:root {
    --bg-color: #fbbdb9;       /* Rosa pelle chiaro e rilassante[cite: 4] */
    --header-color: #FF1493;   /* Rosa acceso (DeepPink)[cite: 4] */
    --primary-color: #FF69B4;  /* Rosa medio per cerchio e pulsanti[cite: 4] */
    --text-color: #5C3A41;     /* Un marrone/bordeaux molto scuro per massima leggibilità sul rosa[cite: 4] */
    --btn-text: #FFFFFF;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    overflow: hidden; 
}

/* STILE DELL'HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-color);
    color: white;
    text-align: center;
    padding: 18px 0;
    font-size: 24px;
    font-weight: bold;
    font-style: italic;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Aggiungiamo un padding-top per compensare l'header fisso */
.screen {
    width: 100%;
    max-width: 400px;
    padding: 70px 15px 15px 15px; 
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.screen.active {
    display: flex;
}

h1 { font-size: 24px; margin-bottom: 5px; }
h2 { font-size: 22px; margin-bottom: 15px; }
.subtitle { font-size: 15px; margin-bottom: 15px; opacity: 0.85; }

button {
    font-family: inherit;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

button:active { transform: scale(0.95); }

.menu-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    background-color: white;
    color: var(--text-color);
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; 
}

/* --- ANIMAZIONE CUORE CHE BATTE --- */
.beating-heart {
    display: inline-block;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
    100% { transform: scale(1); }
}

.back-btn {
    position: absolute;
    top: 75px; 
    left: 15px;
    background: none;
    color: var(--text-color);
    font-size: 16px;
    padding: 5px;
    font-weight: bold;
}

.action-btn {
    background-color: var(--primary-color);
    color: var(--btn-text);
    padding: 12px 25px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
}

/* Animazione Respirazione (Box Breathing) */
.breathing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.circle-wrapper {
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.breathing-circle {
    width: 90px;
    height: 90px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: box-breathe 16s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes box-breathe {
    0% { transform: scale(1); }
    25% { transform: scale(2.2); }
    50% { transform: scale(2.2); }
    75% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* Animazione Respiro Fisiologico (Doppio inspiro + lunga espirazione) */
.sigh-circle {
    width: 90px;
    height: 90px;
    background-color: var(--header-color);
    border-radius: 50%;
    animation: physiological-sigh 9s infinite ease-in-out;
}

@keyframes physiological-sigh {
    0%   { transform: scale(1); }     /* Inizio */
    20%  { transform: scale(1.6); }   /* Primo inspiro */
    25%  { transform: scale(1.5); }   /* Piccolo stop intermedio */
    40%  { transform: scale(2.2); }   /* Secondo inspiro extra (top) */
    100% { transform: scale(1); }     /* Lunga espirazione lenta fino a chiudere */
}

/* Testi Grounding & Colori */
.large-text { font-size: 18px; line-height: 1.4; margin-bottom: 8px; }
.counter-text { font-size: 35px; font-weight: bold; color: var(--header-color); margin-bottom: 15px; }

/* --- ZONA GATTINO ANIMATO --- */
.cat-container {
    margin-top: 2px;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.cat-image {
    width: 120px; 
    height: auto;
    border-radius: 12px;
    animation: hug-motion 2.5s infinite ease-in-out;
}

@keyframes hug-motion {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* --- TASTO PER CAMBIARE TECNICA DIRETTAMENTE --- */
.switch-btn {
    background-color: transparent;
    color: var(--header-color);
    border: 2px solid var(--primary-color);
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    margin-top: 20px; 
}

/* --- TASTO CHIAMATA DIRETTA --- */
.call-btn {
    background-color: var(--header-color);
    color: white;
    margin-top: 5px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
}

.call-btn:active {
    opacity: 0.9;
}