:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-1: #ff007f;
    --accent-2: #00f3ff;
    --accent-3: #a200ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Prevent text selection and zooming on mobile */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

/* 2D Canvas Background */
#webgl {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    outline: none;
}

/* UI Content */
.content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    pointer-events: none; /* Let all clicks pass through to game/buttons */
}

/* Fused Text Layer */
.hero-text {
    text-align: center;
    max-width: 900px;
    width: 100%;
    animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.title {
    font-family: 'Press Start 2P', cursive;
    font-size: 5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    /* Blend mode creates a realistic blend with the background game */
    mix-blend-mode: screen; 
    text-shadow: 0 0 30px rgba(255, 0, 127, 0.6), 0 5px 15px rgba(0, 0, 0, 0.8);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.subtitle {
    font-size: 1.4rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 5px;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.status-text {
    font-size: 1.1rem;
    color: var(--accent-2);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.4), 0 2px 5px rgba(0,0,0,0.8);
    animation: pulse 2s infinite;
    margin-bottom: 1rem;
}

.desktop-hint {
    margin-top: 3rem; 
    color: var(--accent-1); 
    font-family: 'Press Start 2P', cursive; 
    font-size: 0.8rem; 
    line-height: 1.5; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    opacity: 0.8;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.3; }
}

/* Mobile Controls */
#mobile-controls {
    display: none;
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    justify-content: space-between;
    z-index: 10;
}

.d-pad, .action-pad {
    display: flex;
    gap: 15px;
}

#mobile-controls button {
    background: rgba(0, 243, 255, 0.1);
    border: 3px solid rgba(0, 243, 255, 0.5);
    color: #00f3ff;
    padding: 15px 20px;
    border-radius: 12px;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    backdrop-filter: blur(4px);
    touch-action: manipulation;
    pointer-events: auto;
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.2), inset 0 0 10px rgba(0, 243, 255, 0.2);
    transition: transform 0.1s, background 0.1s;
}

#mobile-controls button:active {
    background: rgba(0, 243, 255, 0.4);
    transform: scale(0.92);
}

/* Responsive Overrides */
@media (max-width: 900px) {
    .title { font-size: 3.5rem; }
}

@media (max-width: 600px) {
    #mobile-controls {
        display: flex; /* Show controls only on mobile sizes */
    }
    
    .desktop-hint {
        display: none; /* Hide keyboard hint on mobile */
    }
    
    .content {
        padding-top: 15%;
        justify-content: flex-start;
    }

    .title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    .status-text {
        font-size: 0.8rem;
    }
}
