@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --accent: #3b82f6;
    --accent-rgb: 59, 130, 246;
    --bg: #050505;
    --surface: rgba(20, 20, 20, 0.7);
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --white: #ffffff;
    --text-muted: #a0a0a0;
    --radius: 16px;
    --shadow: 0 20px 40px rgba(0,0,0,0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg);
    color: var(--white);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    user-select: none;
}

/* --- CINEMA CONTAINER --- */
#cinema-player {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
}

/* --- PREMIUM OVERLAYS --- */
.overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.gradient-top {
    height: 150px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.gradient-bottom {
    height: 200px;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

/* --- FLOATING CONTROLS --- */
#ui-wrapper {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    z-index: 20;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

#ui-wrapper.hidden {
    opacity: 0;
    transform: translateY(20px);
}

/* PROGRESS BAR */
.progress-area {
    margin-bottom: 20px;
    cursor: pointer;
    padding: 10px 0;
}

.progress-bg {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    position: relative;
    overflow: visible;
    transition: height 0.2s;
}

.progress-area:hover .progress-bg { height: 8px; }

.progress-bar {
    position: absolute;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.5);
}

.progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

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

/* CONTROL BAR */
.control-bar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
}

.btn:hover {
    background: var(--glass);
    color: var(--accent);
}

.time-display {
    font-size: 0.95rem;
    font-weight: 500;
    color: #eee;
}

.spacer { flex: 1; }

/* --- SETTINGS MENU --- */
.menu-panel {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 300px;
    background: var(--surface);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
    display: none;
    animation: menuPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes menuPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.menu-item:hover {
    background: rgba(255,255,255,0.08);
}

.menu-item.active {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}

.menu-item i { font-size: 1.1rem; }
.menu-item span { flex: 1; font-weight: 500; }
.menu-item .val { font-size: 0.85rem; opacity: 0.6; }

/* --- CENTER ACTIONS --- */
.center-action {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 15;
}

.play-pulse {
    width: 80px;
    height: 80px;
    background: rgba(var(--accent-rgb), 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    opacity: 0;
    transition: 0.3s;
}

/* --- LOADING --- */
#cinema-loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

#loader-text {
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* --- NOTIFICATIONS --- */
.toast {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 50;
    display: none;
}
