/* ===== CSS VARIABLES ===== */
:root {
    /* Dark mode (default) */
    --tune-bend-bg: #0D0D0F;
    --tune-bend-secondary: #141416;
    --tune-bend-accent: #9966FF;
    --tune-bend-text: #FFFFFF;
    --tune-bend-text-secondary: #B3B3B3;
    --tune-bend-border: #404042;
    --tune-bend-success: #10B981;
    --tune-bend-warning: #F59E0B;
    --tune-bend-error: #EF4444;
}

/* Light mode variables */
[data-theme="light"] {
    --tune-bend-bg: #FFFFFF;
    --tune-bend-secondary: #F2F2F3;
    --tune-bend-accent: #9966FF;
    --tune-bend-text: #000000;
    --tune-bend-text-secondary: #4D4D4D;
    --tune-bend-border: #BFBFC1;
    --tune-bend-success: #10B981;
    --tune-bend-warning: #F59E0B;
    --tune-bend-error: #EF4444;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--tune-bend-bg);
    color: var(--tune-bend-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--tune-bend-text-secondary);
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--tune-bend-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--tune-bend-border);
    z-index: 1000;
    padding: 8px 0;
    height: 48px;
    opacity: 0.95;
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 100%;
}

/* Standalone pages (admin, settings, contact, etc.): brand + logo + links */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-logo {
    display: block;
    height: 36px;
    width: auto;
    max-height: 36px;
    object-fit: cover;
    border-radius: 4px;
}
.nav-title {
    font-weight: 600;
    color: var(--tune-bend-text);
    text-decoration: none;
    font-size: 1.1rem;
}
.nav-title:hover {
    color: var(--tune-bend-accent);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-link {
    color: var(--tune-bend-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
}
.nav-link:hover,
.nav-link.active {
    color: var(--tune-bend-text);
}
.content-area {
    padding-top: 56px; /* clear fixed navbar */
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-actions-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Removed pill styling for left toolbar icons; use standalone circular buttons */

.nav-tabs {
    display: flex;
    gap: 0;
    background: var(--tune-bend-secondary);
    border-radius: 9999px; /* pill */
    padding: 4px; /* slightly more breathing room like macOS */
    border: 1px solid var(--tune-bend-border);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.25);
}

.nav-tab {
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-radius: 9999px; /* pill */
    color: var(--tune-bend-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--tune-bend-text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.18);
    color: var(--tune-bend-text);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
    background: var(--tune-bend-secondary);
    border: 1px solid var(--tune-bend-border);
    border-radius: 9999px; /* pill */
    padding: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.25);
    /* shrink-wrap to icons instead of stretching across the grid column */
    width: max-content;
    justify-self: end;
    align-self: center;
}

.nav-icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 9999px; /* round */
    color: var(--tune-bend-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--tune-bend-text);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: var(--spacing-sm);
}

.btn-primary {
    background-color: var(--tune-bend-accent);
    color: white;
}

.btn-primary:hover {
    background-color: #8A5AE5;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--tune-bend-text);
    border: 1px solid var(--tune-bend-border);
}

.btn-outline:hover {
    background-color: var(--tune-bend-secondary);
    border-color: var(--tune-bend-accent);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
}


/* ===== APP SHELL (Sidebar + Stage) ===== */
.app-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    margin-top: 0; /* sidebar reaches the very top */
    min-height: 100vh;
}

/* Sidebar visibility is now controlled by JavaScript inline styles */
/* Only adjust grid layout for tabs without sidebars */
.app-shell:has(.tab-content#tab-content-archived-streams.active),
.app-shell:has(.tab-content#tab-content-studies.active),
.app-shell:has(.tab-content#tab-content-settings.active) {
    grid-template-columns: 1fr;
}

.sidebar {
    border-right: 1px solid var(--tune-bend-border);
    background: var(--tune-bend-secondary);
    padding: 56px 16px 16px 16px; /* clear fixed navbar while panel extends to top */
    overflow-y: auto;
}

/* ensure main area also clears the fixed top navbar */
.main-content {
    padding-top: 56px;
}

.sidebar-header {
    margin-bottom: 16px;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--tune-bend-text);
    margin: 0;
}

.sidebar-header-actions {
    display: flex;
    gap: 6px;
}

.sidebar-search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.sidebar-search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    color: var(--tune-bend-text-secondary);
    font-size: 14px;
    pointer-events: none;
}

