:root {
    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --surface-light: #2A2A2A;
    --primary-color: #00E676; /* Verde neón deportivo */
    --text-main: #FFFFFF;
    --text-muted: #9E9E9E;
    --nav-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    /* Usamos dvh para móviles (Dynamic Viewport Height) */
    height: 100dvh; 
    overflow: hidden;
}

#app-container {
    height: calc(100dvh - var(--nav-height));
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 30px;
}

/* --- Gestión de Vistas --- */
.view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

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

/* --- Cabeceras --- */
header {
    margin-bottom: 25px;
}
header h1 { font-size: 1.8rem; font-weight: 700; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

/* --- PANTALLA 1: Añadir --- */
.capture-container {
    background-color: var(--surface-color);
    border: 2px dashed var(--surface-light);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 25px;
}

.capture-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}
.capture-btn i { font-size: 3rem; }

.status-text { margin-top: 15px; color: var(--text-muted); font-size: 0.85rem; }

.data-preview { display: flex; flex-direction: column; gap: 15px; }
.data-card {
    background-color: var(--surface-color);
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.data-label { color: var(--text-muted); }
.data-value { font-size: 1.3rem; font-weight: bold; color: var(--primary-color); }

.primary-btn {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
}

/* --- PANTALLA 2: Wrapped --- */
.streak-card {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}
.streak-card i { font-size: 3rem; color: #fff; }
.streak-info h2 { font-size: 1.2rem; }
.streak-info p { font-size: 1.1rem; font-weight: bold; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.stat-box {
    background-color: var(--surface-color);
    padding: 20px 15px;
    border-radius: 16px;
    text-align: center;
}
.stat-box i { font-size: 2rem; color: var(--primary-color); margin-bottom: 10px; }
.stat-title { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 5px; }
.stat-num { font-size: 1.4rem; font-weight: bold; }

/* --- PANTALLA 3: Stats --- */
.chart-container {
    background-color: var(--surface-color);
    border-radius: 16px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--text-muted);
}
.improvement-section {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 16px;
}
.improvement-section h3 { margin-bottom: 15px; font-size: 1.1rem; }
.improvement-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.improvement-list li { color: var(--text-muted); line-height: 1.4; }
.positive { color: var(--primary-color); font-weight: bold; }

/* --- NAVEGACIÓN INFERIOR --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--surface-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--surface-light);
    padding-bottom: env(safe-area-inset-bottom); /* Para iPhones */
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    width: 33%;
}
.nav-item i { font-size: 1.5rem; transition: 0.2s; }
.nav-item span { font-size: 0.75rem; font-weight: 500; }

.nav-item.active { color: var(--primary-color); }
.nav-item.active i { transform: translateY(-3px); }

.negative { 
    color: #FF6B6B; 
    font-weight: bold; 
}