/* ================================================= */
/* VARIABLES DE PERSONALIZACIÓN */
/* ================================================= */
/* Las variables se establecen dinámicamente según el tipo de página */

:root {
    /* Colores principales - Se sobrescriben dinámicamente */
    --color-principal: #d4526e;       /* Rosa/Rojo romántico */
    --color-secundario: #f4a6b8;      /* Rosa claro */
    --color-acento: #ff6b9d;          /* Rosa brillante */
    --color-fondo: #fff5f8;           /* Fondo suave */
    --color-oscuro: #2d1b2e;          /* Texto oscuro */
    --color-claro: #ffffff;           /* Blanco */
    
    /* Tipografía */
    --fuente-titulos: 'Playfair Display', serif;
    --fuente-texto: 'Cormorant Garamond', serif;
    
    /* Espaciado */
    --espaciado-section: 100px;
}

/* ================================================= */
/* RESET Y BASE */
/* ================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-texto);
    background-color: var(--color-fondo);
    color: var(--color-oscuro);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ================================================= */
/* BOTÓN DE MÚSICA */
/* ================================================= */

.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-principal), var(--color-acento));
    border: none;
    color: var(--color-claro);
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(212, 82, 110, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(212, 82, 110, 0.6);
}

.music-btn.playing .music-icon {
    animation: pulse 1s infinite;
}

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

/* ================================================= */
/* SECCIONES GENERALES */
/* ================================================= */

.section {
    min-height: 100vh;
    display: none;
    padding: var(--espaciado-section) 20px;
    position: relative;
    animation: fadeIn 1s ease-in;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================= */
/* BOTONES */
/* ================================================= */

.btn-continuar {
    background: linear-gradient(135deg, var(--color-principal), var(--color-acento));
    color: var(--color-claro);
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-family: var(--fuente-texto);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 82, 110, 0.3);
    margin-top: 30px;
    display: inline-block;
}

.btn-continuar:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(212, 82, 110, 0.5);
}

/* ================================================= */
/* LÍNEA DECORATIVA */
/* ================================================= */

.decorative-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-principal), var(--color-acento));
    margin: 20px auto;
    position: relative;
}

.decorative-line::before,
.decorative-line::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-principal);
    border-radius: 50%;
    top: -2.5px;
}

.decorative-line::before {
    left: -15px;
}

.decorative-line::after {
    right: -15px;
}

/* ================================================= */
/* SECCIÓN 1: PORTADA */
/* ================================================= */

#portada {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff5f8 0%, #ffe8f0 100%);
    position: relative;
    overflow: hidden;
}

.hearts-background {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.hearts-background::before,
.hearts-background::after {
    content: '❤';
    position: absolute;
    font-size: 30px;
    color: rgba(212, 82, 110, 0.1);
    animation: floatHeart 20s infinite;
}

.hearts-background::before {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
}

.hearts-background::after {
    right: 15%;
    top: 60%;
    animation-delay: 5s;
}

@keyframes floatHeart {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
    }
}

.portada-content {
    text-align: center;
    z-index: 1;
}

.nombre-animado {
    font-family: var(--fuente-titulos);
    color: var(--color-principal);
}

.nombre-linea {
    display: block;
    font-size: 28px;
    font-weight: 400;
    font-style: italic;
    opacity: 0;
    animation: slideDown 1s ease forwards;
}

.nombre-principal {
    display: block;
    font-size: 90px;
    font-weight: 700;
    margin: 20px 0;
    opacity: 0;
    animation: scaleIn 1.2s ease forwards 0.5s;
    background: linear-gradient(135deg, var(--color-principal), var(--color-acento));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nombre-linea:last-child {
    animation-delay: 1s;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================================================= */
/* SECCIÓN 2: CARTA */
/* ================================================= */

.carta-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--color-claro);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
}

.carta-container::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 120px;
    font-family: var(--fuente-titulos);
    color: rgba(212, 82, 110, 0.1);
    line-height: 0;
}

.carta-header h2 {
    font-family: var(--fuente-titulos);
    font-size: 42px;
    color: var(--color-principal);
    text-align: center;
    margin-bottom: 10px;
}

.carta-content {
    margin-top: 40px;
    font-size: 20px;
    line-height: 1.9;
    color: var(--color-oscuro);
}

.carta-saludo {
    font-family: var(--fuente-titulos);
    font-size: 26px;
    font-style: italic;
    color: var(--color-principal);
    margin-bottom: 30px;
}

.carta-content p {
    margin-bottom: 25px;
}

