/* public/modules/neon-typer/style.css */

:root {
    --glass-bg: rgba(13, 17, 23, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-yellow: #ffdd00;
    --neon-orange: #ff9d00;
    --neon-purple: #bd00ff;
    --bg-dark: #120024;
}

body {
    background-color: var(--bg-dark);
    font-family: 'Rajdhani', sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex; flex-direction: column;
    margin: 0;
}

/* --- FUNDO RETRO (Sol e Grade) --- */
.retro-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
    background: linear-gradient(to bottom, #120024 0%, #340068 50%, #000 50%);
}

.sun {
    position: absolute; left: 50%; bottom: 50%;
    transform: translate(-50%, 0);
    width: 300px; height: 300px;
    background: linear-gradient(to top, var(--neon-yellow), var(--neon-orange));
    border-radius: 50%;
    box-shadow: 0 0 50px var(--neon-orange);
    /* Corta o sol em faixas */
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 50%, transparent 55%, black 55%, black 60%, transparent 60%, transparent 65%, black 65%, black 70%, transparent 70%, transparent 75%, black 75%);
}

.grid-floor {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 50%;
    background-image: 
        linear-gradient(rgba(189, 0, 255, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(189, 0, 255, 0.4) 1px, transparent 1px);
    background-size: 100px 100px;
    background-position: center bottom;
    perspective: 100vh;
    transform: perspective(500px) rotateX(60deg) scale(2);
    transform-origin: bottom;
    animation: moveGrid 1s linear infinite;
}

@keyframes moveGrid {
    from { background-position: center bottom; }
    to { background-position: center calc(bottom + 100px); }
}

/* HEADER */
.app-header {
    height: 60px; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(18, 0, 36, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--neon-purple);
    z-index: 100; position: relative;
}
.header-left { display: flex; align-items: center; gap: 15px; }
.btn-back {
    color: white; text-decoration: none; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: 0.2s;
}
.btn-back:hover { background: rgba(255,255,255,0.1); color: var(--neon-yellow); }
.app-logo { font-weight: 700; font-size: 1.4rem; color: white; letter-spacing: 1px; }

.header-right { display: flex; gap: 15px; }
.score-badge {
    background: rgba(255, 221, 0, 0.1);
    border: 1px solid var(--neon-yellow);
    padding: 5px 12px; border-radius: 20px;
    color: var(--neon-yellow); font-weight: bold; font-size: 1.1rem;
    display: flex; align-items: center; gap: 6px;
}

/* TELAS */
.screen { display: none; width: 100%; height: calc(100vh - 60px); position: relative; z-index: 10; }
.screen.active { display: flex; flex-direction: column; }

/* MENU SETUP */
.setup-container {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 40px;
}
.hero-text { text-align: center; }
.hero-text h1 { font-size: 3rem; margin: 0; color: white; text-shadow: 0 0 20px var(--neon-yellow); font-style: italic; }
.hero-text p { color: #ccc; margin-top: 5px; font-size: 1.2rem; }

.mode-grid { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.mode-card {
    background: var(--glass-bg); border: 1px solid var(--neon-purple);
    padding: 25px; border-radius: 16px; width: 180px; cursor: pointer;
    transition: 0.3s; color: white; display: flex; flex-direction: column; align-items: center;
}
.mode-card:hover { transform: translateY(-5px); border-color: var(--neon-yellow); box-shadow: 0 0 20px var(--neon-yellow); }
.icon-box { font-size: 2.5rem; margin-bottom: 10px; color: var(--neon-yellow); font-weight: bold; }
.mode-card h3 { margin: 0; font-size: 1.2rem; }
.mode-card p { margin: 5px 0 0 0; color: #888; font-size: 0.9rem; }


/* ÁREA DE JOGO */
.game-scene {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    position: relative;
}

/* Palavra Flutuante */
.target-container {
    margin-bottom: 150px; /* Acima da nave */
    perspective: 500px;
}

.word-display {
    font-family: 'Share Tech Mono', monospace;
    font-size: 3rem; font-weight: bold;
    background: rgba(0,0,0,0.7);
    padding: 15px 30px; border-radius: 10px;
    border: 2px solid var(--neon-purple);
    box-shadow: 0 0 30px var(--neon-purple);
    text-transform: uppercase;
    letter-spacing: 5px;
    animation: pulseWord 0.5s infinite alternate;
}
@keyframes pulseWord { from { transform: scale(1); } to { transform: scale(1.05); } }

.typed { color: var(--neon-yellow); text-shadow: 0 0 10px var(--neon-yellow); }
.untyped { color: rgba(255,255,255,0.5); }

/* Nave */
.player-ship {
    width: 0; height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 60px solid white;
    position: absolute; bottom: 50px;
    filter: drop-shadow(0 0 10px var(--neon-yellow));
}
.player-ship::after {
    content: ''; position: absolute; top: 60px; left: -15px;
    width: 30px; height: 40px;
    background: linear-gradient(to bottom, var(--neon-orange), transparent);
    border-radius: 50%; filter: blur(5px);
    animation: thrust 0.1s infinite alternate;
}
@keyframes thrust { from { opacity: 0.8; height: 40px; } to { opacity: 1; height: 50px; } }

/* Input Oculto e Botão Mobile */
#hidden-input { 
    position: absolute; opacity: 0; top: -1000px; 
    /* Truque para evitar zoom no iOS */
    font-size: 16px; 
}
.btn-keyboard-trigger {
    position: absolute; bottom: 20px; right: 20px;
    background: rgba(255,255,255,0.1); border: 1px solid white;
    color: white; padding: 10px 15px; border-radius: 30px;
    display: none; /* Só aparece no JS se for mobile */
    align-items: center; gap: 8px; cursor: pointer;
}

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 200;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}
.modal-card {
    background: #0d0d12; border: 1px solid var(--neon-yellow);
    padding: 40px; border-radius: 20px; text-align: center;
    width: 90%; max-width: 400px; position: relative;
    box-shadow: 0 0 60px rgba(255, 221, 0, 0.2);
}
.modal-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 200px; height: 200px; background: var(--neon-yellow);
    filter: blur(100px); opacity: 0.2; pointer-events: none;
}
.btn-primary {
    background: var(--neon-yellow); color: black; border: none;
    padding: 12px 30px; border-radius: 8px; font-weight: bold; cursor: pointer;
    font-family: 'Rajdhani'; font-size: 1.1rem; width: 100%; margin-bottom: 10px;
}
.btn-secondary {
    background: transparent; border: 1px solid #555; color: #ccc;
    padding: 10px; border-radius: 8px; cursor: pointer; width: 100%;
}