/* Variables y reset */
:root {
    --primary-color: #5e72e4;
    --secondary-color: #7795f8;
    --accent-color: #324cdd;
    --background-color: #f8fafc;
    --text-color: #2d3748;
    --success-color: #2dce89;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --circle-size: 230px;
    --transition-time: 0.6s;
    --font-primary: 'Segoe UI', 'Helvetica Neue', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background: linear-gradient(150deg, var(--background-color) 0%, #e8f4ff 100%);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* Estilos del banner de instalación */
/* #install-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#install-banner.hidden {
    display: none;
} */

/* Estilos generales */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.logo {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 2.6rem;
    display: inline-block;
}

.logo i {
    filter: drop-shadow(0 5px 10px rgba(94, 114, 228, 0.3));
}

h1 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p {
    color: #64748b;
    font-size: 1.1rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

footer {
    text-align: center;
    margin-top: 50px;
    font-size: 0.85rem;
    color: #94a3b8;
    padding: 15px 0;
}

/* Estilos del ejercicio de respiración */
.breathing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    min-height: 420px;
    width: 100%;
    max-width: 600px;
}

#breathing-circle {
    width: var(--circle-size);
    height: var(--circle-size);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-time) cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease;
    box-shadow: 0 10px 25px rgba(116, 144, 252, 0.3);
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
    perspective: 1000px;
    transform-style: preserve-3d;
}

#breathing-circle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle at center, rgba(116, 144, 252, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
    filter: blur(15px);
}

#breathing-circle.clickable {
    cursor: pointer;
}

#breathing-circle.clickable:hover {
    box-shadow: 0 15px 30px rgba(116, 144, 252, 0.4);
    transform: translateY(-5px);
}

#breathing-circle.clickable:active {
    transform: translateY(2px);
    box-shadow: 0 8px 20px rgba(116, 144, 252, 0.25);
}

.breathing-text {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.circle-icon {
    color: white;
    font-size: 2.2rem;
    transition: opacity 0.4s, transform 0.3s;
}

#breathing-circle.clickable:hover .circle-icon {
    transform: scale(1.1);
}

#breathing-circle.inhale .breathing-text,
#breathing-circle.exhale .breathing-text {
    margin-bottom: 0;
}

#breathing-circle.inhale .circle-icon,
#breathing-circle.exhale .circle-icon {
    display: none;
}

#breathing-circle.inhale {
    transform: scale(1.35);
    transition-duration: 4s;
    box-shadow: 0 15px 35px rgba(116, 144, 252, 0.5);
}

#breathing-circle.exhale {
    transform: scale(0.85);
    transition-duration: 6s;
    box-shadow: 0 8px 20px rgba(116, 144, 252, 0.2);
}

.instructions {
    text-align: center;
    margin-bottom: 30px;
    color: #64748b;
    font-size: 1.05rem;
    max-width: 80%;
}

.instructions p {
    margin-bottom: 12px;
}

/* Botones y controles */
.controls {
    display: flex;
    gap: 15px;
}

.button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(93, 114, 228, 0.25);
}

.button:hover {
    background-color: var(--accent-color);
    box-shadow: 0 6px 15px rgba(93, 114, 228, 0.35);
    transform: translateY(-2px);
}

.button-text {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.button-text:hover {
    transform: scale(1.1);
}

.hidden {
    display: none;
}

/* Estilos para los mensajes positivos */
.positive-message {
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--accent-color);
    font-size: 1.6rem;
    font-weight: 600;
    opacity: 1;
    transition: all 0.5s ease;
    padding: 22px;
    margin-top: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    z-index: 5;
    letter-spacing: -0.3px;
    line-height: 1.4;
}

/* Cuando las instrucciones están ocultas, el mensaje sube */
.instructions.hidden+.positive-message,
.instructions.hidden~.positive-message {
    bottom: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.positive-message.hidden {
    opacity: 0;
    display: none;
}

.positive-message.fade-in {
    animation: fadeIn 1.4s cubic-bezier(0.26, 0.53, 0.74, 1.48) forwards;
}

.positive-message.fade-out {
    animation: fadeOut 0.8s ease forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    70% {
        opacity: 1;
        transform: translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Responsive */
@media (max-width: 600px) {
    :root {
        --circle-size: 200px;
    }

    body {
        padding: 15px;
    }

    header {
        padding-top: 20px;
        margin-bottom: 30px;
    }

    h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }

    .instructions p {
        font-size: 0.95rem;
    }

    .positive-message {
        font-size: 1.4rem;
        padding: 18px;
        max-width: 95%;
    }

    .breathing-container {
        min-height: 380px;
    }

    .banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .banner-action {
        margin-top: 10px;
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 400px) {
    :root {
        --circle-size: 180px;
    }

    .breathing-text {
        font-size: 1.6rem;
    }

    .circle-icon {
        font-size: 1.8rem;
    }

    .positive-message {
        font-size: 1.2rem;
        padding: 15px;
        max-width: 100%;
    }

    .breathing-container {
        min-height: 340px;
    }

    header {
        padding-top: 20px;
    }
}

/* App container */
.app-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
}

/* Modal de anuncios */
.ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.ad-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 450px;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.18, 1.25, 0.4, 1);
    overflow: hidden;
}

.ad-modal.visible .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 0;
}

.modal-body {
    padding: 25px 20px;
}

.modal-body p {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.ad-container {
    background-color: #f1f5f9;
    border-radius: 10px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 10px 0;
}

.placeholder-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #94a3b8;
}

.placeholder-ad i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.modal-footer {
    padding: 15px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#support-button {
    background-color: var(--success-color);
}

#support-button:hover {
    background-color: #26ab5f;
}

#later-button {
    color: #64748b;
}

/* Media queries - ajustes para diferentes tamaños de pantalla */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 20px 15px;
    }

    .ad-container {
        height: 100px;
    }
}