@import url('https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Teko:wght@600;700&family=Bebas+Neue&family=Orbitron:wght@700;900&display=swap');

:root {
    /* Purple theme for FLVS */
    --primary-color: #8b00ff;
    --secondary-color: #b366ff;
    --accent-color: #d966ff;
    --glow-color: rgba(139, 0, 255, 0.8);
    --gradient-start: rgba(80, 0, 139, 0.6);
    --gradient-end: rgba(139, 0, 255, 0.7);
    --button-bg: rgba(80, 0, 139, 0.4);
    --button-border: rgba(139, 0, 255, 0.5);
    --progress-bg: rgba(80, 0, 139, 0.4);
}

.theme-purple {
    /* Purple theme for FLVS */
    --primary-color: #8b00ff;
    --secondary-color: #b366ff;
    --accent-color: #d966ff;
    --glow-color: rgba(139, 0, 255, 0.8);
    --gradient-start: rgba(80, 0, 139, 0.6);
    --gradient-end: rgba(139, 0, 255, 0.7);
    --button-bg: rgba(80, 0, 139, 0.4);
    --button-border: rgba(139, 0, 255, 0.5);
    --progress-bg: rgba(80, 0, 139, 0.4);
}

.theme-red {
    /* Red theme for My life */
    --primary-color: #ff0000;
    --secondary-color: #ff3333;
    --accent-color: #ff6666;
    --glow-color: rgba(255, 0, 0, 0.8);
    --gradient-start: rgba(80, 0, 40, 0.6);
    --gradient-end: rgba(120, 0, 0, 0.7);
    --button-bg: rgba(139, 0, 0, 0.4);
    --button-border: rgba(255, 0, 0, 0.5);
    --progress-bg: rgba(139, 0, 0, 0.4);
}

.theme-blue {
    /* Blue theme for FLVS Mobile */
    --primary-color: #0080ff;
    --secondary-color: #3399ff;
    --accent-color: #66b3ff;
    --glow-color: rgba(0, 128, 255, 0.8);
    --gradient-start: rgba(0, 60, 120, 0.6);
    --gradient-end: rgba(0, 100, 200, 0.7);
    --button-bg: rgba(0, 80, 160, 0.4);
    --button-border: rgba(0, 128, 255, 0.5);
    --progress-bg: rgba(0, 80, 160, 0.4);
}

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

body {
    font-family: 'Teko', 'Impact', sans-serif;
    background-color: #000;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    transition: all 0.5s ease;
}

/* ===== INTRO SCREEN (PS2 STYLE) ===== */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease;
}

.intro-screen.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Mobile screen fade with subtle scale */
@media (max-width: 768px) {
    .intro-screen.fade-out {
        animation: mobile-screen-fade 0.8s ease-out forwards;
        transition: none; /* Override transition for animation */
    }
}

@keyframes mobile-screen-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.03);
    }
}

.intro-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    opacity: 0.6;
    filter: blur(2px);
    transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

/* Optimize for mobile - reduce visual complexity */
@media (max-width: 768px) {
    .intro-video {
        filter: blur(0px);
        opacity: 0.4;
        /* Scale down to reduce rendering load */
        transform: translate(-50%, -50%) scale(0.8);
        image-rendering: optimizeSpeed;
        image-rendering: -webkit-optimize-contrast;
    }
}

.intro-video.playing {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 1;
    filter: blur(0px);
    animation: ps2-zoom 3s ease-out forwards;
}

/* Simpler, faster animation for mobile */
@media (max-width: 768px) {
    .intro-video.playing {
        /* Override desktop animation with mobile-friendly one */
        animation: mobile-fade 2s ease-out forwards !important;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

@keyframes ps2-zoom {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(5);
        opacity: 0;
    }
}

/* Cool mobile transition: Flash + Slide */
@keyframes mobile-fade {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.4;
        filter: brightness(1) blur(0px);
    }
    20% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        filter: brightness(1.2) blur(0px);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
        filter: brightness(1.8) blur(0px);
    }
    80% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.5;
        filter: brightness(3) blur(0px);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0;
        filter: brightness(5) blur(0px);
    }
}

.intro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.intro-content {
    text-align: center;
    position: relative;
}

.intro-text {
    font-family: 'Orbitron', 'Bebas Neue', sans-serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 6px;
    color: #fff;
    text-shadow: 
        0 0 20px rgba(139, 0, 255, 1),
        0 0 40px rgba(139, 0, 255, 0.8),
        0 0 60px rgba(139, 0, 255, 0.6),
        3px 3px 10px rgba(0,0,0,0.9);
    animation: pulse-text 2s ease-in-out infinite;
    text-transform: uppercase;
    padding: 0 20px;
    max-width: 90vw;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    .intro-text {
        font-size: 24px;
        letter-spacing: 3px;
        padding: 0 30px;
    }
}

@media (max-width: 480px) {
    .intro-text {
        font-size: 18px;
        letter-spacing: 2px;
        padding: 0 20px;
    }
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 0.8;
        text-shadow: 
            0 0 20px rgba(139, 0, 255, 1),
            0 0 40px rgba(139, 0, 255, 0.8),
            0 0 60px rgba(139, 0, 255, 0.6),
            3px 3px 10px rgba(0,0,0,0.9);
    }
    50% {
        opacity: 1;
        text-shadow: 
            0 0 30px rgba(139, 0, 255, 1),
            0 0 60px rgba(139, 0, 255, 1),
            0 0 90px rgba(139, 0, 255, 0.8),
            3px 3px 10px rgba(0,0,0,0.9);
    }
}

