/* =============================================================================
   KARAOKE SUBTITLE PLAYER STYLES

   Features:
   - Scrollable subtitle list with tap-to-seek
   - Desktop sidebar with artwork and info
   - Mobile drawer for chapters/speakers
   - Word-level karaoke highlighting
   ============================================================================= */

/* =============================================================================
   CSS CUSTOM PROPERTIES
   ============================================================================= */
.player-layout {
    /* Colors */
    --player-bg: #000000;
    --player-surface: rgba(28, 28, 30, 0.95);
    --player-surface-elevated: rgba(44, 44, 46, 0.98);
    --player-glass: rgba(255, 255, 255, 0.08);
    --player-glass-border: rgba(255, 255, 255, 0.12);

    /* Accent */
    --player-accent: #fa2d55;
    --player-accent-subtle: rgba(250, 45, 85, 0.15);

    /* Typography */
    --player-text-primary: rgba(255, 255, 255, 0.95);
    --player-text-secondary: rgba(255, 255, 255, 0.65);
    --player-text-tertiary: rgba(255, 255, 255, 0.45);

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

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.35), 0 3px 6px rgba(0, 0, 0, 0.2);

    /* Timing */
    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
    --duration-fast: 200ms;

    /* Sidebar width for desktop */
    --sidebar-width: 320px;
}

/* =============================================================================
   MAIN LAYOUT
   ============================================================================= */
.player-layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
    background: var(--player-bg);
    overflow: hidden;
}

.app-container:has(.player-layout) {
    max-width: none;
    padding: 0;
}

/* =============================================================================
   DESKTOP SIDEBAR (hidden on mobile)
   ============================================================================= */
.player-sidebar {
    display: none;
    flex-direction: column;
    width: var(--sidebar-width);
    background: var(--player-surface);
    border-right: 1px solid var(--player-glass-border);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-back {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    color: var(--player-accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity var(--duration-fast);
}

.sidebar-back:hover {
    opacity: 0.8;
}

.sidebar-artwork {
    padding: var(--space-4);
    padding-top: 0;
}

.sidebar-artwork .artwork-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.sidebar-artwork .artwork-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--player-accent), #ff6b6b);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.8;
}

.sidebar-info {
    padding: 0 var(--space-4) var(--space-4);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-1);
    color: var(--player-text-primary);
}

.sidebar-show {
    font-size: 14px;
    color: var(--player-accent);
    margin-bottom: var(--space-1);
}

.sidebar-date {
    font-size: 12px;
    color: var(--player-text-tertiary);
}

.sidebar-stats {
    display: flex;
    justify-content: space-around;
    padding: var(--space-4);
    margin: 0 var(--space-4);
    background: var(--player-glass);
    border-radius: var(--radius-md);
}

.sidebar-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

.sidebar-stats .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--player-text-primary);
}

.sidebar-stats .stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--player-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--player-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.sidebar-chapters,
.sidebar-speakers {
    padding: var(--space-4);
    border-top: 1px solid var(--player-glass-border);
}

.sidebar-chapters .chapters-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.sidebar-chapters .chapter-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: background-color var(--duration-fast);
}

.sidebar-chapters .chapter-item:hover {
    background: var(--player-glass);
}

.sidebar-chapters .chapter-item.active {
    background: var(--player-accent);
}

.sidebar-chapters .chapter-item.active .chapter-time,
.sidebar-chapters .chapter-item.active .chapter-title {
    color: white;
}

.sidebar-chapters .chapter-time {
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--player-accent);
    min-width: 36px;
}

.sidebar-chapters .chapter-title {
    font-size: 13px;
    color: var(--player-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-speakers .speakers-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sidebar-speakers .speaker-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-speakers .speaker-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-speakers .speaker-name {
    font-size: 13px;
    color: var(--player-text-primary);
}

/* =============================================================================
   MAIN CONTENT AREA
   ============================================================================= */
.player-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* =============================================================================
   MOBILE HEADER - Apple Podcasts style
   ============================================================================= */
.player-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--player-surface);
    border-bottom: 1px solid var(--player-glass-border);
    flex-shrink: 0;
    min-height: 56px;
}

.back-btn,
.drawer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: var(--radius-full);
    color: var(--player-text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color var(--duration-fast) var(--ease-out);
}

.back-btn:hover,
.drawer-btn:hover {
    background: var(--player-glass);
}

.back-btn svg,
.drawer-btn svg {
    width: 22px;
    height: 22px;
}

