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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #ffd1dc, #ffb7c5);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    color: #8a1c4a;
}

/* Password Modal */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 182, 193, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}

.password-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: bounceIn 1s forwards;
}

.password-content h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 32px;
    margin-bottom: 20px;
    color: #d81b60;
}

.password-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ffb7c5;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

.password-input:focus {
    border-color: #d81b60;
}

.submit-btn {
    background: #d81b60;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s, transform 0.2s;
}

.submit-btn:hover {
    background: #b71550;
    transform: scale(1.05);
}

/* === ESTILOS DE LA ROSA Y CONTADOR (Integrados) === */

/* Contador */
.contador-wrapper {
    margin-bottom: 20px;
    /* Separación de la rosa */
    text-align: center;
    font-family: 'Dancing Script', cursive;
    /* Usamos tu fuente bonita */
    color: #d81b60;
    font-size: 1.5rem;
    z-index: 102;
    position: relative;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Contenedor de la Rosa (Renombrado para no afectar tu galería) */
.rose-container {
    position: relative;
    width: 300px;
    height: 220px;
    /* Espacio reservado para la rosa */
    margin: 0 auto 20px auto;
    /* Centrado y con margen abajo */
    z-index: 50;
    transform: scale(0.6);
    /* Hacemos la rosa un poco más pequeña para que quepa bien */
}

/* === ESTRUCTURA DE LA ROSA === */
/* Glass (Vaso) - Ajustado a un tono vino/transparente */
.glass {
    position: absolute;
    height: 230px;
    width: 130px;
    background: rgba(80, 10, 30, 0.6);
    /* Cambio a tono vino */
    border-radius: 300px 300px 0 0;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
}

.glass:before {
    content: "";
    height: 10px;
    width: 10px;
    border: 10px solid rgba(80, 10, 30, 0.6);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: -20px;
    transform: translateX(-50%);
}

.glass:after {
    content: "";
    position: absolute;
    height: 15px;
    width: 150px;
    background: #4a2c2c;
    /* Tierra */
    top: 100%;
    left: -10px;
    border-radius: 10px;
}

.shine {
    width: 15px;
    height: 90px;
    background: white;
    opacity: 0.2;
    position: absolute;
    left: 85%;
    top: 50px;
    border-radius: 999px;
    z-index: 10;
}

/* Pétalos */
.petals>div {
    position: absolute;
    background: white;
    /* Puedes cambiar a #ffddeebb si quieres rosa pálido */
    width: 36px;
    height: 48px;
    top: 20px;
    border-radius: 20px;
    transform-origin: bottom center;
    left: 50%;
    /* Ajuste para centrar */
    margin-left: -18px;
    /* Ajuste para centrar */
}

/* Posiciones específicas de pétalos ajustadas al nuevo contenedor */
.petals>div:nth-child(1) {
    box-shadow: 0 0 25px #ffb7c5;
    top: 20px;
}

.petals>div:nth-child(2),
.petals>div:nth-child(4),
.petals>div:nth-child(6) {
    border-radius: 0 30px 0 30px;
    transform-origin: bottom right;
    margin-left: -28px;
}

.petals>div:nth-child(3),
.petals>div:nth-child(5),
.petals>div:nth-child(7) {
    border-radius: 30px 0 30px 0;
    transform-origin: bottom left;
    margin-left: -8px;
}

/* Animaciones de Pétalos */
.petals>div:nth-child(2) {
    z-index: 5;
    top: 25px;
    height: 45px;
    animation: bloom2 3s ease-in-out forwards;
}

.petals>div:nth-child(3) {
    z-index: 4;
    top: 25px;
    height: 45px;
    animation: bloom3 3s ease-in-out forwards, glowing 2.5s ease-in-out infinite;
}

.petals>div:nth-child(4) {
    z-index: 3;
    top: 20px;
    height: 50px;
    animation: bloom4 3s ease-in-out forwards, glowing 2.5s ease-in-out infinite;
}

.petals>div:nth-child(5) {
    z-index: 2;
    top: 20px;
    height: 50px;
    animation: bloom5 3s ease-in-out forwards, glowing 2.5s ease-in-out infinite;
}

.petals>div:nth-child(6) {
    z-index: 1;
    top: 18px;
    height: 45px;
    animation: bloom6 3s ease-in-out forwards, glowing 2.5s ease-in-out infinite;
}

.petals>div:nth-child(7) {
    z-index: 0;
    top: 18px;
    height: 45px;
    animation: bloom7 3s ease-in-out forwards, glowing 2.5s ease-in-out infinite;
}

/* Pétalos caídos */
.deadPetals>div {
    position: absolute;
    background: white;
    width: 15px;
    height: 20px;
    top: 200px;
    /* Más abajo */
    border-radius: 0 30px 0 30px;
    opacity: 0.5;
}

.deadPetals>div:nth-child(1) {
    left: 40px;
    animation: falling 8s 1s ease-in-out infinite;
}

.deadPetals>div:nth-child(2) {
    left: 100px;
    animation: falling 8s 2.5s ease-in-out infinite;
}

.deadPetals>div:nth-child(3) {
    left: 70px;
    animation: falling 8s 4s ease-in-out infinite;
}

.deadPetals>div:nth-child(4) {
    left: 20px;
    animation: falling 8s 5.5s ease-in-out infinite;
}

/* Tallo y Hojas */
.leaves>div:nth-last-child(1) {
    position: absolute;
    width: 60px;
    height: 18px;
    background: #338f37;
    top: 75px;
    left: 50%;
    margin-left: -30px;
    border-radius: 100px;
}

.leaves>div:nth-child(1) {
    position: absolute;
    width: 6px;
    height: 170px;
    background: #054c05;
    top: 55px;
    left: 50%;
    margin-left: -3px;
    border-radius: 0 0 100px 100px;
}

.leaves>div:nth-child(2) {
    position: absolute;
    width: 23px;
    height: 30px;
    top: 130px;
    background: #054c05;
    transform: rotate(-30deg);
    left: 50%;
    margin-left: -20px;
    border-radius: 5px 40px 20px 40px;
}

.leaves>div:nth-child(3) {
    position: absolute;
    width: 23px;
    height: 30px;
    top: 110px;
    background: #054c05;
    transform: rotate(30deg);
    left: 50%;
    margin-left: 5px;
    border-radius: 40px 5px 40px 20px;
}

/* Espinas */
.thorns>div {
    position: absolute;
    width: 0;
    height: 0;
    top: 90px;
}

.thorns>div:nth-child(odd) {
    border-left: 5px solid #054c05;
    left: 50%;
    margin-left: 2px;
}

.thorns>div:nth-child(even) {
    border-right: 5px solid #054c05;
    left: 50%;
    margin-left: -7px;
}

/* Keyframes */
@keyframes bloom2 {
    0% {
        transform: rotate(0);
    }

    50% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(-60deg);
        opacity: 1;
    }
}

