/* styles.css */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
}

/* Clase para ocultar elementos */
.hidden {
    display: none !important;
}

/* ===== PANTALLA DE INTRODUCCIÓN ===== */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(145deg, #ff8da1, #ff5e7e);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 1.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.heart-container {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 20px;
    width: 100%;
    max-width: 600px;
}

.heart-container:hover {
    transform: scale(1.05);
}

.big-heart {
    font-size: min(200px, 40vw);
    animation: heartbeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.2));
    line-height: 1;
}

@keyframes heartbeat {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255,255,255,0.8);
    }
    25% { 
        transform: scale(1.1);
        text-shadow: 0 0 40px rgba(255,255,255,1);
    }
    35% { 
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255,255,255,0.8);
    }
    45% { 
        transform: scale(1.08);
        text-shadow: 0 0 35px rgba(255,255,255,1);
    }
    55% { 
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255,255,255,0.8);
    }
}

.heart-text {
    color: white;
    font-size: clamp(1rem, 5vw, 1.5rem);
    margin-top: 20px;
    font-weight: 300;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadePulse 2s infinite;
    padding: 0 15px;
}

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

/* ===== PANTALLA PRINCIPAL ===== */
.main-screen {
    min-height: 100vh;
    padding: clamp(20px, 5vw, 40px) clamp(10px, 3vw, 20px);
    position: relative;
    background: linear-gradient(145deg, #ffdde1, #f9c9d1);
    animation: slideIn 1s ease;
}

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

/* Corazones flotantes */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-heart {
    position: absolute;
    color: #ff6b8b;
    font-size: clamp(1rem, 3vw, 1.5rem);
    user-select: none;
    opacity: 0.6;
    filter: drop-shadow(0 5px 5px rgba(255, 80, 120, 0.3));
    animation: floatAround linear infinite;
}

@keyframes floatAround {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

.content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.message-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: min(60px, 8vw) min(60px, 8vw) min(60px, 8vw) min(20px, 3vw);
    padding: clamp(25px, 6vw, 50px) clamp(20px, 5vw, 40px);
    box-shadow: 0 30px 50px rgba(255, 75, 100, 0.3),
                0 0 0 3px rgba(255, 255, 255, 0.8) inset;
    border: 2px solid rgba(255, 200, 210, 0.6);
    width: 100%;
}

.title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    color: #d43f5e;
    text-align: center;
    margin-bottom: clamp(20px, 4vw, 30px);
    text-shadow: 3px 3px 0 #ffe2e8;
    animation: glowTitle 2s infinite;
    line-height: 1.3;
    word-wrap: break-word;
}

