/**
 * VSAI Video Studio App Styles
 * Ventus Scenes AI by Ventus Media
 */

body.vsai-app {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
}

/* Navigation */
.app-nav {
    height: 56px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    flex-shrink: 0;
}

.nav-left, .nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-center { display: flex; gap: 0.5rem; }

.site-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.site-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #8b5cf6 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
}
.site-logo .logo-text { font-size: 1.1rem; font-weight: 700; color: #fafafa; }
.site-logo .logo-text .highlight {
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-tab:hover { color: var(--text-secondary); background: var(--bg-card); }
.nav-tab.active { color: var(--text-primary); background: var(--bg-card); }

.project-name {
    padding: 0.4rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.project-name input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 150px;
    outline: none;
}

.credits-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.user-menu {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}
.user-menu:hover { border-color: var(--accent-primary); }

.user-menu-dropdown {
    position: fixed;
    top: 60px;
    right: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
}
.user-menu-dropdown.show { display: block; }
.user-menu-header { padding: 1rem; border-bottom: 1px solid var(--border); }
.user-menu-header .user-name { display: block; font-weight: 600; font-size: 0.9rem; }
.user-menu-header .user-email { display: block; font-size: 0.8rem; color: var(--text-muted); }
.user-menu-items { padding: 0.5rem; }
.user-menu-items a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.user-menu-items a:hover { background: var(--bg-secondary); color: var(--text-primary); }
.user-menu-items a.logout { color: var(--accent-red); }
.user-menu-divider { height: 1px; background: var(--border); margin: 0.5rem 0; }

/* Main Layout */
.app-main { flex: 1; display: flex; overflow: hidden; }

/* Sidebars */
.sidebar-left {
    width: 320px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sidebar-right {
    width: 280px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    flex-shrink: 0;
    overflow-y: auto;
}

.sidebar-header, .properties-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-header h2, .properties-header h3 { font-size: 0.9rem; font-weight: 600; }

.sidebar-content, .properties-content { flex: 1; overflow-y: auto; padding: 1rem; }

.form-section { margin-bottom: 1.5rem; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

/* Image Upload */
.image-upload {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    background: var(--bg-card);
    transition: all 0.2s;
}
.image-upload:hover { border-color: var(--accent-primary); }
.image-upload.has-image { padding: 0; border-style: solid; }
.image-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--text-muted); }
.upload-placeholder svg { width: 32px; height: 32px; opacity: 0.5; }
.upload-placeholder span { font-size: 0.8rem; }
.image-preview { display: none; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.image-upload.has-image .upload-placeholder { display: none; }
.image-upload.has-image .image-preview { display: block; }

/* Toggle */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; }
.toggle-label { font-size: 0.85rem; color: var(--text-secondary); }
.toggle { position: relative; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 11px;
    transition: all 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent-primary); border-color: var(--accent-primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: white; }

/* Generate Section */
.generate-section {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}
.btn-generate { width: 100%; padding: 0.875rem; font-size: 0.95rem; }
.cost-estimate { text-align: center; margin-top: 0.5rem; font-size: 0.75rem; color: var(--text-muted); }

/* Preview Area */
.preview-area { flex: 1; display: flex; flex-direction: column; background: var(--bg-primary); min-width: 0; }
.video-preview { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.video-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.video-container video { width: 100%; height: 100%; object-fit: contain; }
.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
}
.video-placeholder svg { width: 64px; height: 64px; opacity: 0.3; }

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.video-container:hover .video-controls { opacity: 1; }
.control-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.control-btn:hover { background: rgba(255,255,255,0.2); }
.control-btn svg { width: 20px; height: 20px; }
.time-display { font-size: 0.85rem; color: white; }
.progress-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; cursor: pointer; }
.progress-fill { height: 100%; background: var(--accent-primary); border-radius: 2px; width: 0; }

/* Generation Status */
.generation-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: none;
}
.generation-status.active { display: block; }
.generation-text { font-size: 0.9rem; color: var(--text-secondary); margin-top: 1rem; }
.generation-time { font-size: 0.8rem; color: var(--text-muted); }

