/**
 * YogiVid - Premium Black & Gold Student Portal Styles
 * Luxurious, Dark-First Design System
 */

/* ========================================
   CSS Variables - Premium Black & Gold Theme
   ======================================== */
:root {
    /* Premium Black Backgrounds */
    --bg-primary: #0a0a0a;
    --bg-secondary: #0f0f10;
    --bg-tertiary: #151517;
    --bg-card: #1a1a1c;
    --bg-elevated: #202023;
    --bg-hover: #252528;
    
    /* Borders - Subtle Gold Hints */
    --border-subtle: #2a2a2d;
    --border-default: #3a3a3f;
    --border-focus: #d4a853;
    
    /* Text */
    --text-primary: #fafaf9;
    --text-secondary: #b5b5b0;
    --text-tertiary: #7a7a75;
    --text-muted: #5a5a55;
    
    /* Premium Gold Accents */
    --accent-primary: #d4a853;
    --accent-primary-hover: #e6bc6a;
    --accent-primary-glow: rgba(212, 168, 83, 0.25);
    --accent-secondary: #c9963c;
    --accent-gold-light: #f0d890;
    --accent-gold-dark: #a07c2f;
    
    /* Status Colors with Gold Tints */
    --success: #4ade80;
    --success-bg: rgba(74, 222, 128, 0.1);
    --warning: #d4a853;
    --warning-bg: rgba(212, 168, 83, 0.1);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.1);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, 0.1);
    
    /* Premium Gradients */
    --gradient-accent: linear-gradient(135deg, #d4a853 0%, #f0d890 50%, #c9963c 100%);
    --gradient-gold: linear-gradient(135deg, #d4a853 0%, #a07c2f 100%);
    --gradient-gold-shine: linear-gradient(135deg, #f0d890 0%, #d4a853 50%, #a07c2f 100%);
    --gradient-card: linear-gradient(180deg, rgba(212, 168, 83, 0.03) 0%, transparent 100%);
    --gradient-glow: radial-gradient(circle at center, var(--accent-primary-glow) 0%, transparent 70%);
    --gradient-dark: linear-gradient(180deg, #0a0a0a 0%, #151517 100%);
    
    /* Premium Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 40px var(--accent-primary-glow);
    --shadow-gold: 0 4px 20px rgba(212, 168, 83, 0.15);
}

/* Light Theme Override */
[data-theme="light"] {
    --bg-primary: #f8f7f4;
    --bg-secondary: #f0efe9;
    --bg-tertiary: #e8e7e1;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-hover: #f0efe9;
    
    --border-subtle: #e0dfd9;
    --border-default: #d0cfc9;
    
    --text-primary: #1a1918;
    --text-secondary: #4a4945;
    --text-tertiary: #6a6965;
    --text-muted: #9a9995;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ========================================
   Premium Background Effects
   ======================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 100% 80% at 20% -30%, rgba(212, 168, 83, 0.08), transparent 50%),
        radial-gradient(ellipse 80% 60% at 80% 110%, rgba(212, 168, 83, 0.05), transparent 40%),
        linear-gradient(180deg, #0a0a0a 0%, #0f0f10 100%);
    pointer-events: none;
    z-index: -1;
}

/* Subtle animated grain texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: -1;
}

/* ========================================
   Sidebar Premium Styling
   ======================================== */
.sidebar {
    background: linear-gradient(180deg, #0f0f10 0%, #0a0a0a 100%);
    border-right: 1px solid rgba(212, 168, 83, 0.1);
}

.sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
    background: linear-gradient(180deg, rgba(212, 168, 83, 0.03) 0%, transparent 100%);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-decoration: none;
}

.sidebar-logo-img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(212, 168, 83, 0.2));
}

.sidebar-logo-content {
    display: flex;
    flex-direction: column;
}

.sidebar-logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    background: var(--gradient-gold-shine);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.sidebar-logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-gold);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #0a0a0a;
    box-shadow: var(--shadow-gold);
}

