/* MOON BALLOON - Clean Alien Interface */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: #000;
    color: #00ffaa;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Videos */
#video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    filter: hue-rotate(270deg) saturate(1.2);
}

.background-video.active {
    opacity: 1;
}

/* Game Canvas */
#game-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Start Menu */
#start-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh; /* Use small viewport height for mobile */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.menu-container {
    background: rgba(0, 20, 40, 0.9);
    border: 2px solid #00ffaa;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 0 30px rgba(0, 255, 170, 0.3),
        inset 0 0 20px rgba(0, 255, 170, 0.1);
}

/* Title */
.game-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: #00ffaa;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 170, 0.6);
    letter-spacing: 2px;
}

.game-subtitle {
    font-size: 1rem;
    color: #00aaff;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Steps */
.step {
    margin-bottom: 30px;
}

.step.hidden {
    display: none;
}

.step-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    color: #00ffaa;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Wallet Grid */
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.wallet-btn {
    background: rgba(0, 50, 100, 0.3);
    border: 2px solid #00ffaa;
    border-radius: 10px;
    padding: 15px;
    color: #00ffaa;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-btn:hover {
    background: rgba(0, 100, 200, 0.5);
    border-color: #00aaff;
    color: #00aaff;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.4);
}

/* Setup Form */
.setup-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pfp-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pfp-preview {
    width: 100px;
    height: 100px;
    border: 2px solid #00ffaa;
    border-radius: 50%;
    background: rgba(0, 50, 100, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    color: #00ffaa;
}

.pfp-preview:hover {
    border-color: #00aaff;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.4);
}

.name-section {
    width: 100%;
}

#player-name {
    width: 100%;
    padding: 15px;
    border: 2px solid #00ffaa;
    border-radius: 10px;
    background: rgba(0, 20, 40, 0.8);
    color: #00aaff;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

#player-name:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.3);
}

.address-section {
    width: 100%;
}

#payout-address {
    width: 100%;
    padding: 15px;
    border: 2px solid #00ffaa;
    border-radius: 10px;
    background: rgba(0, 20, 40, 0.8);
    color: #00aaff;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

#payout-address:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.3);
}

.address-hint {
    margin-top: 8px;
    font-size: 0.7rem;
    color: #00ffaa;
    text-align: center;
    opacity: 0.8;
    font-family: 'Exo 2', sans-serif;
}

/* Launch Section */
.launch-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.fee-info {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    color: #ffaa00;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-btn {
    background: linear-gradient(135deg, #00ffaa, #00aaff);
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    color: #000;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 200px;
}

.action-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00aaff, #00ffaa);
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.5);
    transform: translateY(-2px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(0, 255, 255, 0.2);
}

.action-btn.launch-btn {
    background: linear-gradient(135deg, #ffaa00, #ff6600);
}

.action-btn.launch-btn:hover {
    background: linear-gradient(135deg, #ff6600, #ffaa00);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.5);
}

/* Status */
.status-text {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 255, 170, 0.3);
}

#status-message {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: #00aaff;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Full Screen Game Container */
#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 5, 15, 0.95);
    z-index: 1000;
}

#title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    text-align: center;
}

#title h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    color: #00ffaa;
    text-shadow: 0 0 20px rgba(0, 255, 170, 0.6);
    letter-spacing: 2px;
}

#game-info {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    text-align: center;
}

#score {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    color: #00ffaa;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    #start-menu {
        padding: 10px;
        align-items: flex-start;
        padding-top: 5vh;
    }
    
    .menu-container {
        padding: 25px 20px;
        max-width: 95%;
        margin: 0 auto;
    }
    
    .game-title {
        font-size: 1.8rem;
    }
    
    .wallet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wallet-btn {
        padding: 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #start-menu {
        padding: 10px;
        padding-top: 2vh;
        align-items: center;
        justify-content: center;
    }
    
    .menu-container {
        padding: 20px 15px;
        border-radius: 15px;
        margin: 0 auto;
        width: calc(100% - 20px);
        max-width: 100%;
    }
    
    .wallet-grid {
        margin: 0 auto;
        width: 100%;
        max-width: 280px;
    }
    
    .game-title {
        font-size: 1.4rem;
        letter-spacing: 1px;
        margin-bottom: 8px;
    }
    
    .game-subtitle {
        font-size: 0.75rem;
        margin-bottom: 25px;
    }
    
    .step-title {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .action-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        min-width: 140px;
    }
    
    .pfp-preview {
        width: 60px;
        height: 60px;
        font-size: 0.65rem;
    }
    
    .setup-form {
        gap: 15px;
    }
    
    .menu-container {
        padding: 25px 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    #player-name, #payout-address {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .address-hint {
        font-size: 0.7rem;
        margin-top: 5px;
    }
}

/* Game Over Screen */
#game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #00ffff;
    font-family: 'Orbitron', monospace;
    z-index: 3000;
}

.game-over-content {
    text-align: center;
    padding: 40px;
    background: rgba(0, 20, 40, 0.9);
    border: 2px solid #00ffaa;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 170, 0.3);
}

.game-over-content h2 {
    color: #ff00ff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff00ff;
    font-size: 2rem;
}

.game-stats {
    margin: 20px 0;
    text-align: center;
}

.game-stats p {
    margin: 10px 0;
    color: #00ffff;
    font-size: 1.2rem;
    font-weight: bold;
}

.game-over-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-over-actions .action-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.game-over-actions .action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #00ffff;
}

/* Blockchain Status Messages */
.blockchain-status {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    z-index: 2000;
    transition: all 0.3s ease;
}

.blockchain-status.success {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
    color: #00ff00;
}

.blockchain-status.error {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff0000;
}

