/* ===== MPC PLAYER — DESIGN SYSTEM ===== */
:root {
    --bg-primary: #0d0d1a;
    --bg-secondary: #131328;
    --bg-tertiary: #1a1a35;
    --bg-surface: #1e1e3a;
    --bg-hover: #2a2a50;
    --bg-active: #32325a;
    --border: #2a2a4a;
    --border-light: #3a3a5a;
    --text-primary: #e8e8f0;
    --text-secondary: #9898b8;
    --text-muted: #6868888;
    --accent: #e94560;
    --accent-hover: #ff5a75;
    --accent-glow: rgba(233, 69, 96, 0.3);
    --accent-gradient: linear-gradient(135deg, #e94560, #f5a623);
    --seek-bar-bg: #2a2a4a;
    --seek-buffered: #3a3a5a;
    --volume-bg: #2a2a4a;
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font);
    font-size: 13px;
    background: var(--bg-primary);
    color: var(--text-primary);
    user-select: none;
}

.hidden {
    display: none !important;
}

/* ===== MENU BAR ===== */
.menu-bar {
    display: flex;
    align-items: center;
    height: 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 4px;
    position: relative;
    z-index: 100;
}

.menu-item {
    position: relative;
}

.menu-label {
    padding: 4px 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 12px;
    transition: background var(--transition), color var(--transition);
    border-radius: var(--radius-sm);
}

.menu-label:hover,
.menu-item.active .menu-label {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 4px 0;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    animation: menuFadeIn 0.15s ease;
}

.menu-item.active .menu-dropdown {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 12px;
    transition: background var(--transition);
}

.menu-dropdown-item:hover {
    background: var(--accent);
    color: #fff;
}

.menu-dropdown-item.active::before {
    content: '✓';
    margin-right: 8px;
    color: var(--accent);
    font-size: 11px;
}

.menu-dropdown-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.menu-dropdown-item .shortcut {
    color: var(--text-muted);
    font-size: 11px;
    margin-left: 24px;
}

.menu-dropdown-item:hover .shortcut {
    color: rgba(255, 255, 255, 0.7);
}

.menu-separator {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
}

.has-submenu {
    position: relative;
}

.submenu-arrow {
    font-size: 8px;
    color: var(--text-muted);
}

.menu-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -4px;
    min-width: 160px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 4px 0;
    box-shadow: var(--shadow-lg);
}

.has-submenu:hover .menu-submenu {
    display: block;
}

.menu-right-info {
    margin-left: auto;
    padding-right: 12px;
}

.menu-title-text {
    color: var(--text-muted);
    font-size: 11px;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    display: flex;
    height: calc(100vh - 28px - 72px);
    overflow: hidden;
}

.video-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* DROP OVERLAY */
.drop-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 26, 0.9);
    z-index: 50;
    align-items: center;
    justify-content: center;
}

.drop-overlay.active {
    display: flex;
}

.drop-content {
    text-align: center;
    color: var(--accent);
    padding: 40px;
    border: 2px dashed var(--accent);
    border-radius: var(--radius-lg);
    animation: dropPulse 1.5s ease infinite;
}

.drop-content p {
    margin-top: 16px;
    font-size: 16px;
    color: var(--text-secondary);
}

@keyframes dropPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* WELCOME SCREEN */
.welcome-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, var(--bg-tertiary) 0%, var(--bg-primary) 70%);
    z-index: 10;
}

.welcome-content {
    text-align: center;
    animation: welcomeFadeIn 0.6s ease;
}

@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.welcome-logo {
    margin-bottom: 20px;
}

.welcome-logo svg {
    filter: drop-shadow(0 0 20px var(--accent-glow));
    animation: logoPulse 3s ease infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 20px var(--accent-glow));
    }

    50% {
        filter: drop-shadow(0 0 40px var(--accent-glow));
    }
}