/* Navigation Items */
.nav-item {
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--accent-gold-light);
    background: rgba(212, 168, 83, 0.05);
}

.nav-item.active {
    color: var(--accent-primary);
    background: rgba(212, 168, 83, 0.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--gradient-gold);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
    box-shadow: 0 0 12px rgba(212, 168, 83, 0.4);
}

.nav-section-title {
    color: var(--accent-gold-dark);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Premium Upgrade Item */
.nav-item-premium,
.nav-item[href*="upgrade"] {
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.1), rgba(169, 124, 47, 0.05)) !important;
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-left: 3px solid var(--accent-primary);
}

.nav-item-premium:hover,
.nav-item[href*="upgrade"]:hover {
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.15), rgba(169, 124, 47, 0.1)) !important;
    border-color: rgba(212, 168, 83, 0.3);
    border-left-color: var(--accent-gold-light);
}

.nav-item-premium .nav-icon,
.nav-item-premium span,
.nav-item[href*="upgrade"] .nav-icon,
.nav-item[href*="upgrade"] span {
    color: var(--accent-primary) !important;
    font-weight: 600;
}

/* ========================================
   Header Premium Styling
   ======================================== */
.header {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.08);
}

.page-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.user-menu {
    background: rgba(212, 168, 83, 0.08);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: var(--radius-lg);
}

.user-menu:hover {
    background: rgba(212, 168, 83, 0.12);
    border-color: rgba(212, 168, 83, 0.25);
}

.user-avatar {
    background: var(--gradient-gold);
    color: #0a0a0a;
    font-weight: 700;
}

.header-action-btn:hover {
    background: rgba(212, 168, 83, 0.1);
    color: var(--accent-primary);
}

/* ========================================
   Continue Watching Section - Premium
   ======================================== */
.continue-watching {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.continue-watching::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-gold);
    opacity: 0.5;
}

.continue-watching-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.continue-watching-header h2::before {
    content: '▶';
    color: var(--accent-primary);
    font-size: 0.75rem;
}

.continue-play-btn {
    background: var(--gradient-gold);
    color: #0a0a0a;
    box-shadow: var(--shadow-gold);
}

.continue-play-btn:hover {
    box-shadow: 0 0 30px rgba(212, 168, 83, 0.4);
}

.continue-progress-bar {
    background: var(--gradient-gold);
}

/* ========================================
   Video Cards - Premium Gold
   ======================================== */
.video-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 168, 83, 0.3);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(212, 168, 83, 0.1);
}

.video-card-play {
    background: var(--gradient-gold);
    color: #0a0a0a;
}

.video-card:hover .video-card-play {
    box-shadow: 0 0 30px rgba(212, 168, 83, 0.5);
}

.video-card-progress-bar {
    background: var(--gradient-gold);
}

/* ========================================
   Course Cards - Premium
   ======================================== */
.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 168, 83, 0.2);
    box-shadow: var(--shadow-lg);
}

.course-card-thumbnail {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-gold-dark) 100%);
}

.course-card-progress-bar {
    background: var(--gradient-gold-shine);
}

.course-progress-text {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ========================================
   Video Player Page - Premium
   ======================================== */
.player-wrapper {
    display: flex;
    gap: var(--spacing-xl);
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    align-items: flex-start;
}

@media (max-width: 1200px) {
    .player-wrapper {
        flex-direction: column;
    }
    
    .playlist-sidebar {
        order: 2;
    }
}

.player-main {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 360px - var(--spacing-xl));
}

@media (max-width: 1200px) {
    .player-main {
        max-width: 100%;
        width: 100%;
    }
}

.player-container {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 80px rgba(212, 168, 83, 0.05);
    border: 1px solid rgba(212, 168, 83, 0.1);
}

.player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
    z-index: 1;
}

