/* Reaction Test - Premium Redesign */

/* Page Layout */
.page-wrapper {
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Navigation */
.game-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(10, 15, 37, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-home {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-home:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.4);
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 18px;
}

.nav-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #fbbf24 20%, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.test-badge {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* Main Layout */
.game-main {
    display: flex;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    flex-wrap: wrap;
}

/* Stats Panel */
.stats-panel {
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-shrink: 0;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.stat-card.avg {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.04));
    border-color: rgba(59, 130, 246, 0.2);
}

.stat-card.best {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04));
    border-color: rgba(34, 197, 94, 0.2);
}

.sc-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.sc-value {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
}

.btn-reset {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-xl {
    padding: 16px 32px;
    font-size: 16px;
}

/* History Panel */
.history-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
}

.history-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 12px;
}

.results-list {
    max-height: 200px;
    overflow-y: auto;
}

.no-results {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Test Section */
.test-section {
    flex: 1;
    min-width: 300px;
}

.test-area {
    position: relative;
    height: 400px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    overflow: hidden;
}

.test-area.waiting {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.15));
    border: 2px solid rgba(239, 68, 68, 0.4);
}

.test-area.ready {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.15));
    border: 2px solid rgba(251, 191, 36, 0.4);
}

.test-area.go {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.35), rgba(22, 163, 74, 0.2));
    border: 2px solid rgba(34, 197, 94, 0.5);
}

.test-area.result {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.15));
    border: 2px solid rgba(59, 130, 246, 0.4);
}

/* Overlay */
.overlay-panel {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 25, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    z-index: 50;
}

.overlay-panel.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
    padding: 32px;
}

.overlay-emoji {
    font-size: 56px;
    margin-bottom: 14px;
}

.overlay-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.overlay-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 24px;
}

/* Test Content */
.test-content {
    text-align: center;
    padding: 20px;
}

.test-message {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}

.test-instruction {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

/* Instructions Bar */
.instructions-bar {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
}

.inst-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inst-icon {
    font-size: 20px;
}

.inst-text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* Recommendations */
.recommendations-section {
    max-width: 800px;
    margin: 48px auto;
    padding: 0 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #fff;
}

.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.game-card-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.game-card-mini:hover {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.4);
    transform: translateY(-4px);
}

.card-icon {
    font-size: 30px;
}

.card-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .game-main {
        flex-direction: column;
    }

    .stats-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 1;
        min-width: 100px;
    }

    .action-buttons {
        width: 100%;
        flex-direction: row;
    }

    .history-panel {
        width: 100%;
    }
}

/* Legacy support */
.header {
    display: none;
}

.game-container {
    display: contents;
}

.level-badge {
    display: none;
}

.instructions-panel,
.test-main-area {
    display: contents;
}