* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.5rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    height: 100vh;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}


.main-content {
    flex: 1;
    display: flex;
    background: hsl(var(--background));
    overflow: hidden;
    min-height: 0;
}

.four-column-layout {
    display: grid;
    grid-template-columns: 10% 10% 40% 40%;
    width: 100%;
    height: 100%;
    gap: 0;
}

.column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    min-height: 0;
}

.column:last-child {
    border-right: none;
    background: #2d3748;
}

.column:last-child .column-header {
    background: #2d3748;
    color: #e2e8f0;
    border-bottom-color: #4a5568;
}

.column:last-child .column-title {
    color: #e2e8f0;
}

.column:last-child .action-bar {
    background: #2d3748;
    border-top-color: #4a5568;
}

.column-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 3.5rem;
    flex-shrink: 0;
}

.header-toggle {
    margin-left: auto;
}

.column-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.column-content {
    flex: 1;
    overflow: auto;
    padding: 1.5rem;
    min-height: 0;
}

/* Options Column */
.options-scrollable {
    height: 100%;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.options-section {
    margin-bottom: 1.5rem;
}

.options-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: calc(var(--radius) - 2px);
    transition: background-color 0.2s;
    cursor: pointer;
}

.option-item:hover {
    background: hsl(var(--accent));
}

.option-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: hsl(var(--primary));
    cursor: pointer;
}

.option-item label {
    font-size: 0.8rem;
    font-weight: 400;
    color: hsl(var(--foreground));
    cursor: pointer;
    flex: 1;
    line-height: 1.4;
}

/* Find and Replace */
.find-replace-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.input-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.input-field {
    padding: 0.25rem 0.5rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.8rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: border-color 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.input-field::placeholder {
    color: hsl(var(--muted-foreground));
}

.find-replace-options {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.find-replace-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: calc(var(--radius) - 2px);
}

/* Editor Column */
.editor-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.editor-toggle {
    display: inline-flex;
    background: hsl(var(--muted));
    border-radius: calc(var(--radius) - 2px);
    padding: 0.25rem;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.toggle-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    transition: all 0.2s;
}

.toggle-btn.active {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.header-toggle .toggle-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    height: auto;
    min-height: 1.75rem;
}

.header-toggle .toggle-btn .icon {
    width: 0.75rem;
    height: 0.75rem;
}

.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wysiwyg-editor {
    flex: 1;
    border: none;
    background: hsl(var(--background));
    transition: all 0.2s;
    min-height: 0;
}

.ql-toolbar {
    border: none;
    background: transparent;
}

.ql-container {
    border: none;
    height: calc(100% - 42px);
    font-family: 'Inter', sans-serif;
}

.ql-editor {
    font-size: 0.875rem;
    line-height: 1.6;
}

.textarea {
    width: 100%;
    flex: 1;
    border: none;
    padding: 0.75rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: none;
    background: hsl(var(--background));
    transition: all 0.2s;
    min-height: 0;
}

.textarea:focus {
    outline: none;
}

.source-view {
    display: none;
}

/* Code Output Column */
.code-editor {
    flex: 1;
    border: none;
    overflow: hidden;
    background: #2d3748;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    min-height: 0;
    position: relative;
}

.code-editor pre {
    margin: 0;
    padding: 0.75rem 0.75rem 0.75rem 3rem;
    overflow: auto;
    height: 100%;
    font-size: 0.875rem;
    line-height: 1.5;
    background: transparent;
    min-height: 0;
    position: relative;
}

.code-editor {
    position: relative;
    height: 100%;
    display: flex;
}

.code-textarea {
    position: absolute;
    top: 0;
    left: 3rem;
    right: 0;
    bottom: 0;
    padding: 0.75rem;
    margin: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #e5e7eb;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    z-index: 2;
    overflow: auto;
}

.line-numbers {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3rem;
    background: transparent;
    border-right: 1px solid #4a5568;
    padding: 0.75rem 0.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #718096;
    text-align: right;
    user-select: none;
    overflow: hidden;
}

.line-numbers .line-number {
    display: block;
    min-height: 1.3125rem;
}

.code-editor code {
    font-family: inherit;
    color: #e2e8f0;
    background: transparent;
}

/* Override Prism theme for better integration */
.code-editor .token.tag {
    color: #f56565;
}

.code-editor .token.attr-name {
    color: #68d391;
}

.code-editor .token.attr-value {
    color: #fbd38d;
}

.code-editor .token.punctuation {
    color: #cbd5e0;
}

.code-editor .token.string {
    color: #9ae6b4;
}

.code-editor .token.comment {
    color: #718096;
    font-style: italic;
}

/* Enhanced Syntax highlighting for overlay */
.syntax-overlay .token.tag {
    color: #f56565 !important;
    font-weight: 500;
}

.syntax-overlay .token.attr-name {
    color: #68d391 !important;
    font-weight: 500;
}

.syntax-overlay .token.attr-value {
    color: #fbd38d !important;
}

.syntax-overlay .token.string {
    color: #9ae6b4 !important;
}

.syntax-overlay .token.punctuation {
    color: #cbd5e0 !important;
}

.syntax-overlay .token.comment {
    color: #718096 !important;
    font-style: italic;
}

.syntax-overlay .token.prolog,
.syntax-overlay .token.doctype,
.syntax-overlay .token.cdata {
    color: #718096 !important;
    font-style: italic;
}

.syntax-overlay .token.entity {
    color: #63b3ed !important;
}

.syntax-overlay .token.number {
    color: #fc8181 !important;
}

.syntax-overlay .token.boolean {
    color: #f687b3 !important;
}

/* HTML specific tokens */
.syntax-overlay .token.tag .token.tag {
    color: #f56565 !important;
}

.syntax-overlay .token.tag .token.punctuation {
    color: #e2e8f0 !important;
}

.syntax-overlay .token.namespace {
    color: #d53f8c !important;
}

/* Action Bar */
.action-bar {
    padding: 1rem 1.5rem;
    border-top: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.1);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.button-container {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    outline: none;
}

.btn:focus {
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.5);
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: 1px solid hsl(var(--primary));
}

