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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f4f7ed 0%, #e8efdb 100%);
    min-height: 100vh;
    color: #0f2018;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pomodoro-app {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 30px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 4px 12px rgba(15,32,24,.06), 0 24px 48px rgba(15,32,24,.10);
    text-align: center;
}

/* --- Cabecera --- */
.app-header {
    margin-bottom: 30px;
}

.app-header h1 {
    color: #2d5a3d;
    font-size: 2rem;
    margin-bottom: 5px;
}

.subtitle {
    color: #6b7d6e;
    font-size: 0.95rem;
}

/* --- Planta --- */
/* --- Planta + Anillo de progreso --- */
.planta-zone {
    margin: 20px 0 30px;
}

.planta-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.progreso-anillo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.anillo-fondo {
    fill: none;
    stroke: #e8efdb;
    stroke-width: 8;
}

.anillo-progreso {
    fill: none;
    stroke: #4a8c5c;
    stroke-width: 8;
    stroke-linecap: round;
    /* Circunferencia: 2 * π * 54 ≈ 339.29 */
    stroke-dasharray: 339.29;
    stroke-dashoffset: 339.29;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.anillo-progreso.descanso {
    stroke: #d4b04a;
}

.planta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #e8efdb 0%, #f4f7ed 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.planta-emoji {
    font-size: 3.5rem;
    transition: transform 0.5s ease;
    display: inline-block;
}

.planta.crece .planta-emoji {
    animation: crecer 0.8s ease;
}

@keyframes crecer {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3) rotate(-5deg); }
    100% { transform: scale(1); }
}

.planta-label {
    margin-top: 12px;
    color: #4a8c5c;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Timer --- */
.timer-zone {
    margin-bottom: 30px;
}

.modo {
    color: #4a8c5c;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.modo.descanso {
    color: #d4b04a;
}

.timer {
    font-family: 'Courier New', monospace;
    font-size: 5rem;
    font-weight: 700;
    color: #2d5a3d;
    margin-bottom: 25px;
    letter-spacing: 2px;
}

.timer.descanso {
    color: #b8941f;
}

/* --- Botones --- */
.botones {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-principal {
    background: #2d5a3d;
    color: #ffffff;
}

.btn-principal:hover {
    background: #1f4029;
    transform: translateY(-2px);
}

.btn-secundario {
    background: #e8efdb;
    color: #2d5a3d;
}

.btn-secundario:hover {
    background: #d8e2c9;
}

/* --- Estadísticas --- */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding-top: 25px;
    border-top: 1px solid #d8e2c9;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d5a3d;
}

.stat-label {
    font-size: 0.8rem;
    color: #6b7d6e;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* --- Móvil --- */
@media (max-width: 500px) {
    .pomodoro-app {
        padding: 30px 20px;
    }

    .timer {
        font-size: 4rem;
    }

    .botones {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