.header-spacer {
    width: 40px;
    flex-shrink: 0;
}

/* Episode info with artwork */
.header-episode-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    overflow: hidden;
}

.header-artwork {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--player-glass);
}

.header-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-artwork-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--player-accent), #ff6b6b);
}

.header-artwork-placeholder svg {
    width: 24px;
    height: 24px;
    color: white;
    opacity: 0.8;
}

.header-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.header-title-wrapper {
    overflow: hidden;
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
}

.episode-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--player-text-primary);
    white-space: nowrap;
    margin: 0;
    animation: marquee 12s linear infinite;
    display: inline-block;
    padding-right: 50px;
}

/* Only animate if title overflows */
.header-title-wrapper:not(:hover) .episode-title {
    animation-play-state: running;
}

.header-title-wrapper:hover .episode-title {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.header-show-name {
    font-size: 12px;
    color: var(--player-text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 2px 0 0 0;
}

/* =============================================================================
   SCROLLABLE SUBTITLE LIST
   ============================================================================= */
.subtitle-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-4);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.subtitle-list.no-transcript {
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-transcript-message {
    text-align: center;
    color: var(--player-text-tertiary);
}

.no-transcript-message svg {
    opacity: 0.5;
    margin-bottom: var(--space-4);
}

.no-transcript-message h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.no-transcript-message p {
    font-size: 14px;
}

/* Subtitle item */
.subtitle-item {
    padding: var(--space-4);
    margin-bottom: var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--duration-fast);
}

.subtitle-item:hover {
    background: var(--player-glass);
}

.subtitle-item.active {
    background: var(--player-accent-subtle);
}

.subtitle-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.subtitle-speaker {
    font-size: 12px;
    font-weight: 600;
    color: var(--speaker-color, var(--player-accent));
}

.subtitle-speaker::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--speaker-color, var(--player-accent));
    margin-right: var(--space-2);
    vertical-align: middle;
}

.subtitle-time {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--player-text-tertiary);
}

.subtitle-original {
    font-size: 18px;
    line-height: 1.5;
    margin: 0 0 var(--space-2) 0;
    color: var(--player-text-tertiary);
}

.subtitle-item.active .subtitle-original {
    color: var(--player-text-primary);
}

.subtitle-translation {
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    color: var(--player-text-secondary);
    opacity: 0.7;
}

/* Word-level karaoke highlighting */
.word {
    color: inherit;
    transition: color 50ms linear;
}

.subtitle-item.active .word {
    color: var(--player-text-tertiary);
}

.subtitle-item.active .word.spoken {
    color: var(--player-text-primary);
}

.subtitle-item.active .word.speaking {
    color: var(--player-accent);
}

/* =============================================================================
   PLAYER CONTROLS - Apple Podcasts inspired
   ============================================================================= */
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
    background: var(--player-surface);
    border-top: 1px solid var(--player-glass-border);
    flex-shrink: 0;
}

/* Progress bar - Apple Podcasts style with filled track */
.progress-container {
    width: 100%;
    max-width: 600px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border-radius: 2px;
    cursor: pointer;
    outline: none;
    position: relative;
}

/* Webkit (Chrome, Safari) - filled progress */
.progress-bar::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.8) var(--progress, 0%),
        rgba(255, 255, 255, 0.2) var(--progress, 0%),
        rgba(255, 255, 255, 0.2) 100%
    );
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    background: transparent;
    cursor: pointer;
}

/* Show thumb on interaction */
.progress-bar:hover::-webkit-slider-thumb,
.progress-bar:active::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    margin-top: -4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Firefox */
.progress-bar::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.progress-bar::-moz-range-progress {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.8);
}

.progress-bar::-moz-range-thumb {
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.progress-bar:hover::-moz-range-thumb,
.progress-bar:active::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.progress-times {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 500;
    color: var(--player-text-tertiary);
    margin-top: var(--space-2);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.2px;
}

/* Control buttons - simple, no backgrounds */
.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
}

.control-btn {
    background: none;
    border: none;
    color: var(--player-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-2);
    border-radius: var(--radius-full);
    transition: opacity var(--duration-fast) var(--ease-out);
}

.control-btn:hover {
    opacity: 0.7;
}

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

.control-btn svg {
    width: 32px;
    height: 32px;
}

/* Play button - simple, no fill */
.control-btn.play-btn {
    width: 56px;
    height: 56px;
    background: none;
    color: var(--player-text-primary);
    box-shadow: none;
}

