/* 
 * Pars Runner - Mega Edition
 * Performance-optimized with mobile-first design
 */

/* =============================
   GAME LAUNCHER HOOK
   ============================= */
.game-launcher-hook {
    background: #0a0a0f;
    padding: 40px 0;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hook-flex-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hook-mascot {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 20px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
    animation: mascot-float 3s infinite ease-in-out;
}

.mascot-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.3));
}

@keyframes mascot-float {

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

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.hook-text-content {
    flex: 1;
    text-align: left;
}

.hook-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
    color: #ffd700;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 12px;
    border-left: 3px solid #D4AF37;
    text-transform: uppercase;
}

.game-launcher-hook h2 {
    font-size: 2.4rem;
    color: #fff;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.1;
}

.game-launcher-hook h2 span {
    color: #D4AF37;
    background: linear-gradient(135deg, #D4AF37, #f5d76e, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-launcher-hook p {
    font-size: 1.15rem;
    color: rgb(180 180 180 / 95%);
    margin-bottom: 0;
    line-height: 1.7;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.game-launcher-hook p b,
.game-launcher-hook p strong {
    color: #ffd700;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.btn-launch-game {
    background: linear-gradient(135deg, #D4AF37, #f5d76e);
    color: #000;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 900;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    white-space: nowrap;
}

.btn-launch-game:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.btn-launch-game .btn-icon {
    font-size: 1.4rem;
}

/* =============================
   GAME UI CONTROLS
   ============================= */
.game-ui-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;
    /* Increased to be above everything including overlays */
    display: flex;
    gap: 10px;
}

.game-control-btn {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    /* Increased icon size */
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    /* Clean touch feedback */
}

/* TOUCH TARGET OPTIMIZATION for mobile */
@media (max-width: 768px) {
    .game-control-btn {
        width: 54px;
        /* Larger touch target */
        height: 54px;
    }

    .game-ui-controls {
        top: 15px;
        right: 15px;
        gap: 12px;
    }
}

.game-control-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #D4AF37;
    transform: scale(1.1);
}

/* FULLSCREEN / EXPANDED STATE */
.leopard-runner-section.game-expanded {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    border: none !important;
    aspect-ratio: auto !important;
}

.game-expanded .shrink-icon {
    display: block !important;
}

.game-expanded .expand-icon {
    display: none !important;
}

/* =============================
   LEOPARD RUNNER SECTION
   ============================= */
.leopard-runner-section {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    background: #050508;
    overflow: hidden;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    transition: background 3s ease;
    -webkit-touch-callout: none;
}

/* ===== PARALLAX BACKGROUND ===== */
.parallax-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.parallax-stars {
    z-index: 1;
}

.stars-svg {
    width: 100%;
    height: 100%;
}

.celestial-body {
    position: absolute;
    top: 12%;
    right: 15%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 2s ease;
}

.parallax-mountains {
    z-index: 3;
    bottom: 0;
    top: auto;
    height: 50%;
}

.mountains-svg {
    width: 100%;
    height: 100%;
}

.is-playing .mountains-svg {
    animation: svg-scroll-slow 25s linear infinite;
}

.parallax-city {
    z-index: 4;
    bottom: 0;
    top: auto;
    height: 45%;
}

.city-svg {
    width: 200%;
    height: 100%;
}

.is-playing .city-svg {
    animation: svg-scroll 10s linear infinite;
}

@keyframes svg-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes svg-scroll-slow {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-20%);
    }
}

.runner-bg-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 80%, rgba(212, 175, 55, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 5;
}

/* ===== PROGRESS BAR ===== */
.progress-bar-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 300;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #D4AF37, #f5d76e, #D4AF37);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.progress-label {
    position: absolute;
    right: 10px;
    top: 5px;
    font-size: 0.6rem;
    color: rgba(212, 175, 55, 0.6);
    font-family: 'JetBrains Mono', monospace;
}

/* ===== STAGE ===== */
.runner-stage {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1920px;
    margin: 0 auto;
    z-index: 5;
}

