/* Variables de colores */
:root {
    --primary-red: #FF1744;
    --secondary-red: #FF4081;
    --strawberry-pink: #FF80AB;
    --leaf-green: #00E676;
    --background-pink: #FFF0F3;
    --text-dark: #2C0114;
}

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

body {
    font-family: 'Lato', sans-serif;
    background: var(--background-pink);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Pantalla de carga */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    background: linear-gradient(135deg, #FFE5E5 0%, #FFB3B3 100%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
    padding: clamp(1rem, 4vw, 2rem);
}

.splash-content {
    text-align: center;
}

.strawberry-loader {
    position: relative;
    margin-bottom: 2rem;
}

.strawberry-emoji {
    font-size: 4rem;
    animation: bounce 1s infinite;
}

.sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    opacity: 0;
    animation: sparkle 2s infinite;
}

.loading-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.loading-bar {
    width: 280px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: var(--primary-red);
    border-radius: 10px;
    animation: progress 3.5s ease-out forwards;
}

.loading-tip {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--secondary-red);
    animation: pulse 2s infinite;
}

/* Control de música */
.music-control {
    position: fixed;
    top: max(env(safe-area-inset-top, 20px), 20px);
    right: max(env(safe-area-inset-right, 20px), 20px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    width: clamp(40px, 12vw, 50px);
    height: clamp(40px, 12vw, 50px);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    -webkit-tap-highlight-color: transparent;
}

.music-control:hover, .music-control:active {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.music-icon {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    color: var(--primary-red);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: spin 4s linear infinite;
}

/* Contenido principal */
#main-content {
    opacity: 0;
    transition: opacity 1s ease-in;
}

#main-content.loaded {
    opacity: 1;
}

/* Fondo de fresas */
#strawberry-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-strawberry {
    position: absolute;
    font-size: 2rem;
    animation: float 15s linear infinite;
    opacity: 0.6;
}

/* Secciones */
.section {
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.container {
    max-width: min(1200px, 95%);
    margin: 0 auto;
    width: 100%;
    padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

/* Títulos y textos */
.main-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    color: var(--primary-red);
    text-align: center;
    margin: clamp(0.5rem, 2vh, 1rem) auto;
    opacity: 0;
    transform: translateY(-20px);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 clamp(1rem, 4vw, 2rem);
    max-width: 100%;
    line-height: 1.2;
}

.section-title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2rem, 7vw, 2.5rem);
    color: var(--secondary-red);
    text-align: center;
    margin: clamp(1.5rem, 4vh, 2rem) auto;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0 clamp(1rem, 4vw, 2rem);
    max-width: 100%;
    line-height: 1.3;
}

.section-title.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Mensajes */
.scroll-hint {
    text-align: center;
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--secondary-red);
    margin-bottom: clamp(1rem, 4vw, 2rem);
    animation: bounce 2s infinite;
}

.messages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1rem, 4vw, 2rem);
    padding: clamp(1rem, 4vw, 2rem);
    width: 100%;
}

.message-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: clamp(15px, 4vw, 20px);
    padding: clamp(1.2rem, 4vw, 2rem);
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.6s ease-out;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.message-card.animate {
    transform: scale(1);
    opacity: 1;
}

.message-icon {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

.message-text {
    font-size: clamp(1rem, 3vw, 1.2rem);
    line-height: 1.6;
    color: var(--text-dark);
    padding: 0 clamp(0.5rem, 2vw, 1rem);
}

/* Galería */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(15px, 3vw, 25px);
    padding: clamp(20px, 4vw, 40px);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.photo-container {
    position: relative;
    border-radius: clamp(15px, 4vw, 20px);
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    width: 100%;
    margin: 0 auto;
    max-width: min(100%, 350px);
    -webkit-tap-highlight-color: transparent;
    aspect-ratio: 1;
}

.photo-container.animate {
    transform: scale(1);
    opacity: 1;
}

.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    will-change: transform;
    display: block;
}

/* Ajustes específicos para móvil */
@media screen and (max-width: 768px) {
    .photo-container {
        aspect-ratio: auto !important;
        height: auto !important;
    }
    
    .gallery-photo {
        position: static !important;
        height: auto !important;
        width: 100% !important;
        object-fit: contain !important;
        transform: none !important;
    }
    
    .photo-container:hover .gallery-photo,
    .photo-container:active .gallery-photo {
        transform: none !important;
    }
    
    .section {
        padding: 10px !important;
    }
    
    .gallery {
        padding: 10px !important;
    }
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 23, 68, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.3s ease;
    padding: clamp(0.5rem, 2vw, 1rem);
}

