:root {
    --primary: #0a192f;
    --secondary: #112240;
    --accent: #64ffda;
    --text: #ccd6f6;
    --white: #e6f1ff;
    --danger: #ff5555; /* Per i ritmi 1'40 */
    --gold: #ffd700;   /* Per il test finale */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--primary);
    color: var(--text);
    overflow-x: hidden;
}

/* --- SFONDO ANIMATO (BOLLE) --- */
.bubbles {
    position: fixed;
    width: 100%; height: 100%; z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #020c1b 0%, #0a192f 100%);
}
.bubble {
    position: absolute; bottom: -100px;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 50%; opacity: 0.5;
    animation: rise 15s infinite ease-in;
}
.bubble:nth-child(1) { left: 10%; width: 80px; height: 80px; animation-duration: 20s; }
.bubble:nth-child(2) { left: 20%; width: 20px; height: 20px; animation-duration: 10s; animation-delay: 5s; }
.bubble:nth-child(3) { left: 35%; width: 50px; height: 50px; animation-duration: 18s; animation-delay: 2s; }
.bubble:nth-child(4) { left: 50%; width: 30px; height: 30px; animation-duration: 12s; }
.bubble:nth-child(5) { left: 65%; width: 60px; height: 60px; animation-duration: 22s; animation-delay: 8s; }
.bubble:nth-child(6) { left: 80%; width: 25px; height: 25px; animation-duration: 14s; animation-delay: 3s; }
@keyframes rise {
    0% { bottom: -100px; transform: translateX(0); }
    50% { transform: translateX(100px); }
    100% { bottom: 120%; transform: translateX(-200px); }
}

/* --- HEADER CON FOTO --- */
header {
    padding: 80px 20px;
    text-align: center;
    background: url('https://images.unsplash.com/photo-1530549387789-4c1017266635?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') no-repeat center center/cover;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 25, 47, 0.85);
}
.hero-content { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem; font-weight: 900; color: var(--white);
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px;
}
.subtitle { color: var(--accent); font-size: 1.2rem; font-weight: 600; margin-bottom: 30px; }

/* DASHBOARD OBIETTIVI */
.dashboard {
    display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 20px;
}
.stat-card {
    background: rgba(17, 34, 64, 0.9);
    padding: 15px 25px; border-radius: 10px;
    border: 1px solid var(--accent); text-align: center;
}
.stat-val { font-size: 1.8rem; font-weight: bold; color: var(--white); }
.stat-label { font-size: 0.8rem; color: var(--accent); text-transform: uppercase; }

/* --- CONTAINER E GRIGLIA SETTIMANALE --- */
.container { max-width: 1200px; margin: 0 auto; padding: 40px 15px; }

.month-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem; color: var(--white);
    margin: 50px 0 20px 0; padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
    display: flex; align-items: center; gap: 10px;
}

.week-row {
    display: flex; gap: 20px; margin-bottom: 25px;
    align-items: stretch;
}

/* CARD ALLENAMENTO */
.day-col {
    flex: 1;
    background: var(--secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(100, 255, 218, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex; flex-direction: column;
    position: relative;
}
.day-col:hover { transform: translateY(-5px); border-color: var(--accent); }
.day-col.empty { background: transparent; border: none; pointer-events: none; }
.day-col.past { opacity: 0.5; filter: grayscale(1); }

/* Header Card */
.card-header {
    background: rgba(0,0,0,0.2); padding: 15px;
    display: flex; justify-content: space-between; align-items: center;
}
.date-badge {
    background: var(--primary); color: var(--accent);
    padding: 5px 10px; border-radius: 6px;
    font-family: 'Roboto Mono', monospace; font-weight: bold;
}
.meters-badge {
    font-size: 0.85rem; font-weight: 800; color: var(--primary);
    background: var(--accent); padding: 4px 10px; border-radius: 15px;
}

/* Body Card */
.card-body { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.workout-title { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 5px; }
.workout-focus { font-size: 0.85rem; color: var(--text); font-style: italic; margin-bottom: 15px; opacity: 0.8; }

/* Programma dettagliato */
.program-content {
    background: rgba(0,0,0,0.2);
    padding: 12px; border-radius: 8px;
    font-size: 0.9rem; line-height: 1.5;
    color: #a8b2d1;
}
.main-set {
    margin-top: 8px; margin-bottom: 8px;
    padding: 8px;
    background: rgba(100, 255, 218, 0.05);
    border-left: 3px solid var(--accent);
    color: var(--white); font-weight: 600;
}
.hard-pace { color: var(--danger); font-weight: 800; }
.tech-note { display: block; font-size: 0.8rem; color: var(--accent); margin-top: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .week-row { flex-direction: column; }
    h1 { font-size: 2rem; }
    .dashboard { gap: 10px; }
    .stat-card { flex: 1 1 40%; }
}
