/* Fonts */
:root {
    --primary-color: #c9184a;
    /* Deep Pink */
    --secondary-color: #ff4d6d;
    /* Lighter Pink */
    --accent-color: #ffb3c1;
    /* Soft Pink */
    --text-color: #880d1e;
    /* Darker Red/Brown */
    --bg-color: #fdfbf7;
    /* Cream */
    --font-heading: 'Pacifico', cursive;
    --font-body: 'Dancing Script', cursive;
}

body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    overflow: hidden;
    /* No scrollbars */
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-body);
}

/* Escena Inicial: Corazón Palpitante */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Corazón abajo */
    padding-bottom: 50px;
    z-index: 100;
    transition: opacity 1s ease-out;
}

/* Utility to force hide */
.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Escena Inicial: Corazón Palpitante */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Asegurar columna para centrar bien */
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 1s ease-out;
    background-color: var(--bg-color);
    /* Asegurar fondo para tapar lo de atrás */
}

/* Cuando ocultamos el start-screen con la clase específica de transición */
#start-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.heart-btn {
    font-size: 5rem;
    cursor: pointer;
    animation: heartbeat 1.5s infinite ease-in-out;
    position: relative;
    user-select: none;
    transition: transform 0.3s;
    /* Removed relative positioning as hint is now external */
}

.heart-btn:hover {
    transform: scale(1.1);
}

.click-hint {
    margin-top: 20px;
    font-size: 1.5rem;
    color: var(--text-color);
    font-family: var(--font-heading);
    white-space: nowrap;
    animation: pulseText 2s infinite ease-in-out;
    cursor: pointer;
    /* Indicar que también es clickeable */
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.3);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1);
    }
}

/* Canvas para Árbol */
#tree-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    /* Detrás de la tarjeta */
}

/* Tarjeta (Glassmorphism) */
.card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.75);
    /* Semi-transparent */
    backdrop-filter: blur(10px);
    /* Glass effect */
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(201, 24, 74, 0.2);
    /* Sutil sombra rosa */
    padding: 2rem;
    text-align: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 2s ease-in;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.card.visible {
    opacity: 1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, -50%);
    }

    50% {
        transform: translate(-50%, -55%);
    }
}

.card-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.card-body {
    font-size: 1.8rem;
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-footer {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    border-top: 1px solid var(--accent-color);
    padding-top: 1rem;
    margin-bottom: 2rem;
}

/* Timer */
.timer-container {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 10px;
    margin-top: 20px;
}

.timer-label {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 5px;
}

.timer {
    font-family: 'Courier New', monospace;
    /* Monospace for numbers */
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: bold;
}

/* Enlace al álbum */
.gallery-link {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1.2rem;
    transition: background 0.3s;
    box-shadow: 0 5px 15px rgba(201, 24, 74, 0.3);
}

.gallery-link:hover {
    background: var(--text-color);
}

/* Responsividad */
@media (max-width: 600px) {
    .card {
        padding: 1.5rem;
        width: 85%;
    }

    .card-title {
        font-size: 2rem;
    }

    .card-body {
        font-size: 1.4rem;
    }

    .heart-btn {
        font-size: 4rem;
        margin-bottom: 20px;
    }
}