@keyframes bloom3 {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(45deg);
    }
}

@keyframes bloom4 {
    100% {
        transform: rotate(-20deg);
    }
}

@keyframes bloom5 {
    100% {
        transform: rotate(20deg);
    }
}

@keyframes bloom6 {
    100% {
        transform: rotate(-5deg);
    }
}

@keyframes bloom7 {
    100% {
        transform: rotate(5deg);
    }
}

@keyframes glowing {
    50% {
        background: white;
        box-shadow: 0 0 60px #fff6f9;
    }
}

@keyframes falling {
    0% {
        top: 80px;
        opacity: 1;
    }

    100% {
        top: 250px;
        opacity: 0;
    }
}

/* Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffd1dc, #ffb7c5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99;
    transition: opacity 0.8s ease;
}

.welcome-message {
    font-family: 'Dancing Script', cursive;
    font-size: 48px;
    color: #d81b60;
    text-align: center;
    animation: pulse 2s infinite, float 3s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    margin-top: 50px;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #d81b60;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
}

.tab.active {
    background: white;
    color: #d81b60;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.content-area {
    background: white;
    border-radius: 20px;
    padding: 30px;
    min-height: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tab-content.active {
    display: block;
}

/* Love Letter Tab */
.letter {
    padding: 20px;
    background: #fff5f7;
    border-radius: 15px;
    border: 2px dashed #ffb7c5;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.letter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.letter h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 28px;
    color: #d81b60;
}