@keyframes glowTitle {
    0%, 100% { text-shadow: 3px 3px 0 #ffe2e8; }
    50% { text-shadow: 5px 5px 0 #ffb6c1, 0 0 20px #ff4d6d; }
}

.poem {
    font-size: clamp(1rem, 4vw, 1.3rem);
    line-height: 1.8;
    color: #4a2c33;
    text-align: center;
    margin: clamp(20px, 4vw, 30px) 0;
    padding: clamp(20px, 5vw, 30px) clamp(15px, 4vw, 30px);
    background: rgba(255, 245, 247, 0.9);
    border-radius: min(40px, 6vw);
    border: 3px solid white;
    box-shadow: 0 10px 20px rgba(200, 80, 100, 0.2);
}

.poem p {
    margin: 8px 0;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.poem p:nth-child(1) { animation-delay: 0.2s; }
.poem p:nth-child(2) { animation-delay: 0.4s; }
.poem p:nth-child(3) { animation-delay: 0.6s; }
.poem p:nth-child(4) { animation-delay: 0.8s; }
.poem p:nth-child(5) { animation-delay: 1s; }
.poem p:nth-child(6) { animation-delay: 1.2s; }
.poem p:nth-child(7) { animation-delay: 1.4s; }

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

.question-box {
    text-align: center;
    margin-top: clamp(20px, 4vw, 30px);
}

.question {
    font-size: clamp(1.3rem, 5vw, 2rem);
    color: #b13e55;
    margin-bottom: clamp(20px, 4vw, 30px);
    background: rgba(255, 255, 255, 0.6);
    padding: clamp(15px, 3vw, 20px);
    border-radius: min(50px, 8vw);
    border: 3px dashed #ff7b9c;
    animation: shake 0.5s ease infinite;
    word-wrap: break-word;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: clamp(15px, 4vw, 30px);
    flex-wrap: wrap;
    margin: 20px 0;
    position: relative;
    width: 100%;
}

.btn-yes, .btn-no {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    padding: clamp(12px, 3vw, 15px) clamp(20px, 6vw, 50px);
    border: none;
    border-radius: min(60px, 10vw);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 min(8px, 2vw) 0 rgba(0,0,0,0.2);
    border: 3px solid white;
    min-width: min(200px, 80%);
    max-width: 300px;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive para botones en móviles muy pequeños */
@media (max-width: 380px) {
    .btn-yes, .btn-no {
        font-size: 1.1rem;
        padding: 10px 15px;
        min-width: 130px;
        white-space: normal;
        word-break: break-word;
    }
}

.btn-yes {
    background: #ff4d6d;
    color: white;
    box-shadow: 0 min(10px, 2.5vw) 0 #b32e48;
    animation: pulse 1.5s infinite;
}

.btn-yes:hover {
    transform: translateY(-3px);
    box-shadow: 0 min(13px, 3vw) 0 #b32e48;
    background: #ff3355;
}

.btn-yes:active {
    transform: translateY(min(5px, 1.5vw));
    box-shadow: 0 min(5px, 1.5vw) 0 #b32e48;
}

.btn-no {
    background: #2c3e50;
    color: white;
    box-shadow: 0 min(10px, 2.5vw) 0 #1a2632;
    transition: all 0.1s ease;
}

.btn-no:hover {
    background: #34495e;
}

.btn-no:active {
    transform: translateY(min(5px, 1.5vw));
    box-shadow: 0 min(5px, 1.5vw) 0 #1a2632;
}

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

/* ===== PANTALLA FINAL ===== */
.final-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, #ff9a9e, #fad0c4);
    padding: clamp(15px, 4vw, 20px);
    animation: celebrateIn 1s ease;
}

@keyframes celebrateIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.final-content {
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
}

.surprise-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: min(80px, 10vw);
    padding: clamp(25px, 6vw, 40px);
    box-shadow: 0 30px 60px rgba(255, 75, 100, 0.4);
    border: min(5px, 1.5vw) solid white;
    min-height: min(400px, 70vh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.btn-reset {
    background: #ff4d6d;
    color: white;
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    padding: clamp(12px, 3vw, 15px) clamp(25px, 6vw, 40px);
    border: none;
    border-radius: min(50px, 8vw);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 min(8px, 2vw) 0 #b32e48;
    border: min(3px, 1vw) solid white;
    margin-top: 30px;
    transition: all 0.2s ease;
    width: fit-content;
    max-width: 90%;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .btn-reset {
        white-space: normal;
        word-break: break-word;
        font-size: 1.1rem;
        padding: 12px 20px;
    }
}

.btn-reset:hover {
    transform: translateY(-3px);
    box-shadow: 0 min(11px, 2.8vw) 0 #b32e48;
    background: #ff3355;
}

.btn-reset:active {
    transform: translateY(min(5px, 1.5vw));
    box-shadow: 0 min(3px, 1vw) 0 #b32e48;
}

/* ===== CARRUSEL DE FOTOS ===== */
.carousel-section {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 3px solid white;
    animation: fadeInUp 0.8s ease;
}

.carousel-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    color: #d43f5e;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 0 #ffe2e8;
    animation: glowTitle 2s infinite;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.carousel-track-container {
    flex: 1;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 4px solid white;
}

.carousel-slide:hover img {
    filter: brightness(1.05);
}

.carousel-btn {
    background: #ff4d6d;
    color: white;
    border: none;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 0 #b32e48;
    border: 3px solid white;
    transition: all 0.2s ease;
    z-index: 10;
}

.carousel-btn:hover {
    transform: scale(1.1);
    background: #ff3355;
    box-shadow: 0 8px 0 #b32e48;
}

.carousel-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #b32e48;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 5px 0 #b32e48;
}

.carousel-btn:disabled:hover {
    transform: none;
    background: #ff4d6d;
}

/* Indicadores del carrusel */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 75, 100, 0.3);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #ff4d6d;
    transform: scale(1.2);
    box-shadow: 0 0 10px #ff4d6d;
}

.indicator:hover {
    background: #ff4d6d;
    transform: scale(1.1);
}

/* Título de la foto actual */
.carousel-caption {
    text-align: center;
    font-size: 1.2rem;
    color: #4a2c33;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    font-weight: 500;
}

/* Modal para ver foto ampliada */
.carousel-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border: 5px solid white;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(255, 75, 100, 0.5);
    animation: scaleIn 0.3s ease;
}

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

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,75,100,0.8);
    border-radius: 50%;
    border: 3px solid white;
}