/* ===== FLOOR ===== */
.runner-floor {
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.15) 20%, rgba(212, 175, 55, 0.4) 50%, rgba(212, 175, 55, 0.15) 80%, transparent 100%);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
    z-index: 10;
}

.is-playing .runner-floor {
    animation: floor-move 1.2s linear infinite;
}

@keyframes floor-move {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ===== SCORE BOARD ===== */
.game-ui-top {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 100;
}

.score-board {
    font-family: 'Inter', sans-serif;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.score-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    line-height: 1.6;
}

.score-board span:not(.label) {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 55px;
    text-align: right;
}

.score-board .label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ===== COMBO DISPLAY ===== */
.combo-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 150;
    pointer-events: none;
}

.combo-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    color: #ff9f43;
    text-shadow: 0 0 30px rgba(255, 159, 67, 0.6);
    animation: combo-pop 0.4s cubic-bezier(0.17, 0.67, 0.35, 1.5);
}

@keyframes combo-pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    60% {
        transform: scale(1.3);
        opacity: 1;
    }

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

/* ===== POWER-UP INDICATOR ===== */
.powerup-indicator {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: powerup-glow 1s ease-in-out infinite alternate;
}

.powerup-icon {
    font-size: 1.3rem;
}

.powerup-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 700;
}

@keyframes powerup-glow {
    from {
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    }

    to {
        box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
    }
}

/* ===== LEVEL TOAST ===== */
.level-toast {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 180;
    pointer-events: none;
}

.level-toast span {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    color: #a29bfe;
    letter-spacing: 6px;
    text-shadow: 0 0 30px rgba(162, 155, 254, 0.5);
    animation: level-up-anim 1.5s ease-out forwards;
}

@keyframes level-up-anim {
    0% {
        transform: scale(0.5) translateY(20px);
        opacity: 0;
    }

    30% {
        transform: scale(1.2) translateY(0);
        opacity: 1;
    }

    70% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }

    100% {
        transform: scale(0.8) translateY(-30px);
        opacity: 0;
    }
}

/* ===== OVERLAY SCREENS ===== */
.game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    transition: opacity 0.3s ease;
}

.overlay-content {
    text-align: center;
    color: #fff;
    padding: 35px;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    width: 95%;
    max-width: 900px;
    animation: overlay-appear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.overlay-inner {
    display: flex;
    gap: 30px;
    align-items: stretch;
    justify-content: center;
}

.overlay-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
}

.discount-reward-panel {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(0, 0, 0, 0.6));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.premium-glow {
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.1), 0 30px 80px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.premium-title {
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: 2px;
    /* Reduced from 12px for better readability */
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.premium-title-alt {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: 2px;
    /* Reduced from 8px */
    color: #fff;
    margin-bottom: 15px;
    opacity: 0.9;
}

.premium-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 25px;
}

.controls-hint-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.hint-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(212, 175, 55, 0.8);
    font-weight: 600;
}

.hint-item span {
    font-size: 1.5rem;
    background: rgba(212, 175, 55, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.btn-start-game {
    background: #fff;
    color: #000;
    border: none;
    padding: 18px 50px;
    font-size: 1.2rem;
    font-weight: 900;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.btn-start-game:hover {
    background: #D4AF37;
    transform: scale(1.05);
}

.pulse-btn {
    animation: pulse-btn-anim 2s infinite;
}

@keyframes pulse-btn-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-5px);
}

.stat-card .lbl {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.stat-card .val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.6rem !important;
    font-weight: 800;
    color: #D4AF37;
}

.leaderboard-submit-premium {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.premium-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 15px;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}

.premium-input:focus {
    border-color: #D4AF37;
    background: rgba(255, 255, 255, 0.08);
}

.btn-submit-score-premium {
    background: #D4AF37;
    color: #000;
    border: none;
    padding: 14px;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-restart-premium {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 15px 40px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-restart-premium:hover {
    background: #fff;
    color: #000;
}

.premium-list {
    background: rgba(0, 0, 0, 0.3) !important;
}

.controls-hint-footer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
        opacity: 1;
    }

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

.overlay-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes overlay-appear {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.overlay-content h3 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 0px;
    letter-spacing: 8px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ff4d4d, #f093fb, #f5576c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 77, 77, 0.4));
    animation: title-pulse 3s infinite alternate;
}

@keyframes title-pulse {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 77, 77, 0.4));
        transform: scale(1);
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(255, 77, 77, 0.6));
        transform: scale(1.02);
    }
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.5);
    font-size: clamp(0.8rem, 2vw, 1rem);
}

