/* ==========================================================================
   SoundScope — Vercel-Inspired Monochrome Design System
   Pure Grayscale · Deep Black Canvas · Linear & Radial Gradients · Spotlight
   ========================================================================== */

:root {
    /* Pure Monochrome Palette */
    --black-base: #000000;
    --black-surface: #040404;
    --black-sidebar: #060606;
    --black-card: #0a0a0a;
    --black-elevated: #111111;
    --black-hover: #171717;
    --black-active: #202020;

    /* Hairline Borders */
    --border-hairline: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.22);
    --border-highlight: rgba(255, 255, 255, 0.35);

    /* Grayscale Text Hierarchy */
    --text-primary: #ededed;
    --text-secondary: #a1a1a1;
    --text-muted: #707070;
    --text-faint: #444444;
    --text-pure-white: #ffffff;
    --text-on-light: #050505;

    /* Linear & Radial Gradients */
    --gradient-radial-ambient: radial-gradient(1200px circle at 50% -20%, rgba(255, 255, 255, 0.045), transparent 70%);
    --gradient-card-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.008) 100%), #090909;
    --gradient-btn-primary: linear-gradient(180deg, #ffffff 0%, #dedede 100%);
    --gradient-btn-secondary: linear-gradient(180deg, #181818 0%, #0d0d0d 100%);
    --gradient-btn-hover: linear-gradient(180deg, #222222 0%, #141414 100%);
    --gradient-meter: linear-gradient(90deg, #333333 0%, #888888 50%, #ffffff 100%);
    --gradient-hairline-top: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);

    /* Typography */
    --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Geist Mono', monospace;

    /* Spacing */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;

    /* Dynamic Resizable Layout Dimensions */
    --sidebar-w: 330px;
    --vinyl-dock-h: 275px;
    --transport-h: 78px;
    --vinyl-size: 195px;

    /* Dynamic cursor spotlight coordinates */
    --mouse-x: 50vw;
    --mouse-y: 50vh;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
    background-color: var(--black-base);
}

body {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-primary);
    background-color: var(--black-base);
    background-image: var(--gradient-radial-ambient);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

body.is-resizing {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Global Spotlight Illumination overlay */
.spotlight-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    background: radial-gradient(220px circle at var(--mouse-x, 50vw) var(--mouse-y, 50vh), rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.022) 35%, rgba(255, 255, 255, 0.007) 65%, transparent 100%);
    transition: background 0.04s ease-out;
}

/* Card-level spotlight interactive illumination */
.spotlight-card {
    position: relative;
    background: var(--gradient-card-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(160px circle at var(--card-mouse-x, 50%) var(--card-mouse-y, 50%), rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.006) 70%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.spotlight-card:hover::before {
    opacity: 1;
}

.spotlight-card:hover {
    border-color: var(--border-subtle);
}

.mono {
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

/* ==========================================================================
   Button System
   ========================================================================== */
.v-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, border-color 0.15s ease, filter 0.15s ease, color 0.15s ease;
    outline: none;
    white-space: nowrap;
    text-decoration: none;
}

.v-btn-primary {
    background: var(--gradient-btn-primary);
    color: var(--text-on-light);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.v-btn-primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25), inset 0 1px 0 #ffffff;
    transform: translateY(-1px);
}

.v-btn-primary:active {
    transform: translateY(0);
    filter: brightness(0.96);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.v-btn-secondary {
    background: var(--gradient-btn-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.v-btn-secondary:hover {
    border-color: var(--border-hover);
    color: var(--text-pure-white);
    filter: brightness(1.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 8px rgba(0, 0, 0, 0.6);
    transform: translateY(-1px);
}

.v-btn-secondary:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.v-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--black-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease, color 0.15s ease;
}

.v-btn-icon:hover {
    border-color: var(--border-hover);
    color: var(--text-pure-white);
    filter: brightness(1.35);
    transform: scale(1.05);
}

.v-btn-icon:active {
    transform: scale(0.96);
}

/* Badges */
.v-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: var(--black-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.v-badge-highlight {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-subtle);
    color: var(--text-pure-white);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* ==========================================================================
   App Shell Layout
   ========================================================================== */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ==========================================================================
   Sidebar (File Explorer + Folders Directory + Vinyl Dock)
   ========================================================================== */
.sidebar {
    width: var(--sidebar-w);
    min-width: 250px;
    max-width: 650px;
    height: 100vh;
    background: var(--black-sidebar);
    border-right: 1px solid var(--border-hairline);
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
    z-index: 50;
    flex-shrink: 0;
}

.sidebar-header {
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
    border-bottom: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.logo-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #2a2a2a 0%, #111111 100%);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.logo-text-group {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.logo-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-pure-white);
}

.logo-badge {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-hairline);
    border-radius: 4px;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.sidebar-actions {
    padding: var(--sp-3) var(--sp-4);
}

.sidebar-actions .v-btn-primary {
    width: 100%;
}

/* Search Input */
.sidebar-search {
    padding: 0 var(--sp-4) var(--sp-3);
}

.search-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-input {
    width: 100%;
    height: 32px;
    padding: 0 12px 0 32px;
    background: var(--black-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 12px;
    outline: none;
    transition: all 0.15s ease;
}

.search-input::placeholder {
    color: var(--text-faint);
}

.search-input:focus {
    border-color: var(--border-hover);
    background: var(--black-surface);
    box-shadow: 0 0 0 1px var(--border-subtle);
}

/* ==========================================================================
   Folders Directory Section (Interactive Crates & Drop Target)
   ========================================================================== */
.sidebar-folders-section {
    padding: var(--sp-2) var(--sp-4) var(--sp-3);
    border-top: 1px solid var(--border-hairline);
    border-bottom: 1px solid var(--border-hairline);
    background: rgba(255, 255, 255, 0.015);
}

.folders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.folders-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.folders-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.add-folder-btn {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid transparent;
}

.add-folder-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hairline);
    color: #ffffff;
}

.folders-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.12s ease;
    user-select: none;
}

.folder-item:hover {
    background: var(--black-hover);
    border-color: var(--border-hairline);
}

.folder-item.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-subtle);
}

.folder-item.active .folder-name {
    color: var(--text-pure-white);
    font-weight: 500;
}

/* Drag-over indicator when hovering a track over a folder */
.folder-item.drag-over {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
}

.folder-item-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.folder-icon {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.folder-name {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-item-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.folder-count {
    font-size: 10px;
    color: var(--text-muted);
    padding: 1px 5px;
    background: var(--black-card);
    border-radius: 4px;
    border: 1px solid var(--border-hairline);
}

.folder-delete-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
}

.folder-item:hover .folder-delete-btn {
    display: flex;
}

.folder-delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

/* File List Header & List */
.file-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-2) var(--sp-4);
    border-bottom: 1px solid var(--border-hairline);
    background: rgba(255, 255, 255, 0.015);
}

.file-list-title-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.file-count {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-weight: 500;
}

.active-folder-indicator {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: var(--sp-2);
    scrollbar-width: thin;
    scrollbar-color: var(--black-elevated) transparent;
}

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

.file-list::-webkit-scrollbar-thumb {
    background: var(--black-elevated);
    border-radius: 2px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 7px var(--sp-3);
    margin: 2px 0;
    border-radius: var(--radius-sm);
    cursor: grab;
    border: 1px solid transparent;
    transition: all 0.12s ease;
    min-height: 42px;
}

.file-item:active {
    cursor: grabbing;
}

.file-item:hover {
    background: var(--black-hover);
    border-color: var(--border-hairline);
}

.file-item.active {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%), #121212;
    border-color: var(--border-subtle);
}

