
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto:wght@300;400;700&family=Space+Mono:wght@400;700&display=swap');

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

:root {
    --bg-primary: #0a0a15;
    --bg-secondary: #1a1a2e;
    --neon-purple: #6a00f4;
    --neon-blue: #00f5ff;
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-green: #39ff14;
    --glow-purple: 0 0 20px #6a00f4;
    --glow-blue: 0 0 20px #00f5ff;
    --glow-pink: 0 0 20px #ff00ff;
}

html, body { height: 100%; width: 100%; overflow-x: hidden; }

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #0f1b2e 25%, #1a0a2e 50%, var(--bg-primary) 75%, #0f1b2e 100%);
    background-size: 400% 400%;
    animation: bgFloat 20s ease infinite;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 100px;
    position: relative;
}

@keyframes bgFloat {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 0% 50%; }
    75% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* EFEITO STARFIELD */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* PARTICULAS */
.particle {
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

.particle::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* CONTAINERS */
.app-header {
    text-align: center;
    padding: 20px 10px;
}

.logo {
    width: 180px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    filter: drop-shadow(var(--glow-blue)) drop-shadow(0 0 30px rgba(0,245,255,0.5));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(-15px) rotate(1deg) scale(1.05); }
}

h1 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2em, 5vw, 3.5em);
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
    letter-spacing: 3px;
    text-shadow: 0 0 30px rgba(106,0,244,0.5);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 10px rgba(106,0,244,0.3), 0 0 20px rgba(0,245,255,0.3); }
    to { text-shadow: 0 0 30px rgba(106,0,244,0.6), 0 0 40px rgba(0,245,255,0.6), 0 0 50px rgba(255,0,255,0.3); }
}

h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2em;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    text-shadow: var(--glow-purple);
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
}

#greeting {
    font-size: 1.4em;
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.9;
    text-shadow: var(--glow-purple);
    font-family: 'Orbitron';
    animation: greetingPulse 2s ease-in-out infinite;
}

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

/* PLAYER SECTION */
.player {
    background: rgba(120,119,198,0.1);
    padding: 25px;
    border-radius: 30px;
    margin: 20px 0;
    border: 2px solid rgba(0,245,255,0.4);
    box-shadow: var(--glow-purple), 0 20px 50px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    animation: playerGlow 3s ease-in-out infinite;
}

@keyframes playerGlow {
    0%, 100% { box-shadow: var(--glow-purple), 0 20px 50px rgba(0,0,0,0.5); }
    50% { box-shadow: var(--glow-blue), 0 30px 60px rgba(0,245,255,0.3); }
}

#currentSound {
    font-size: 1.4em;
    margin-bottom: 18px;
    text-align: center;
    text-shadow: var(--glow-cyan);
    font-weight: bold;
    font-family: 'Space Mono';
}

.sound-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 18px 0;
    flex-wrap: wrap;
}

.sound-btn {
    padding: 12px 18px;
    background: rgba(0,245,255,0.15);
    border: 2px solid var(--neon-cyan);
    border-radius: 25px;
    color: var(--neon-cyan);
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: bold;
    font-family: 'Orbitron';
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.sound-btn:hover::before { left: 100%; }

.sound-btn:hover {
    background: rgba(0,245,255,0.3);
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--glow-cyan), 0 10px 30px rgba(0,245,255,0.4);
}

.sound-btn.active {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: var(--glow-cyan), 0 0 30px rgba(0,245,255,0.8);
    transform: scale(1.15);
}

.play-btn {
    padding: 18px 40px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan));
    border: none;
    border-radius: 30px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.3em;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Orbitron';
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 30px rgba(255,0,255,0.5);
    width: 100%;
}

.play-btn:hover {
    transform: translateY(-8px) scale(1.08);
    box-shadow: 0 15px 50px rgba(0,245,255,0.7), 0 0 40px rgba(255,0,255,0.6);
}

.play-btn:active {
    transform: translateY(-4px) scale(1.03);
}

/* GRID BOTÕES */
.btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.btn {
    padding: 25px 15px;
    background: linear-gradient(135deg, rgba(106,0,244,0.2), rgba(0,245,255,0.1));
    border: 2px solid rgba(0,245,255,0.4);
    border-radius: 25px;
    color: #fff;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.7s;
}

.btn:hover::before { left: 100%; }

.btn:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-15px) scale(1.1);
    box-shadow: var(--glow-cyan), 0 30px 60px rgba(0,245,255,0.5);
    background: linear-gradient(135deg, rgba(106,0,244,0.4), rgba(0,245,255,0.2));
}

.btn:active {
    transform: translateY(-8px) scale(1.05);
    animation: clickPulse 0.3s;
}

@keyframes clickPulse {
    0% { box-shadow: var(--glow-cyan), 0 0 0 0 rgba(0,245,255,0.8); }
    70% { box-shadow: var(--glow-cyan), 0 0 0 25px rgba(0,245,255,0); }
    100% { box-shadow: var(--glow-cyan), 0 0 0 0 rgba(0,245,255,0); }
}