.controls-hint {
    margin-top: 18px;
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 0.85rem;
    color: rgba(212, 175, 55, 0.8);
}

.final-stats {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: left;
    margin-bottom: 15px;
}

.final-stats p {
    margin: 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.final-stats p:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
}

/* Color coding for cards */
#finalScoreDisplay {
    border-top-color: #4facfe;
}

#finalCoinsDisplay {
    border-top-color: #f9d423;
}

#finalComboDisplay {
    border-top-color: #ff9f43;
}

#finalLevelDisplay {
    border-top-color: #a29bfe;
}

.final-stats p span.val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.final-stats p span.lbl {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

.achievements-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 12px 0;
}

.achievement-badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #D4AF37;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.pulse-icon {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #D4AF37;
    margin-bottom: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

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

    50% {
        transform: scale(1.15);
        opacity: 0.7;
    }
}

.btn-restart {
    background: linear-gradient(135deg, #D4AF37, #f5d76e);
    color: #000;
    border: none;
    padding: 12px 30px;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 10px;
    margin-top: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 1.5px;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-restart::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(30deg);
    transition: none;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -60%;
    }

    20% {
        left: 120%;
    }

    100% {
        left: 120%;
    }
}

.btn-restart .btn-sub {
    font-size: 0.65rem;
    opacity: 0.7;
    font-weight: 600;
    letter-spacing: 1px;
}

.btn-restart:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.5);
}

.btn-restart:active {
    transform: translateY(0) scale(0.98);
}

/* ===== CHARACTER ===== */
.leopard-character {
    position: absolute;
    bottom: 20%;
    left: 12%;
    width: 150px;
    /* Increased from 130px */
    z-index: 50;
    transform: translateY(0);
    transform-origin: bottom center;
    transition: transform 0.15s ease;
}

.leopard-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.4));
}

.leopard-frame2 {
    position: absolute;
    top: 0;
    left: 0;
}

.leopard-frame1 {
    opacity: 1;
}

.leopard-frame2 {
    opacity: 0;
}

.is-playing .leopard-frame1 {
    animation: frame-toggle 0.4s steps(1) infinite !important;
}

.is-playing .leopard-frame2 {
    animation: frame-toggle-alt 0.4s steps(1) infinite !important;
}

@keyframes frame-toggle {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes frame-toggle-alt {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Jump */
.leopard-character.is-jumping {
    animation: jump 0.55s cubic-bezier(0.33, 0, 0.2, 1) !important;
}

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

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

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

/* Slide */
.leopard-character.is-sliding {
    transform: translateY(8px) scaleY(0.5);
    transform-origin: bottom center;
}

/* Shield Bubble */
.shield-bubble {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(100, 200, 255, 0.5);
    background: rgba(100, 200, 255, 0.08);
    animation: shield-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes shield-pulse {
    from {
        box-shadow: 0 0 10px rgba(100, 200, 255, 0.3);
        transform: scale(1);
    }

    to {
        box-shadow: 0 0 25px rgba(100, 200, 255, 0.6);
        transform: scale(1.05);
    }
}

/* ===== PARTICLES ===== */
.particle {
    position: absolute;
    pointer-events: none;
    z-index: 55;
    border-radius: 50%;
    animation: particle-fade 0.6s ease-out forwards;
}

.particle-dust {
    background: rgba(212, 175, 55, 0.4);
    width: 4px;
    height: 4px;
}

.particle-sparkle {
    background: #f5d76e;
    width: 6px;
    height: 6px;
    box-shadow: 0 0 8px #D4AF37;
}

@keyframes particle-fade {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--px), var(--py)) scale(0);
        opacity: 0;
    }
}

