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

body {
    font-family: 'Courier New', monospace;
    overflow: hidden;
    background: #0a4c6d;
}

/* Landing Page */
#landing-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a7ba8 0%, #0a4c6d 50%, #064566 100%);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#landing-page.active {
    display: flex;
}

.branding {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 1s ease-in;
}

.logo {
    font-size: 72px;
    font-weight: 900;
    letter-spacing: 12px;
    color: #fff;
    text-shadow: 4px 4px 0px #064566;
    margin-bottom: 20px;
}

.tagline {
    font-size: 18px;
    color: #a8d8ea;
    max-width: 500px;
    line-height: 1.6;
    padding: 0 20px;
}

.animation-container {
    margin: 40px 0;
}

#landing-canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.enter-button {
    padding: 18px 40px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #fff;
    background: #ff6b35;
    border: 4px solid #fff;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 6px 6px 0px #064566;
    transition: all 0.2s;
    animation: pulse 2s infinite;
}

.enter-button:hover {
    background: #ff8555;
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px #064566;
}

.enter-button:active {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0px #064566;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Game Page */
#game-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#game-page.active {
    display: block;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    background: #1a7ba8;
}

/* Popups */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background: #fff;
    padding: 40px;
    border: 6px solid #064566;
    box-shadow: 8px 8px 0px #ff6b35;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #064566;
    font-weight: bold;
    line-height: 1;
}

.close-popup:hover {
    color: #ff6b35;
}

.popup-content h2 {
    color: #064566;
    margin-bottom: 20px;
    font-size: 28px;
}

.popup-content p {
    color: #0a4c6d;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 15px;
}

#email-input {
    width: 100%;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    border: 3px solid #064566;
    margin: 20px 0 15px 0;
    outline: none;
}

#email-input:focus {
    border-color: #ff6b35;
}

#submit-email {
    width: 100%;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    background: #ff6b35;
    color: #fff;
    border: 3px solid #064566;
    cursor: pointer;
    text-transform: uppercase;
}

#submit-email:hover {
    background: #ff8555;
}

.email-response {
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
}

.email-response.success {
    color: #2d9b4e;
}

.email-response.error {
    color: #d9534f;
}

/* Controls Hint */
.controls-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 24px;
    border: 3px solid #064566;
    color: #064566;
    font-weight: bold;
    border-radius: 4px;
    animation: fadeIn 1s, fadeOut 1s 4s forwards;
}

@keyframes fadeOut {
    to { opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 48px;
        letter-spacing: 8px;
    }
    
    .tagline {
        font-size: 14px;
    }
    
    .enter-button {
        font-size: 16px;
        padding: 14px 30px;
    }
    
    .popup-content {
        padding: 30px 20px;
    }
    
    .popup-content h2 {
        font-size: 22px;
    }
}