.welcome-content h1 {
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.welcome-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.welcome-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.welcome-btn.primary {
    background: var(--accent);
    color: #fff;
}

.welcome-btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

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

.welcome-btn.secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

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

/* MEDIA INFO */
.media-info {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    animation: fadeIn 0.3s ease;
}

.media-info-content {
    background: rgba(13, 13, 26, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 12px;
    min-width: 220px;
}

.media-info-row {
    display: flex;
    gap: 8px;
    padding: 3px 0;
}

.media-info-row .label {
    color: var(--accent);
    font-weight: 600;
    min-width: 72px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* AB REPEAT */
.ab-repeat-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 11px;
    color: var(--accent);
}

/* STATUS TOAST */
.status-toast {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 13, 26, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 20px;
    font-size: 13px;
    z-index: 20;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== PLAYLIST ===== */
.playlist-panel {
    width: 280px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

.playlist-panel.collapsed {
    width: 0;
    border-left: none;
}

.playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    min-height: 40px;
}

.playlist-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

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

.playlist-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.playlist-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.playlist-count {
    padding: 6px 12px;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

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

.playlist-items::-webkit-scrollbar-track {
    background: transparent;
}

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

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

.playlist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background var(--transition);
    border-bottom: 1px solid rgba(42, 42, 74, 0.3);
    min-width: 0;
}

.playlist-item:hover {
    background: var(--bg-hover);
}

.playlist-item.active {
    background: var(--bg-active);
    border-left: 3px solid var(--accent);
}

.playlist-item-index {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 20px;
    text-align: right;
}

.playlist-item-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.playlist-item-name {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-item-duration {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.playlist-item-remove {
    opacity: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition);
    flex-shrink: 0;
}

.playlist-item:hover .playlist-item-remove {
    opacity: 1;
}

.playlist-item-remove:hover {
    background: var(--accent);
    color: #fff;
}

/* PLAYLIST TOOLBAR */
.playlist-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.playlist-toolbar-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 4px;
}

.playlist-btn.active {
    color: var(--accent);
    background: rgba(233, 69, 96, 0.15);
}

.playlist-btn.active:hover {
    background: rgba(233, 69, 96, 0.25);
}

/* PLAYLIST NAME BAR */
.playlist-name-bar {
    padding: 6px 12px;
    font-size: 11px;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    background: rgba(233, 69, 96, 0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* DRAG REORDER */
.playlist-item-drag {
    cursor: grab;
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.4;
    transition: opacity var(--transition);
    flex-shrink: 0;
    user-select: none;
    letter-spacing: -1px;
}

.playlist-item:hover .playlist-item-drag {
    opacity: 1;
}

.playlist-item.dragging {
    opacity: 0.4;
    background: var(--bg-active);
}

.playlist-item.drag-over {
    border-top: 2px solid var(--accent);
    padding-top: 6px;
}

/* SAVED PLAYLISTS LIST */
.saved-playlists-list {
    max-height: 400px;
    overflow-y: auto;
}

.no-playlists {
    color: var(--text-muted);
    text-align: center;
    padding: 24px;
    font-size: 13px;
}

.saved-playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.saved-playlist-item:hover {
    background: var(--bg-hover);
}

.saved-playlist-info {
    flex: 1;
    min-width: 0;
}

.saved-playlist-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.saved-playlist-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

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

.saved-playlist-btn {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font);
    font-size: 11px;
    transition: all var(--transition);
}

.saved-playlist-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.saved-playlist-btn.load {
    color: var(--accent);
    border-color: var(--accent);
}

.saved-playlist-btn.load:hover {
    background: var(--accent);
    color: #fff;
}

.saved-playlist-btn.delete:hover {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

/* ===== CONTROLS BAR ===== */
.controls-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 0;
    position: relative;
    z-index: 50;
}

/* SEEK BAR */
.seek-container {
    padding: 0 12px;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.seek-bar {
    width: 100%;
    height: 4px;
    background: var(--seek-bar-bg);
    border-radius: 2px;
    position: relative;
    transition: height 0.15s ease;
}

.seek-container:hover .seek-bar {
    height: 6px;
}

.seek-buffered {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--seek-buffered);
    border-radius: 2px;
}

.seek-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 2px;
    width: 0%;
}

.seek-thumb {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    left: 0%;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: 0 0 8px var(--accent-glow);
}

.seek-container:hover .seek-thumb {
    opacity: 1;
}

.seek-tooltip {
    position: absolute;
    bottom: 20px;
    left: 0;
    transform: translateX(-50%);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.seek-container:hover .seek-tooltip {
    opacity: 1;
}

/* MAIN CONTROLS */
.controls-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px 8px;
    height: 48px;
}

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

.controls-center {
    flex: 1;
    text-align: center;
}

.ctrl-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.ctrl-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.ctrl-btn.play-btn {
    width: 44px;
    height: 44px;
    color: var(--accent);
}

.ctrl-btn.play-btn:hover {
    color: var(--accent-hover);
    background: rgba(233, 69, 96, 0.1);
}

.ctrl-btn-text {
    font-size: 12px;
    font-weight: 600;
    min-width: 36px;
}

.time-display {
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* VOLUME */
.volume-slider-container {
    width: 80px;
    display: flex;
    align-items: center;
}

.volume-bar {
    width: 100%;
    height: 4px;
    background: var(--volume-bg);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    width: 100%;
}

.volume-thumb {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    left: 100%;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.volume-slider-container:hover .volume-thumb {
    opacity: 1;
}

/* SPEED POPUP */
.speed-control {
    position: relative;
}

.speed-popup {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    min-width: 100px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 4px 0;
    box-shadow: var(--shadow-lg);
    animation: menuFadeIn 0.15s ease;
}

.speed-option {
    padding: 6px 16px;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    transition: background var(--transition);
}

.speed-option:hover {
    background: var(--accent);
    color: #fff;
}

.speed-option.active {
    color: var(--accent);
    font-weight: 600;
}

/* ===== DIALOGS ===== */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    animation: fadeIn 0.2s ease;
}

.dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    min-width: 380px;
    max-width: 90vw;
    box-shadow: var(--shadow-lg);
    animation: dialogIn 0.25s ease;
}

.dialog-wide {
    min-width: 600px;
}

@keyframes dialogIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.dialog-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.dialog-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.dialog-close:hover {
    background: var(--accent);
    color: #fff;
}

.dialog-body {
    padding: 20px;
}

.dialog-body label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dialog-body input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition);
}

.dialog-body input[type="text"]:focus {
    border-color: var(--accent);
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

.dialog-btn {
    padding: 8px 20px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font);
    font-size: 12px;
    transition: all var(--transition);
}

.dialog-btn:hover {
    background: var(--bg-hover);
}

.dialog-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.dialog-btn.primary:hover {
    background: var(--accent-hover);
}

/* SHORTCUTS */
.shortcuts-body {
    max-height: 60vh;
    overflow-y: auto;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.shortcut-group h4 {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 600;
}

.shortcut-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    font-size: 12px;
}

.shortcut-row kbd {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-family: var(--font);
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: center;
}

/* ABOUT */
.about-body {
    text-align: center;
}

.about-logo {
    margin-bottom: 12px;
}

.about-body h2 {
    font-size: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-version {
    color: var(--text-muted);
    font-size: 12px;
    margin: 4px 0 12px;
}

.about-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}

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

/* FULLSCREEN */
body.fullscreen .menu-bar {
    display: none;
}

body.fullscreen .main-content {
    height: calc(100vh - 72px);
}

body.fullscreen .controls-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.fullscreen:hover .controls-bar,
body.fullscreen .controls-bar:hover {
    opacity: 1;
}

body.fullscreen .playlist-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 72px;
    z-index: 60;
    box-shadow: var(--shadow-lg);
}