/* Screen Shake */
.screen-shake {
    animation: shake 0.3s ease;
}

@keyframes shake {

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

    20% {
        transform: translate(-3px, 2px);
    }

    40% {
        transform: translate(3px, -2px);
    }

    60% {
        transform: translate(-2px, 3px);
    }

    80% {
        transform: translate(2px, -1px);
    }
}

/* ===== OBSTACLES ===== */
.obstacle {
    position: absolute;
    bottom: 20%;
    z-index: 40;
    filter: drop-shadow(0 0 8px rgba(255, 77, 77, 0.5));
}

.obstacle svg {
    width: 100%;
    height: 100%;
}

/* ===== POWER-UPS (spawned) ===== */
.powerup-item {
    position: absolute;
    width: 28px;
    height: 28px;
    z-index: 46;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: powerup-float 1s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

@keyframes powerup-float {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-6px);
    }
}

/* ===== COINS ===== */
.coin {
    position: absolute;
    width: 22px;
    height: 22px;
    z-index: 45;
    background: radial-gradient(circle at 35% 35%, #f5d76e, #D4AF37, #b8941f);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: coin-spin 0.8s linear infinite;
}

.coin::after {
    content: '₺';
    color: #000;
    font-weight: 900;
    font-size: 11px;
}

@keyframes coin-spin {
    0% {
        transform: scaleX(1);
    }

    50% {
        transform: scaleX(0.15);
    }

    100% {
        transform: scaleX(1);
    }
}

.coin-collect-effect {
    position: absolute;
    pointer-events: none;
    color: #D4AF37;
    font-weight: 900;
    font-size: 1.1rem;
    animation: float-up 0.7s ease-out forwards;
    z-index: 100;
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-40px) scale(1.2);
        opacity: 0;
    }
}

/* ===== BRANDING TEXT ===== */
.runner-branding-text {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
    letter-spacing: 0.1em;
}

/* ===== LEADERBOARD PANEL ===== */
.leaderboard-submit {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0;
}

.player-name-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    width: 140px;
    transition: border-color 0.2s;
}

.player-name-input:focus {
    border-color: #D4AF37;
}

.player-name-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.btn-submit-score {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border: none;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.btn-submit-score:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-submit-score:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.leaderboard-panel {
    margin: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
}

.leaderboard-panel p {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 10px;
}

.leaderboard-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #D4AF37;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.leaderboard-list {
    max-height: 160px;
    overflow-y: auto;
}

.lb-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
}

.lb-entry:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.lb-entry:nth-child(1) {
    color: #fff;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), transparent);
    border-left: 3px solid #D4AF37;
    font-weight: 700;
}

.lb-entry:nth-child(2) {
    color: #e0e0e0;
    border-left: 3px solid #C0C0C0;
}

.lb-entry:nth-child(3) {
    color: #cd7f32;
    border-left: 3px solid #cd7f32;
}

.lb-rank {
    font-weight: 700;
    min-width: 25px;
}

.lb-name {
    flex: 1;
    text-align: left;
    margin: 0 8px;
}