/* Video Loading */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 5;
    color: white;
    font-size: 14px;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(212, 168, 83, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Player Controls */
.player-controls {
    position: absolute;
    bottom: 0 !important;
    top: auto !important;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
    padding: 50px 16px 16px 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 50;
}

.player-container:hover .player-controls,
.player-container:focus-within .player-controls,
.player-container.show-controls .player-controls {
    opacity: 1;
}

/* Progress Bar - Gold Theme */
.player-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 12px;
    position: relative;
    transition: height 0.15s ease;
}

.player-progress:hover {
    height: 6px;
}

.player-progress-filled {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 2px;
    position: relative;
    transition: width 0.1s linear;
    z-index: 1;
}

.player-progress-filled::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(212, 168, 83, 0.6);
    transition: transform 0.15s ease;
}

.player-progress:hover .player-progress-filled::after {
    transform: translateY(-50%) scale(1);
}

/* Player Buttons */
.player-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.player-buttons-left,
.player-buttons-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.player-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.player-btn:hover {
    background: rgba(212, 168, 83, 0.2);
    color: var(--accent-gold-light);
    opacity: 1;
}

.player-btn:active {
    transform: scale(0.92);
}

.player-btn.active {
    background: var(--accent-primary) !important;
    color: #0a0a0a !important;
}

.player-btn svg {
    width: 20px;
    height: 20px;
}

/* Time Display */
.player-time {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    white-space: nowrap;
}

/* Volume Slider */
.player-volume {
    display: flex;
    align-items: center;
    gap: 4px;
}

.player-volume input[type="range"] {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, width 0.2s ease;
}

.player-volume:hover input[type="range"] {
    opacity: 1;
}

.player-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(212, 168, 83, 0.5);
}

/* ========================================
   Settings Panel - Premium
   ======================================== */
.player-settings-panel {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: rgba(20, 20, 22, 0.98);
    border-radius: 16px;
    padding: 24px;
    width: 340px;
    max-height: 80vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(212, 168, 83, 0.1);
    border: 1px solid rgba(212, 168, 83, 0.15);
    backdrop-filter: blur(24px);
}

.player-settings-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.settings-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-gold-light);
    margin-bottom: 20px;
    padding-right: 30px;
}

.settings-section {
    padding: 14px 0;
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-gold-dark);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

/* Speed Options */
.speed-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.speed-options button {
    background: rgba(212, 168, 83, 0.08);
    border: 1px solid rgba(212, 168, 83, 0.15);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.speed-options button:hover {
    background: rgba(212, 168, 83, 0.15);
    border-color: rgba(212, 168, 83, 0.3);
    color: white;
}

.speed-options button.active {
    background: var(--gradient-gold);
    border-color: var(--accent-primary);
    color: #0a0a0a;
    font-weight: 700;
}

/* Settings Toggle */
.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(212, 168, 83, 0.05);
    border-radius: 10px;
    transition: background 0.15s ease;
    margin-bottom: 8px;
}

.settings-toggle:hover {
    background: rgba(212, 168, 83, 0.1);
}

.settings-toggle input[type="checkbox"] {
    width: 44px;
    height: 24px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.settings-toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.settings-toggle input[type="checkbox"]:checked {
    background: var(--gradient-gold);
}

.settings-toggle input[type="checkbox"]:checked::before {
    transform: translateX(20px);
    background: #0a0a0a;
}

/* Video Stats */
.video-stats {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 14px;
    border-radius: 10px;
}

.video-stats div {
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
}

.video-stats span:last-child {
    color: var(--accent-gold-light);
    font-weight: 500;
}

/* Settings Close Button */
.settings-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.settings-close-btn:hover {
    background: rgba(212, 168, 83, 0.2);
    color: var(--accent-gold-light);
}

/* ========================================
   Video Info Section - Premium
   ======================================== */
.video-info {
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: var(--radius-xl);
    margin-top: var(--spacing-lg);
    position: relative;
}

.video-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: var(--gradient-gold);
    opacity: 0.3;
}

.video-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.video-info-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.video-info-meta {
    display: flex;
    gap: var(--spacing-lg);
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: var(--spacing-sm);
}

