/* OrangeTalent Gaming CSS - Enhanced Version */
/* CSS Variables */
:root {
    --ot-orange: #ff6b35;
    --ot-orange-light: #fc7100;
    --ot-blue: #30b8fe;
    --ot-blue-light: #2eb8fe;
    --ot-dark: #2a1558;
    --ot-purple-light: #a6a8ff;
    --ot-light: #f8f8f8;
    --ot-white: #ffffff;
    --ot-gradient: linear-gradient(135deg, #42c6ff, #2eb9ff);
}

/* Fonts*/
/* Base styles with gaming fonts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Exo 2', sans-serif;
}

/* Music Control Button */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(66, 198, 255, 0.9) 0%, 
        rgba(46, 185, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(26, 79, 102, 0.3),
        0 0 20px rgba(66, 198, 255, 0.2);
}

.music-control:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px rgba(66, 198, 255, 0.5),
        0 0 30px rgba(66, 198, 255, 0.4);
}

.music-control:active {
    transform: scale(0.95);
}

.music-control.muted {
    background: linear-gradient(135deg, 
        rgba(255, 70, 70, 0.9) 0%, 
        rgba(200, 50, 50, 0.9) 100%);
    box-shadow: 
        0 4px 15px rgba(255, 70, 70, 0.3),
        0 0 20px rgba(255, 70, 70, 0.2);
}

.music-control.muted:hover {
    box-shadow: 
        0 6px 20px rgba(255, 70, 70, 0.5),
        0 0 30px rgba(255, 70, 70, 0.4);
}

.music-control.muted .sound-waves {
    opacity: 0.3;
}

.music-icon {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.sound-waves {
    transition: opacity 0.3s ease;
}

/* Prevent text selection and improve mobile interaction */
@media (max-width: 768px) {
    * {
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        -webkit-touch-callout: none !important;
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation !important;
    }
    
    /* Mobile Music Control */
    .music-control {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
    }
    
    .music-icon {
        width: 20px;
        height: 20px;
    }
    
    /* Hide desktop elements on mobile */
    .desktop-sun, .desktop-moon {
        display: none;
    }
    
    /* Show mobile elements */
    .mobile-sun, .mobile-moon {
        display: block;
    }
    
    input, textarea {
        -webkit-user-select: auto !important;
        -moz-user-select: auto !important;
        -ms-user-select: auto !important;
        user-select: auto !important;
    }
}

/* Show desktop elements on larger screens */
@media (min-width: 769px) {
    .mobile-sun, .mobile-moon {
        display: none;
    }
    
    .desktop-sun, .desktop-moon {
        display: block;
    }
}

body {
    background: linear-gradient(135deg, 
        rgba(28, 28, 28, 0.95) 0%, 
        rgba(44, 44, 44, 0.95) 100%);
    color: var(--ot-dark);
    overflow: hidden;
    font-family: 'Exo 2', sans-serif;
    /* iPhone notch support */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, var(--ot-blue) 0%, var(--ot-light) 100%);
    backdrop-filter: blur(20px);
    z-index: 10;
}

.screen.hidden {
    display: none;
}

.title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    margin-bottom: 2rem;
    text-align: center;
    background: var(--ot-purple-light);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Mark Pro', monospace;
    line-height: 1.2;
}

.subtitle {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
    font-family: 'Mark Pro', monospace;
    line-height: 1.2;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    min-width: 300px;
}

input[type="text"] {
    padding: 15px 20px;
    border: 2px solid rgba(66, 198, 255, 0.3);
    border-radius: 9999px;
    color: var(--ot-blue);
    font-size: 20px;
    font-family: 'Exo 2', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--ot-blue-light);
    box-shadow: 0 0 20px rgba(66, 198, 255, 0.4);
}

button {
    padding: 15px 30px;
    border: none;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--ot-orange-light), var(--ot-orange));
    color: white;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 198, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 198, 255, 0.5);
}

button:active {
    transform: translateY(0);
}

.secondary-button {
    background: var(--ot-light);
    border: 1px solid var(--ot-dark);
    color: var(--ot-dark);
}

.secondary-button:hover {
    box-shadow: 0 8px 25px rgba(102, 102, 102, 0.5);
}

