:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-light: #e8e8e8;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.game-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
}

.game-header h1 {
    color: white;
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.game-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.video-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.video-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.video-card:nth-child(2) .video-card-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    /* 4:3 Aspect Ratio */
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    overflow: hidden;
}

.video-wrapper img,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.video-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.video-placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
}

#countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#countdown-overlay.active {
    display: flex;
}

#countdown-number {
    font-size: 8rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
    animation: pulse 1s ease-in-out infinite;
}

.control-panel {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2.5rem;
    border-radius: 15px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.start-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.5rem 4rem;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.start-button:active {
    transform: translateY(-1px);
}

.start-button i {
    margin-right: 0.75rem;
}

.instruction-text {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 2rem;
    font-weight: 500;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes pulse {

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

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-container {
        gap: 1rem;
    }

    .stat-card {
        min-width: 150px;
        padding: 1rem 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .start-button {
        padding: 1.25rem 3rem;
        font-size: 1.2rem;
    }

    #countdown-number {
        font-size: 5rem;
    }
}

/* Custom CSS for the countdown overlay */
#countdown-overlay {
    position: absolute;
    /* Position over the video container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* Semi-transparent background */
    display: none;
    /* Hidden by default */
    place-content: center;
    /* Center content vertically and horizontally */
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#countdown-number {
    font-size: 8rem;
    /* Large font size for effect */
    color: white;
    font-weight: bold;
}

/* Container for the video stream */
#video-container {
    position: relative;
    /* Needed for the absolute positioning of the overlay */
    max-width: 70%;
    min-height: 60vh;
    height: auto;
    margin: 0 auto;
}
