
.game-container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 20px;
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

.game-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
    font-weight: bold;
    letter-spacing: 1px;
}

.progress-container {
    margin-bottom: 30px;
}

.race-counter {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #1e1e4e;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00bfff, #0080ff);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.traffic-lights {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.light-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #1a1a2e;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.light {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.light.blue {
    background-color: #1e3a8a;
}

.light.red {
    background-color: #7b1113;
}

.light.red.active {
    background-color: #ff0000;
    box-shadow: 0 0 25px #ff0000;
}

.light.green.active {
    background-color: #00ff00;
    box-shadow: 0 0 25px #00ff00;
}

.game-instruction {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #b0b0ff;
    min-height: 24px;
}

.best-time {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 30px;
}

.best-time span {
    color: #00bfff;
    font-weight: bold;
}

.start-button {
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.start-button:hover {
    background: linear-gradient(135deg, #0052a3, #007acc);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.6);
}

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

.start-button:disabled {
    background: linear-gradient(135deg, #333, #555);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.result-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 42, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.result-container.show {
    opacity: 1;
    visibility: visible;
}

.result-card {
    background-color: #1a1a2e;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 1px solid rgba(0, 191, 255, 0.3);
}

.result-header {
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: white;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.result-text {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 20px;
}

.reaction-time {
    font-size: 3rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 191, 255, 0.7);
    margin-bottom: 30px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.4);
}

.continue-button {
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.4);
}

.continue-button:hover {
    background: linear-gradient(135deg, #0052a3, #007acc);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.6);
}

.continue-button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }

    .light {
        width: 60px;
        height: 60px;
    }

    .traffic-lights {
        gap: 10px;
    }

    .light-column {
        padding: 10px;
    }

    .reaction-time {
        font-size: 2.5rem;
    }

    .result-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.8rem;
    }

    .light {
        width: 50px;
        height: 50px;
    }

    .traffic-lights {
        gap: 8px;
    }

    .reaction-time {
        font-size: 2rem;
    }

    .start-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

.f1-info-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.info-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.info-section h2 {
    color: #ff5722;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-section h3 {
    color: #ff9800;
    margin: 20px 0 10px;
    font-size: 1.3rem;
}

.info-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #e0e0e0;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.step {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.step:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.step h3 {
    color: #ff9800;
    margin-bottom: 10px;
}

.types-grid,
.training-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;

    gap: 20px;
    margin: 20px 0;
}

.type-card,
.training-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.type-card:hover,
.training-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.type-card h3,
.training-card h3 {
    color: #ff9800;
    margin-bottom: 10px;
}

.drivers-table-container {
    margin-top: 20px;
}

.drivers-table-container h3 {
    color: #ff9800;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.drivers-table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.drivers-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.drivers-table th,
.drivers-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drivers-table th {
    background: rgba(255, 87, 34, 0.2);
    color: #ff5722;
    font-weight: bold;
}

.drivers-table tr:last-child td {
    border-bottom: none;
}

.drivers-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .f1-info-container {
        padding: 0 15px;
    }

    .info-section {
        padding: 20px 15px;
    }

    .info-section h2 {
        font-size: 1.5rem;
    }

    .info-section h3 {
        font-size: 1.2rem;
    }

    .info-section p {
        font-size: 1rem;
    }

    .steps-container,
    .types-grid,
    .training-grid {
        grid-template-columns: 1fr;
    }

    .drivers-table {
        font-size: 0.9rem;
    }

    .drivers-table th,
    .drivers-table td {
        padding: 10px 8px;
    }
}