.btn-primary:hover {
    background: hsl(var(--primary) / 0.9);
}

.btn-outline {
    background: transparent;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
}

.btn-outline:hover {
    background: hsl(var(--accent));
}

.btn-ghost {
    background: transparent;
    color: hsl(var(--muted-foreground));
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: hsl(var(--accent));
    color: hsl(var(--foreground));
}

.btn-white {
    background: white;
    color: #374151;
    border: 1px solid hsl(var(--border));
}

.btn-white:hover {
    background: #f9fafb;
    color: #374151;
}

.btn-sm.btn-secondary {
    background: transparent;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
    font-size: 0.75rem;
}

.btn-sm.btn-secondary:hover {
    background: hsl(var(--accent));
}


/* Stats */
.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    background: hsl(var(--muted));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

.column:last-child .stats {
    background: #1a202c;
    color: #a0aec0;
    border-radius: calc(var(--radius) - 2px);
}

/* Icons */
.icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
}

/* Dark theme icons for last column */
.column:last-child .icon {
    color: #e2e8f0;
}


/* Responsive */
/* Clean ShadCN-style Sidebar */
.chatgpt-sidebar {
    background: hsl(var(--background));
    border-right: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
}

.chatgpt-sidebar::-webkit-scrollbar {
    width: 4px;
}

.chatgpt-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.chatgpt-sidebar::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.3);
    border-radius: 2px;
}

.chatgpt-sidebar::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.5);
}

/* Simple new session button */
.new-chat-section {
    padding: 12px;
    border-bottom: 1px solid hsl(var(--border));
}

.new-chat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: hsl(var(--primary));
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: hsl(var(--primary-foreground));
    transition: background-color 0.2s;
}

.new-chat-btn:hover {
    background: hsl(var(--primary) / 0.9);
}

.new-chat-btn .icon {
    width: 16px;
    height: 16px;
}

/* Clean search section */
.search-section {
    padding: 12px;
    border-bottom: 1px solid hsl(var(--border));
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: hsl(var(--muted-foreground));
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: 14px;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.search-input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Clean sessions section */
.sessions-section {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
    border-bottom: 1px solid hsl(var(--border));
}

.section-title {
    flex: 1;
}

.sessions-icon {
    width: 14px;
    height: 14px;
    color: hsl(var(--muted-foreground));
}

.add-project-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
}