.file-item.active .file-item-name {
    color: var(--text-pure-white);
    font-weight: 500;
}

.file-item-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--black-elevated);
    border: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-item-name {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.file-item-meta {
    font-size: 10.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-duration {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-faint);
    flex-shrink: 0;
}

/* Empty State in File / Folder List */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 16px;
    margin: 12px 6px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.015);
    list-style: none;
    box-sizing: border-box;
    user-select: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.empty-state:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.025);
}

.empty-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--black-card);
    border: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--text-muted);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.empty-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.empty-sub {
    display: block;
    font-size: 11px;
    color: var(--text-faint);
    line-height: 1.45;
    max-width: 200px;
}

/* ==========================================================================
   Draggable Splitters / Resizers
   ========================================================================== */
/* Vertical divider between Sidebar & Main */
.resizer-col {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.resizer-col:hover,
.resizer-col.is-dragging {
    background: rgba(255, 255, 255, 0.08);
}

.resizer-col-line {
    width: 1px;
    height: 100%;
    background: transparent;
    transition: background 0.15s ease;
}

.resizer-col:hover .resizer-col-line,
.resizer-col.is-dragging .resizer-col-line {
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}

/* Horizontal divider between Track List & Vinyl Dock */
.resizer-row {
    position: relative;
    width: 100%;
    height: 8px;
    margin-top: -4px;
    margin-bottom: -4px;
    cursor: row-resize;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.resizer-row:hover,
.resizer-row.is-dragging {
    background: rgba(255, 255, 255, 0.08);
}

.resizer-row-line {
    width: 100%;
    height: 1px;
    background: var(--border-hairline);
    transition: background 0.15s ease;
}

.resizer-row:hover .resizer-row-line,
.resizer-row.is-dragging .resizer-row-line {
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}

/* Horizontal resizer for Bottom Transport Bar */
.resizer-transport {
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    z-index: 120;
}

/* ==========================================================================
   Bottom-Left Scalable Vinyl Player Section (Static Play Button)
   ========================================================================== */
.sidebar-vinyl-dock {
    height: var(--vinyl-dock-h);
    min-height: 170px;
    max-height: 480px;
    width: 100%;
    background: linear-gradient(180deg, #101010 0%, #060606 100%);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 14px 12px;
    flex-shrink: 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 60;
    overflow: hidden;
}

.vinyl-dock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.vinyl-dock-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.vinyl-dock-badge {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.vinyl-file-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-pure-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.vinyl-dock-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.vinyl-tag {
    font-size: 9.5px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--black-elevated);
    border: 1px solid var(--border-hairline);
    color: var(--text-secondary);
}

/* Vinyl Player Row */
.vinyl-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    flex: 1;
    margin-top: 2px;
}

.vinyl-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--black-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.vinyl-nav-btn:hover {
    border-color: #ffffff;
    color: #ffffff;
    background: #181818;
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.vinyl-nav-btn:active {
    transform: scale(0.94);
}

/* Interactive Scalable Vinyl Disc */
.turntable-vinyl-btn {
    width: var(--vinyl-size, 195px);
    height: var(--vinyl-size, 195px);
    border-radius: 50%;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    outline: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 auto;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease;
}

.turntable-vinyl-btn:hover {
    transform: scale(1.035);
    filter: brightness(1.08);
}

.turntable-vinyl-btn:active {
    transform: scale(0.97);
}

/* Rotating Vinyl Body */
.turntable-vinyl-disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at center, #252525 0%, #111111 20%, #171717 28%, #090909 44%, #191919 62%, #0c0c0c 80%, #010101 100%);
    border: 2px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.95), 0 0 1px rgba(255, 255, 255, 0.4), inset 0 0 12px rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    will-change: transform;
    transition: transform 0.04s linear;
}

.vinyl-groove-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.vinyl-groove-ring.ring-outer {
    inset: 4%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.vinyl-groove-ring.ring-mid-outer {
    inset: 11%;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.vinyl-groove-ring.ring-mid {
    inset: 20%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.vinyl-groove-ring.ring-inner {
    inset: 28%;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.vinyl-sheen-layer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 45deg, rgba(255, 255, 255, 0.10) 0deg, transparent 45deg, rgba(255, 255, 255, 0.10) 90deg, transparent 135deg, rgba(255, 255, 255, 0.10) 180deg, transparent 225deg, rgba(255, 255, 255, 0.10) 270deg, transparent 315deg, rgba(255, 255, 255, 0.10) 360deg);
    pointer-events: none;
}

/* Vinyl Center Label (Rotates with Disc) */
.turntable-center-label {
    width: calc(var(--vinyl-size, 195px) * 0.34);
    height: calc(var(--vinyl-size, 195px) * 0.34);
    min-width: 50px;
    min-height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #2a2a2a 0%, #151515 70%, #060606 100%);
    border: 2px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.9), inset 0 1px 2px rgba(255, 255, 255, 0.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 2px;
}

.label-brand {
    font-size: 6.5px;
    font-weight: 700;
    letter-spacing: 1.1px;
    color: #ffffff;
    line-height: 1;
}

.label-user {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 1px;
}

.label-spindle {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

/* ==========================================================================
   STATIC Play/Pause Button in Center of Vinyl (Does NOT rotate with disc!)
   ========================================================================== */
.static-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--vinyl-size, 195px) * 0.21);
    height: calc(var(--vinyl-size, 195px) * 0.21);
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.9), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.88;
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
    color: #ffffff;
    z-index: 10;
    pointer-events: none;
}

