/* =====================================================
   NEBRASKETBALL SHOOTING GAME
   Mobile-first basketball shooting challenge
   16-bit Nebraska themed aesthetic
   ===================================================== */

/* Hide hero when game tab is active */
#tab-game.active~.hero,
body:has(#tab-game.active) .hero {
    display: none !important;
}

/* Game Tab Container */
#tab-game {
    padding: 0 !important;
    background: #0a0a0f;
}

#tab-game.active {
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* Game Wrapper - Responsive scaling for all devices */
.game-wrapper {
    width: 100%;
    max-width: 480px;
    position: relative;
    margin: 0 auto;
}

/* Tablet sizing */
@media (min-width: 600px) {
    .game-wrapper {
        max-width: 550px;
    }
}

/* Desktop sizing */
@media (min-width: 768px) {
    .game-wrapper {
        max-width: 650px;
        margin-top: 80px;
        border-left: 4px solid #d00000;
        border-right: 4px solid #d00000;
        box-shadow: 0 0 60px rgba(208, 0, 0, 0.3);
    }
}

/* Large desktop */
@media (min-width: 1024px) {
    .game-wrapper {
        max-width: 750px;
    }
}

/* Extra large screens */
@media (min-width: 1400px) {
    .game-wrapper {
        max-width: 800px;
    }
}

/* Game Viewport */
.game-viewport {
    width: 100%;
    height: calc(100vh - 80px);
    min-height: 550px;
    max-height: 800px;
    position: relative;
    overflow: hidden;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    background: #1a1a2e;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

@media (min-width: 768px) {
    .game-viewport {
        height: 700px;
    }
}

@media (min-width: 1024px) {
    .game-viewport {
        height: 750px;
    }
}

/* Game Container fallback */
#game-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* =====================================================
   16-BIT NEBRASKA ARENA BACKGROUND
   ===================================================== */
.game-court {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    image-rendering: pixelated;
}

/* Arena ceiling/rafters */
.arena-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35%;
    background:
        repeating-linear-gradient(90deg,
            #1a1a2e 0px,
            #1a1a2e 40px,
            #252540 40px,
            #252540 42px),
        linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
}

/* Championship banners hint */
.arena-bg::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 10%;
    right: 10%;
    height: 20px;
    background:
        repeating-linear-gradient(90deg,
            #d00000 0px,
            #d00000 25px,
            transparent 25px,
            transparent 35px);
    opacity: 0.5;
}

/* 16-bit Pixel Crowd */
.crowd-section {
    position: absolute;
    top: 12%;
    left: 0;
    right: 0;
    height: 18%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 2px;
    padding: 0 3%;
    overflow: hidden;
}

.crowd-pixel {
    width: 8px;
    height: 12px;
    border-radius: 3px 3px 0 0;
    image-rendering: pixelated;
}

.crowd-pixel.wave {
    animation: crowd-wave 1.5s ease-in-out infinite;
}

@keyframes crowd-wave {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* Court Floor - Hardwood */
.court-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background:
        repeating-linear-gradient(90deg,
            #c9a227 0px,
            #c9a227 12px,
            #b8941f 12px,
            #b8941f 24px);
    transition: all 0.4s ease;
}

/* Paint/Key Area - Position from TOP (toward basket) */
.paint-area {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid #d00000;
    border-top: none;
    background: rgba(208, 0, 0, 0.12);
    transition: all 0.4s ease;
}

/* Free throw line - Position from TOP (toward basket) */
.free-throw-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
}

/* 3-point arc - Position from TOP (toward basket) */
.three-point-arc {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: none;
    border-radius: 0 0 50% 50%;
    transition: all 0.4s ease;
}

/* LAYUP VIEW - Player is RIGHT UNDER the basket, inside the paint
   Paint should fill most of the visible court, player is at the far end of paint */
.court-floor.layup .paint-area {
    width: 100%;
    height: 95%;
}

.court-floor.layup .free-throw-line {
    top: 85%;
    width: 85%;
}

.court-floor.layup .three-point-arc {
    display: none;
    /* Can't see arc when under basket */
}