.sidebar-search-input {
    width: 100%;
    padding: 8px 10px 8px 32px;
    background: var(--tune-bend-bg);
    border: 1px solid var(--tune-bend-border);
    border-radius: 6px;
    color: var(--tune-bend-text);
    font-size: 13px;
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--tune-bend-accent);
}

.sidebar-actions {
    display: flex;
    gap: 4px;
}

.sidebar-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--tune-bend-border);
    border-radius: 4px;
    color: var(--tune-bend-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--tune-bend-text);
    border-color: var(--tune-bend-accent);
}

.albums-content {
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: var(--spacing-md);
}

.section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--tune-bend-bg);
    color: var(--tune-bend-text);
    border: 1px solid var(--tune-bend-border);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.section-content {
    margin-top: 8px;
}


.album-item {
    margin-bottom: 4px;
}

.album-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: transparent;
    border: none;
    color: var(--tune-bend-text);
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.album-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.album-title {
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.chevron {
    color: var(--tune-bend-text-secondary);
    font-size: 12px;
    margin-left: 8px;
}

.songs-list {
    padding-left: 12px;
    margin-top: 2px;
}

.songs-list.hidden {
    display: none;
}

.song-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--tune-bend-text-secondary);
    font-size: 13px;
    transition: all 0.2s ease;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--tune-bend-text);
}

.song-item.active {
    background: rgba(153, 102, 255, 0.1);
    color: var(--tune-bend-text);
}

.song-item .fa-check {
    color: var(--tune-bend-accent);
    font-size: 12px;
    margin-left: 8px;
}

.empty-hint {
    color: var(--tune-bend-text-secondary);
    font-size: 12px;
    padding: 8px 4px;
}

.chevron { opacity: 0.6; }

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
    padding: 16px 20px 80px 20px;
}

.tab-content.active {
    display: block;
}

.tab-page {
    padding: 20px;
}

.tab-page h2 {
    margin-bottom: 20px;
    color: var(--tune-bend-text);
}

.streams-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stream-item {
    padding: 12px;
    background: var(--tune-bend-secondary);
    border: 1px solid var(--tune-bend-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.stream-item:hover {
    border-color: var(--tune-bend-accent);
    background: rgba(153, 102, 255, 0.1);
}

/* ===== PLATFORM MESSAGE ===== */
.platform-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin: 16px 0;
    background: rgba(153, 102, 255, 0.1);
    border: 1px solid var(--tune-bend-accent);
    border-radius: var(--radius-md);
    color: var(--tune-bend-text);
}

.platform-message i {
    font-size: 20px;
    color: var(--tune-bend-accent);
    flex-shrink: 0;
}

.platform-message strong {
    color: var(--tune-bend-accent);
}

.stage {
    padding: 16px 20px 80px 20px;
}

.stage-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.applied-sequence { color: var(--tune-bend-text-secondary); }

.stage-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 400px;
}

.stage-cell {
    background: #000;
    border: 1px solid var(--tune-bend-border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    /* Enforce 16:9 for video/audio placeholders */
    aspect-ratio: 16 / 9;
}

.stage-cell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--tune-bend-text-secondary);
    border: 1px dashed var(--tune-bend-border);
    border-radius: 12px;
    padding: 40px;
    /* Keep placeholder area 16:9 when nothing is loaded */
    aspect-ratio: 16 / 9;
}

.transport-bar {
    position: sticky;
    bottom: 0;
    background: rgba(20, 20, 22, 0.95);
    border-top: 1px solid var(--tune-bend-border);
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    backdrop-filter: blur(8px);
    margin-top: 12px;
}

.transport-bar-top {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.transport-time-left,
.transport-time-right {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 13px;
    color: var(--tune-bend-text);
    min-width: 45px;
    text-align: center;
}

.transport-progress-container {
    flex: 1;
    display: flex;
    align-items: center;
}

.transport-progress {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--tune-bend-border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.transport-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.transport-progress::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.transport-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.transport-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--tune-bend-border);
    border-radius: 4px;
    color: var(--tune-bend-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.transport-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--tune-bend-accent);
}

