:root {
    --bg-primary: #0D0D0F;
    --bg-secondary: #16161A;
    --bg-tertiary: #1E1E24;
    --bg-hover: #25252D;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --text-primary: #F5F5F7;
    --text-secondary: #8E8EA0;
    --text-muted: #5C5C6D;
    --accent-purple: #7C5CFF;
    --accent-purple-hover: #8F73FF;
    --accent-cyan: #00D4AA;
    --accent-blue: #5B8DEF;
    --accent-yellow: #F5C542;
    --accent-yellow-hover: #F7D163;
    --accent-sky: #38BDF8;
    --accent-red: #FF6B6B;
    --accent-green: #4CD964;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-subtle);
    --transition-fast: 150ms cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}


/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    min-width: 1000px;
    padding: 12px;
    gap: 12px;
}

/* Panel Base */
.panel {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width var(--transition-slow), transform var(--transition-slow);
}

/* Left Sidebar */
.sidebar {
    width: 260px;
    flex-shrink: 0;
}
.sidebar.collapsed {
    width: 0;
    border: none;
    padding: 0;
    overflow: hidden;
}
.sidebar-header {
    padding: 16px 16px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.sidebar-header .logo {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}
.sidebar-header .logo span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-header .logo .sparkle-icon {
    color: var(--accent-purple);
}
.sidebar-toggle {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    transition: all 200ms ease-out;
    flex-shrink: 0;
}
.search-box.show {
    width: 140px;
    padding: 6px 10px;
    opacity: 1;
}
.sidebar-toggle.hidden {
    display: none;
}
.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    padding: 0;
    min-width: 0;
}
.search-box input::placeholder {
    color: var(--text-muted);
}
.search-close {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all var(--transition-fast);
}
.search-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Type Tabs */
.type-tabs {
    display: flex;
    gap: 4px;
    padding: 0 16px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.type-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: var(--radius-sm);
    position: relative;
    transition: all var(--transition-fast);
}
.type-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}
.type-tab.active {
    color: var(--text-primary);
}
.type-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
}

/* Inspiration List */
.inspiration-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 12px;
}
.inspiration-list::-webkit-scrollbar { width: 4px; }
.inspiration-list::-webkit-scrollbar-track { background: transparent; }
.inspiration-list::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.inspiration-list:hover::-webkit-scrollbar-thumb { background: var(--bg-tertiary); }

/* Inspiration Card */
.inspiration-card {
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.inspiration-card:hover {
    border-color: rgba(124, 92, 255, 0.35);
    background: rgba(124, 92, 255, 0.06);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.12), 0 4px 16px rgba(124, 92, 255, 0.06);
}
.inspiration-card.expanded {
    border-color: rgba(124, 92, 255, 0.25);
}

/* Card Works Area */
.card-works {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    display: none;
}
.inspiration-card.expanded .card-works {
    display: block;
    animation: worksSlideIn 200ms ease-out;
}
@keyframes worksSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.card-works-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.card-works-files {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.card-works-files::-webkit-scrollbar {
    display: none;
}
.card-works-files > *:last-child {
    margin-right: 4px;
}

/* Mini Audio Card inside Inspiration */
.mini-audio-card {
    position: relative;
    overflow: hidden;
    width: 110px;
    min-width: 110px;
    height: 90px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    scroll-snap-align: start;
    display: block;
}
.mini-audio-card:hover {
    border-color: var(--border-medium);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.2), 0 4px 16px rgba(0, 0, 0, 0.3);
}
.mini-audio-card .waveform-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 24px;
    transform: translateY(-50%);
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}
.mini-audio-card .waveform-bg svg {
    width: 100%;
    height: 100%;
}
.mini-audio-card.mode-topline .waveform-bar {
    fill: var(--accent-sky);
}
.mini-audio-card.mode-text-to-music .waveform-bar {
    fill: var(--accent-red);
}
.mini-audio-card.mode-style-transfer .waveform-bar {
    fill: var(--accent-green);
}
.mini-audio-card:hover .waveform-bar {
    opacity: 0.8;
}
.mini-audio-card .mini-mode-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 100px;
    z-index: 2;
    white-space: nowrap;
}
.mini-audio-card .mini-mode-tag.mode-topline {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-sky);
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.mini-audio-card .mini-mode-tag.mode-text-to-music {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(255, 107, 107, 0.3);
}
.mini-audio-card .mini-mode-tag.mode-style-transfer {
    background: rgba(76, 217, 100, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(76, 217, 100, 0.3);
}
.mini-audio-card .mini-filename {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    z-index: 2;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    padding: 0 6px;
}
.card-works-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 0;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}
.card-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    background: transparent;
    color: var(--text-secondary);
    border: none;
}
.inspiration-card .card-icon-wrap {
    color: var(--text-muted);
}
.created-card.audio-card .card-icon-wrap {
    color: var(--accent-yellow);
}
.created-card.text-card .card-icon-wrap {
    color: var(--accent-green);
}