.intro-pulse {
    width: 400px;
    max-width: 80vw;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b00ff, transparent);
    margin: 30px auto 0;
    animation: pulse-line 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(139, 0, 255, 0.8);
}

@keyframes pulse-line {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 0 0 20px rgba(139, 0, 255, 0.5);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 40px rgba(139, 0, 255, 1);
    }
}

.intro-footer {
    position: absolute;
    bottom: 40px;
    width: 100%;
    text-align: center;
}

.intro-warning {
    font-family: 'Teko', sans-serif;
    font-size: 14px;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

/* ===== VIDEO PLAYER ===== */

.video-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    cursor: none;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark overlay for that grungy feel */
.dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 100%);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

/* Film grain texture overlay */
.grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' 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.15;
    pointer-events: none;
    z-index: 1;
}

/* Controls Overlay */
.controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.5s ease;
    background: linear-gradient(to bottom, 
        var(--gradient-start) 0%, 
        rgba(0,0,0,0) 15%, 
        rgba(0,0,0,0) 85%, 
        var(--gradient-end) 100%);
    pointer-events: none;
    z-index: 2;
}

.controls-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.video-container.show-cursor {
    cursor: default;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 60px;
    z-index: 10;
}

.nav-button {
    background: var(--button-bg);
    border: 2px solid var(--button-border);
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    cursor: pointer;
    padding: 12px 24px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Bebas Neue', 'Teko', sans-serif;
    text-shadow: 0 0 10px var(--glow-color), 2px 2px 4px rgba(0,0,0,0.8);
    box-shadow: 0 0 20px var(--glow-color);
    position: relative;
    overflow: hidden;
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.nav-button:hover::before {
    left: 100%;
}

.nav-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--glow-color), 2px 2px 4px rgba(0,0,0,0.9);
    box-shadow: 0 0 30px var(--glow-color);
    transform: translateY(-2px);
}

.video-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-family: 'Bebas Neue', 'Teko', sans-serif;
    text-shadow: 0 0 15px var(--glow-color), 
                 0 0 30px var(--glow-color),
                 3px 3px 6px rgba(0,0,0,0.9);
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Center Play Button - Hidden */
.center-controls {
    display: none;
}

/* Bottom Controls */
.bottom-controls {
    padding: 0 60px 40px 60px;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

.progress-container {
    position: relative;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--progress-bg);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px var(--glow-color);
    transition: all 0.5s ease;
}

.progress-filled {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.1s linear, background 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 0 15px var(--glow-color);
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { 
        filter: brightness(1);
    }
    50% { 
        filter: brightness(1.3);
    }
}

.progress-slider {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 20px;
    transform: translateY(-50%);
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 15px var(--glow-color), 0 0 5px var(--primary-color);
    border: 2px solid #fff;
    transition: all 0.3s ease;
}

.progress-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 15px var(--glow-color), 0 0 5px var(--primary-color);
    transition: all 0.3s ease;
}

.progress-container:hover .progress-slider {
    opacity: 1;
}

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

.control-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-controls,
.right-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 120px;
}

.left-controls {
    justify-content: flex-start;
}

.right-controls {
    justify-content: flex-end;
}

.center-button {
    display: flex;
    justify-content: center;
    align-items: center;
}

.time-display {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: 'Teko', sans-serif;
    text-shadow: 0 0 10px var(--glow-color), 2px 2px 4px rgba(0,0,0,0.8);
    transition: all 0.5s ease;
}

.control-btn {
    background: var(--button-bg);
    border: 2px solid var(--button-border);
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.9;
    border-radius: 50%;
    box-shadow: 0 0 15px var(--glow-color);
}

.control-btn:hover {
    opacity: 1;
    transform: scale(1.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 25px var(--glow-color);
    background: var(--button-bg);
}

.control-btn svg {
    display: block;
    filter: drop-shadow(0 0 5px var(--glow-color));
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-nav {
        padding: 20px 20px;
    }
    
    .bottom-controls {
        padding: 0 20px 20px 20px;
    }
    
    .nav-button {
        font-size: 12px;
        padding: 8px 12px;
        letter-spacing: 2px;
    }
    
    .video-title {
        font-size: 10px;
    }
    
    .play-button-large svg {
        width: 60px;
        height: 60px;
    }
    
    .control-buttons {
        gap: 10px;
    }
    
    .left-controls,
    .right-controls {
        min-width: 60px;
        gap: 10px;
    }
    
    .time-display {
        font-size: 14px;
    }
    
    .control-btn {
        padding: 6px;
    }
    
    .control-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .top-nav {
        padding: 15px 15px;
    }
    
    .bottom-controls {
        padding: 0 15px 15px 15px;
    }
    
    .nav-button {
        font-size: 10px;
        padding: 6px 10px;
        letter-spacing: 1px;
    }
    
    .video-title {
        font-size: 8px;
        letter-spacing: 2px;
    }
    
    .play-button-large svg {
        width: 50px;
        height: 50px;
    }
    
    .control-buttons {
        gap: 8px;
    }
    
    .left-controls,
    .right-controls {
        min-width: 50px;
        gap: 8px;
    }
    
    .time-display {
        font-size: 12px;
    }
    
    .control-btn {
        padding: 5px;
    }
    
    .control-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .progress-container {
        margin-bottom: 15px;
    }
}

/* Ensure video container fits viewport */
@media (max-width: 768px) {
    .video-container {
        height: 100vh;
        height: 100dvh; /* Use dynamic viewport height on mobile */
    }
    
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