.transport-btn i {
    font-size: 14px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(153, 102, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(153, 102, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--tune-bend-text) 0%, var(--tune-bend-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--tune-bend-accent);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--tune-bend-text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    width: 300px;
    height: 300px;
}

.visual-item {
    background: linear-gradient(135deg, var(--tune-bend-accent) 0%, #8A5AE5 100%);
    border-radius: var(--radius-lg);
    opacity: 0.8;
    animation: float 6s ease-in-out infinite;
}

.visual-item:nth-child(2) {
    animation-delay: -2s;
}

.visual-item:nth-child(3) {
    animation-delay: -4s;
}

.visual-item:nth-child(4) {
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Old marketing sections removed from new app shell context */

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    font-size: 2.5rem;
    font-weight: 700;
}

/* ===== GRIDS ===== */
.albums-grid,
.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.album-card,
.clip-card {
    background-color: var(--tune-bend-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--tune-bend-border);
}

.album-card:hover,
.clip-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--tune-bend-accent);
}

.card-image {
    width: 100%;
    height: 200px;
    background-color: var(--tune-bend-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tune-bend-text-secondary);
    font-size: 3rem;
}

.card-content {
    padding: var(--spacing-lg);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--tune-bend-text);
}

.card-subtitle {
    color: var(--tune-bend-text-secondary);
    margin-bottom: var(--spacing-md);
}

.card-description {
    font-size: 0.875rem;
    color: var(--tune-bend-text-secondary);
    line-height: 1.5;
}

/* ===== STATS SECTION ===== */
.stats-section {
    background-color: var(--tune-bend-secondary);
    border-top: 1px solid var(--tune-bend-border);
    border-bottom: 1px solid var(--tune-bend-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--tune-bend-accent);
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: 1.125rem;
    color: var(--tune-bend-text-secondary);
    font-weight: 500;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--tune-bend-secondary);
    border-top: 1px solid var(--tune-bend-border);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    margin-bottom: var(--spacing-md);
}

.footer-description {
    color: var(--tune-bend-text-secondary);
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-xl);
}

.footer-column h4 {
    color: var(--tune-bend-text);
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
}

.footer-column a {
    display: block;
    color: var(--tune-bend-text-secondary);
    text-decoration: none;
    margin-bottom: var(--spacing-sm);
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--tune-bend-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--tune-bend-border);
    color: var(--tune-bend-text-secondary);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--tune-bend-secondary);
    margin: 10% auto;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid var(--tune-bend-border);
}

.close {
    position: absolute;
    right: var(--spacing-lg);
    top: var(--spacing-lg);
    font-size: 2rem;
    cursor: pointer;
    color: var(--tune-bend-text-secondary);
}

.close:hover {
    color: var(--tune-bend-text);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--tune-bend-text);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--tune-bend-bg);
    border: 1px solid var(--tune-bend-border);
    border-radius: var(--radius-md);
    color: var(--tune-bend-text);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--tune-bend-accent);
    box-shadow: 0 0 0 3px rgba(153, 102, 255, 0.1);
}

/* ===== LOADING ===== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--tune-bend-border);
    border-top: 3px solid var(--tune-bend-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: var(--spacing-xl) auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tab {
        flex: 0 0 auto;
        min-width: 100px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .app-shell {
        grid-template-columns: 1fr !important;
        margin-top: 48px;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-visual {
        margin-top: var(--spacing-xl);
    }
    
    .visual-grid {
        width: 200px;
        height: 200px;
    }
    
    .albums-grid,
    .clips-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .albums-grid,
    .clips-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.hidden { display: none; }
.visible { display: block; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

/* ===== VIDEO SYNCHRONIZATION STYLES ===== */

.stage-cell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.stage-cell:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(153, 102, 255, 0.3);
}

.stage-cell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stage-cell:hover .video-overlay {
    opacity: 1;
}

.video-info {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    margin-bottom: 4px;
}