.turntable-vinyl-btn:hover .static-play-indicator {
    opacity: 1;
    background: rgba(0, 0, 0, 0.88);
    transform: translate(-50%, -50%) scale(1.08);
}

.static-play-indicator.is-playing {
    opacity: 0.95;
}

/* ==========================================================================
   Main Content Area & Top Navigation Bar
   ========================================================================== */
.main {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--black-base);
    background-image: var(--gradient-radial-ambient);
    position: relative;
    min-width: 0;
}

.main-top-bar {
    height: 52px;
    min-height: 52px;
    padding: 0 var(--sp-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-hairline);
    background: rgba(8, 8, 8, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 40;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.top-bar-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.cloud-sync-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-secondary);
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-pill);
}

.cloud-sync-status.active {
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

/* Auth Navigation Buttons in Top Bar */
.top-bar-auth {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.auth-logged-out-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-nav-btn {
    padding: 6px 13px;
    font-size: 12px;
}

.auth-logged-in-profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-session-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}

.user-session-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.user-avatar-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    color: #000000;
    font-weight: 700;
    font-size: 10.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.user-name-text {
    font-weight: 500;
    font-size: 12px;
    letter-spacing: -0.2px;
}

.user-cloud-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 6px;
}

.nav-logout-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.nav-logout-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Scrollable Main Workspace */
.main-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(var(--transport-h) + 24px);
    scrollbar-width: thin;
    scrollbar-color: var(--black-elevated) transparent;
}