.control-btn.play-btn svg {
    width: 56px;
    height: 56px;
    margin-left: 0;
}

.control-btn.play-btn:hover {
    opacity: 0.7;
    transform: none;
}

/* Skip label - inside the icon like Apple */
.skip-label {
    position: absolute;
    font-size: 9px;
    font-weight: 600;
    color: var(--player-text-primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Playback options - minimal */
.playback-options {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
}

.option-btn {
    background: none;
    border: none;
    color: var(--player-text-secondary);
    padding: var(--space-2);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    transition: all var(--duration-fast) var(--ease-out);
}

.option-btn svg {
    width: 22px;
    height: 22px;
    opacity: 1;
}

.option-btn:hover {
    color: var(--player-text-primary);
}

.option-btn.active {
    color: var(--player-accent);
    background: none;
}

.option-btn.active svg {
    opacity: 1;
}

/* =============================================================================
   MOBILE DRAWER
   ============================================================================= */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-fast) var(--ease-out),
                visibility var(--duration-fast) var(--ease-out);
    z-index: 100;
}

.drawer-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: var(--player-surface);
    transform: translateX(100%);
    transition: transform var(--duration-fast) var(--ease-out);
    z-index: 101;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--player-glass-border);
    flex-shrink: 0;
}

.drawer-header h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

.drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--player-glass);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--player-text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.drawer-close:hover {
    background: var(--player-glass-border);
    color: var(--player-text-primary);
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    padding: var(--space-2);
    gap: var(--space-1);
    border-bottom: 1px solid var(--player-glass-border);
    flex-shrink: 0;
}

.drawer-nav-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--player-text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all var(--duration-fast) var(--ease-out);
}

.drawer-nav-btn svg {
    opacity: 0.6;
    flex-shrink: 0;
}

.drawer-nav-btn:hover {
    background: var(--player-glass);
    color: var(--player-text-primary);
}

.drawer-nav-btn.active {
    background: var(--player-accent-subtle);
    color: var(--player-accent);
}

.drawer-nav-btn.active svg {
    opacity: 1;
    color: var(--player-accent);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4);
    -webkit-overflow-scrolling: touch;
}

/* Drawer content items */
.drawer-empty {
    color: var(--player-text-tertiary);
    text-align: center;
    padding: var(--space-6);
}

/* Chapter items in drawer */
.drawer-content .chapter-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    margin-bottom: var(--space-1);
    transition: background-color var(--duration-fast) var(--ease-out);
}

.drawer-content .chapter-item:hover {
    background: var(--player-glass);
}

.drawer-content .chapter-item.active {
    background: var(--player-accent);
}

.drawer-content .chapter-item.active .chapter-time,
.drawer-content .chapter-item.active .chapter-title,
.drawer-content .chapter-item.active .chapter-desc {
    color: #fff;
}

.chapter-time {
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--player-accent);
    min-width: 38px;
    flex-shrink: 0;
}

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

.chapter-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--player-text-primary);
    line-height: 1.3;
}

.chapter-desc {
    font-size: 11px;
    color: var(--player-text-tertiary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Speaker items in drawer */
.drawer-content .speaker-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--player-glass);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-2);
}

.drawer-content .speaker-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.drawer-content .speaker-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drawer-content .speaker-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--player-text-primary);
}

.drawer-content .speaker-role {
    font-size: 12px;
    color: var(--player-text-tertiary);
}

/* Info panel in drawer */
.info-panel {
    display: flex;
    justify-content: space-around;
    padding: var(--space-4);
    background: var(--player-glass);
    border-radius: var(--radius-md);
}

.info-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

.info-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--player-text-primary);
    letter-spacing: -0.5px;
}

.info-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--player-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Shortcuts in drawer */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

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

.shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 var(--space-2);
    background: var(--player-glass);
    border: 1px solid var(--player-glass-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--player-text-primary);
}

.shortcut span {
    font-size: 13px;
    color: var(--player-text-secondary);
}

/* =============================================================================
   TABLET RESPONSIVE (768px - 1023px)
   ============================================================================= */