.carta-despedida {
    margin-top: 40px;
    font-style: italic;
}

.firma {
    font-family: var(--fuente-titulos);
    font-size: 28px;
    color: var(--color-principal);
}

.carta-container .btn-continuar {
    display: block;
    margin: 40px auto 0;
}

/* ================================================= */
/* SECCIÓN 3: GALERÍA */
/* ================================================= */

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-header h2 {
    font-family: var(--fuente-titulos);
    font-size: 48px;
    color: var(--color-principal);
    margin-bottom: 10px;
}

.gallery-subtitle {
    font-size: 20px;
    color: var(--color-oscuro);
    opacity: 0.8;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.gifs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 1;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-item-display {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.video-item-display:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-item-display video {
    width: 100%;
    background: #000;
}

.video-caption {
    margin-top: 1rem;
    color: var(--color-principal);
    font-size: 1rem;
    font-weight: 500;
}

.gif-item-display {
    text-align: center;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gif-item-display:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gif-item-display img {
    width: 100%;
    display: block;
}

.gif-caption {
    padding: 1rem;
    color: var(--color-principal);
    font-size: 1rem;
    font-weight: 500;
    background: #f8f9fa;
    margin: 0;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(212, 82, 110, 0.9), transparent);
    padding: 30px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-caption {
    color: var(--color-claro);
    font-size: 18px;
    font-family: var(--fuente-titulos);
    text-align: center;
}

#fotos .btn-continuar {
    display: block;
    margin: 0 auto;
}

/* ================================================= */
/* SECCIÓN 4: ÁBRELO CUANDO */
/* ================================================= */

.abre-header {
    text-align: center;
    margin-bottom: 60px;
}

.abre-header h2 {
    font-family: var(--fuente-titulos);
    font-size: 48px;
    color: var(--color-principal);
    margin-bottom: 10px;
}

.abre-subtitle {
    font-size: 20px;
    color: var(--color-oscuro);
    opacity: 0.8;
}

.abre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.abre-card {
    background: var(--color-claro);
    padding: 40px 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.abre-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(212, 82, 110, 0.3);
}

.abre-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.abre-card h3 {
    font-family: var(--fuente-titulos);
    font-size: 24px;
    color: var(--color-principal);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--color-claro);
    margin: 10% auto;
    padding: 50px;
    border-radius: 20px;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 35px;
    font-weight: bold;
    color: var(--color-oscuro);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--color-principal);
}

.modal-content h3 {
    font-family: var(--fuente-titulos);
    font-size: 32px;
    color: var(--color-principal);
    margin-bottom: 25px;
}

.modal-content p {
    font-size: 20px;
    line-height: 1.8;
    color: var(--color-oscuro);
}

#abre-cuando .btn-continuar {
    display: block;
    margin: 0 auto;
}

/* ================================================= */
/* SECCIÓN 5: CONTRASEÑA */
/* ================================================= */

.password-container {
    max-width: 600px;
    margin: 0 auto;
}