.main-content-scroll::-webkit-scrollbar {
    width: 5px;
}

.main-content-scroll::-webkit-scrollbar-thumb {
    background: var(--black-elevated);
    border-radius: 2px;
}

/* Welcome Screen */
.welcome-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    padding: var(--sp-6);
}

.welcome-state.hidden {
    display: none;
}

.welcome-inner {
    max-width: 500px;
    padding: var(--sp-10) var(--sp-8);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.005) 100%), #080808;
}

.welcome-radial-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    height: 200px;
    background: radial-gradient(ellipse 160px 100px at 50% 65px, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 45%, transparent 75%);
    pointer-events: none;
}

.welcome-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #222222 0%, #111111 100%);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 14px rgba(0, 0, 0, 0.8);
    margin-bottom: var(--sp-4);
}

.welcome-inner h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-pure-white);
    margin-bottom: var(--sp-2);
}

.welcome-inner p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--sp-6);
    max-width: 380px;
}

.welcome-buttons {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-6);
}

.welcome-features {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
    justify-content: center;
}

.feat-pill {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-muted);
    padding: 4px 10px;
    background: var(--black-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-pill);
}

/* Detail Pane */
.detail-pane {
    display: none;
    padding: var(--sp-6);
    flex-direction: column;
    gap: var(--sp-4);
    max-width: 1200px;
    margin: 0 auto;
}