.video-info-meta span {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.video-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.video-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.video-actions .btn-primary {
    background: var(--gradient-gold);
    color: #0a0a0a;
    box-shadow: var(--shadow-gold);
}

.video-actions .btn-primary:hover {
    box-shadow: 0 0 30px rgba(212, 168, 83, 0.4);
    transform: translateY(-2px);
}

.video-actions .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.video-actions .btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.video-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-subtle);
}

/* ========================================
   Playlist Sidebar - Premium
   ======================================== */
.playlist-sidebar {
    width: 360px;
    min-width: 360px;
    max-width: 360px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: fit-content;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-lg));
}

@media (max-width: 1200px) {
    .playlist-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        max-height: 400px;
    }
}

.playlist-header {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
    font-weight: 600;
    background: rgba(212, 168, 83, 0.03);
    font-size: 0.95rem;
    color: var(--accent-gold-light);
}

.playlist-items {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
}

.playlist-items::-webkit-scrollbar {
    width: 6px;
}

.playlist-items::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.playlist-items::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.playlist-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.playlist-item:hover {
    background: rgba(212, 168, 83, 0.05);
}

.playlist-item.active {
    background: rgba(212, 168, 83, 0.1);
    border-left: 3px solid var(--accent-primary);
}

.playlist-thumbnail {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    height: 68px;
    min-height: 68px;
    max-height: 68px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.playlist-thumbnail img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
}

.playlist-info {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 132px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.playlist-info h4 {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    line-height: 1.3;
}

.playlist-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.playlist-item.completed .playlist-thumbnail::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--accent-primary);
    color: #0a0a0a;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* ========================================
   Notes Section - Premium
   ======================================== */
.notes-section {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.notes-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--accent-gold-light);
}

.notes-form {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.notes-form textarea {
    flex: 1;
    min-width: 200px;
    min-height: 60px;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    resize: vertical;
}

.notes-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.notes-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.note-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    align-items: flex-start;
}

.note-timestamp {
    flex-shrink: 0;
    padding: 4px 10px;
    background: var(--gradient-gold);
    color: #0a0a0a;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-timestamp:hover {
    box-shadow: 0 0 12px rgba(212, 168, 83, 0.4);
    transform: scale(1.05);
}

.note-content {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.note-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.note-delete:hover {
    color: var(--error);
    background: rgba(248, 113, 113, 0.1);
}

/* ========================================
   Rating Section - Premium
   ======================================== */
.rating-section {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.05), rgba(169, 124, 47, 0.02));
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: var(--radius-xl);
}

.rating-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-gold-light);
}

.rating-widget {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.rating-widget .stars {
    display: flex;
    gap: 4px;
}

.rating-widget .star {
    font-size: 28px;
    color: var(--text-muted);
    transition: all 0.15s ease;
    cursor: pointer;
    user-select: none;
}

.rating-widget .star:hover,
.rating-widget .star.active {
    color: var(--accent-primary);
    transform: scale(1.15);
    text-shadow: 0 0 20px rgba(212, 168, 83, 0.6);
}

#ratingInfo {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

#ratingReview {
    margin-top: 12px;
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    resize: vertical;
}

#ratingReview:focus {
    outline: none;
    border-color: var(--accent-primary);
}

#submitRating {
    margin-top: 12px;
}

/* ========================================
   Comments Section - Premium
   ======================================== */
.comments-section {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
}

.comments-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

#commentForm {
    margin-bottom: var(--spacing-lg);
}

#commentForm textarea {
    width: 100%;
    min-height: 80px;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    resize: vertical;
    margin-bottom: var(--spacing-sm);
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.5;
}

#commentForm textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

#commentForm button {
    margin-top: var(--spacing-sm);
}

#commentsList {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.comment-item {
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.comment-item:hover {
    border-color: rgba(212, 168, 83, 0.2);
    background: rgba(212, 168, 83, 0.02);
}