.part-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Locked clip thumbnail styles */
.stage-cell.locked-clip {
    cursor: not-allowed;
}

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

.clip-thumbnail {
    width: 100%;
    flex: 1;
    min-height: 200px;
    position: relative;
    background-color: var(--tune-bend-border);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: background-color 0.3s ease;
}

.lock-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--tune-bend-text);
}

.lock-icon i {
    color: var(--tune-bend-warning);
}

.lock-message {
    text-align: center;
    color: var(--tune-bend-text);
}

.lock-message p {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    color: var(--tune-bend-text);
}

.clip-info {
    padding: 12px;
    background-color: var(--tune-bend-secondary);
    border-top: 1px solid var(--tune-bend-border);
}

.clip-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tune-bend-text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clip-duration {
    font-size: 0.75rem;
    color: var(--tune-bend-text-secondary);
}

.transport-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 24px;
}

.transport-bar .controls {
    display: flex;
    gap: 8px;
}

.transport-bar .controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.transport-bar .controls button:hover {
    background: rgba(153, 102, 255, 0.2);
    transform: scale(1.05);
}

.transport-bar .controls button:active {
    transform: scale(0.95);
}

.zoom-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.zoom-controls .zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.zoom-controls .zoom-btn:hover {
    background: rgba(153, 102, 255, 0.2);
    transform: scale(1.05);
}

.zoom-controls .zoom-btn.active {
    background: rgba(153, 102, 255, 0.3);
    color: #9966FF;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-control label {
    font-size: 16px;
    color: #999;
}

.volume-control input[type="range"] {
    width: 80px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #9966FF;
    border-radius: 50%;
    cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #9966FF;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.time-display {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 14px;
    color: #999;
    min-width: 100px;
    text-align: center;
}

.bpm {
    font-size: 14px;
    color: #999;
    min-width: 80px;
    text-align: right;
}

/* Light theme adjustments for video sync */
[data-theme="light"] .stage-cell {
    background: #f5f5f5;
}

[data-theme="light"] .transport-bar {
    background: rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .time-display,
[data-theme="light"] .bpm {
    color: #666;
}

/* ===== ABOUT TAB STYLES ===== */
.about-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--tune-bend-text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.about-nav-item i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

.about-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--tune-bend-text);
}

.about-nav-item.active {
    background: rgba(153, 102, 255, 0.1);
    color: var(--tune-bend-text);
}

.about-page {
    max-width: 900px;
}

.about-section {
    display: none;
}

.about-section.active {
    display: block;
}

.about-section h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--tune-bend-text);
}

.about-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--tune-bend-text);
}

.about-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--tune-bend-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-section h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 16px;
    margin-bottom: 8px;
    color: var(--tune-bend-text);
}

.about-bio-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--tune-bend-text-secondary);
    margin-bottom: 24px;
}

.copy-button {
    display: inline-block;
    padding: 8px 12px;
    margin: 8px 0 16px 0;
    font-size: 0.9rem;
    color: #fff;
    background: var(--tune-bend-accent);
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.copy-button:hover {
    filter: brightness(1.05);
}

.about-links {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.about-links a {
    color: var(--tune-bend-accent);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.about-links a:hover {
    color: #8A5AE5;
    text-decoration: underline;
}

.press-actions {
    margin: 12px 0 20px 0;
}

.press-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.press-card {
    background: var(--tune-bend-surface);
    border: 1px solid var(--tune-bend-border);
    border-radius: 8px;
    padding: 12px;
}

.press-card img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.press-meta {
    margin-top: 8px;
    color: var(--tune-bend-text-secondary);
    font-size: 0.85rem;
}

.press-controls {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.cv-section {
    margin-bottom: 32px;
}

.cv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cv-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    line-height: 1.6;
    color: var(--tune-bend-text-secondary);
}

.cv-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--tune-bend-accent);
    font-weight: bold;
}

.discography-section {
    margin-bottom: 32px;
}

.discography-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tune-bend-text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tune-bend-border);
}

.discography-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.discography-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.discography-album-art {
    width: 44px;
    height: 44px;
    background: var(--tune-bend-border);
    border-radius: 6px;
    flex-shrink: 0;
}