.close-modal:hover {
    transform: scale(1.1);
    background: #ff3355;
}

.modal-caption {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.2rem;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

/* Mensaje cuando no hay fotos */
.carousel-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255,255,255,0.5);
    border-radius: 30px;
    border: 3px dashed #ff7b9c;
    color: #b13e55;
    font-size: 1.2rem;
}

.carousel-placeholder span {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}

/* Media Queries adicionales para responsividad */
@media (max-width: 768px) {
    .message-card {
        padding: 30px 20px;
    }
    
    .poem {
        padding: 20px 15px;
    }
    
    .buttons-container {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-yes, .btn-no {
        width: 100%;
        max-width: 250px;
    }
    
    .carousel-container {
        max-width: 100%;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .close-modal {
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .poem {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .question {
        font-size: 1.3rem;
        padding: 12px;
    }
    
    .heart-text {
        font-size: 1.1rem;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .carousel-caption {
        font-size: 1rem;
    }
}

@media (max-width: 320px) {
    .title {
        font-size: 1.5rem;
    }
    
    .poem {
        font-size: 0.9rem;
        padding: 15px 10px;
    }
    
    .question {
        font-size: 1.1rem;
    }
    
    .btn-yes, .btn-no {
        font-size: 1rem;
        padding: 10px 15px;
    }
}

/* Orientación landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .intro-screen {
        padding: 10px;
    }
    
    .big-heart {
        font-size: min(120px, 30vh);
    }
    
    .heart-text {
        margin-top: 5px;
    }
    
    .message-card {
        padding: 20px;
    }
    
    .poem {
        margin: 15px 0;
        padding: 15px;
    }
    
    .poem p {
        margin: 3px 0;
    }
    
    .carousel-slide {
        aspect-ratio: 16/9;
    }
}

/* Animaciones adicionales */
@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    75% { transform: scale(0.95) rotate(-5deg); }
}

.celebrate {
    animation: celebrate 0.5s ease;
}

/* Estilos para los elementos que se crearán dinámicamente en la sorpresa */
.surprise-message {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    color: #d43f5e;
    margin: 20px 0;
    animation: glow 2s infinite;
    word-wrap: break-word;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 20px #ff4d6d; }
    50% { text-shadow: 0 0 40px #ff1493, 0 0 60px #ff4d6d; }
}

.surprise-hearts {
    font-size: clamp(3rem, 10vw, 4rem);
    animation: spin 10s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.photo-frame {
    width: min(200px, 60vw);
    height: min(200px, 60vw);
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin: 20px auto;
    overflow: hidden;
    animation: float 3s ease infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.love-note {
    font-size: clamp(1rem, 4vw, 1.3rem);
    color: #4a2c33;
    background: rgba(255, 245, 247, 0.9);
    padding: clamp(15px, 4vw, 20px);
    border-radius: min(30px, 5vw);
    margin: 20px 0;
    border: 3px solid white;
    max-width: min(500px, 90%);
    word-wrap: break-word;
}

/* Ajustes para tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .content {
        max-width: 600px;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    .poem {
        font-size: 1.2rem;
    }
}

/* Soporte para pantallas grandes */
@media (min-width: 1400px) {
    .content {
        max-width: 800px;
    }
    
    .title {
        font-size: 3rem;
    }
    
    .poem {
        font-size: 1.5rem;
    }
    
    .question {
        font-size: 2.2rem;
    }
    
    .carousel-container {
        max-width: 800px;
    }
}