.section-header:hover .add-project-btn {
    opacity: 1;
}

.add-project-btn:hover {
    background: hsl(var(--muted));
}

.plus-icon {
    width: 12px;
    height: 12px;
    color: hsl(var(--muted-foreground));
}

/* Simple sessions list */
.unified-sessions-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}

.unified-sessions-list::-webkit-scrollbar {
    width: 4px;
}

.unified-sessions-list::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.2);
    border-radius: 2px;
}

.project-item, .session-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 1px 0;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background-color 0.2s;
    min-height: 40px;
}

.project-item:hover, .session-item:hover {
    background: hsl(var(--muted) / 0.5);
}

.project-item.active, .session-item.active {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.project-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.chevron-icon {
    width: 14px;
    height: 14px;
    color: hsl(var(--muted-foreground));
    transition: transform 0.2s;
    flex-shrink: 0;
}

.chevron-icon.expanded {
    transform: rotate(90deg);
}

.project-sessions {
    margin-left: 24px;
    border-left: 1px solid hsl(var(--border));
    transition: all 0.2s;
}

.project-icon {
    width: 16px;
    height: 16px;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}

.project-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.project-count {
    font-size: 11px;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--muted));
    padding: 2px 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

.session-item {
    font-size: 14px;
    color: hsl(var(--foreground));
}

.session-item.session-in-folder {
    padding-left: 28px;
    border-left: 1px solid hsl(var(--border));
    margin-left: 12px;
}