.letter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.letter.expanded .letter-content {
    max-height: 1000px;
}

/* Music Tab */
.song {
    background: #f8e8ee;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.song-icon {
    font-size: 24px;
    color: #d81b60;
}

.song-info h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.song-info p {
    color: #000000;
    font-size: 20px;
}

/* Notes Tab */
.note {
    background: #fce4ec;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #d81b60;
    display: flex;
    gap: 15px;
}

/* Gallery Tab */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    height: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Decorative Elements */
.heart,
.teddy-bear {
    position: absolute;
    z-index: -1;
    opacity: 0.2;
    pointer-events: none;
}

.heart {
    color: #d81b60;
    font-size: 24px;
    animation: float 6s ease-in-out infinite;
}

.teddy-bear {
    font-size: 32px;
    animation: float 8s ease-in-out infinite;
}

/* Animations */
@keyframes bounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
    }

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    50% {
        transform: scale(1.05);
    }

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

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

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-message {
        font-size: 36px;
    }

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

    .tab {
        width: 100%;
        justify-content: center;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    /* =========================================
   RESPONSIVIDAD MÓVIL (Celulares)
   Agrega esto al final de tu style.css
   ========================================= */

    @media (max-width: 480px) {

        /* 1. Ajustar el tamaño de la Rosa para que no tape el input */
        .rose-container {
            transform: scale(0.45);
            /* La hacemos más pequeña */
            margin-top: -10px;
            /* Subimos un poco */
            margin-bottom: 0px;
            /* Quitamos espacio extra abajo */
            height: 180px;
            /* Reducimos la altura que ocupa */
        }

        /* 2. Ajustar el título de la contraseña */
        .password-content h2 {
            font-size: 22px;
            /* Letra más pequeña */
            margin-bottom: 10px;
        }

        .password-content {
            padding: 20px;
            width: 95%;
            /* Que ocupe casi todo el ancho */
        }

        /* 3. Ajustar el Menú de Pestañas (Tabs) */
        /* En vez de una lista larga vertical, hacemos botones pequeños de 2 en 2 */
        .tabs {
            flex-direction: row;
            /* Mantener horizontal */
            flex-wrap: wrap;
            /* Que bajen si no caben */
            gap: 8px;
        }

        .tab {
            flex: 1 1 45%;
            /* Que cada botón ocupe casi la mitad */
            font-size: 13px;
            /* Letra más pequeña */
            padding: 10px 5px;
            /* Menos relleno */
            justify-content: center;
            width: auto;
            /* Sobrescribir ancho fijo */
        }

        /* 4. Galería de fotos */
        /* Aseguramos que se vean 2 fotos por fila y no muy altas */
        .gallery {
            grid-template-columns: repeat(2, 1fr);
            /* 2 columnas forzadas */
            gap: 8px;
        }

        .gallery-item {
            height: 140px;
            /* Fotos más bajitas para ver más */
        }

        /* 5. Ajustes generales de texto y márgenes */
        .welcome-message {
            font-size: 32px;
            /* Bienvenida más chica */
            padding: 0 10px;
        }

        .container {
            margin-top: 20px;
            padding: 10px;
        }

        .content-area {
            padding: 15px;
            /* Menos espacio interno */
        }

        /* Ajuste para que la carta no se salga */
        .letter-header h3 {
            font-size: 20px;
        }

        /* Ajuste del contador */
        .contador-wrapper {
            font-size: 1.2rem;
            margin-top: 10px;
        }
    }
}