/* COMPACT MODE */
body.compact .playlist-panel {
    width: 0;
    border-left: none;
}

/* ===== OSD OVERLAY ===== */
.osd-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 30;
}

.osd-overlay .osd-icon {
    opacity: 0;
    transform: scale(0.6);
}

.osd-overlay .osd-text {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    margin-top: 8px;
    opacity: 0;
}

.osd-overlay.osd-animate .osd-icon {
    animation: osdPop 0.8s ease forwards;
}

.osd-overlay.osd-animate .osd-text {
    animation: osdFade 0.8s ease forwards;
}

@keyframes osdPop {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }

    20% {
        opacity: 0.9;
        transform: scale(1.1);
    }

    40% {
        opacity: 0.8;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.3);
    }
}

@keyframes osdFade {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 0.9;
    }

    40% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

/* ===== SUBTITLE DISPLAY ===== */
.subtitle-display {
    position: absolute;
    bottom: 60px;
    left: 10%;
    right: 10%;
    text-align: center;
    z-index: 25;
    pointer-events: none;
    font-size: 20px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 2px #000;
    line-height: 1.4;
    padding: 8px;
}

/* ===== EQUALIZER ===== */
.eq-presets {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.eq-presets label {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.eq-presets select {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.eq-presets select:focus {
    border-color: var(--accent);
}

.eq-bands {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: flex-end;
    height: 200px;
    padding: 10px 0;
}

.eq-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.eq-band input[type="range"] {
    writing-mode: vertical-lr;
    direction: rtl;
    height: 140px;
    width: 24px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.eq-band input[type="range"]::-webkit-slider-track {
    width: 4px;
    background: var(--border);
    border-radius: 2px;
}

.eq-band input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-glow);
}

.eq-label {
    font-size: 9px;
    color: var(--text-muted);
    white-space: nowrap;
}

.eq-value {
    font-size: 10px;
    color: var(--text-secondary);
    min-width: 24px;
    text-align: center;
}

/* ===== VIDEO FILTERS ===== */
.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.filter-row label {
    min-width: 80px;
    font-size: 12px;
    color: var(--text-secondary);
}

.filter-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.filter-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-glow);
}

.filter-row span {
    min-width: 48px;
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ===== PLAYLIST SEARCH ===== */
.playlist-search {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
}

.playlist-search input {
    width: 100%;
    padding: 5px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 11px;
    outline: none;
    transition: border-color var(--transition);
}

.playlist-search input:focus {
    border-color: var(--accent);
}

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

/* ===== PENDING PLAYLIST ITEMS ===== */
.playlist-item.pending {
    opacity: 0.45;
    border-left: 2px solid var(--text-muted);
}

.playlist-item.pending .playlist-item-name {
    font-style: italic;
}

/* ===== SEEK THUMBNAIL ===== */
.seek-thumbnail {
    width: 160px;
    height: 90px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    border: 1px solid var(--border);
    display: none;
}

.seek-container:hover .seek-thumbnail {
    display: block;
}

.seek-tooltip {
    position: absolute;
    bottom: 20px;
    left: 0;
    transform: translateX(-50%);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}