/* Enhanced game info styles with futuristic design */
.game-info {
    background: linear-gradient(135deg, 
        rgba(0, 20, 40, 0.95) 0%, 
        rgba(0, 40, 80, 0.95) 50%, 
        rgba(0, 60, 120, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(66, 198, 255, 0.5);
    border-radius: 15px;
    padding: 12px 20px;
    margin: 10px;
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--ot-blue-light);
    box-shadow: 
        0 0 20px rgba(66, 198, 255, 0.3),
        inset 0 0 20px rgba(66, 198, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.game-info:hover::before {
    left: 100%;
}

#score {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.95) 0%, 
        rgba(252, 113, 0, 0.95) 30%,
        rgba(255, 140, 60, 0.95) 70%,
        rgba(255, 180, 100, 0.95) 100%);
    color: #fff;
    border: 3px solid rgba(255, 107, 53, 0.8);
    box-shadow: 
        0 0 25px rgba(255, 107, 53, 0.4),
        inset 0 0 20px rgba(255, 107, 53, 0.1),
        0 0 40px rgba(252, 113, 0, 0.3);
    animation: scoreCounterPulse 3s ease-in-out infinite;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

#score::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 215, 0, 0.3) 50%, 
        transparent 70%);
    border-radius: 15px;
    z-index: -1;
    animation: scoreShine 2s linear infinite;
}

@keyframes scoreCounterPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 0 25px rgba(252, 113, 0, 0.4),
            inset 0 0 20px rgba(252, 113, 0, 0.1),
            0 0 40px rgba(255, 215, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 
            0 0 35px rgba(252, 113, 0, 0.6),
            inset 0 0 30px rgba(252, 113, 0, 0.2),
            0 0 50px rgba(255, 215, 0, 0.4);
    }
}

@keyframes scoreShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(300%) rotate(45deg); }
}



#ultra-jump {
    position: absolute;
    top: 100px;
    right: 10px;
    z-index: 100;
    background: linear-gradient(135deg, 
        rgba(255, 0, 255, 0.95) 0%, 
        rgba(200, 0, 200, 0.95) 20%,
        rgba(255, 50, 255, 0.95) 40%,
        rgba(255, 100, 255, 0.95) 60%,
        rgba(200, 150, 255, 0.95) 80%,
        rgba(255, 200, 255, 0.95) 100%);
    border: 4px solid rgba(255, 0, 255, 0.9);
    color: #fff;
    text-shadow: 
        0 0 15px rgba(255, 0, 255, 0.8),
        0 0 30px rgba(255, 0, 255, 0.4),
        0 0 45px rgba(255, 100, 255, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    box-shadow: 
        0 0 30px rgba(255, 0, 255, 0.6),
        inset 0 0 20px rgba(255, 0, 255, 0.2),
        0 0 60px rgba(255, 100, 255, 0.4),
        0 0 80px rgba(200, 150, 255, 0.3);
    animation: ultraPulse 1s infinite;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    overflow: hidden;
    opacity: 0.9;
}

#ultra-jump::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    background: linear-gradient(45deg, 
        transparent 20%, 
        rgba(255, 0, 255, 0.6) 30%,
        rgba(255, 100, 255, 0.8) 50%,
        rgba(200, 150, 255, 0.6) 70%,
        transparent 80%);
    border-radius: 15px;
    z-index: -1;
    animation: ultraShine 1s linear infinite;
}

#ultra-jump::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ultraSpark 2s ease-in-out infinite;
}

@keyframes ultraShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(300%) rotate(45deg); }
}

@keyframes ultraSpark {
    0% {
        width: 0;
        height: 0;
        opacity: 0;
    }
    50% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 0;
        height: 0;
        opacity: 0;
    }
}

/* Enhanced mobile controls */
#mobile-controls {
    position: fixed;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 1000;
    pointer-events: none;
    height: 80px; /* Fixed height for better layout */
}

.left-controls, .right-controls {
    display: flex;
    gap: 10px;
    pointer-events: all;
}

