:root {
    --bg-dark: #0a0515;
    --accent: #d4af37;
    --text-primary: #e8e6e3;
    --text-dim: rgba(232, 230, 227, 0.6);
    --surface: rgba(255, 255, 255, 0.03);
    --border: rgba(212, 175, 55, 0.15);
    --nav-bg: rgba(10, 5, 21, 0.95);
}

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

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

#app { width: 100%; height: 100%; position: relative; }

/* ── SPLASH SCREEN ── */
#screen-splash {
    z-index: 5000;
    background: #05020a;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 1s ease;
}
.splash-content { text-align: center; padding: 2rem; max-width: 400px; }
.splash-emblem { font-size: 5rem; margin-bottom: 2rem; filter: drop-shadow(0 0 30px var(--accent)); }
.splash-loader { width: 40px; height: 2px; background: var(--accent); margin: 2rem auto; animation: loading 2s infinite ease-in-out; }
.daily-quote { font-family: 'Lora', serif; font-style: italic; font-size: 1.3rem; color: var(--text-primary); margin-bottom: 1rem; line-height: 1.6; }
.splash-author { font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.2em; color: var(--accent); opacity: 0.6; }

@keyframes loading {
    0% { width: 0; opacity: 0; }
    50% { width: 100px; opacity: 1; }
    100% { width: 0; opacity: 0; }
}

.screen {
    position: absolute; inset: 0;
    display: none; flex-direction: column;
    background: var(--bg-dark);
    padding-bottom: 75px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.screen.active { 
    display: flex !important; 
    opacity: 1;
}

/* ── ESTRELLAS ── */
.stars-bg {
    position: absolute; inset: 0;
    background: radial-gradient(circle at center, #1a0a2e 0%, #05020a 100%);
    z-index: 0;
}

/* ── HEADER ── */
.app-header {
    padding: 1.2rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 5, 21, 0.8);
    backdrop-filter: blur(10px);
}
.coach-name { font-family: 'Cinzel', serif; font-weight: 700; color: var(--accent); display: block; font-size: 1.1rem; }
.status { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.15em; }
.status-dot { width: 8px; height: 8px; background: #44ff88; border-radius: 50%; box-shadow: 0 0 10px #44ff88; }
.title-sm { font-family: 'Cinzel', serif; color: var(--accent); font-size: 1.2rem; letter-spacing: 0.1em; }

/* ── CHAT ── */
.chat-area { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.message { max-width: 85%; padding: 1.2rem; border-radius: 12px; line-height: 1.7; font-size: 1.1rem; }
.message.neville { background: var(--surface); border-left: 2px solid var(--accent); align-self: flex-start; }
.message.user { background: rgba(212, 175, 55, 0.08); align-self: flex-end; color: var(--accent); font-style: italic; }

/* ── INPUT ── */
.app-footer { padding: 1rem; background: var(--bg-dark); }
.input-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 0.5rem 1.2rem; display: flex; align-items: center; gap: 0.8rem; }
#user-input { flex: 1; background: none; border: none; color: var(--text-primary); font-family: 'Lora', serif; font-size: 1.1rem; outline: none; padding: 0.6rem 0; resize: none; }
.btn-send { background: none; border: none; color: var(--accent); font-size: 1.5rem; cursor: pointer; }

/* ── NAV ── */
.bottom-nav {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 75px; 
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--nav-bg);
    display: flex; border-top: 1px solid var(--border);
    z-index: 100;
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: none; border: none; color: var(--text-dim); gap: 4px; transition: all 0.3s;
}
.nav-item.active { color: var(--accent); }
.nav-icon { font-size: 1.4rem; }
.nav-label { font-family: 'Cinzel', serif; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* ── HISTORIAL ── */
.scroll-area { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.history-item {
    background: var(--surface); border: 1px solid var(--border);
    padding: 1.2rem; border-radius: 8px; cursor: pointer;
}
.history-date { font-size: 0.7rem; color: var(--text-dim); display: block; margin-bottom: 0.5rem; }
.history-summary { font-size: 1rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── SATS ── */
.sats-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; text-align: center; }
.sats-icon { font-size: 4rem; margin-bottom: 1.5rem; opacity: 0.8; }
.sats-content h3 { font-family: 'Cinzel', serif; color: var(--accent); margin-bottom: 1rem; }
.sats-content p { color: var(--text-dim); margin-bottom: 2rem; max-width: 280px; }
.btn-secondary { background: var(--surface); border: 1px solid var(--accent); padding: 0.8rem 2rem; color: var(--accent); border-radius: 20px; font-family: 'Cinzel', serif; cursor: pointer; }
.timer-display { margin-top: 1rem; font-size: 0.8rem; color: var(--accent); opacity: 0.6; }
.sats-whisper { font-style: italic; margin-top: 3rem !important; font-size: 0.9rem !important; }

/* ── ENTRANCE OVERRIDE ── */
#screen-entrance { z-index: 1000; padding-bottom: 0; }
.entrance-content { margin: auto; text-align: center; position: relative; z-index: 1; }
.btn-primary { background: transparent; border: 1px solid var(--accent); padding: 1rem 3rem; color: var(--accent); font-family: 'Cinzel', serif; letter-spacing: 0.2em; border-radius: 4px; cursor: pointer; }

.btn-icon { background: none; border: none; color: var(--accent); font-size: 1.2rem; cursor: pointer; transition: all 0.3s; }
.btn-icon:active { transform: scale(0.9); }
#btn-mic.active { color: #ff4444; animation: pulse 1.5s infinite; }

/* ── RITUAL DE RESPIRACIÓN ── */
#screen-breath { z-index: 2000; background: radial-gradient(circle at center, #1a0a2e 0%, #05020a 100%); }
.breath-content { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.breath-circle {
    width: 150px; height: 150px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    animation: breath 8s infinite ease-in-out;
}
#breath-instruction { font-family: 'Cinzel', serif; color: var(--accent); font-size: 2rem; letter-spacing: 0.2em; }
.breath-tag { color: var(--text-dim); font-style: italic; }

@keyframes breath {
    0%, 100% { transform: scale(0.8); opacity: 0.4; }
    40%, 60% { transform: scale(1.5); opacity: 1; box-shadow: 0 0 100px rgba(212, 175, 55, 0.6); }
}

/* ── PARTÍCULAS (Canvas) ── */
#particles-canvas {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 1;
}
.vision-image {
    width: 100%; border-radius: 12px;
    margin: 1rem 0; border: 1px solid var(--accent);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}
