/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #fce7f3 0%, #fae8ff 50%, #f3e8ff 100%);
    overflow-x: hidden;
    position: relative;
}

/* Animaciones flotantes */
#floating-animations {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    font-size: 2.5rem;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0;
    }
}

@keyframes float-rotate {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg) scale(1.2);
        opacity: 0;
    }
}

@keyframes fall-down {
    0% {
        transform: translateY(-100vh) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) scale(1);
        opacity: 0;
    }
}

.float-up {
    animation: float-up linear infinite;
}

.float-rotate {
    animation: float-rotate linear infinite;
}

.fall-down {
    animation: fall-down linear infinite;
}

/* Páginas */
.page {
    display: none;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.page.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* Logo */
.logo {
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

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

.logo-circle {
    width: 128px;
    height: 128px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #d946ef, #9333ea);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(236, 72, 153, 0.5);
}

.logo-circle span {
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

/* Títulos */
.main-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #c026d3, #ec4899, #f43f5e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nicky-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #c026d3, #ec4899, #f43f5e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Contenido de inicio */
.content {
    margin-bottom: 3rem;
}

.content h2 {
    font-size: 1.5rem;
    color: #c026d3;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 1rem;
}

.message {
    font-size: 1.125rem;
    color: #ec4899;
    font-weight: 500;
}

/* Botones */
.buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(90deg, #d946ef, #ec4899);
    color: white;
}

.btn-secondary {
    background: linear-gradient(90deg, #ec4899, #f43f5e);
    color: white;
}

.btn-back {
    position: fixed;
    top: 1rem;
    left: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #d946ef, #ec4899);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: all 0.3s ease;
}

.btn-back:hover {
    transform: scale(1.05);
}

/* Mensaje gracioso */
.funny-message {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fae8ff, #fce7f3);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    animation: bounce 1s infinite;
}

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

.funny-message.hidden {
    display: none;
}

.funny-message .emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.funny-message p:last-child {
    font-size: 1.125rem;
    color: #374151;
}

/* Dedicatoria */
.dedication {
    background: linear-gradient(135deg, #fce7f3, #fae8ff, #f3e8ff);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.dedication p {
    font-size: 1.125rem;
    color: #374151;
    line-height: 1.8;
}

/* Foto principal */
.main-photo {
    margin-bottom: 2rem;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.main-photo img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* Cuenta regresiva */
.countdown {
    background: linear-gradient(135deg, #fce7f3, #fae8ff, #f3e8ff);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.countdown h3 {
    font-size: 1.5rem;
    color: #c026d3;
    margin-bottom: 1.5rem;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.countdown-item {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d946ef;
}

.countdown-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Botón de confort */
.comfort-button-container {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.btn-comfort {
    padding: 0.5rem 1rem;
    background: #fbcfe8;
    color: #be185d;
    border: none;
    border-radius: 50px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-comfort:hover {
    background: #f9a8d4;
    transform: scale(1.05);
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.modal.active {
    display: block;
}

.modal-content {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 75px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-large {
    max-width: 1200px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 2rem;
    color: #d946ef;
}

.btn-close {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #d946ef, #ec4899);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    transform: scale(1.05);
}

.btn-close-x {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-close-x:hover {
    background: #f3f4f6;
}

/* Galería de recuerdos */
.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.memory-card {
    perspective: 1000px;
    height: 400px;
    cursor: pointer;
}

.memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s;
    transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.memory-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.memory-card-front .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 1rem;
    color: white;
    font-weight: bold;
}

.memory-card-back {
    background: linear-gradient(135deg, #d946ef, #ec4899, #f43f5e);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: white;
    text-align: center;
}

.memory-card-back h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.memory-card-back p {
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Reproductor de música */
.music-player {
    background: linear-gradient(135deg, #c026d3, #ec4899, #f43f5e);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.player-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.music-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.player-display h3 {
    font-size: 1.875rem;
    color: white;
    margin-bottom: 0.5rem;
}

.player-display p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.control-btn {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.control-btn-main {
    width: 80px;
    height: 80px;
    background: white;
    font-size: 2rem;
}

.control-btn-main:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Playlist */
.playlist {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.playlist h3 {
    font-size: 1.5rem;
    color: #d946ef;
    margin-bottom: 1rem;
}

.playlist-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.playlist-item:hover {
    background: #f3f4f6;
}

.playlist-item.active {
    background: linear-gradient(90deg, #d946ef, #ec4899);
    color: white;
}

.playlist-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.playlist-item-artist {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Instrucciones */
.instructions {
    background: rgba(236, 72, 153, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
}

.instructions h4 {
    font-size: 1.25rem;
    color: #d946ef;
    margin-bottom: 0.75rem;
}

.instructions ol {
    color: #374151;
    padding-left: 1.5rem;
}

.instructions li {
    margin-bottom: 0.5rem;
}

.instructions code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
}

/* Modal de confort */
.comfort-title {
    font-size: 2rem;
    color: #c026d3;
    text-align: center;
    margin-bottom: 1.5rem;
}

.comfort-message {
    font-size: 1.125rem;
    color: #374151;
    line-height: 1.8;
}

.comfort-message p {
    margin-bottom: 1.5rem;
}

.comfort-final {
    text-align: center;
    font-weight: 600;
    color: #be185d !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

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

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

    .btn {
        width: 100%;
        max-width: 300px;
    }

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

    .memories-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-header {
        flex-direction: column;
        gap: 1rem;
    }

    .player-controls {
        gap: 1rem;
    }

    .control-btn {
        width: 48px;
        height: 48px;
    }

    .control-btn-main {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 480px) {
    .logo-circle {
        width: 100px;
        height: 100px;
    }

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

    .nicky-title {
        font-size: 1.5rem;
    }

    .countdown-item {
        padding: 1rem 0.5rem;
    }

    .countdown-number {
        font-size: 1.875rem;
    }

    .main-photo img {
        height: 300px;
    }
}