/* NAV BOTTOM - CORRIGIDO E TESTADO */
nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: rgba(10,10,21,0.98);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -15px 50px rgba(0,0,0,0.8), 0 0 40px rgba(106,0,244,0.4);
    border-top: 3px solid rgba(0,245,255,0.5);
    z-index: 999;
    padding: 10px 0;
}

nav button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 2.5em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 12px 25px;
    border-radius: 20px;
    flex: 1;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav button:hover {
    color: var(--neon-cyan);
    transform: scale(1.15) translateY(-5px);
}

nav button.active {
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    background: rgba(0,245,255,0.2);
    box-shadow: var(--glow-cyan), inset 0 0 20px rgba(0,245,255,0.2);
    border-radius: 20px;
    transform: scale(1.2);
}

nav button::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: var(--neon-cyan);
    transition: width 0.3s;
    border-radius: 10px;
    box-shadow: var(--glow-cyan);
}

nav button.active::after {
    width: 70%;
}

/* SECTIONS */
section {
    display: none;
    animation: fadeIn 0.6s ease-out;
    overflow-y: auto;
    max-height: calc(100vh - 150px);
}

section.active {
    display: flex;
    flex-direction: column;
}

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

/* TIMER */
.timer-display {
    font-family: 'Space Mono', monospace;
    font-size: 5.5em;
    text-align: center;
    margin: 40px 0;
    text-shadow: var(--glow-cyan), 0 0 50px rgba(0,245,255,0.6);
    color: var(--neon-cyan);
    letter-spacing: 5px;
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0%, 100% { text-shadow: var(--glow-cyan), 0 0 30px rgba(0,245,255,0.4); transform: scale(1); }
    50% { text-shadow: var(--glow-cyan), 0 0 60px rgba(0,245,255,0.8); transform: scale(1.02); }
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.stat {
    background: linear-gradient(135deg, rgba(106,0,244,0.15), rgba(0,245,255,0.1));
    padding: 22px;
    border-radius: 20px;
    border: 2px solid rgba(0,245,255,0.3);
    text-align: center;
    margin: 12px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.stat:hover {
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan), 0 15px 40px rgba(0,0,0,0.4);
}

.stat h3 {
    font-size: 0.85em;
    opacity: 0.8;
    margin-bottom: 10px;
    color: var(--neon-cyan);
    font-family: 'Orbitron';
}

.stat .value {
    font-size: 2.5em;
    color: var(--neon-cyan);
    font-weight: bold;
    font-family: 'Space Mono';
    text-shadow: var(--glow-cyan);
}

/* BREATH ANIMATION */
.breath-guide {
    font-size: 1.8em;
    text-align: center;
    margin: 60px 0;
    animation: breatheDeep 4s ease-in-out infinite;
    color: var(--neon-pink);
    font-weight: bold;
    font-family: 'Orbitron';
}

@keyframes breatheDeep {
    0%, 100% { transform: scale(0.95) translateY(0); opacity: 0.8; }
    50% { transform: scale(1.2) translateY(-10px); opacity: 1; }
}

/* QUOTES */
.quote {
    background: linear-gradient(135deg, rgba(106,0,244,0.3), rgba(255,0,255,0.1));
    padding: 25px;
    border-radius: 20px;
    border-left: 5px solid var(--neon-pink);
    margin: 25px 0;
    font-size: 1.2em;
    font-style: italic;
    text-align: center;
    box-shadow: var(--glow-pink), 0 10px 30px rgba(0,0,0,0.3);
}

/* FORMS */
.form-group {
    margin: 20px 0;
}

input, select {
    width: 100%;
    padding: 16px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(0,245,255,0.3);
    border-radius: 20px;
    color: #fff;
    font-size: 1.1em;
    font-family: 'Roboto';
    transition: all 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    background: rgba(0,245,255,0.08);
}

input::placeholder { color: rgba(255,255,255,0.5); }

/* SLEEP OVERLAY */
.sleep-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.98);
    z-index: 2000;
    animation: dimScreen 1s;
    justify-content: center;
    align-items: center;
}

@keyframes dimScreen { from { opacity: 0; } to { opacity: 1; } }

.sleep-overlay.active {
    display: flex;
}

.sleep-content {
    text-align: center;
}

.sleep-timer {
    font-size: 4.5em;
    font-family: 'Space Mono';
    color: var(--neon-cyan);
    margin: 30px 0;
    animation: sleepPulse 1.5s infinite;
}

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

/* RESPONSIVE */
@media (max-width: 600px) {
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
    .btn-grid { grid-template-columns: 1fr; }
    .timer-display { font-size: 4em; }
    .controls { gap: 10px; }
    nav { height: 80px; }
    nav button { font-size: 2em; }
    body { padding-bottom: 90px; }
}

.hidden { display: none !important; }