.lb-score {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

/* =============================
   RESPONSIVE — Tablets 
   ============================= */
@media (max-width: 1024px) {
    .leopard-runner-section {
        aspect-ratio: 16 / 7;
    }

    .leopard-character {
        width: 100px;
        left: 10%;
    }

    .coin {
        width: 20px;
        height: 20px;
    }

    .coin::after {
        font-size: 10px;
    }

    .score-board {
        padding: 10px 16px;
    }

    .score-board span:not(.label) {
        font-size: 0.95rem;
        min-width: 45px;
    }
}

/* =============================
   RESPONSIVE — Mobile 
   KEY: Performance & Playability
   ============================= */
@media (max-width: 768px) {
    .hook-flex-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .hook-mascot {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .hook-text-content {
        text-align: center;
    }

    .game-launcher-hook h2 {
        font-size: 1.6rem;
    }

    .game-launcher-hook p {
        font-size: 1rem;
    }

    .btn-launch-game {
        padding: 15px 35px;
        width: 100%;
        justify-content: center;
    }

    .leopard-runner-section {
        aspect-ratio: auto;
        height: 380px;
    }

    .game-overlay {
        padding: 40px 10px 10px 10px;
        /* Added more top padding */
        justify-content: flex-start;
        /* Align to top so awards are lower */
        overflow-y: auto;
    }

    .overlay-content {
        max-width: 100%;
        padding: 20px;
        gap: 10px;
    }

    .overlay-inner {
        flex-direction: column;
        gap: 10px;
    }

    .overlay-right {
        padding: 12px;
        max-height: 200px;
    }

    .stat-card .val {
        font-size: 1.2rem !important;
    }

    .input-group {
        flex-direction: column;
    }

    .premium-input {
        padding: 10px;
        font-size: 0.85rem;
    }

    .btn-submit-score-premium {
        padding: 12px;
    }

    .premium-title {
        letter-spacing: 2px;
    }

    .premium-title-alt {
        letter-spacing: 2px;
    }

    .controls-hint-wrapper {
        gap: 15px;
        margin-bottom: 20px;
    }

    .hint-item span {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    /* PERFORMANCE: Kill GPU-heavy effects */
    .parallax-layer {
        display: none;
    }

    .celestial-body {
        display: none;
    }

    .runner-bg-gradient {
        display: none;
    }

    .particle {
        display: none !important;
    }

    .runner-branding-text {
        display: none;
    }

    .coin {
        animation: none;
    }

    .powerup-item {
        animation: none;
    }

    .shield-bubble {
        animation: none;
    }

    /* Simple gradient background instead of SVG parallax */
    .leopard-runner-section::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(180deg,
                rgba(212, 175, 55, 0.03) 0%,
                transparent 30%,
                transparent 70%,
                rgba(212, 175, 55, 0.05) 100%);
        pointer-events: none;
    }

    /* Floor */
    .runner-floor {
        bottom: 18%;
    }

    /* Character - Larger for better proportion to obstacles */
    .leopard-character {
        width: 85px;
        /* Increased from 65px */
        left: 10%;
        bottom: 18%;
    }

    .leopard-img {
        filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.3));
    }

    .leopard-character.is-jumping {
        animation: jump-m 0.45s cubic-bezier(0.33, 0, 0.2, 1) !important;
    }

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

        40% {
            transform: translateY(-85px);
        }

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

    /* Obstacles */
    .obstacle {
        bottom: 18%;
    }

    .obstacle svg {
        filter: none;
    }

    /* Coins */
    .coin {
        width: 16px;
        height: 16px;
        box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
    }

    .coin::after {
        font-size: 8px;
    }

    /* Power-ups */
    .powerup-item {
        width: 22px;
        height: 22px;
        font-size: 16px;
        filter: none;
    }

    /* HUD — compact, no blur */
    .game-ui-top {
        top: 6px;
        right: 6px;
    }

    .score-board {
        padding: 5px 8px;
        border-radius: 6px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        border: none;
    }

    .score-board span:not(.label) {
        font-size: 0.65rem;
        min-width: 28px;
    }

    .score-board .label {
        font-size: 0.4rem;
        letter-spacing: 1px;
    }

    .score-row {
        line-height: 1.3;
        gap: 4px;
    }

    .powerup-indicator {
        top: auto;
        bottom: 6px;
        left: 6px;
        padding: 4px 8px;
        gap: 4px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        animation: none;
    }

    .powerup-icon {
        font-size: 0.9rem;
    }

    .powerup-timer {
        font-size: 0.6rem;
    }

    .progress-bar-track {
        height: 3px;
    }

    .progress-label {
        font-size: 0.45rem;
        top: 5px;
        right: 5px;
    }

    .combo-text {
        font-size: 1.5rem !important;
        text-shadow: 0 0 15px rgba(255, 159, 67, 0.4);
    }

    .combo-display {
        top: 35%;
    }

    .level-toast {
        top: 40%;
    }

    .level-toast span {
        font-size: 1rem !important;
        letter-spacing: 2px;
        text-shadow: 0 0 15px rgba(162, 155, 254, 0.3);
    }

    /* Buttons — big fat touch targets */
    .btn-restart {
        padding: 14px 44px;
        font-size: 1rem;
        margin-top: 10px;
        border-radius: 10px;
        min-height: 48px;
    }

    /* Game overlay — FIXED position to escape 280px container */
    .game-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px 10px;
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        background: rgba(5, 5, 10, 0.7);
        z-index: 9999;
    }

    .overlay-content {
        padding: 18px;
        width: 94%;
        max-width: 360px;
        border-radius: 18px;
        background: rgba(18, 18, 25, 0.8);
        /* Darker for better contrast */
    }

    .overlay-content h3 {
        font-size: 1.4rem;
        letter-spacing: 4px;
        margin-bottom: 12px;
    }

    .overlay-content p {
        font-size: 0.8rem;
    }

    .final-stats {
        margin: 12px 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .final-stats p {
        padding: 8px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .final-stats p span.val {
        font-size: 1.1rem;
    }

    .final-stats p span.lbl {
        font-size: 0.55rem;
    }

    .controls-hint {
        margin-top: 14px;
        font-size: 0.75rem;
        gap: 12px;
    }

    /* Leaderboard compact */
    .leaderboard-submit {
        gap: 6px;
        margin: 8px 0;
    }

    .player-name-input {
        width: 120px;
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 8px;
        min-height: 40px;
    }

    .btn-submit-score {
        padding: 10px 16px;
        font-size: 0.75rem;
        border-radius: 8px;
        min-height: 40px;
    }

    .leaderboard-panel {
        margin: 8px auto;
        max-width: 280px;
    }

    .leaderboard-title {
        font-size: 0.7rem;
    }

    .leaderboard-list {
        max-height: 90px;
    }

    .lb-entry {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .final-stats {
        margin: 15px 0;
        gap: 10px;
        grid-template-columns: 1fr 1fr;
    }

    .final-stats p {
        padding: 10px;
        border-radius: 10px;
    }

    .final-stats p span.val {
        font-size: 1.1rem;
    }

    .final-stats p span.lbl {
        font-size: 0.55rem;
    }

    .achievements-row {
        gap: 4px;
        margin: 6px 0;
    }

    .achievement-badge {
        padding: 3px 8px;
        font-size: 0.55rem;
    }

    .shield-bubble {
        inset: -6px;
        border-width: 1px;
    }
}

/* ===== RESPONSIVE — Small Phones ===== */
@media (max-width: 480px) {
    .leopard-runner-section {
        height: 240px;
    }

    .leopard-character {
        width: 55px;
        left: 8%;
    }

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

        40% {
            transform: translateY(-70px);
        }

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

    .game-ui-top {
        top: 4px;
        right: 4px;
    }

    .score-board {
        padding: 3px 6px;
    }

    .score-board span:not(.label) {
        font-size: 0.55rem;
        min-width: 22px;
    }

    .score-board .label {
        font-size: 0.35rem;
    }

    .overlay-content {
        padding: 12px;
    }

    .overlay-content h3 {
        font-size: 1rem;
        letter-spacing: 2px;
        margin-bottom: 8px;
    }

    .overlay-content p {
        font-size: 0.65rem;
    }

    .final-stats p {
        font-size: 0.7rem;
    }

    .controls-hint {
        font-size: 0.65rem;
        gap: 8px;
    }

    .leaderboard-submit {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .player-name-input {
        width: 90%;
        max-width: 200px;
    }

    .leaderboard-panel {
        max-width: 220px;
    }

    .leaderboard-list {
        max-height: 60px;
    }

    .combo-text {
        font-size: 1.2rem !important;
    }

    .coin {
        width: 14px;
        height: 14px;
    }

    .coin::after {
        font-size: 7px;
    }

    .powerup-item {
        width: 18px;
        height: 18px;
        font-size: 13px;
    }

    .btn-restart {
        padding: 12px 36px;
        font-size: 0.9rem;
    }
}