.detail-pane.visible {
    display: flex;
}

/* Track Header Card */
.track-header-card {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    padding: var(--sp-5);
}

.track-cover-frame {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    background: var(--black-elevated);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.6);
}

.track-header-content {
    flex: 1;
    min-width: 0;
}

.track-title-row {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

.track-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-pure-white);
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-badges {
    display: flex;
    gap: var(--sp-2);
}

.track-artist {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.track-album {
    font-size: 12px;
    color: var(--text-muted);
}

/* Analysis Meter Banner */
.analysis-meter-card {
    padding: var(--sp-3) var(--sp-4);
    background: linear-gradient(180deg, #101010 0%, #080808 100%);
    border: 1px solid var(--border-hairline);
}

.meter-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meter-label-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.meter-label {
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.meter-status {
    color: var(--text-muted);
}

.meter-track {
    width: 100%;
    height: 3px;
    background: var(--black-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: var(--gradient-meter);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Waveform Inspector Panel */
.waveform-panel {
    padding: var(--sp-4) var(--sp-5);
}

.waveform-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-3);
    padding-bottom: var(--sp-2);
    border-bottom: 1px solid var(--border-hairline);
}

.waveform-legend {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.legend-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.legend-subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

.waveform-timers {
    font-size: 12px;
    color: var(--text-secondary);
}

.time-divider {
    color: var(--text-faint);
    margin: 0 4px;
}

.waveform-body {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

#waveform {
    width: 100%;
    height: 96px;
    cursor: pointer;
}

/* Section Headings */
.section-heading {
    margin-top: var(--sp-2);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

/* Metadata Grid */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-3);
}

.meta-card {
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 86px;
}

.full-width-card {
    grid-column: 1 / -1;
    min-height: auto;
}

.meta-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.meta-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.meta-value-row {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    margin: 4px 0 2px;
}

.meta-value {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.meta-value.highlight {
    color: var(--text-pure-white);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.meta-sub-pill {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    background: var(--black-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: 4px;
    color: var(--text-secondary);
}

.meta-footnote {
    font-size: 10.5px;
    color: var(--text-faint);
}

.file-name-val {
    font-size: 12px !important;
    color: var(--text-secondary) !important;
    word-break: break-all;
}

/* Tags */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
}

/* ==========================================================================
   Bottom Transport Dock for Main Workstation
   ========================================================================== */
.transport {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--transport-h);
    background: linear-gradient(180deg, rgba(14, 14, 14, 0.98) 0%, rgba(4, 4, 4, 0.99) 100%);
    border-top: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-6);
    gap: var(--sp-5);
    z-index: 100;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.transport-mode-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.transport-btn {
    width: 34px;
    height: 34px;
    transition: transform 0.15s ease, filter 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.transport-btn:hover {
    transform: scale(1.08);
}

.transport-btn.active {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}

/* Soundwave Progress Scrubber */
.transport-wave-progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-width: 0;
}

.transport-time {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 32px;
}

.soundwave-progress-bar {
    flex: 1;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.soundwave-progress-bar:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.02);
}

.transport-wave-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.soundwave-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0%;
    width: 2px;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    pointer-events: none;
    transform: translateX(-50%);
    transition: left 0.05s linear;
}

/* Right Section: Volume & Tools */
.transport-volume-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp-3);
    flex-shrink: 0;
}

.mute-btn {
    width: 34px;
    height: 34px;
}

.volume-slider-wrap {
    width: 120px;
    display: flex;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #1c1c1c;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    outline: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.volume-slider:hover {
    background: #252525;
    border-color: var(--border-hover);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #000000;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.8);
    transition: transform 0.12s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #000000;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.transport-util-btn {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.15s ease;
}

.transport-util-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.06);
}