.control-button {
    width: 120px;
    height: 120px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(66, 198, 255, 0.9) 0%, 
        rgba(46, 185, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(66, 198, 255, 0.3),
        0 0 20px rgba(66, 198, 255, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.control-button:hover {
    transform: scale(1.05);
    box-shadow: 
        0 6px 20px rgba(66, 198, 255, 0.5),
        0 0 30px rgba(66, 198, 255, 0.4);
}

.control-button:active {
    transform: scale(0.95);
    box-shadow: 
        0 2px 10px rgba(66, 198, 255, 0.6),
        0 0 15px rgba(66, 198, 255, 0.5);
}

.control-icon {
    width: 64px;
    height: 64px;
    pointer-events: none;
}

.control-text {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.jump-btn {
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.95) 0%, 
        rgba(247, 147, 30, 0.95) 50%, 
        rgba(255, 210, 63, 0.95) 100%);
    box-shadow: 
        0 4px 15px rgba(255, 107, 53, 0.4),
        0 0 25px rgba(255, 107, 53, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.jump-btn.ready {
    background: linear-gradient(135deg, 
        rgba(46, 185, 255, 0.95) 0%, 
        rgba(66, 198, 255, 0.95) 30%,
        rgba(100, 220, 255, 0.95) 70%,
        rgba(135, 240, 255, 0.95) 100%);
    border: 3px solid rgba(46, 185, 255, 0.9);
    box-shadow: 
        0 0 30px rgba(46, 185, 255, 0.6),
        inset 0 0 20px rgba(46, 185, 255, 0.2),
        0 0 50px rgba(135, 240, 255, 0.4);
    animation: readyPulse 2s infinite;
}

.jump-btn.ready::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(135, 240, 255, 0.4) 50%, 
        transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: powerJumpShine 1.5s linear infinite;
}

.jump-btn.charging {
    background: linear-gradient(135deg, 
        rgba(100, 100, 100, 0.9) 0%, 
        rgba(140, 140, 140, 0.9) 30%,
        rgba(180, 180, 180, 0.9) 70%,
        rgba(200, 200, 200, 0.9) 100%);
    border: 3px solid rgba(100, 100, 100, 0.8);
    box-shadow: 
        0 0 15px rgba(100, 100, 100, 0.3),
        inset 0 0 20px rgba(100, 100, 100, 0.1);
    animation: chargingPulse 1s ease-in-out infinite;
}

.jump-btn:hover {
    box-shadow: 
        0 6px 20px rgba(255, 107, 53, 0.6),
        0 0 35px rgba(255, 107, 53, 0.5);
}

.jump-btn.ready:hover {
    box-shadow: 
        0 6px 20px rgba(46, 185, 255, 0.8),
        0 0 35px rgba(46, 185, 255, 0.7);
}

.jump-btn.charging:hover {
    box-shadow: 
        0 6px 20px rgba(100, 100, 100, 0.5),
        0 0 35px rgba(100, 100, 100, 0.4);
}

.jump-btn:active {
    box-shadow: 
        0 2px 10px rgba(255, 107, 53, 0.7),
        0 0 20px rgba(255, 107, 53, 0.6);
}

.jump-btn.ready:active {
    box-shadow: 
        0 2px 10px rgba(46, 185, 255, 0.9),
        0 0 20px rgba(46, 185, 255, 0.8);
}

.jump-btn.charging:active {
    box-shadow: 
        0 2px 10px rgba(100, 100, 100, 0.6),
        0 0 20px rgba(100, 100, 100, 0.5);
}

.shoot-btn {
    background: linear-gradient(135deg, 
        rgba(255, 71, 87, 0.95) 0%, 
        rgba(255, 55, 66, 0.95) 50%, 
        rgba(255, 107, 122, 0.95) 100%);
    box-shadow: 
        0 4px 15px rgba(255, 71, 87, 0.4),
        0 0 25px rgba(255, 71, 87, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.shoot-btn:hover {
    box-shadow: 
        0 6px 20px rgba(255, 71, 87, 0.6),
        0 0 35px rgba(255, 71, 87, 0.5);
}

.shoot-btn:active {
    box-shadow: 
        0 2px 10px rgba(255, 71, 87, 0.7),
        0 0 20px rgba(255, 71, 87, 0.6);
}

/* Game canvas */
#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
}

/* Leaderboard styles */
.leaderboard {
    background: linear-gradient(135deg, 
        rgba(0, 20, 40, 0.95) 0%, 
        rgba(0, 40, 80, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(66, 198, 255, 0.5);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    max-width: 400px;
    width: 100%;
    box-shadow: 
        0 0 25px rgba(66, 198, 255, 0.3),
        inset 0 0 20px rgba(66, 198, 255, 0.1);
}

.leaderboard h2 {
    color: #42c6ff;
    margin-bottom: 15px;
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 24px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(66, 198, 255, 0.2);
    color: #fff;
    font-family: 'Exo 2', sans-serif;
}

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

.score {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    margin: 20px 0;
    font-family: 'Orbitron', monospace;
}

.reward {
    font-size: 1.2rem;
    color: #ff6b35;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, 
        rgba(255, 107, 53, 0.1) 0%, 
        rgba(255, 140, 60, 0.1) 100%);
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 10px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
}

/* Instructions screen */
.instructions-container {
    text-align: left;
}

.instructions-container h2 {
    color: var(--ot-blue-light, #42c6ff);
    margin-bottom: 15px;
    font-family: 'Heldane Display', monospace;
}

.controls-section, .rewards-section {
    margin-bottom: 25px;
}

.control-item, .reward-item {
    margin-bottom: 15px;
}

.control-item span, .reward-item span {
    font-weight: 600;
    color: var(--ot-orange);
    font-family: 'Heldane Display', monospace;
}

.control-item p, .reward-item p {
    margin: 5px 0;
    color: var(--ot-dark);
    font-family: 'Exo 2', sans-serif;
}

.instructions-container ul {
    padding-left: 20px;
}

.instructions-container li {
    margin-bottom: 8px;
    color: var(--ot-dark);
    font-family: 'Exo 2', sans-serif;
}

/* Score popup animations */
.score-popup {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    animation: scorePopupAnimation 1.2s ease-out forwards;
    pointer-events: none;
    z-index: 1000;
    font-family: 'Orbitron', monospace;
}

/* Enhanced animations */
@keyframes scorePopupAnimation {
    0% {
        transform: scale(0) rotate(-15deg);
        opacity: 1;
    }
    20% {
        transform: scale(1.3) rotate(5deg);
        opacity: 1;
    }
    40% {
        transform: scale(1.1) rotate(-2deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg) translateY(-60px);
        opacity: 0;
    }
}

@keyframes readyPulse {
    0% { 
        transform: scale(1); 
        box-shadow: 
            0 0 30px rgba(46, 185, 255, 0.6),
            inset 0 0 20px rgba(46, 185, 255, 0.2),
            0 0 50px rgba(135, 240, 255, 0.4);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 
            0 0 40px rgba(46, 185, 255, 0.8),
            inset 0 0 30px rgba(46, 185, 255, 0.3),
            0 0 60px rgba(135, 240, 255, 0.5);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 
            0 0 30px rgba(46, 185, 255, 0.6),
            inset 0 0 20px rgba(46, 185, 255, 0.2),
            0 0 50px rgba(135, 240, 255, 0.4);
    }
}

@keyframes ultraPulse {
    0% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 
            0 0 30px rgba(255, 0, 255, 0.6),
            inset 0 0 20px rgba(255, 0, 255, 0.2),
            0 0 60px rgba(255, 100, 255, 0.4),
            0 0 80px rgba(200, 150, 255, 0.3);
    }
    25% {
        transform: scale(1.03) rotate(1deg);
        box-shadow: 
            0 0 35px rgba(255, 0, 255, 0.7),
            inset 0 0 25px rgba(255, 0, 255, 0.25),
            0 0 70px rgba(255, 100, 255, 0.45),
            0 0 90px rgba(200, 150, 255, 0.35);
    }
    50% { 
        transform: scale(1.08) rotate(0deg); 
        box-shadow: 
            0 0 45px rgba(255, 0, 255, 0.9),
            inset 0 0 30px rgba(255, 0, 255, 0.3),
            0 0 80px rgba(255, 100, 255, 0.5),
            0 0 100px rgba(200, 150, 255, 0.4);
    }
    75% {
        transform: scale(1.03) rotate(-1deg);
        box-shadow: 
            0 0 35px rgba(255, 0, 255, 0.7),
            inset 0 0 25px rgba(255, 0, 255, 0.25),
            0 0 70px rgba(255, 100, 255, 0.45),
            0 0 90px rgba(200, 150, 255, 0.35);
    }
    100% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 
            0 0 30px rgba(255, 0, 255, 0.6),
            inset 0 0 20px rgba(255, 0, 255, 0.2),
            0 0 60px rgba(255, 100, 255, 0.4),
            0 0 80px rgba(200, 150, 255, 0.3);
    }
}

/* Game over screen animations */
.game-over-enter {
    background-color: var(--ot-white);
}

@keyframes gameOverEnter {
    0% {
        transform: scale(0.5) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.score-count-up {
    animation: scoreCountUp 1.5s ease-out;
}

@keyframes scoreCountUp {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.leaderboard-animate {
    animation: leaderboardSlideIn 0.8s ease-out 0.5s both;
}

@keyframes leaderboardSlideIn {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.reward-animate {
    animation: rewardBounce 1s ease-out 1s both;
}

@keyframes rewardBounce {
    0% {
        transform: translateY(50px) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateY(-10px) scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.button-animate {
    animation: buttonSlideUp 0.6s ease-out 1.5s both;
}

@keyframes buttonSlideUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Transition container for game over */
.transition-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(20, 20, 40, 0.9) 100%);
    backdrop-filter: blur(10px);
    z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.transition-container.active {
  opacity: 1;
    visibility: visible;
}

.transition-content {
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.5s ease;
}

.transition-container.active .transition-content {
  transform: scale(1);
} 

.game-over-title {
    font-size: 3rem;
    color: #ff6b35;
    margin-bottom: 30px;
    animation: titlePulse 2s infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Mobile specific adjustments - iPhone optimized */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .form {
        padding: 20px;
    }
    
    .control-button {
        width: 65px;
        height: 65px;
    }
    
    .control-icon {
        width: 28px;
        height: 28px;
    }
    
    .control-text {
        font-size: 8px;
        margin-top: 2px;
        letter-spacing: 0.3px;
    }
    
    #mobile-controls {
        bottom: 5px;
        padding: 0 10px;
        height: 75px;
    }
    
    .left-controls, .right-controls {
        gap: 8px;
    }

    /* Hide score label on mobile */
    .score-label {
        display: none;
    }
}

/* iPhone and small screens - Safari optimized */
@media (max-width: 480px) {
    .control-button {
        width: 60px;
        height: 60px;
    }
    
    .control-icon {
        width: 24px;
        height: 24px;
    }
    
    .control-text {
        font-size: 7px;
        margin-top: 1px;
        letter-spacing: 0.2px;
    }
    
    .left-controls, .right-controls {
        gap: 6px;
    }
    
    #mobile-controls {
        bottom: 2px;
        padding: 0 8px;
        height: 65px;
    }
}

/* iPhone specific - Account for Safari UI and notch */
@media (max-width: 414px) and (max-height: 896px) {
    #mobile-controls {
        bottom: env(safe-area-inset-bottom, 2px);
        padding: 0 max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }
    
    .control-button {
        width: 55px;
        height: 55px;
    }
    
    .control-icon {
        width: 22px;
        height: 22px;
    }
    
    .control-text {
        font-size: 6px;
        margin-top: 1px;
    }
}

/* iPhone SE and smaller */
@media (max-width: 375px) {
    .control-button {
        width: 64px;
        height: 64px;
    }
    
    .control-icon {
        width: 20px;
        height: 20px;
    }
    
    .control-text {
        font-size: 6px;
        margin-top: 0px;
    }
    
    .left-controls, .right-controls {
        gap: 5px;
    }
    
    #mobile-controls {
        padding: 0 5px;
        height: 60px;
    }
    
    /* Adjust game info positioning for small screens */
    .game-info {
        font-size: 14px;
        padding: 8px 12px;
        margin: 8px;
    }
    
    #score {
        top: max(10px, env(safe-area-inset-top));
        left: max(10px, env(safe-area-inset-left));
    }
    
    #power-jump {
        top: max(10px, env(safe-area-inset-top));
        right: max(10px, env(safe-area-inset-right));
    }
}

/* Additional animation classes for enhanced UI */
.score-change {
    animation: scoreFlash 0.8s ease-out;
}

@keyframes scoreFlash {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
} 

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: var(--ot-white);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    width: 94%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    z-index: 1001; /* Ensure it's above other modal content */
}

.modal-close:hover {
    transform: scale(1.1);
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--ot-dark);
    transform-origin: center;
    transition: background-color 0.2s ease;
}

.modal-close:hover::before,
.modal-close:hover::after {
    background: var(--ot-orange);
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

/* Update existing how-to-play screen styles */
#how-to-play-screen {
    position: fixed;
    background: none;
}

#how-to-play-screen .instructions-container {
    margin: 1rem 0;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ot-blue) transparent;
}

#how-to-play-screen .instructions-container::-webkit-scrollbar {
    width: 8px;
}

#how-to-play-screen .instructions-container::-webkit-scrollbar-track {
    background: transparent;
}

#how-to-play-screen .instructions-container::-webkit-scrollbar-thumb {
    background-color: var(--ot-blue);
    border-radius: 4px;
} 