/* FREE THROW VIEW - Player is standing AT the free throw line
   Free throw line should be near the player (bottom), paint extends up to basket */
.court-floor.freethrow .paint-area {
    width: 55%;
    height: 70%;
}

.court-floor.freethrow .free-throw-line {
    top: 70%;
    width: 55%;
}

.court-floor.freethrow .three-point-arc {
    top: 90%;
    width: 100%;
    height: 40%;
}

/* 3-POINTER VIEW - Player is BEHIND the 3-point arc
   Arc should be far up the screen, paint is distant */
.court-floor.threepoint .paint-area {
    width: 38%;
    height: 45%;
}

.court-floor.threepoint .free-throw-line {
    top: 45%;
    width: 38%;
}

.court-floor.threepoint .three-point-arc {
    top: 70%;
    width: 85%;
    height: 40%;
}

/* Nebraska N logo on court - centered in paint area */
.court-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Oswald', sans-serif;
    font-weight: 900;
    color: rgba(208, 0, 0, 0.15);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

/* Adjust logo position by shot type - center in visible court area */
.court-floor.layup .court-logo {
    top: 40%;
    font-size: 85px;
}

.court-floor.freethrow .court-logo {
    top: 25%;
    font-size: 55px;
}

.court-floor.threepoint .court-logo {
    top: 15%;
    font-size: 40px;
}

/* =====================================================
   HOOP - PERSPECTIVE BASED ON SHOT TYPE
   ===================================================== */
.hoop-container {
    position: absolute;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s ease;
    z-index: 5;
}

/* LAYUP - Very close, large hoop */
.hoop-container.layup {
    top: 28%;
    transform: translateX(-50%) scale(2.2);
}

/* FREE THROW - Medium distance */
.hoop-container.freethrow {
    top: 26%;
    transform: translateX(-50%) scale(1.3);
}

/* 3-POINTER - Far away, smaller hoop */
.hoop-container.threepoint {
    top: 22%;
    transform: translateX(-50%) scale(0.85);
}

/* Backboard */
.backboard {
    width: 65px;
    height: 42px;
    background: linear-gradient(180deg, #fff 0%, #e0e0e0 100%);
    border: 3px solid #333;
    border-radius: 3px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    image-rendering: pixelated;
}

/* Backboard square */
.backboard::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -35%);
    width: 26px;
    height: 20px;
    border: 3px solid #d00000;
}