.card-body {
    flex: 1;
    min-width: 0;
}
.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-title-input {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-purple);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    outline: none;
    width: 100%;
    font-family: inherit;
    margin-bottom: 4px;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}
.card-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}
.used-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.card-expand-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    margin-left: auto;
    border-radius: var(--radius-sm);
}
.card-expand-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.btn-create {
    flex: 1;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.btn-create:hover {
    color: white;
}
.btn-create-secondary {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.btn-create-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}
.empty-state-icon {
    margin-bottom: 12px;
    opacity: 0.5;
}
.empty-state-text {
    font-size: 13px;
    line-height: 1.6;
}

/* Center: Chat Area */
.chat-panel {
    flex: 1;
    min-width: 0;
}
.chat-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.chat-header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}
.chat-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-header-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border-radius: 100px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: 8px;
}
.chat-header-link:hover {
    border-color: var(--border-medium);
    color: var(--text-primary);
    background: var(--bg-tertiary);
}
.memory-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(124, 92, 255, 0.1);
    color: var(--accent-purple);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-left: 4px;
}
.memory-btn:hover {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
    transform: scale(1.08);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 320px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transform: scale(0.95);
    transition: transform var(--transition-base);
}
.modal-overlay.show .modal-content {
    transform: scale(1);
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.modal-qr {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    background: white;
    border-radius: var(--radius-sm);
    padding: 12px;
}
.modal-qr canvas {
    width: 100%;
    height: 100%;
}
.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.modal-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.memory-modal-content {
    width: 520px;
    max-height: 76vh;
    padding: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.memory-modal-content .modal-title {
    padding: 24px 28px 0;
    font-size: 17px;
    font-weight: 600;
}
.memory-modal-content .modal-close {
    top: 18px;
    right: 18px;
}
.memory-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 28px 28px;
}
.memory-body::-webkit-scrollbar { width: 4px; }
.memory-body::-webkit-scrollbar-track { background: transparent; }
.memory-body::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }
.memory-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}
.memory-section {
    margin-bottom: 20px;
}
.memory-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
}
.memory-line {
    margin: 5px 0;
    padding-left: 12px;
    position: relative;
}
.memory-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-medium);
}
.memory-note {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}
.chat-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}
.chat-header-title {
    font-size: 18px;
    font-weight: 600;
}
.chat-header-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}
.chat-header-actions {
    display: flex;
    gap: 8px;
}
.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