/* Timeline */
.timeline-area {
    height: 180px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.timeline-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}
.timeline-tools { display: flex; gap: 0.25rem; }
.tool-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tool-btn:hover { background: var(--bg-card); color: var(--text-secondary); }
.tool-btn.active { background: var(--accent-primary); color: white; }
.tool-btn svg { width: 16px; height: 16px; }
.zoom-slider { width: 100px; }

.timeline-tracks { flex: 1; display: flex; overflow: hidden; }
.track-labels { width: 100px; flex-shrink: 0; border-right: 1px solid var(--border); background: var(--bg-tertiary); }
.track-label {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}
.track-icon { font-size: 0.65rem; }
.track-content { flex: 1; overflow-x: auto; position: relative; }
.timeline-ruler { height: 24px; background: var(--bg-tertiary); border-bottom: 1px solid var(--border); }
.track-rows { position: relative; }
.track-row { height: 40px; border-bottom: 1px solid var(--border); position: relative; }

.clip {
    position: absolute;
    height: 32px;
    top: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.7rem;
    color: white;
    cursor: pointer;
}
.clip.video { background: var(--track-video); }
.clip.audio { background: var(--track-audio); }
.clip.selected { box-shadow: 0 0 0 2px white; }

.playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-red);
    z-index: 10;
    left: 0;
}
.playhead::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -5px;
    width: 12px;
    height: 12px;
    background: var(--accent-red);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* Library */
.library-section { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.library-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.library-header h4 { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.library-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.library-item {
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
}
.library-item:hover { border-color: var(--accent-primary); }
.library-item video { width: 100%; height: 100%; object-fit: cover; }
.library-empty { grid-column: 1/-1; text-align: center; padding: 1rem; color: var(--text-muted); font-size: 0.8rem; }

/* Toast */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

/* Responsive */
@media (max-width: 1200px) { .sidebar-right { display: none; } }
@media (max-width: 900px) {
    .sidebar-left { width: 280px; }
    .timeline-area { height: 140px; }
}
@media (max-width: 700px) {
    .app-main { flex-direction: column; }
    .sidebar-left { width: 100%; max-height: 50vh; border-right: none; border-bottom: 1px solid var(--border); }
    .timeline-area { display: none; }
}

/* ========== Library View ========== */
.view-library, .view-export {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.library-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow: hidden;
}

.library-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.library-header-bar h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.library-filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.library-filters .form-select {
    width: auto;
    min-width: 140px;
}

.library-grid-view {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.library-video-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.library-video-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 200, 255, 0.15);
}

.library-video-thumb {
    aspect-ratio: 16/9;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.library-video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.library-video-thumb .thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.library-video-thumb .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.2s;
}

.library-video-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay svg {
    width: 48px;
    height: 48px;
    fill: white;
}

.library-video-info {
    padding: 1rem;
}

.library-video-info h4 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.library-video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.library-video-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.library-video-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.library-video-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.75rem;
}

.library-loading, .library-empty-full {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.library-empty-full svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ========== Export View ========== */
.export-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow: hidden;
}

.export-header-bar {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.export-header-bar h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.export-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    flex: 1;
    overflow: hidden;
}

.export-preview {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-preview-box {
    text-align: center;
    color: var(--text-muted);
}

.export-preview-box video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.export-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.export-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 1.25rem;
}

.export-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.export-timeline-list {
    max-height: 200px;
    overflow-y: auto;
}

.export-timeline-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.export-timeline-item img {
    width: 60px;
    height: 34px;
    object-fit: cover;
    border-radius: 4px;
}

.export-timeline-item-info {
    flex: 1;
}

.export-timeline-item-info h5 {
    font-size: 0.8rem;
    font-weight: 500;
}