/* Rim */
.rim {
    width: 34px;
    height: 5px;
    background: linear-gradient(180deg, #ff5500 0%, #cc3300 100%);
    border: 2px solid #aa2200;
    border-radius: 0 0 2px 2px;
    position: relative;
    box-shadow: 0 2px 6px rgba(255, 68, 0, 0.5);
}

/* Net */
.net {
    width: 30px;
    height: 25px;
    background:
        repeating-linear-gradient(180deg,
            transparent 0px,
            transparent 3px,
            rgba(255, 255, 255, 0.85) 3px,
            rgba(255, 255, 255, 0.85) 4px);
    clip-path: polygon(0 0, 100% 0, 75% 100%, 25% 100%);
}

/* =====================================================
   DEFENDER - PERSPECTIVE BASED
   ===================================================== */
.defender-container {
    position: absolute;
    left: 50%;
    transition: all 0.4s ease;
    z-index: 8;
}

/* Hide for layup */
.defender-container.layup {
    display: none !important;
}

/* FREE THROW - Closer, larger defender */
.defender-container.freethrow {
    bottom: 32%;
    transform: translateX(-50%) scale(1.2);
}

/* 3-POINTER - Medium distance */
.defender-container.threepoint {
    bottom: 38%;
    transform: translateX(-50%) scale(0.9);
}

.defender {
    position: relative;
    width: 50px;
    height: 85px;
    transition: transform 0.1s ease-out;
    image-rendering: pixelated;
}

.defender.jumping {
    animation: defender-jump 0.9s ease-out;
}

@keyframes defender-jump {
    0% {
        transform: translateY(0);
    }

    35% {
        transform: translateY(-45px);
    }

    50% {
        transform: translateY(-50px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Defender pixel art parts */
.defender-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: #e8c8a0;
    border-radius: 3px;
    border: 2px solid #c9a87c;
}

.defender-body {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 28px;
    background: #d00000;
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    color: white;
    font-weight: bold;
    border: 2px solid #8b0000;
}

.defender-shorts {
    position: absolute;
    top: 42px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 14px;
    background: #f5f5f5;
    border-radius: 0 0 3px 3px;
    border: 2px solid #ccc;
    border-top: none;
}

.defender-legs {
    position: absolute;
    top: 54px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 28px;
    display: flex;
    justify-content: space-between;
}

.defender-leg {
    width: 9px;
    height: 100%;
    background: #e8c8a0;
    border-radius: 2px;
    border: 1px solid #c9a87c;
}

/* Arms raised when jumping */
.defender-arms {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    display: flex;
    justify-content: space-between;
    transition: top 0.1s;
}

.defender.jumping .defender-arms {
    top: -12px;
}

.defender-arm {
    width: 9px;
    height: 28px;
    background: #e8c8a0;
    border-radius: 3px;
    border: 1px solid #c9a87c;
}

/* =====================================================
   BASKETBALL
   ===================================================== */
.basketball {
    position: absolute;
    width: 40px;
    height: 40px;
    background:
        radial-gradient(circle at 35% 35%, #ff9933 0%, #ff6600 40%, #cc4400 100%);
    border-radius: 50%;
    border: 3px solid #993300;
    z-index: 15;
    opacity: 0;
    pointer-events: none;
    box-shadow:
        inset -3px -3px 6px rgba(0, 0, 0, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.4);
}

.basketball.visible {
    opacity: 1;
}

/* Ball seams */
.basketball::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #662200;
    transform: translateY(-50%);
}

.basketball::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 10%;
    bottom: 10%;
    width: 2px;
    background: #662200;
    transform: translateX(-50%);
}

/* =====================================================
   AIM & POWER CONTROLS
   ===================================================== */
.controls-container {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 30;
}

/* Aim Arrow Container */
.aim-container {
    position: relative;
    width: 160px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Target zone */
.aim-target {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 80px;
    border: 2px dashed rgba(34, 197, 94, 0.4);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    pointer-events: none;
}

/* Aim Arrow */
.aim-arrow {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 8px;
    height: 75px;
    background: linear-gradient(180deg,
            #22c55e 0%,
            #eab308 50%,
            #ef4444 100%);
    transform-origin: bottom center;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 0 15px rgba(255, 200, 0, 0.6);
}

/* Arrow head */
.aim-arrow::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 18px solid #22c55e;
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.7));
}

/* Power Bar Container */
.power-container {
    position: relative;
    width: 200px;
    height: 24px;
    background: rgba(0, 0, 0, 0.85);
    border: 3px solid #555;
    border-radius: 5px;
    overflow: hidden;
}

/* Power zones */
.power-zones {
    position: absolute;
    inset: 0;
    display: flex;
}

.power-zone {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.power-zone.sweet-spot {
    background: rgba(34, 197, 94, 0.25);
    border: 2px solid rgba(34, 197, 94, 0.5);
    border-radius: 3px;
}

/* Power fill bar */
.power-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #22c55e 0%, #eab308 50%, #ef4444 100%);
}

/* Power indicator arrow */
.power-arrow {
    position: absolute;
    top: -10px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
    transform: translateX(-8px);
}

/* =====================================================
   SHOT TYPE LABEL
   ===================================================== */
.shot-label {
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #d00000;
    padding: 8px 20px;
    font-size: 11px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    z-index: 50;
    box-shadow: 0 0 15px rgba(208, 0, 0, 0.4);
}

/* =====================================================
   ACTION BUTTON
   ===================================================== */
.action-btn {
    padding: 16px 45px;
    background: linear-gradient(180deg, #e02020 0%, #b01010 100%);
    border: 3px solid #fff;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    box-shadow:
        0 5px 0 #800000,
        0 8px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.08s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.action-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #800000, 0 4px 8px rgba(0, 0, 0, 0.4);
}

.action-btn:disabled {
    background: linear-gradient(180deg, #555 0%, #333 100%);
    box-shadow: 0 5px 0 #222;
    cursor: not-allowed;
}

/* =====================================================
   SCORE DISPLAY
   ===================================================== */
.score-display {
    position: absolute;
    top: 75px;
    right: 15px;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #22c55e;
    padding: 10px 16px;
    border-radius: 5px;
    text-align: center;
    z-index: 50;
}

.score-label {
    font-size: 7px;
    color: #888;
    margin-bottom: 3px;
}

.score-value {
    font-size: 24px;
    color: #22c55e;
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

/* =====================================================
   EXIT BUTTON
   ===================================================== */
.exit-btn {
    position: absolute;
    top: 75px;
    left: 15px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #555;
    color: #888;
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 50;
    transition: all 0.2s;
}

.exit-btn:hover {
    border-color: #d00000;
    color: #d00000;
}

/* =====================================================
   FEEDBACK OVERLAY
   ===================================================== */
.feedback-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.feedback-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.feedback-message {
    font-size: 28px;
    text-align: center;
    padding: 20px;
    animation: feedback-pop 0.25s ease-out;
}

@keyframes feedback-pop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

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

.feedback-message.success {
    color: #22c55e;
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.8);
}

.feedback-message.fail {
    color: #ef4444;
    text-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
}

.feedback-sub {
    font-size: 10px;
    color: #aaa;
    margin-top: 10px;
}

/* =====================================================
   MENU SCREENS
   ===================================================== */
.game-menu {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 30%, rgba(208, 0, 0, 0.1) 0%, transparent 50%),
        rgba(10, 10, 15, 0.97);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    padding: 20px;
}

.game-menu.hidden {
    display: none;
}

.menu-title {
    font-size: 20px;
    color: #d00000;
    text-shadow: 2px 2px 0 #000, 0 0 25px rgba(208, 0, 0, 0.5);
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.6;
}

.menu-subtitle {
    font-size: 8px;
    color: #888;
    margin-bottom: 30px;
    text-align: center;
}

.menu-btn {
    margin: 7px 0;
    padding: 12px 30px;
    background: transparent;
    border: 3px solid #d00000;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 220px;
}

.menu-btn:hover {
    background: #d00000;
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(208, 0, 0, 0.4);
}

.menu-btn.primary {
    background: #d00000;
}

.menu-btn.primary:hover {
    background: #ff2020;
}

/* =====================================================
   GAME OVER SCREEN
   ===================================================== */
.gameover-content {
    text-align: center;
    max-width: 300px;
}

.final-score-display {
    margin: 22px 0;
}

.final-score-label {
    font-size: 9px;
    color: #888;
}

.final-score-value {
    font-size: 48px;
    color: #22c55e;
    text-shadow: 0 0 35px rgba(34, 197, 94, 0.5);
}

.name-input {
    width: 100%;
    padding: 12px;
    background: #1a1a2e;
    border: 3px solid #444;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    text-align: center;
    margin: 15px 0;
    text-transform: uppercase;
}

.name-input:focus {
    outline: none;
    border-color: #d00000;
}

.name-input::placeholder {
    color: #555;
}

/* =====================================================
   LEADERBOARD
   ===================================================== */
.leaderboard-container {
    width: 100%;
    max-width: 350px;
    max-height: 40vh;
    overflow-y: auto;
    margin: 15px 0;
}

.leaderboard-list {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    border-radius: 5px;
}

.leaderboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    border-bottom: 1px solid #222;
    font-size: 8px;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row.highlight {
    background: rgba(208, 0, 0, 0.15);
    border: 1px solid #d00000;
}

.leaderboard-rank {
    color: #888;
    min-width: 32px;
}

.leaderboard-rank.gold {
    color: #ffd700;
}

.leaderboard-rank.silver {
    color: #c0c0c0;
}

.leaderboard-rank.bronze {
    color: #cd7f32;
}

.leaderboard-name {
    flex: 1;
    color: #fff;
    margin: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-score {
    color: #22c55e;
    font-weight: bold;
}

.your-rank {
    margin-top: 15px;
    padding: 12px;
    background: rgba(208, 0, 0, 0.1);
    border: 2px solid #d00000;
    border-radius: 5px;
    text-align: center;
}

.your-rank-label {
    font-size: 6px;
    color: #888;
}

.your-rank-value {
    font-size: 14px;
    color: #fff;
    margin-top: 4px;
}

/* =====================================================
   MOBILE RESPONSIVE
   ===================================================== */
@media (max-width: 400px) {
    .game-viewport {
        height: calc(100vh - 90px);
    }

    .shot-label {
        top: 68px;
        font-size: 9px;
        padding: 6px 14px;
    }

    .score-display {
        top: 68px;
        right: 8px;
        padding: 8px 12px;
    }

    .score-value {
        font-size: 20px;
    }

    .exit-btn {
        top: 68px;
        left: 8px;
        font-size: 6px;
        padding: 8px 10px;
    }

    .action-btn {
        padding: 14px 35px;
        font-size: 11px;
    }

    .aim-container {
        width: 140px;
        height: 80px;
    }

    .aim-arrow {
        height: 65px;
        width: 7px;
    }

    .power-container {
        width: 170px;
        height: 22px;
    }

    .menu-title {
        font-size: 16px;
    }

    .menu-btn {
        min-width: 190px;
        font-size: 8px;
        padding: 10px 20px;
    }

    .final-score-value {
        font-size: 40px;
    }

    .controls-container {
        bottom: 8%;
        gap: 10px;
    }

    .court-logo {
        font-size: 45px;
    }
}

/* =====================================================
   TUTORIAL OVERLAY
   ===================================================== */
.tutorial-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 30%, rgba(208, 0, 0, 0.15) 0%, transparent 50%),
        rgba(10, 10, 15, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 210;
    padding: 20px;
}

.tutorial-overlay.hidden {
    display: none;
}

.tutorial-content {
    max-width: 340px;
    width: 100%;
    text-align: center;
}

.tutorial-title {
    font-size: 18px;
    color: #d00000;
    text-shadow: 2px 2px 0 #000, 0 0 25px rgba(208, 0, 0, 0.5);
    margin-bottom: 25px;
}

.tutorial-rules {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.tutorial-rule {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #d00000;
    padding: 12px 14px;
    border-radius: 0 6px 6px 0;
    text-align: left;
}

.tutorial-icon {
    font-size: 22px;
    min-width: 30px;
    text-align: center;
}

.tutorial-text {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #ccc;
    line-height: 1.6;
}

.tutorial-text strong {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

.tap-label {
    display: inline-block;
    background: #d00000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: bold;
    margin-right: 6px;
}

/* Mobile adjustments for tutorial */
@media (max-width: 400px) {
    .tutorial-title {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .tutorial-rules {
        gap: 12px;
    }

    .tutorial-rule {
        padding: 10px 12px;
    }

    .tutorial-icon {
        font-size: 18px;
        min-width: 24px;
    }

    .tutorial-text {
        font-size: 10px;
    }

    .tutorial-text strong {
        font-size: 8px;
    }
}

/* =====================================================
   HELP ICON BUTTON
   ===================================================== */
.help-icon-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-icon-btn:hover {
    background: rgba(208, 0, 0, 0.2);
    border-color: #d00000;
    transform: scale(1.1);
}

.help-icon-btn:active {
    transform: scale(0.95);
}

/* Tutorial back button */
.tutorial-back-btn {
    margin-top: 10px;
    background: transparent;
    border-color: #666;
}

.tutorial-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #888;
}

/* Hide elements with hidden class */
.tutorial-back-btn.hidden,
.help-icon-btn.hidden,
#btn-start-tutorial.hidden {
    display: none;
}

@media (max-width: 400px) {
    .help-icon-btn {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}