* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 20px;
}

#hearts-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 600px;
    animation: fadeIn 0.8s ease-in;
    margin: auto;
}

.hidden {
    display: none !important;
}

.content-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.content-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 182, 193, 0.3), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.title {
    font-family: 'Pacifico', cursive;
    font-size: 2.5em;
    color: #ff6b9d;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.sad-title {
    color: #9b59b6;
}

.success-title {
    color: #ff1493;
    font-size: 3em;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.question {
    font-size: 1.5em;
    color: #555;
    margin-bottom: 30px;
    font-weight: 300;
}

.success-message {
    font-size: 2em;
    color: #ff1493;
    font-weight: 600;
}

.emoji-container {
    margin: 30px 0;
}

.emoji {
    font-size: 5em;
    display: inline-block;
    animation: rotate 2s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.sad-emoji {
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.celebration-emoji {
    animation: celebrate 0.6s ease-in-out infinite;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-15deg); }
    75% { transform: scale(1.2) rotate(15deg); }
}

.buttons-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.btn {
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-yes {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff1493 100%);
    color: white;
    padding: 20px 50px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(255, 20, 147, 0.8); }
}

.btn-yes:hover {
    transform: scale(1.1);
}

.btn-no {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    padding: 15px 30px;
    transition: all 0.3s ease;
}

.btn-no:hover {
    transform: scale(0.95);
    opacity: 0.8;
}

.attempt-counter {
    margin-top: 30px;
    font-size: 1em;
    color: #7f8c8d;
    font-weight: 600;
}

#attempt-number {
    color: #e74c3c;
    font-size: 1.2em;
}

.final-message {
    margin-top: 10px;
    font-size: 1.3em;
    color: #ff1493;
    font-style: italic;
    animation: fadeIn 1.5s ease-in;
}

.hearts-explosion {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.celebration {
    animation: celebrationPulse 0.5s ease-in-out;
}

@keyframes celebrationPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Timeline - Nuestra Historia */
.timeline-container {
    max-width: 900px;
    width: 95%;
}

.timeline-box {
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px 30px;
}

.timeline-box::-webkit-scrollbar {
    width: 8px;
}

.timeline-box::-webkit-scrollbar-track {
    background: rgba(255, 182, 193, 0.2);
    border-radius: 10px;
}

.timeline-box::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff1493 100%);
    border-radius: 10px;
}

.timeline-title {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.timeline-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

.timeline-counter {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #ffe5ec 0%, #ffd1dc 100%);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.2);
}

.counter-number {
    font-size: 3em;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff1493 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ff6b9d 0%, #ff1493 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    animation: slideIn 0.6s ease-out backwards;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-content {
    width: calc(50% - 40px);
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 35px rgba(255, 20, 147, 0.3);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 40px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 40px;
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff1493 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(255, 20, 147, 0.3);
}

.timeline-title-item {
    font-size: 1.4em;
    color: #ff1493;
    margin-bottom: 12px;
    font-weight: 600;
}

.timeline-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.timeline-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.timeline-photo {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.timeline-photo:hover {
    transform: scale(1.05);
}

.timeline-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff1493 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
    z-index: 10;
}

.timeline-footer {
    text-align: center;
    font-size: 1.3em;
    color: #ff1493;
    margin-top: 40px;
    font-style: italic;
    font-weight: 600;
}

.btn-story {
    margin-top: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: glow 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 600px) {
    .title {
        font-size: 2em;
    }
    
    .question {
        font-size: 1.2em;
    }
    
    .emoji {
        font-size: 4em;
    }
    
    .btn {
        font-size: 1em;
    }
    
    .content-box {
        padding: 30px 20px;
    }
    
    .floating-nav {
        top: 10px;
        left: 10px;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 60px;
    }
    
    .timeline-content {
        width: 100%;
        margin: 0 !important;
    }
    
    .timeline-icon {
        left: 20px;
        transform: translateX(0);
    }
    
    .timeline-counter {
        gap: 20px;
    }
    
    .counter-item {
        padding: 15px 20px;
    }
    
    .counter-number {
        font-size: 2em;
    }
    
    .timeline-title {
        font-size: 1.8em;
    }
    
    .timeline-box {
        padding: 30px 20px;
    }
}

/* Menú de navegación flotante */
.floating-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-btn {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff1493 100%);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.3em;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.6);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Control de música */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.music-btn {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff1493 100%);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 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 20px rgba(255, 20, 147, 0.6);
}

.music-btn:active {
    transform: scale(0.95);
}