/* Messages Area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.messages-area::-webkit-scrollbar { width: 6px; }
.messages-area::-webkit-scrollbar-track { background: transparent; }
.messages-area::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 4px; }

.message-group {
    display: flex;
    gap: 10px;
    animation: messageSlideIn 300ms ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}
@keyframes messageSlideIn {
    to { opacity: 1; transform: translateY(0); }
}
.message-group.user {
    flex-direction: row-reverse;
}
.message-avatar {
    display: none;
}
.message-bubble {
    max-width: 90%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: pre-line;
}
.message-bubble.ai {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-subtle);
}
.message-bubble.user {
    background: var(--accent-purple);
    color: white;
    border-bottom-right-radius: 4px;
}
.msg-mode-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 100px;
    margin-right: 6px;
    vertical-align: middle;
    line-height: 1.4;
}
.message-attachments {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.message-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

/* Generating Indicator */
.generating-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--accent-purple);
}
.generating-dots {
    display: flex;
    gap: 4px;
}
.generating-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-purple);
    animation: dotBounce 1.4s ease-in-out infinite;
}
.generating-dots span:nth-child(2) { animation-delay: 0.2s; }
.generating-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-hover);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Chat Input */
.chat-input-area {
    padding: 12px 20px 16px;
    flex-shrink: 0;
}
.mode-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.mode-btn {
    height: 28px;
    padding: 0 12px;
    border-radius: 100px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.mode-btn:hover {
    border-color: var(--border-medium);
    color: var(--text-primary);
}
.mode-btn.active {
    color: white;
}
.mode-btn[data-mode="topline"].active {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-sky);
    border-color: rgba(56, 189, 248, 0.3);
}
.mode-btn[data-mode="style-transfer"].active {
    background: rgba(76, 217, 100, 0.2);
    color: var(--accent-green);
    border-color: rgba(76, 217, 100, 0.3);
}
.mode-btn[data-mode="text-to-music"].active {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-red);
    border-color: rgba(255, 107, 107, 0.3);
}
.input-attachments {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.input-attachment-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: rgba(124, 92, 255, 0.1);
    border: 1px solid rgba(124, 92, 255, 0.2);
    color: var(--accent-purple);
    font-size: 12px;
    font-weight: 500;
    cursor: default;
    animation: tagPopIn 200ms ease-out;
}
@keyframes tagPopIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.input-attachment-tag .remove-tag {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--accent-purple);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 2px;
    transition: all var(--transition-fast);
}
.input-attachment-tag .remove-tag:hover {
    background: rgba(124, 92, 255, 0.2);
}
.input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 12px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.06), inset 0 1px 2px rgba(0,0,0,0.2);
}
.input-wrapper:focus-within {
    border-color: rgba(124, 92, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1), 0 0 12px rgba(124, 92, 255, 0.08);
}
.input-actions-left {
    display: flex;
    gap: 4px;
    align-items: center;
}
.input-action-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.input-action-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    resize: none;
    max-height: 120px;
    min-height: 20px;
    padding: 0;
}
.chat-input::placeholder {
    color: var(--text-muted);
}
.send-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--accent-purple);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}
.send-btn:hover {
    background: var(--accent-purple-hover);
    transform: scale(1.05);
}
.send-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
    transform: none;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}
.input-status {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    padding-left: 4px;
    height: 18px;
}

/* Center: Works Panel */
.works-panel {
    flex: 0 0 0px;
    width: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    border: none;
    transition: all var(--transition-slow);
}
.works-panel.open {
    flex: 0 0 280px;
    width: 280px;
    opacity: 1;
    padding: 0;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}
.works-header {
    padding: 16px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.works-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 8px;
    cursor: pointer;
    color: var(--text-primary);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}
.works-title:hover {
    color: var(--accent-purple);
}
.works-title-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 14px;
    width: 14px;
}
.works-title-icon.type-audio {
    color: var(--accent-yellow);
}
.works-title-icon.type-text {
    color: var(--accent-green);
}
.works-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}
.works-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}
.works-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}
.works-content::-webkit-scrollbar { width: 4px; }
.works-content::-webkit-scrollbar-track { background: transparent; }
.works-content::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.works-content:hover::-webkit-scrollbar-thumb { background: var(--bg-tertiary); }

.works-content .file-item.audio-card.generating-card {
    width: 100%;
    min-width: 0;
    min-height: 140px;
    margin-bottom: 10px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}
.works-content .file-item.audio-card.generating-card .generating-waveform {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    position: static;
    transform: none;
    top: auto;
    left: auto;
    right: auto;
}
.works-content .file-item.audio-card.generating-card .generating-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-purple);
    margin-top: 8px;
    position: static;
    bottom: auto;
    left: auto;
    right: auto;
    text-align: center;
}