.comment-item strong {
    color: var(--text-primary);
}

.comment-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 8px 0;
}

/* ========================================
   Progress Stats - Premium
   ======================================== */
.progress-stat-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.progress-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
}

.progress-stat-icon {
    background: rgba(212, 168, 83, 0.1);
    color: var(--accent-primary);
}

.progress-stat-value {
    background: var(--gradient-gold-shine);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Buttons - Premium Gold
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #0a0a0a;
    font-weight: 600;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(212, 168, 83, 0.05);
}

/* ========================================
   Forms - Premium Gold
   ======================================== */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

/* ========================================
   Skip Indicators
   ======================================== */
.skip-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(0, 0, 0, 0.8);
    color: var(--accent-gold-light);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 50;
    border: 1px solid rgba(212, 168, 83, 0.3);
}

.skip-indicator.left { left: 15%; }
.skip-indicator.right { right: 15%; }
.skip-indicator.show { 
    opacity: 1;
    animation: skipPulse 0.5s ease;
}

@keyframes skipPulse {
    0% { transform: translateY(-50%) scale(0.8); opacity: 0; }
    50% { transform: translateY(-50%) scale(1.1); opacity: 1; }
    100% { transform: translateY(-50%) scale(1); opacity: 0; }
}

/* ========================================
   Time Preview
   ======================================== */
.time-preview {
    position: absolute;
    bottom: 60px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: var(--radius-md);
    padding: 6px;
    display: none;
    z-index: 50;
    text-align: center;
}

.time-preview span {
    color: var(--accent-gold-light);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ========================================
   Theater Mode
   ======================================== */
body.theater-mode {
    overflow: hidden;
}

body.theater-mode .sidebar,
body.theater-mode .header {
    display: none !important;
}

body.theater-mode .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: none !important;
}

.player-wrapper.theater-active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #000;
}

.player-wrapper.theater-active .player-container {
    border-radius: 0;
    border: none;
}

/* ========================================
   Ambient Mode
   ======================================== */
.ambient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    filter: blur(120px) saturate(1.5);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    display: none;
}

body.ambient-active .ambient-canvas {
    opacity: 0.4;
}

body.ambient-active {
    background: #000 !important;
}

/* ========================================
   Empty State - Premium
   ======================================== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--accent-gold-dark);
    margin-bottom: var(--spacing-lg);
}

.empty-state-title {
    background: var(--gradient-gold-shine);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Breadcrumb - Premium
   ======================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: var(--spacing-md);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: var(--spacing-sm);
    color: var(--text-muted);
}

.breadcrumb a,
.breadcrumb a.breadcrumb-item {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--accent-gold-light);
}

/* ========================================
   Section Headers - Premium
   ======================================== */
.section-header h2 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-header h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
}

.section-header a {
    color: var(--accent-primary);
    font-weight: 500;
}

.section-header a:hover {
    color: var(--accent-gold-light);
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .player-controls {
        padding: var(--spacing-sm);
        opacity: 1;
    }
    
    .player-buttons-left,
    .player-buttons-right {
        gap: 2px;
    }
    
    .player-btn {
        padding: 6px;
    }
    
    .player-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .player-time {
        font-size: 0.75rem;
    }
    
    .video-info {
        padding: var(--spacing-md);
    }
    
    .sidebar-logo-img {
        width: 40px;
        height: 40px;
    }
    
    .sidebar-logo-text {
        font-size: 1.2rem;
    }
}

/* ========================================
   Scrollbar - Premium Gold
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 83, 0.3);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 83, 0.5);
}

/* ========================================
   Toast Notifications - Gold Accent
   ======================================== */
.toast {
    background: var(--bg-card);
    border: 1px solid rgba(212, 168, 83, 0.15);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(212, 168, 83, 0.05);
}

/* ========================================
   Animations
   ======================================== */
@keyframes goldGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 168, 83, 0.2); }
    50% { box-shadow: 0 0 40px rgba(212, 168, 83, 0.4); }
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