.music-btn.playing {
    animation: musicPulse 1s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.music-btn.muted {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

/* Pantalla de momentos */
.photo-carousel {
    margin: 30px 0;
    position: relative;
}

.photo-container {
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe5f3 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.carousel-photo {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 20px;
    animation: fadeIn 1s ease-in;
    display: none;
}

.carousel-photo.active {
    display: block;
}

.photo-placeholder {
    text-align: center;
    color: #ff6b9d;
    padding: 40px;
}

.placeholder-emoji {
    font-size: 5em;
    display: block;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

.photo-placeholder p {
    font-size: 1.1em;
    color: #999;
    line-height: 1.6;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #ff1493;
    transform: scale(1.3);
}

.dot:hover {
    background: #ff6b9d;
}

.moments-messages {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.moment-text {
    font-size: 1.2em;
    color: #666;
    font-style: italic;
    animation: fadeIn 1s ease-in;
    opacity: 0;
}

.moment-text:nth-child(1) {
    animation-delay: 0.5s;
    animation-fill-mode: forwards;
}

.moment-text:nth-child(2) {
    animation-delay: 1s;
    animation-fill-mode: forwards;
}

.moment-text:nth-child(3) {
    animation-delay: 1.5s;
    animation-fill-mode: forwards;
}

.btn-continue {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff1493 100%);
    color: white;
    padding: 20px 60px;
    margin-top: 20px;
    animation: glow 2s ease-in-out infinite;
    animation-delay: 2s;
}

.btn-continue:hover {
    transform: scale(1.1);
}

/* Mensajes finales mejorados */
.final-messages {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.love-battle {
    font-size: 1.2em;
    color: #ff6b9d;
    animation: fadeIn 1s ease-in;
    animation-delay: 1s;
    animation-fill-mode: forwards;
    opacity: 0;
}

.love-battle-main {
    font-size: 2em !important;
    color: #ff1493;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(255, 20, 147, 0.3);
    animation: winAnimation 1s ease-in-out;
    animation-delay: 1.5s;
    animation-fill-mode: forwards;
    opacity: 0;
    transform: scale(0.5);
}

@keyframes winAnimation {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.final-messages .final-message:last-child {
    animation-delay: 2s;
    animation-fill-mode: forwards;
    opacity: 0;
}

/* Pantalla de razones */
.reasons-list {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reason-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #fff5f9 0%, #ffe8f3 100%);
    border-radius: 15px;
    border-left: 5px solid #ff1493;
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.1);
    animation: slideIn 0.5s ease-out;
    animation-fill-mode: backwards;
}

.reason-item:nth-child(1) { animation-delay: 0.2s; }
.reason-item:nth-child(2) { animation-delay: 0.4s; }
.reason-item:nth-child(3) { animation-delay: 0.6s; }
.reason-item:nth-child(4) { animation-delay: 0.8s; }
.reason-item:nth-child(5) { animation-delay: 1s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.reason-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff1493 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(255, 20, 147, 0.3);
}

.reason-text {
    flex: 1;
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.special-dates {
    margin: 40px 0 20px 0;
    padding: 30px;
    background: linear-gradient(135deg, #fff0f8 0%, #ffe5f5 100%);
    border-radius: 20px;
    border: 2px dashed #ff6b9d;
    animation: fadeIn 1s ease-in;
    animation-delay: 1.2s;
    animation-fill-mode: backwards;
}

.date-info {
    font-size: 1.1em;
    color: #666;
    margin: 10px 0;
    line-height: 1.8;
}

.date-info strong {
    color: #ff1493;
    font-weight: 600;
}

.date-counter {
    font-size: 1.3em;
    color: #ff1493;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.date-counter strong {
    font-size: 1.5em;
    color: #ff1493;
    text-shadow: 1px 1px 2px rgba(255, 20, 147, 0.2);
}

.date-footer {
    font-size: 1.2em;
    color: #ff1493;
    font-style: italic;
    margin-top: 15px;
    font-weight: 500;
}

.secret-message {
    margin-top: 25px !important;
    font-size: 1.1em !important;
    color: #ff6b9d !important;
    font-style: normal !important;
    padding: 15px;
    background: linear-gradient(135deg, #fff5f9 0%, #ffe8f3 100%);
    border-radius: 10px;
    border-left: 4px solid #ff1493;
    animation-delay: 2.5s !important;
}

/* Responsive para móviles */
@media (max-width: 600px) {
    body {
        padding: 20px 0;
    }
    
    .container {
        width: 95%;
    }
    
    .content-box {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .title {
        font-size: 1.8em;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    .question {
        font-size: 1.1em;
        line-height: 1.5;
    }
    
    .emoji {
        font-size: 4em;
    }
    
    .photo-container {
        height: 250px;
    }
    
    .carousel-photo {
        border-radius: 15px;
    }
    
    .moment-text {
        font-size: 0.95em;
    }
    
    .btn {
        font-size: 1em;
        padding: 15px 30px !important;
    }
    
    .btn-continue {
        padding: 15px 35px !important;
        font-size: 1em;
    }
    
    .btn-yes {
        padding: 18px 40px !important;
    }
    
    .btn-no {
        padding: 12px 25px !important;
    }
    
    .buttons-container {
        gap: 15px;
        flex-direction: column;
    }
    
    /* Razones */
    .reason-item {
        flex-direction: row;
        text-align: left;
        gap: 15px;
        padding: 15px;
    }
    
    .reason-number {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .reason-text {
        font-size: 0.95em;
        line-height: 1.5;
    }
    
    .special-dates {
        padding: 20px 15px;
    }
    
    .date-info {
        font-size: 0.95em;
        line-height: 1.6;
    }
    
    .date-counter {
        font-size: 1.1em;
    }
    
    .date-counter strong {
        font-size: 1.3em;
    }
    
    .date-footer {
        font-size: 1em;
    }
    
    /* Pantalla de éxito */
    .success-title {
        font-size: 2em !important;
    }
    
    .success-message {
        font-size: 1.3em;
        line-height: 1.4;
    }
    
    .love-battle-main {
        font-size: 1.6em !important;
        line-height: 1.3;
    }
    
    .final-message {
        font-size: 1em !important;
        line-height: 1.5;
    }
    
    .secret-message {
        font-size: 0.95em !important;
        padding: 12px;
    }
    
    /* Control de música */
    .music-control {
        top: 15px;
        right: 15px;
    }
    
    .music-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3em;
    }
    
    /* Contador de intentos */
    .attempt-counter {
        font-size: 0.9em;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 380px) {
    .title {
        font-size: 1.5em;
    }
    
    .question {
        font-size: 1em;
    }
    
    .photo-container {
        height: 200px;
    }
    
    .reason-item {
        flex-direction: column;
        text-align: center;
    }
    
    .btn {
        font-size: 0.9em;
        padding: 12px 25px !important;
    }
    
    .love-battle-main {
        font-size: 1.4em !important;
    }
}