.works-file-item {
    position: relative;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 10px;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.works-file-item:hover {
    border-color: rgba(124, 92, 255, 0.35);
    background: rgba(124, 92, 255, 0.06);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.12), 0 4px 16px rgba(124, 92, 255, 0.06);
}
.works-file-item.playing {
    border-color: rgba(124, 92, 255, 0.4);
    background: rgba(124, 92, 255, 0.08);
}
.works-file-waveform {
    position: absolute;
    top: 50%;
    left: 14px;
    right: 14px;
    transform: translateY(-50%);
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.35;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}
.works-file-item:hover .works-file-waveform {
    opacity: 0.55;
}
.works-file-waveform svg {
    width: 100%;
    height: 100%;
}
.works-file-item .waveform-bar {
    fill: var(--text-muted);
}
.works-file-item.mode-topline .waveform-bar {
    fill: var(--accent-sky);
}
.works-file-item.mode-text-to-music .waveform-bar {
    fill: var(--accent-red);
}
.works-file-item.mode-style-transfer .waveform-bar {
    fill: var(--accent-green);
}
.works-file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.works-file-meta {
    font-size: 11px;
    color: var(--text-muted);
}
.works-mode-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    z-index: 2;
}
.works-mode-tag.mode-topline {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-sky);
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.works-mode-tag.mode-text-to-music {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(255, 107, 107, 0.3);
}
.works-mode-tag.mode-style-transfer {
    background: rgba(76, 217, 100, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(76, 217, 100, 0.3);
}

/* Inspiration list states */
.inspiration-card.active-works {
    border-color: rgba(124, 92, 255, 0.5);
    background: rgba(124, 92, 255, 0.1);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.2), 0 4px 16px rgba(124, 92, 255, 0.08);
}
.card-created-indicator {
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

/* Right: Workspace */
.workspace-panel {
    flex: 0 0 280px;
    min-width: 0;
}
.workspace-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.workspace-title {
    font-size: 18px;
    font-weight: 600;
}
.workspace-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}
.workspace-content::-webkit-scrollbar { width: 4px; }
.workspace-content::-webkit-scrollbar-track { background: transparent; }
.workspace-content::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.workspace-content:hover::-webkit-scrollbar-thumb { background: var(--bg-tertiary); }

/* Folder */
.folder {
    margin-bottom: 8px;
    overflow: hidden;
}
.folder-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}
.folder-icon {
    color: var(--accent-blue);
    flex-shrink: 0;
}
.folder-title-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.folder-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.folder-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 100px;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.folder-more-btn {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    margin-left: auto;
}
.folder-more-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.folder-files {
    padding: 16px 0;
    display: none;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.folder-files > *:last-child {
    margin-right: 8px;
}
.folder-files::-webkit-scrollbar {
    display: none;
}
.folder.expanded .folder-files {
    display: flex;
    animation: folderExpand 200ms ease-out;
}
@keyframes folderExpand {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* File Item - Card Style */
.file-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.file-item:hover {
    border-color: var(--border-medium);
}
.file-item.playing {
    border-color: rgba(124, 92, 255, 0.4);
    background: rgba(124, 92, 255, 0.06);
}
.file-item.zip-item {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
}
.file-item.zip-item:hover {
    background: var(--bg-hover);
}

/* Audio Card - Waveform Design */
.file-item.audio-card {
    position: relative;
    overflow: hidden;
    padding: 0;
    width: 150px;
    min-width: 150px;
    min-height: 130px;
    display: block;
    background: var(--bg-tertiary);
    scroll-snap-align: start;
}
.file-item.audio-card:hover {
    border-color: var(--border-medium);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.2), 0 4px 16px rgba(0, 0, 0, 0.3);
}
.file-item.audio-card:hover .file-item-waveform-bg {
    opacity: 0.55;
}
.file-item-waveform-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 32px;
    transform: translateY(-50%);
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}
.file-item-waveform-bg svg {
    width: 100%;
    height: 100%;
}
.file-item.audio-card .waveform-bar {
    fill: var(--text-muted);
}
.file-item.audio-card.mode-topline .waveform-bar {
    fill: var(--accent-sky);
}
.file-item.audio-card.mode-text-to-music .waveform-bar {
    fill: var(--accent-red);
}
.file-item.audio-card.mode-style-transfer .waveform-bar {
    fill: var(--accent-green);
}
.file-item.audio-card:hover .waveform-bar {
    opacity: 0.8;
}