.session-main {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.session-icon {
    width: 14px;
    height: 14px;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
    margin-right: 8px;
}

.session-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.session-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.session-item:hover .session-menu-btn {
    opacity: 1;
}

.session-menu-btn:hover {
    background: hsl(var(--muted));
}

.session-menu-btn .material-icons {
    font-size: 16px;
    color: hsl(var(--muted-foreground));
}

.session-title {
    font-weight: 400;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.session-date {
    font-size: 11px;
    color: hsl(var(--muted-foreground));
    margin-top: 2px;
}

/* Simple bottom actions */
.sidebar-actions {
    padding: 12px;
    border-top: 1px solid hsl(var(--border));
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.action-btn:hover {
    background: hsl(var(--muted) / 0.5);
    border-color: hsl(var(--border));
}

.action-btn .icon {
    width: 16px;
    height: 16px;
    color: hsl(var(--muted-foreground));
}

/* Simple search highlighting */
mark {
    background: hsl(var(--primary) / 0.2);
    color: hsl(var(--foreground));
    padding: 1px 2px;
    border-radius: 2px;
}

.search-highlight {
    background: hsl(var(--primary) / 0.2);
    border-radius: 2px;
    padding: 1px 2px;
}

/* Simple empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    text-align: center;
    color: hsl(var(--muted-foreground));
}

.empty-icon {
    width: 40px;
    height: 40px;
    color: hsl(var(--muted-foreground) / 0.5);
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: hsl(var(--foreground));
}

.empty-state small {
    font-size: 12px;
    color: hsl(var(--muted-foreground));
}

.header-actions {
    display: flex;
    gap: 0.25rem;
}

.folder-item {
    margin-bottom: 0.5rem;
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.folder-header:hover {
    background: hsl(var(--muted) / 0.5);
}

.folder-toggle-icon {
    width: 0.75rem;
    height: 0.75rem;
    color: hsl(var(--muted-foreground));
    transition: transform 0.2s;
    cursor: pointer;
}

.folder-toggle-icon.expanded {
    transform: rotate(90deg);
}

.folder-icon {
    width: 0.875rem;
    height: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.session-count {
    font-size: 0.7rem;
    color: hsl(var(--muted-foreground));
    margin-left: 0.25rem;
}

.folder-name {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.folder-delete {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    font-size: 1rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.folder-header:hover .folder-delete {
    opacity: 1;
}

.folder-delete:hover {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
}

.folder-sessions {
    margin-left: 1.5rem;
}

.session-in-folder {
    margin-left: 0.5rem;
    border-left: 1px solid hsl(var(--border));
    padding-left: 0.5rem;
}

.session-in-folder.active {
    border-left-color: hsl(var(--primary));
}

/* ChatGPT-Style Drag and Drop */
.session-item[draggable="true"] {
    cursor: grab;
    transition: all 0.2s ease;
}

.session-item[draggable="true"]:active {
    cursor: grabbing;
}

.session-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(0.95);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-item.drop-target {
    background: #f0f8ff;
    border: 1px dashed #4a90e2;
    border-radius: 8px;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.project-item.drag-over {
    background: #e6f3ff;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.project-item .project-header {
    position: relative;
}

.project-item.drop-target .project-header::after {
    content: "Drop here to move session";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 144, 226, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #2c5aa0;
    border-radius: 6px;
    backdrop-filter: blur(2px);
}

@keyframes dragPulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(74, 144, 226, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
}

.project-item.drag-over {
    animation: dragPulse 1.5s infinite;
}

/* Hide session actions while dragging */
.session-item.dragging .session-actions {
    opacity: 0;
}

/* Project actions positioning */
.project-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-item:hover .project-actions {
    opacity: 1;
}

.action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f0f0f0;
    color: #e74c3c;
}

.action-btn svg {
    width: 12px;
    height: 12px;
}

/* Folder visibility improvements */
.folder-item {
    border: 1px solid transparent;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.folder-header:hover {
    background: hsl(var(--primary) / 0.05);
}

/* Empty state message */
.history-list:empty::after {
    content: "No folders or sessions yet. Create a new session or folder to get started.";
    display: block;
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-size: 0.8rem;
    padding: 2rem 1rem;
    font-style: italic;
}

/* Session menu button */
.session-menu-btn {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 0.2rem;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s;
    margin-left: auto;
}

.history-item:hover .session-menu-btn {
    opacity: 1;
}

.session-menu-btn:hover {
    background: hsl(var(--muted) / 0.3);
}

/* Context Menu */
.context-menu {
    position: absolute;
    background: hsl(var(--popover));
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    z-index: 1000;
    min-width: 150px;
}

.context-menu-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
    border-bottom: 1px solid hsl(var(--border));
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background: hsl(var(--muted) / 0.5);
}

.context-menu-item.danger {
    color: hsl(var(--destructive));
}

.context-menu-item.danger:hover {
    background: hsl(var(--destructive) / 0.1);
}

/* Improve history item meta layout */
.history-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.history-header {
.history-header {
    padding: 0.75rem 0.75rem 0.5rem;
    background: hsl(var(--muted) / 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.5rem;
}

.new-session-btn {
.new-session-btn {
    padding: 0.35rem 0.65rem;
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.75rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.new-session-btn:hover {
    background: hsl(var(--primary) / 0.9);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 0.5rem 0.75rem;
}

.history-item {
    padding: 0.5rem 0.5rem;
    margin-bottom: 0.125rem;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid transparent;
}

.history-item:hover {
    background: hsl(var(--accent));
}

.history-item.active {
    background: hsl(var(--primary) / 0.1);
    border-color: hsl(var(--primary) / 0.3);
}
.history-item.active { background: hsl(var(--primary) / 0.08); border-color: hsl(var(--primary) / 0.25); }
.history-item-title {
    font-size: 0.75rem;
    font-size: 0.8rem;
    color: hsl(var(--foreground));
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.history-item-meta {
    font-size: 0.625rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.7rem;
    justify-content: space-between;
    align-items: center;
}

.history-actions {
.history-actions {
    padding: 0.5rem 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.undo-btn {
.undo-btn {
    padding: 0.35rem;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    display: flex;
    align-items: center;
    color: hsl(var(--muted-foreground));
    transition: all 0.2s;
}

.undo-btn:hover {
    background: hsl(var(--accent));
    color: hsl(var(--foreground));
}

.undo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 1024px) {
    .four-column-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    
    .column {
        border-right: none;
        border-bottom: 1px solid hsl(var(--border));
        min-height: 300px;
    }
    
    .column:last-child {
        border-bottom: none;
    }
}
