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

:root {
    /* VLC Color Palette */
    --vlc-orange: #FF8800;
    --vlc-orange-light: #FF9500;
    --vlc-orange-dark: #CC5500;

    /* Dark Theme */
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --bg-hover: #404040;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;

    /* Controls */
    --control-bg: #1a1a1a;
    --control-hover: #333333;
    --control-active: #FF8800;

    /* Progress */
    --progress-bg: #555555;
    --progress-buffer: #666666;
    --progress-filled: #FF8800;

    /* Borders */
    --border-color: #3a3a3a;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: #0a0a0a;
}

/* ===== App Container ===== */
#app {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 136, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 136, 0, 0.03) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a0a 0%, #121212 50%, #0a0a0a 100%);
}

/* ===== VLC Player Container ===== */
.vlc-player {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(255, 136, 0, 0.1);
    border: 1px solid var(--border-color);
}

/* ===== Title Bar ===== */
.title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    padding: 0 12px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-color);
    user-select: none;
    cursor: default;
}

.title-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vlc-logo {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cone-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(255, 136, 0, 0.3));
}

.title-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.title-bar-right {
    display: flex;
    gap: 4px;
}

.window-btn {
    width: 28px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.window-btn.close:hover {
    background: #e81123;
    color: white;
}

/* ===== Menu Bar ===== */
.menu-bar {
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 8px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    gap: 2px;
}

.menu-item {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

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

.menu-item:active {
    background: var(--vlc-orange);
    color: white;
}

/* ===== Video Container ===== */
.video-container {
    flex: 1;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Drop Zone */
.drop-zone {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 5;
}

.drop-zone.hidden {
    opacity: 0;
    pointer-events: none;
}

.drop-zone.drag-over {
    background: rgba(255, 136, 0, 0.15);
    border: 3px dashed var(--vlc-orange);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.drop-icon {
    opacity: 0.8;
    filter: drop-shadow(0 4px 20px rgba(255, 136, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.drop-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.drop-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: 3;
}

.video-container:hover .play-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.play-overlay.hidden {
    display: none;
}

.big-play-btn {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 136, 0, 0.9);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 20px rgba(255, 136, 0, 0.4);
}

.big-play-btn:hover {
    transform: scale(1.1);
    background: var(--vlc-orange);
}

.big-play-btn svg {
    width: 40px;
    height: 40px;
    margin-left: 4px;
}

/* ===== Progress Bar ===== */
.progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--progress-bg);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    transition: height var(--transition-fast);
}

.progress-bar:hover {
    height: 10px;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--progress-buffer);
    border-radius: 3px;
    pointer-events: none;
}

.progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--vlc-orange-dark), var(--vlc-orange));
    border-radius: 3px;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.4);
}

.progress-handle {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: var(--vlc-orange);
    border-radius: 50%;
    transform: translateY(-50%) scale(0.6);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(255, 136, 0, 0.5);
}

.time-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 100px;
    justify-content: flex-end;
}

.time-separator {
    color: var(--text-muted);
}

/* ===== Control Bar ===== */
.control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--control-bg) 100%);
    border-top: 1px solid var(--border-color);
    gap: 16px;
}

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

.controls-center {
    gap: 8px;
}

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

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

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

.control-btn.active {
    color: var(--vlc-orange);
}

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

.play-btn {
    width: 44px;
    height: 44px;
    background: var(--vlc-orange);
    color: white;
    border-radius: 50%;
}

.play-btn:hover {
    background: var(--vlc-orange-light);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 136, 0, 0.4);
}

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

/* Volume Slider */
.volume-slider-container {
    width: 100px;
    height: 6px;
    background: var(--progress-bg);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.volume-slider {
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--vlc-orange);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 136, 0, 0.4);
    transition: transform var(--transition-fast);
}

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

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--vlc-orange);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 136, 0, 0.4);
}

.volume-level {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--vlc-orange-dark), var(--vlc-orange));
    border-radius: 3px;
    pointer-events: none;
    width: 100%;
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
}

/* ===== Status Bar ===== */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 28px;
    padding: 0 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
}

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

/* ===== Fullscreen Mode ===== */
.vlc-player.fullscreen {
    max-width: 100%;
    max-height: 100%;
    height: 100vh;
    border-radius: 0;
    border: none;
}

.vlc-player.fullscreen .title-bar,
.vlc-player.fullscreen .menu-bar,
.vlc-player.fullscreen .status-bar {
    display: none;
}

.vlc-player.fullscreen .control-bar,
.vlc-player.fullscreen .progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.vlc-player.fullscreen .progress-container {
    bottom: 60px;
}

.vlc-player.fullscreen:hover .control-bar,
.vlc-player.fullscreen:hover .progress-container {
    opacity: 1;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .vlc-player {
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }

    .menu-bar {
        display: none;
    }

    .volume-slider-container {
        width: 60px;
    }

    .controls-right .control-btn:not(#fullscreenBtn):not(#playlistBtn) {
        display: none;
    }

    .divider {
        display: none;
    }

    .time-display {
        min-width: 80px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .title-bar {
        padding: 0 8px;
    }

    .title-text {
        font-size: 12px;
    }

    .control-bar {
        padding: 8px;
        gap: 8px;
    }

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

    .play-btn {
        width: 40px;
        height: 40px;
    }

    .progress-container {
        padding: 8px;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== Animations ===== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}