/* Generating Card Animation */
.file-item.audio-card.generating-card {
    border: 1px solid rgba(124, 92, 255, 0.3);
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.08) 0%, rgba(124, 92, 255, 0.02) 100%);
    animation: generatingPulse 2s ease-in-out infinite;
    cursor: default;
}
@keyframes generatingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.15); }
    50% { box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.08); }
}
.generating-waveform {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 40px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 16px;
}
.generating-bar {
    width: 3px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent-purple);
    animation: generatingBar 0.8s ease-in-out infinite alternate;
    opacity: 0.6;
}
@keyframes generatingBar {
    0% { transform: scaleY(1); }
    100% { transform: scaleY(3.5); }
}
.generating-label {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-purple);
    z-index: 2;
}
.file-item-mode-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    z-index: 2;
    white-space: nowrap;
}
.file-item-mode-tag.mode-topline {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-sky);
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.file-item-mode-tag.mode-text-to-music {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(255, 107, 107, 0.3);
}
.file-item-mode-tag.mode-style-transfer {
    background: rgba(76, 217, 100, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(76, 217, 100, 0.3);
}

.file-item-filename {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    z-index: 2;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    padding: 0 8px;
}
.file-item-duration {
    position: absolute;
    bottom: 38px;
    left: 0;
    right: 0;
    z-index: 2;
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    padding: 0 8px;
}
.file-icon {
    color: var(--accent-yellow);
    flex-shrink: 0;
}
.file-icon.zip { color: var(--accent-cyan); }
.file-info {
    flex: 1;
    min-width: 0;
}
.file-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.zip-item:hover .file-actions {
    opacity: 1;
}
.file-action-btn {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.file-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Waveform SVG */
.waveform-svg {
    width: 100%;
    height: 100%;
}
.waveform-bar {
    fill: var(--text-muted);
}

/* Collapsed Sidebar Trigger */
.sidebar-collapsed-trigger {
    position: fixed;
    left: 12px;
    top: 12px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-card);
}
.sidebar-collapsed-trigger:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.sidebar.collapsed ~ .sidebar-collapsed-trigger {
    display: flex;
}

/* Audio Detail Panel */
.detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 9996;
    display: flex;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
    background: rgba(0, 0, 0, 0.4);
}
.detail-overlay.show {
    opacity: 1;
    visibility: visible;
}
.detail-panel {
    width: 420px;
    height: 100%;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 350ms cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}
.detail-overlay.show .detail-panel {
    transform: translateX(0);
}
.detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all var(--transition-fast);
}
.detail-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}
.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 60px 28px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.detail-content::-webkit-scrollbar { width: 4px; }
.detail-content::-webkit-scrollbar-track { background: transparent; }
.detail-content::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.detail-content:hover::-webkit-scrollbar-thumb { background: var(--bg-tertiary); }
.detail-icon-wrap {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-yellow);
    margin-top: 8px;
}
.detail-panel.mode-topline .detail-icon-wrap {
    color: var(--accent-sky);
}
.detail-panel.mode-text-to-music .detail-icon-wrap {
    color: var(--accent-red);
}
.detail-panel.mode-style-transfer .detail-icon-wrap {
    color: var(--accent-green);
}
.detail-mode-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
}
.detail-mode-tag.mode-topline {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-sky);
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.detail-mode-tag.mode-text-to-music {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(255, 107, 107, 0.3);
}
.detail-mode-tag.mode-style-transfer {
    background: rgba(76, 217, 100, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(76, 217, 100, 0.3);
}
.detail-filename {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    word-break: break-word;
    line-height: 1.4;
}
.detail-player {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
}
.detail-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}
.detail-play-btn:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
    transform: scale(1.05);
}
.detail-progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.detail-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-hover);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}
.detail-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 2px;
    transition: width 0.1s linear;
}
.detail-time-label {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.detail-meta-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}
.detail-meta-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.detail-meta-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.detail-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.detail-lyrics {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    flex: 1;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}
.detail-lyrics-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.detail-lyrics-content {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-line;
    overflow-y: auto;
    flex: 1;
}
.detail-lyrics-content::-webkit-scrollbar { width: 4px; }
.detail-lyrics-content::-webkit-scrollbar-track { background: transparent; }
.detail-lyrics-content::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }
.detail-actions {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.detail-btn {
    flex: 1;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-subtle);
}
.detail-btn-primary {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
}
.detail-btn-primary:hover {
    background: var(--accent-purple-hover);
    border-color: var(--accent-purple-hover);
}
.detail-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
}
.detail-btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}
.detail-export-wrap {
    position: relative;
    flex: 1;
}
.detail-export-wrap .detail-btn {
    width: 100%;
}
.detail-export-menu {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 200ms ease;
    z-index: 3;
}
.detail-export-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.detail-export-item {
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
}
.detail-export-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
    z-index: 9998;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