.photo-container:hover .photo-overlay,
.photo-container:active .photo-overlay {
    opacity: 1;
    transform: scale(1);
}

.photo-container:hover .gallery-photo,
.photo-container:active .gallery-photo {
    transform: scale(1.1);
}

.photo-icon {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
}

.photo-overlay p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: white;
    text-align: center;
    padding: 0 clamp(0.5rem, 2vw, 1rem);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* Botón de confeti */
.confetti-button {
    background: linear-gradient(45deg, var(--primary-red), var(--secondary-red));
    border: none;
    border-radius: clamp(25px, 8vw, 50px);
    padding: clamp(1rem, 4vw, 1.5rem) clamp(1.5rem, 6vw, 3rem);
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: clamp(1rem, 4vw, 2rem) auto;
    width: min(90%, 400px);
    box-shadow: 0 8px 25px rgba(255, 23, 68, 0.3);
    transform-origin: center;
    -webkit-tap-highlight-color: transparent;
}

.button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1rem);
    padding: clamp(0.3rem, 1vw, 0.5rem);
}

.button-icons {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    font-size: clamp(1.2rem, 4vw, 1.5rem);
}

.button-hint {
    font-size: clamp(0.8rem, 3vw, 1rem);
    margin-top: clamp(0.3rem, 1vw, 0.5rem);
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.confetti-button:active {
    transform: scale(0.95);
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.2);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Indicador de scroll */
.scroll-indicator {
    position: fixed;
    bottom: clamp(20px, 5vh, 30px);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 90;
    pointer-events: none;
    width: 90%;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: clamp(0.5rem, 2vh, 1rem);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.scroll-text {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    color: var(--secondary-red);
    margin-bottom: clamp(0.3rem, 1vh, 0.5rem);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.scroll-arrow {
    font-size: clamp(1.5rem, 5vw, 2rem);
    animation: bounce 2s infinite;
    color: var(--primary-red);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animaciones */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes sparkle {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

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

@keyframes spin {
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    /* Ajustes generales para móvil */
    body {
        font-size: 16px;
    }

    .section {
        padding: 2rem 1rem;
        min-height: 100svh; /* Usar viewport height seguro para móviles */
    }

    /* Ajustes de títulos */
    .main-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }

    /* Ajustes de mensajes */
    .messages-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }

    .message-card {
        padding: 1.2rem;
        margin: 0 0.5rem;
        font-size: 1rem;
    }

    .message-text {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    /* Ajustes de galería */
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem;
    }

    .photo-container {
        max-width: 100%;
        aspect-ratio: 1;
        margin: 0 auto;
    }

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

    /* Ajustes de botones y controles */
    .confetti-button {
        padding: 1rem 2rem;
        font-size: 1.2rem;
        width: 90%;
        max-width: 300px;
        margin: 1rem auto;
    }

    .button-content {
        gap: 0.5rem;
    }

    .button-hint {
        font-size: 0.9rem;
    }

    .music-button {
        padding: 8px 12px;
        font-size: 0.9rem;
        top: 10px;
        right: 10px;
    }

    /* Ajustes de pantalla de carga */
    .loading-title {
        font-size: 1.8rem;
        padding: 0 1rem;
    }

    .loading-bar {
        width: 80%;
        max-width: 250px;
    }

    .loading-tip {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Ajustes de scroll y navegación */
    .scroll-indicator {
        bottom: 20px;
    }

    .scroll-text {
        font-size: 1rem;
    }

    .scroll-arrow {
        font-size: 1.5rem;
    }
}

/* Ajustes específicos para pantallas muy pequeñas */
@media (max-width: 360px) {
    .main-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .message-text {
        font-size: 1rem;
    }

    .confetti-button {
        padding: 0.8rem 1.5rem;
        font-size: 1.1rem;
    }
}

/* Ajustes de orientación horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .section {
        padding: 1rem;
        min-height: 120svh;
    }

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

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

    .message-card {
        padding: 1rem;
    }
}

/* Efectos de hover */
.message-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.confetti-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 23, 68, 0.3);
}

.music-button:active {
    transform: scale(0.95);
}