.blockchain-status.info {
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid #00ffff;
    color: #00ffff;
}

/* Leaderboard */
.leaderboard {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.leaderboard h3 {
    color: #ff00ff;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #ff00ff;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    margin: 5px 0;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid #00ffff;
}

.leaderboard-entry.current-player {
    background: rgba(255, 0, 255, 0.2);
    border-left-color: #ff00ff;
}

.leaderboard-entry .rank {
    color: #ffff00;
    font-weight: bold;
}

.leaderboard-entry .name {
    color: #00ffff;
}

.leaderboard-entry .score {
    color: #ff00ff;
    font-weight: bold;
}

/* Removed complex frame styling - replaced with simple practical design above */

#game-canvas {
    width: 100vw;
    height: 100vh;
    display: block;
    background: transparent;
    cursor: none;
}

.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2000;
}

.game-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
}

.start-prompt {
    text-align: center;
    color: #00ffff;
    font-family: 'Orbitron', monospace;
    animation: pulse 2s infinite;
}

.start-prompt h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

.start-prompt p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Removed complex corner glow animation */

/* Game Instructions */
.game-instructions {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border: 1px solid #00ffaa;
    text-align: left;
}

.game-instructions p {
    margin: 5px 0;
    font-size: 0.85rem;
    color: #ffffff;
}

.game-instructions p:first-child {
    color: #00ffaa;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.launch-hint {
    font-size: 0.8rem !important;
    color: #ffff00 !important;
    font-style: italic;
    margin-top: 15px !important;
}

/* Game HUD */
.game-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.score-display, .high-score-display, .time-display, .lives-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Orbitron', monospace;
}

.lives-container {
    display: flex;
    gap: 5px;
    align-items: center;
}

.life-balloon {
    font-size: 1.5rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.life-balloon.damaged {
    opacity: 0.3;
    transform: scale(0.8);
    filter: grayscale(100%) drop-shadow(0 0 3px rgba(255, 0, 0, 0.5));
}

.score-label, .time-label {
    font-size: 0.7rem;
    color: #00ffaa;
    font-weight: 600;
    margin-bottom: 2px;
}

.score-value, .time-value {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.instructions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: 'Exo 2', sans-serif;
    text-align: center;
    border: 1px solid rgba(0, 255, 170, 0.3);
    opacity: 0.8;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .game-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .start-prompt {
        max-width: 90%;
        margin: 0 auto;
        text-align: center;
    }
    
    .start-prompt h3 {
        font-size: 1.2rem;
    }
    
    .start-prompt p {
        font-size: 0.8rem;
    }
    
    .game-instructions {
        padding: 10px;
        max-width: 280px;
        margin: 15px auto;
    }
    
    .game-instructions p {
        font-size: 0.75rem;
    }
    
    .hud-top {
        padding: 8px 15px;
    }
    
    .score-value, .time-value {
        font-size: 1rem;
    }
    
    .instructions {
        font-size: 0.65rem;
        padding: 6px 12px;
        bottom: 5px;
    }
    
    /* Mobile pilot registration styles */
    .step-title {
        font-size: 0.75rem;
        margin-bottom: 4px;
        line-height: 1.2;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin: 4px 0;
    }
    
    .pfp-preview {
        width: 40px;
        height: 40px;
    }
    
    .menu-container {
        max-height: 70vh;
        overflow-y: auto;
        padding: 8px;
    }
    
    .pilot-registration {
        padding: 6px;
        margin: 4px 0;
    }
    
    .pilot-registration input,
    .pilot-registration textarea {
        font-size: 0.8rem;
        padding: 6px 8px;
        margin: 4px 0;
    }
    
    /* Make tournament info more compact */
    .tournament-info {
        padding: 6px;
        margin: 4px 0;
        font-size: 11px;
    }
    
    .tournament-header {
        font-size: 13px;
        margin-bottom: 6px;
        line-height: 1.2;
    }
    
    /* Make main title more compact */
    h1 {
        font-size: 1.2rem !important;
        margin: 8px 0 !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1rem !important;
        margin: 6px 0 !important;
        line-height: 1.2 !important;
    }
    
    /* Make address hint smaller */
    .address-hint {
        font-size: 0.7rem;
        margin: 2px 0;
        line-height: 1.1;
    }
    
    /* Validation states for input fields */
    input[style*="border-color: #00ffaa"] {
        box-shadow: 0 0 5px rgba(0, 255, 170, 0.5);
    }
    
    input[style*="border-color: #ff4444"] {
        box-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
    }
}

/* Desktop pilot registration - more compact than default but not as compact as mobile */
@media (min-width: 769px) {
    .step-title {
        font-size: 0.9rem;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .action-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
        margin: 6px 0;
    }
    
    .pfp-preview {
        width: 50px;
        height: 50px;
    }
    
    .menu-container {
        max-height: 80vh;
        overflow-y: auto;
        padding: 12px;
    }
    
    .pilot-registration {
        padding: 10px;
        margin: 6px 0;
    }
    
    .pilot-registration input,
    .pilot-registration textarea {
        font-size: 0.85rem;
        padding: 8px 10px;
        margin: 6px 0;
    }
    
    .tournament-info {
        padding: 10px;
        margin: 6px 0;
        font-size: 12px;
    }
    
    .tournament-header {
        font-size: 15px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .address-hint {
        font-size: 0.75rem;
        margin: 4px 0;
        line-height: 1.2;
    }
    
    /* Make main titles more compact on desktop too */
    h1 {
        font-size: 1.4rem !important;
        margin: 10px 0 !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 1.1rem !important;
        margin: 8px 0 !important;
        line-height: 1.3 !important;
    }
}

/* Notification Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}