.export-timeline-item-info span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.completed { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-badge.pending { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.status-badge.failed { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

@media (max-width: 900px) {
    .export-content {
        grid-template-columns: 1fr;
    }
}

/* ========== Timeline Clips ========== */
.timeline-clip {
    position: absolute;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-primary), #0891b2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    cursor: grab;
    user-select: none;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.timeline-clip:hover {
    border-color: rgba(255,255,255,0.3);
}

.timeline-clip.selected {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

.timeline-clip:active {
    cursor: grabbing;
}

.timeline-clip.dragging {
    opacity: 0.7;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 200, 255, 0.4);
}

.timeline-clip .clip-content {
    flex: 1;
    padding: 0 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}

.timeline-clip .clip-label {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-clip .clip-duration {
    font-size: 0.65rem;
    opacity: 0.8;
}

.timeline-clip .clip-handle {
    width: 6px;
    height: 100%;
    background: rgba(255,255,255,0.2);
    cursor: ew-resize;
    flex-shrink: 0;
}

.timeline-clip .clip-handle.left {
    border-radius: 6px 0 0 6px;
}

.timeline-clip .clip-handle.right {
    border-radius: 0 6px 6px 0;
}

.timeline-clip .clip-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    background: var(--accent-red);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-clip:hover .clip-remove {
    opacity: 1;
}

/* Ruler marks */
.ruler-mark {
    position: absolute;
    font-size: 9px;
    color: var(--text-muted);
    padding-left: 4px;
    border-left: 1px solid var(--border);
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2px;
}

/* Track rows */
.track-row {
    position: relative;
    min-height: 44px;
    padding: 4px 0;
}

/* ========== Library Item Overlay ========== */
.library-item {
    position: relative;
}

.library-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 2rem 0.5rem 0.5rem;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.library-item:hover .library-item-overlay {
    opacity: 1;
}

.library-item-overlay .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

/* ========== Library Video Actions ========== */
.library-video-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.75rem;
}

.library-video-actions .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    min-width: 32px;
}

/* ========== Export Summary ========== */
.export-summary {
    background: var(--bg-elevated);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

/* ========== Continuation Mode Indicator ========== */
.continuation-status {
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

.continuation-indicator {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.continuation-indicator .segment-number {
    font-weight: 700;
    font-size: 1.1rem;
}

/* ========== Toast variants ========== */
.toast.info { border-left: 3px solid var(--accent-primary); }
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.warning { border-left: 3px solid #f59e0b; }
.toast.error { border-left: 3px solid var(--accent-red); }

/* ========== Small button variant ========== */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* ========== Playhead ========== */
#playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-red);
    z-index: 10;
    pointer-events: none;
}

#playhead::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 12px;
    height: 12px;
    background: var(--accent-red);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* ========== Project Selector ========== */
.project-selector {
    position: relative;
}

.project-name-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.project-name-btn:hover {
    border-color: var(--accent-primary);
}

.project-name-btn input {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    width: 160px;
    cursor: pointer;
    pointer-events: none;
}

.project-name-btn.editing input {
    pointer-events: auto;
    cursor: text;
}

.project-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    z-index: 1000;
    display: none;
}

.project-dropdown.show {
    display: block;
}

.project-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.85rem;
}

.project-list {
    max-height: 250px;
    overflow-y: auto;
}

.project-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.project-list-item:hover {
    background: var(--bg-elevated);
}

.project-list-item.active {
    background: rgba(6, 182, 212, 0.1);
    border-left: 3px solid var(--accent-primary);
}

.project-list-item-thumb {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    background: var(--bg-elevated);
    object-fit: cover;
}

.project-list-item-info {
    flex: 1;
    min-width: 0;
}

.project-list-item-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-list-item-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.project-list-item-delete {
    opacity: 0;
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    padding: 0.25rem;
    transition: opacity 0.2s;
}

.project-list-item:hover .project-list-item-delete {
    opacity: 1;
}

.project-list-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.project-dropdown-actions {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border);
}

.project-dropdown-actions .btn {
    flex: 1;
    font-size: 0.75rem;
}

.project-list-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}