/* ==========================================================================
   Drag & Drop Overlay
   ========================================================================== */
.drag-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

.drag-overlay.visible {
    display: flex;
    pointer-events: auto;
}

.drag-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-10) var(--sp-10);
    border: 1px dashed rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #181818 0%, #0d0d0d 100%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 60px rgba(255, 255, 255, 0.05);
    color: var(--text-pure-white);
    font-size: 16px;
    font-weight: 500;
}

.drag-hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   Authentication & Cloud Sync Modal
   ========================================================================== */
.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-backdrop.open {
    display: flex;
    opacity: 1;
}

.auth-modal {
    width: 420px;
    max-width: calc(100vw - 32px);
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 45px rgba(255, 255, 255, 0.04);
    transform: scale(0.96);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-backdrop.open .auth-modal {
    transform: scale(1);
}

.auth-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.auth-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.auth-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-pure-white);
    letter-spacing: -0.01em;
}

.auth-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.auth-close-btn {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.auth-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Tabs inside Auth Modal */
.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--black-elevated);
    padding: 3px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hairline);
}

.auth-tab-btn {
    flex: 1;
    padding: 7px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auth-tab-btn:hover {
    color: var(--text-primary);
}

.auth-tab-btn.active {
    background: #ffffff;
    color: #000000;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Google Sign-In Button */
.google-auth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 40px;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: #000000;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.google-auth-btn:hover {
    background: #f2f2f2;
    transform: scale(1.01);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    text-align: center;
    color: var(--text-faint);
    font-size: 11px;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-hairline);
}

.auth-divider span {
    padding: 0 10px;
}

.email-auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.form-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    background: var(--black-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: all 0.15s ease;
}

.form-input:focus {
    border-color: var(--border-hover);
    background: #141414;
    box-shadow: 0 0 0 1px var(--border-subtle);
}

.auth-submit-btn {
    width: 100%;
    height: 38px;
    margin-top: 4px;
}

/* Logged-in profile view in modal */
.auth-logged-card {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    padding: var(--sp-2) 0;
}

.auth-user-info-row {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.auth-avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    color: #000000;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-user-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-pure-white);
}

.auth-user-email {
    font-size: 12px;
    color: var(--text-muted);
}

.auth-cloud-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #22c55e;
    margin-top: 4px;
}

.auth-cloud-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--sp-3);
    border-top: 1px solid var(--border-hairline);
    font-size: 12px;
    color: var(--text-secondary);
}

/* Firebase Alert & Feedback Box */
.auth-alert-box {
    display: none;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 14px;
    animation: authFadeIn 0.2s ease;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-alert-box.error {
    display: flex;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.auth-alert-box.success {
    display: flex;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.auth-alert-box.info {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
}

/* Firebase Status Banner */
.firebase-setup-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-hairline);
    margin-bottom: 14px;
    font-size: 11px;
}

.firebase-banner-left {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
}

.firebase-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #eab308; /* yellow pending by default */
}

.firebase-status-dot.connected {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.firebase-banner-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-faint);
}

.form-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-text-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.auth-text-link:hover {
    color: var(--text-pure-white);
}

.auth-submit-btn:disabled,
.google-auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Custom Track Context Menu & Inline Rename Input
   ========================================================================== */
.custom-context-menu {
    position: fixed;
    z-index: 4000;
    min-width: 190px;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: ctxPopIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

@keyframes ctxPopIn {
    from { opacity: 0; transform: scale(0.96) translateY(-2px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.context-menu-header {
    padding: 5px 8px 6px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-hairline);
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.12s ease;
}

.context-menu-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color 0.12s ease;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-pure-white);
}

.context-menu-item:hover svg {
    color: var(--text-pure-white);
}

.context-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
}

.context-menu-item.danger:hover svg {
    color: #f87171;
}

.context-menu-divider {
    height: 1px;
    background: var(--border-hairline);
    margin: 3px 0;
}

/* Inline Rename Input in Track Item */
.file-item-rename-input {
    width: 100%;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}
