:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --primary-color: #3b82f6;
    --real-color: #10b981;
    /* Green */
    --fake-color: #ef4444;
    /* Red */
    --card-bg: #1e1e1e;
    --vs-color: #888;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent scrolling */
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    width: 100%;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Header */
header {
    padding: 1rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.vs {
    color: var(--vs-color);
    font-size: 1rem;
    vertical-align: middle;
}

.counter {
    font-size: 0.9rem;
    color: #aaa;
    font-weight: 600;
}

/* Video Player */
.video-container {
    flex: 1;
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fill the container */
}

/* Feedback Overlay */
.overlay-feedback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: scale(0.8);
    z-index: 20;
}

.overlay-feedback.correct {
    background-color: rgba(16, 185, 129, 0.6);
    /* Green tint */
    color: #fff;
    opacity: 1;
    transform: scale(1);
}

.overlay-feedback.correct::after {
    content: "CORRECT";
}

.overlay-feedback.wrong {
    background-color: rgba(239, 68, 68, 0.6);
    /* Red tint */
    color: #fff;
    opacity: 1;
    transform: scale(1);
}

.overlay-feedback.wrong::after {
    content: "WRONG";
}

/* Controls */
.controls {
    padding: 1rem 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    background-color: var(--bg-color);
}

.btn {
    flex: 1;
    padding: 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.1s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.btn-real {
    background-color: var(--real-color);
}

.btn-fake {
    background-color: var(--fake-color);
}

/* Game Over Screen */
.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.game-over.hidden {
    opacity: 0;
    pointer-events: none;
}

.result-box {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.result-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.score-display {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 1.5rem 0;
}

#final-score {
    color: var(--real-color);
}

.btn-restart {
    background-color: var(--primary-color);
    width: 100%;
    margin-top: 1rem;
}

/* Response animations for body */
body.flash-green {
    animation: flashGreen 0.5s;
}

body.flash-red {
    animation: flashRed 0.5s;
}

@keyframes flashGreen {
    0% {
        background-color: var(--bg-color);
    }

    10% {
        background-color: #064e3b;
    }

    100% {
        background-color: var(--bg-color);
    }
}


@keyframes flashRed {
    0% {
        background-color: var(--bg-color);
    }

    10% {
        background-color: #7f1d1d;
    }

    100% {
        background-color: var(--bg-color);
    }
}

/* Sound Toggle Button */
.btn-sound {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    position: absolute;
    /* Position it relative to header */
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.btn-sound:hover {
    background: rgba(255, 255, 255, 0.2);
}

header {
    position: relative;
    /* For absolute positioning of sound button */
}