.discography-album-info {
    flex: 1;
}

.discography-album-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--tune-bend-text);
    margin-bottom: 2px;
}

.discography-album-artist {
    font-size: 0.875rem;
    color: var(--tune-bend-text-secondary);
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-item {
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.timeline-year {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--tune-bend-text);
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1rem;
    color: var(--tune-bend-text-secondary);
    line-height: 1.6;
}

/* ===== SEGMENTED CONTROL (Apple Email Style) ===== */
.sidebar-segmented-control {
    padding: 6px 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.segmented-control {
    display: flex;
    gap: 6px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    border: 1px solid var(--tune-bend-border);
}

.segmented-control-segment {
    padding: 5px 14px;
    background: transparent;
    border: none;
    border-radius: 9999px;
    color: var(--tune-bend-text-secondary);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.segmented-control-segment:hover {
    color: var(--tune-bend-text);
}

.segmented-control-segment.active {
    background: var(--tune-bend-bg);
    color: var(--tune-bend-text);
    font-weight: 500;
    box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.08);
}

/* ===== STREAMS AND STUDIES DETAIL VIEWS ===== */
.streams-detail,
.studies-detail {
    padding: 20px;
    min-height: 400px;
}

.stream-detail-content,
.lesson-detail-content,
.category-detail-content {
    max-width: 800px;
}

.stream-detail-content h2,
.lesson-detail-content h2,
.category-detail-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--tune-bend-text);
}

.stream-detail-content p,
.lesson-detail-content p,
.category-detail-content p {
    font-size: 1rem;
    color: var(--tune-bend-text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.live-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin: 12px 0;
}

.archived-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(153, 102, 255, 0.2);
    color: var(--tune-bend-accent);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin: 12px 0;
}

/* ===== CATEGORY ITEM STYLES ===== */
.category-item {
    padding-left: 24px !important;
}

.livestream-item,
.lesson-item {
    padding-left: 24px !important;
}

/* Ensure Streams and Studies sidebars match Albums sidebar styling */
#streams-sidebar,
#studies-sidebar,
#settings-sidebar {
    border-right: 1px solid var(--tune-bend-border);
    background: var(--tune-bend-secondary);
    padding: 56px 16px 16px 16px;
    overflow-y: auto;
}

/* ===== SETTINGS STYLES ===== */
.settings-section {
    max-width: 800px;
    padding: 20px 0;
}

.settings-group {
    margin-bottom: 32px;
}

.settings-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tune-bend-text-secondary);
    margin-bottom: 12px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--tune-bend-border);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 1rem;
    color: var(--tune-bend-text);
}

.settings-value {
    font-size: 1rem;
    color: var(--tune-bend-text-secondary);
}

.settings-copyright {
    font-size: 0.875rem;
    color: var(--tune-bend-text-secondary);
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--tune-bend-border);
}

.settings-theme-picker {
    margin-top: 12px;
}

.settings-theme-picker .segmented-control {
    margin-bottom: 8px;
}

.settings-hint {
    font-size: 0.875rem;
    color: var(--tune-bend-text-secondary);
    margin-top: 8px;
}

.settings-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tune-bend-border);
    border-radius: 8px;
    color: var(--tune-bend-text);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.settings-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--tune-bend-accent);
}

.settings-button:active {
    transform: scale(0.98);
}

.settings-button i:first-child {
    color: var(--tune-bend-accent);
    width: 20px;
}

.settings-button i:last-child {
    margin-left: auto;
    color: var(--tune-bend-text-secondary);
    font-size: 0.875rem;
}

.settings-button-danger {
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.settings-button-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #EF4444;
}

.settings-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.settings-button-disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--tune-bend-border);
}

.coming-soon {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--tune-bend-text-secondary);
}

.settings-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tune-bend-border);
    border-radius: 8px;
    margin-bottom: 12px;
}

.settings-user-info i {
    font-size: 1.5rem;
    color: var(--tune-bend-accent);
}

.settings-user-info span:first-of-type {
    flex: 1;
    color: var(--tune-bend-text);
}

.admin-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #EF4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#settings-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
