/* Reaction Time Game Styles */
.game-main {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-left,
.header-right {
    flex: 1;
}

.header-center {
    flex: 2;
    text-align: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.game-title {
    color: white;
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stats-display {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.stat-item i {
    font-size: 1.3rem;
}

.game-container {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

#gameCanvas {
    width: 100%;
    max-width: 800px;
    height: 500px;
    display: block;
    margin: 0 auto;
    border-radius: 16px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
    transition: all 0.3s ease;
}

#gameCanvas:active {
    transform: scale(0.99);
}

.game-info {
    margin-top: 1.5rem;
}

.info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.25rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.info-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.info-value {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#modalTitle {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 1rem;
}

#modalMessage {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Help Section */
.help-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.help-section h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.help-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.help-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.help-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.help-item h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-item p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-left,
    .header-center,
    .header-right {
        width: 100%;
        text-align: center;
    }

    .stats-display {
        justify-content: center;
    }

    .game-title {
        font-size: 1.5rem;
    }

    #gameCanvas {
        height: 400px;
    }

    .info-panel {
        grid-template-columns: 1fr;
    }
}