.password-lock {
    background: var(--color-claro);
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.lock-icon {
    font-size: 80px;
    margin-bottom: 30px;
}

.password-lock h2 {
    font-family: var(--fuente-titulos);
    font-size: 42px;
    color: var(--color-principal);
    margin-bottom: 15px;
}

.password-lock p {
    font-size: 20px;
    color: var(--color-oscuro);
    margin-bottom: 30px;
}

.password-input {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    font-size: 18px;
    font-family: var(--fuente-texto);
    border: 2px solid var(--color-secundario);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s ease;
    margin-bottom: 10px;
}

.password-input:focus {
    border-color: var(--color-principal);
}

.password-hint {
    font-size: 16px;
    color: var(--color-oscuro);
    opacity: 0.6;
    margin-top: 15px;
}

.password-content {
    background: var(--color-claro);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.password-content h2 {
    font-family: var(--fuente-titulos);
    font-size: 42px;
    color: var(--color-principal);
    margin-bottom: 10px;
}

.secret-message {
    margin: 40px 0;
    font-size: 20px;
    line-height: 1.9;
}

.secret-message p {
    margin-bottom: 20px;
}

.secret-reveal {
    font-family: var(--fuente-titulos);
    font-size: 28px;
    color: var(--color-principal);
    margin-top: 30px;
}

/* ================================================= */
/* SECCIÓN 6: QUIZ */
/* ================================================= */

.quiz-header {
    text-align: center;
    margin-bottom: 60px;
}

.quiz-header h2 {
    font-family: var(--fuente-titulos);
    font-size: 48px;
    color: var(--color-principal);
    margin-bottom: 10px;
}

.quiz-subtitle {
    font-size: 20px;
    color: var(--color-oscuro);
    opacity: 0.8;
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-question {
    display: none;
    background: var(--color-claro);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.quiz-question.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.quiz-question h3 {
    font-family: var(--fuente-titulos);
    font-size: 28px;
    color: var(--color-principal);
    margin-bottom: 20px;
}

.question-text {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--color-oscuro);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-option {
    background: var(--color-fondo);
    border: 2px solid var(--color-secundario);
    padding: 20px;
    font-size: 20px;
    font-family: var(--fuente-texto);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    background: var(--color-secundario);
    transform: translateX(10px);
}

.quiz-option.correct {
    background: #c8e6c9;
    border-color: #4caf50;
    animation: correctPulse 0.5s ease;
}

.quiz-option.wrong {
    background: #ffcdd2;
    border-color: #f44336;
    animation: shake 0.5s ease;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.quiz-result {
    background: var(--color-claro);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.quiz-result h3 {
    font-family: var(--fuente-titulos);
    font-size: 42px;
    color: var(--color-principal);
    margin-bottom: 20px;
}

.quiz-result p {
    font-size: 24px;
    margin-bottom: 15px;
}

/* ================================================= */
/* SECCIÓN 7: TIMELINE */
/* ================================================= */

.timeline-header {
    text-align: center;
    margin-bottom: 80px;
}

.timeline-header h2 {
    font-family: var(--fuente-titulos);
    font-size: 48px;
    color: var(--color-principal);
    margin-bottom: 10px;
}

.timeline-subtitle {
    font-size: 20px;
    color: var(--color-oscuro);
    opacity: 0.8;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto 80px;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-principal), var(--color-acento));
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 30px 40px;
    animation: fadeIn 1s ease;
}

.timeline-item.left {
    left: 0;
    padding-right: 60px;
}

.timeline-item.right {
    left: 50%;
    padding-left: 60px;
}

.timeline-item::before {
    content: '❤';
    position: absolute;
    top: 40px;
    width: 30px;
    height: 30px;
    background: var(--color-claro);
    border: 4px solid var(--color-principal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 1;
}

.timeline-item.left::before {
    right: -15px;
}

.timeline-item.right::before {
    left: -15px;
}

.timeline-content {
    background: var(--color-claro);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.05);
}

.timeline-date {
    font-family: var(--fuente-titulos);
    color: var(--color-acento);
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 700;
}

.timeline-content h3 {
    font-family: var(--fuente-titulos);
    font-size: 26px;
    color: var(--color-principal);
    margin-bottom: 15px;
}

.timeline-content p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-oscuro);
}

.final-message {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(212, 82, 110, 0.1), rgba(255, 107, 157, 0.1));
    border-radius: 20px;
    margin-top: 60px;
}

.final-message h2 {
    font-family: var(--fuente-titulos);
    font-size: 42px;
    color: var(--color-principal);
    margin-bottom: 20px;
}

.final-message p {
    font-size: 22px;
    margin-bottom: 15px;
}

.final-love {
    font-family: var(--fuente-titulos);
    font-size: 32px;
    color: var(--color-principal);
    margin-top: 30px;
}

/* ================================================= */
/* NAVEGACIÓN CON PUNTOS */
/* ================================================= */

.nav-dots {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    background: var(--color-secundario);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot:hover,
.nav-dot.active {
    background: var(--color-principal);
    transform: scale(1.3);
}

/* ================================================= */
/* RESPONSIVE DESIGN */
/* ================================================= */

@media (max-width: 768px) {
    :root {
        --espaciado-section: 60px;
    }
    
    .nombre-principal {
        font-size: 50px;
    }
    
    .nombre-linea {
        font-size: 20px;
    }
    
    .carta-container {
        padding: 40px 25px;
    }
    
    .carta-header h2 {
        font-size: 32px;
    }
    
    .carta-content {
        font-size: 18px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .abre-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 30px 20px;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 80px;
        padding-right: 20px;
    }
    
    .timeline-item.left,
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item::before {
        left: 15px !important;
    }
    
    .nav-dots {
        display: none;
    }
    
    .music-btn {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .nombre-principal {
        font-size: 40px;
    }
    
    .carta-header h2,
    .gallery-header h2,
    .abre-header h2,
    .quiz-header h2,
    .timeline-header h2 {
        font-size: 32px;
    }
    
    .password-lock,
    .password-content {
        padding: 40px 20px;
    }
}
