/* Breakout Game - 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(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 18px;
}

.nav-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #f97316 20%, #fb923c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-spacer {
    width: 100px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    flex-wrap: wrap;
}

.stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    min-width: 90px;
}

.stat-chip.lives {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.25);
}

.stat-chip.level {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border-color: rgba(59, 130, 246, 0.25);
}

.stat-chip.best {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.04));
    border-color: rgba(251, 191, 36, 0.25);
}

.chip-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.chip-value {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 20px 20px;
    flex-wrap: wrap;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-play {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
}

.btn-play:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
}

.btn-pause {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.btn-pause:hover:not(:disabled) {
    background: rgba(251, 191, 36, 0.2);
}

.btn-reset {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-reset:hover {
    background: rgba(239, 68, 68, 0.18);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.btn-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-xl {
    padding: 16px 32px;
    font-size: 16px;
}

/* Game Main */
.game-main {
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.canvas-container {
    position: relative;
    background: linear-gradient(145deg, rgba(20, 25, 50, 0.95), rgba(10, 15, 35, 0.98));
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(249, 115, 22, 0.08);
    max-width: 100%;
    overflow: hidden;
}

#game-canvas {
    background: radial-gradient(ellipse at center, rgba(249, 115, 22, 0.03), transparent 70%), #080c1a;
    border-radius: 12px;
    display: block;
    max-width: 100%;
    height: auto;
}

/* Overlays */
.overlay-panel,
.game-over {
    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: 18px;
    z-index: 50;
}

.overlay-panel.hidden,
.game-over.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
    padding: 32px;
    max-width: 320px;
}

.overlay-emoji {
    font-size: 56px;
    margin-bottom: 14px;
}

.overlay-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px;
    background: linear-gradient(135deg, #f97316, #fb923c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.overlay-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 22px;
}

.final-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 18px;
}

.final-stat {
    text-align: center;
}

.fs-label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.fs-value {
    font-size: 28px;
    font-weight: 800;
    color: #fb923c;
}

.new-record {
    font-size: 16px;
    font-weight: 700;
    color: #fbbf24;
    margin: 14px 0;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

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

    50% {
        opacity: 0.85;
        transform: scale(1.05);
    }
}

.overlay-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Help Section */
.help-section {
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
}

.help-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #fff;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.help-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.help-key {
    padding: 6px 12px;
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fb923c;
    white-space: nowrap;
}

.help-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.rules-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #f97316;
    border-radius: 12px;
    padding: 20px 24px;
}

.rules-block h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fb923c;
    margin: 0 0 14px;
}

.rules-block ul {
    margin: 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.8;
}

/* Recommendations */
.recommendations-section {
    max-width: 850px;
    margin: 48px auto;
    padding: 0 20px;
}

.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(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.4);
    transform: translateY(-4px);
}

.card-icon {
    font-size: 30px;
}

.card-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* Responsive */
@media (max-width: 860px) {
    #game-canvas {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 600px) {
    .stats-bar {
        gap: 10px;
        padding: 16px;
    }

    .stat-chip {
        padding: 10px 16px;
        min-width: 70px;
    }

    .chip-value {
        font-size: 22px;
    }

    .action-bar {
        gap: 8px;
    }

    .btn-action {
        padding: 10px 16px;
        font-size: 14px;
    }

    .nav-title {
        font-size: 20px;
    }

    .nav-spacer {
        display: none;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}