@media (min-width: 768px) {
    .subtitle-list {
        padding: var(--space-6);
    }

    .subtitle-item {
        padding: var(--space-5);
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    .subtitle-original {
        font-size: 22px;
    }

    .subtitle-translation {
        font-size: 17px;
    }

    .player-controls {
        padding: var(--space-5) var(--space-8);
    }
}

/* =============================================================================
   DESKTOP RESPONSIVE (1024px+)
   ============================================================================= */
@media (min-width: 1024px) {
    /* Show sidebar, hide mobile header and drawer */
    .player-sidebar {
        display: flex;
    }

    .player-header {
        display: none;
    }

    .drawer-btn {
        display: none;
    }

    .drawer,
    .drawer-overlay {
        display: none;
    }

    /* Wider subtitle area */
    .subtitle-list {
        padding: var(--space-8);
    }

    .subtitle-item {
        max-width: 800px;
    }

    .subtitle-original {
        font-size: 24px;
    }

    .subtitle-translation {
        font-size: 18px;
    }
}

/* =============================================================================
   LARGE DESKTOP (1440px+)
   ============================================================================= */
@media (min-width: 1440px) {
    .player-layout {
        --sidebar-width: 380px;
    }

    .sidebar-artwork {
        padding: var(--space-6);
        padding-top: var(--space-2);
    }

    .sidebar-info {
        padding: 0 var(--space-6) var(--space-6);
    }

    .sidebar-title {
        font-size: 22px;
    }

    .subtitle-item {
        max-width: 900px;
    }

    .subtitle-original {
        font-size: 26px;
    }

    .subtitle-translation {
        font-size: 19px;
    }
}

/* =============================================================================
   MOBILE RESPONSIVE (below 768px)
   ============================================================================= */
@media (max-width: 767px) {
    .subtitle-list {
        padding: var(--space-3);
    }

    .subtitle-item {
        padding: var(--space-3);
    }

    .subtitle-original {
        font-size: 16px;
    }

    .subtitle-translation {
        font-size: 14px;
    }

    /* Mobile controls - Apple style */
    .player-controls {
        gap: var(--space-3);
        padding: var(--space-3) var(--space-4);
        padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
    }

    .progress-times {
        font-size: 10px;
        margin-top: var(--space-1);
    }

    .control-buttons {
        gap: var(--space-10);
    }

    .control-btn svg {
        width: 28px;
        height: 28px;
    }

    .control-btn.play-btn {
        width: 48px;
        height: 48px;
    }

    .control-btn.play-btn svg {
        width: 48px;
        height: 48px;
    }

    .playback-options {
        gap: var(--space-4);
    }

    .option-btn {
        min-width: 40px;
        min-height: 40px;
    }

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

/* Small phones */
@media (max-width: 380px) {
    .episode-title {
        font-size: 15px;
    }

    .subtitle-original {
        font-size: 15px;
    }

    .subtitle-translation {
        font-size: 13px;
    }

    .control-buttons {
        gap: var(--space-8);
    }

    .control-btn.play-btn {
        width: 44px;
        height: 44px;
    }

    .control-btn.play-btn svg {
        width: 44px;
        height: 44px;
    }
}

/* =============================================================================
   ADMIN PLAYER (COMPACT MODE)
   ============================================================================= */
.player-layout.admin-player {
    height: auto;
    min-height: 400px;
}

.player-layout.admin-player .subtitle-list {
    min-height: 200px;
    max-height: 400px;
}

.player-layout.admin-player .player-sidebar {
    display: none;
}

/* =============================================================================
   SCROLLBAR
   ============================================================================= */
.subtitle-list::-webkit-scrollbar,
.drawer-content::-webkit-scrollbar,
.player-sidebar::-webkit-scrollbar {
    width: 6px;
}

.subtitle-list::-webkit-scrollbar-track,
.drawer-content::-webkit-scrollbar-track,
.player-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.subtitle-list::-webkit-scrollbar-thumb,
.drawer-content::-webkit-scrollbar-thumb,
.player-sidebar::-webkit-scrollbar-thumb {
    background: var(--player-glass);
    border-radius: 3px;
}

.subtitle-list::-webkit-scrollbar-thumb:hover,
.drawer-content::-webkit-scrollbar-thumb:hover,
.player-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =============================================================================
   REDUCED MOTION
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }

    .drawer {
        transition: none;
    }

    .subtitle-list {
        scroll-behavior: auto;
    }
}

/* =============================================================================
   HIGH CONTRAST
   ============================================================================= */
@media (prefers-contrast: high) {
    .player-layout {
        --player-glass-border: rgba(255, 255, 255, 0.3);
        --player-text-tertiary: rgba(255, 255, 255, 0.6);
    }
}
