/* ========================================
   DESIGN SYSTEM - Cumpleaños Shachenka 21
   Theme: Disco Glam
   ======================================== */

:root {
    --bg-dark: #0d0a12;
    --pink-primary: #F5A5B8;
    --pink-hot: #FF69B4;
    --pink-soft: #FFB6C1;
    --pink-deep: #E91E7B;
    --silver: #C0C0C0;
    --silver-light: #E8E8E8;
    --gold: #FFD700;
    --gold-soft: #FFEAA7;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg-strong: rgba(255, 255, 255, 0.08);

    --font-script: 'Great Vibes', cursive;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Outfit', sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-sans);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(251, 243, 245, 0.42), rgba(251, 243, 245, 0.42)),
        url('/images/fondo1.jpg') center center / 100% auto no-repeat;
    background-attachment: fixed;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    z-index: 0;
    background:
        radial-gradient(circle at 78% 16%, rgba(232, 104, 150, 0.28), transparent 34%),
        radial-gradient(circle at 16% 80%, rgba(255, 210, 185, 0.22), transparent 40%);
}

body::after {
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(250, 240, 242, 0.08));
    backdrop-filter: blur(1px);
}

/* ========================================
   SPARKLE CANVAS
   ======================================== */

#sparkle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   FLOATING DECORATIVE ELEMENTS
   ======================================== */

.floating-elements {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
    opacity: 0.62;
}

.disco-ball {
    position: absolute;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9) 0%, transparent 25%),
        radial-gradient(circle at 70% 60%, rgba(255,255,255,0.4) 0%, transparent 20%),
        repeating-conic-gradient(from 0deg, rgba(200,200,200,0.15) 0deg, rgba(255,255,255,0.35) 2deg, rgba(150,150,150,0.15) 4deg, rgba(255,255,255,0.05) 6deg),
        linear-gradient(135deg, #d0d0d0, #888, #ccc, #999, #ddd);
    box-shadow: 0 0 60px rgba(255,255,255,0.12), 0 0 100px rgba(245,165,184,0.06), inset 0 0 30px rgba(255,255,255,0.18);
    opacity: 0;
    animation: disco-appear 1s var(--ease-out) forwards;
}

.disco-ball::after {
    content: '';
    position: absolute;
    top: -50%; left: 50%;
    width: 2px; height: 50%;
    background: linear-gradient(to bottom, rgba(192,192,192,0.6), transparent);
    transform: translateX(-50%);
}

.disco-ball-1 {
    width: 80px; height: 80px; top: 8%; right: 8%;
    animation: disco-appear 1s var(--ease-out) 2s forwards, disco-float-1 8s ease-in-out 2s infinite;
}
.disco-ball-2 {
    width: 50px; height: 50px; bottom: 20%; left: 5%;
    animation: disco-appear 1s var(--ease-out) 2.5s forwards, disco-float-2 10s ease-in-out 2.5s infinite;
}
.disco-ball-3 {
    width: 35px; height: 35px; top: 40%; left: 8%;
    animation: disco-appear 1s var(--ease-out) 3s forwards, disco-float-3 12s ease-in-out 3s infinite;
}

.floating-emoji {
    position: absolute;
    font-size: 28px;
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(255, 220, 230, 0.22));
    animation: emoji-float 15s ease-in-out infinite;
}

.emoji-1 { top: 15%; left: 5%; animation-delay: 1s; font-size: 32px; }
.emoji-2 { bottom: 15%; right: 5%; animation-delay: 2s; font-size: 36px; }
.emoji-3 { top: 60%; right: 10%; animation-delay: 3s; font-size: 30px; }
.emoji-4 { top: 30%; left: 3%; animation-delay: 0.5s; font-size: 24px; }
.emoji-5 { bottom: 30%; left: 12%; animation-delay: 1.5s; font-size: 38px; }
.emoji-6 { top: 5%; left: 40%; animation-delay: 4s; font-size: 22px; }

/* ========================================
   INVITATION IMAGE SECTION
   ======================================== */

#invitation-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    z-index: 10;
}

.invitation-card {
    max-width: 480px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* Invitation Image */
.invitation-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: visible;
    opacity: 0;
    transform: scale(0.7) translateY(40px);
    box-shadow: 0 10px 30px rgba(82, 56, 66, 0.16);
}

.invitation-image-wrapper.visible {
    animation: image-entrance 1.2s var(--ease-bounce) forwards;
}

.invitation-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    -webkit-mask-image: radial-gradient(140% 140% at 50% 50%, #000 58%, rgba(0, 0, 0, 0.95) 70%, rgba(0, 0, 0, 0.68) 80%, rgba(0, 0, 0, 0.28) 90%, transparent 100%);
    mask-image: radial-gradient(140% 140% at 50% 50%, #000 58%, rgba(0, 0, 0, 0.95) 70%, rgba(0, 0, 0, 0.68) 80%, rgba(0, 0, 0, 0.28) 90%, transparent 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.image-glow {
    position: absolute;
    top: -12px; left: -12px; right: -12px; bottom: -12px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 210, 224, 0.36), rgba(255, 210, 224, 0.08) 55%, transparent 78%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.24), transparent 75%);
    z-index: -1;
    filter: blur(12px);
    opacity: 0.5;
    animation: border-shimmer 4s ease-in-out infinite;
}

/* ========================================
   CTA BUTTON
   ======================================== */

.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 18px 48px;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--white);
    background: linear-gradient(135deg, #ef5d98, #c93b73);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    box-shadow: 0 8px 24px rgba(201, 59, 115, 0.34), 0 0 34px rgba(239, 93, 152, 0.2);
    opacity: 0;
    transform: translateY(20px);
}

.cta-button.visible {
    animation: item-entrance 0.8s var(--ease-out) forwards;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 34px rgba(201, 59, 115, 0.44), 0 0 56px rgba(239, 93, 152, 0.25);
}

.cta-button:active { transform: translateY(0) scale(0.98); }

.btn-shimmer {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: btn-shimmer-slide 3s ease-in-out infinite;
}

.btn-icon { font-size: 1.2rem; animation: btn-icon-bounce 2s ease-in-out infinite; }
.cta-button.pulsing { animation: cta-pulse 2s ease-in-out infinite; }

/* ========================================
   MODAL - FORM
   ======================================== */

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.modal.hidden { display: none; }

.modal-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(102, 70, 84, 0.26);
    backdrop-filter: blur(6px);
    animation: fade-in 0.3s ease;
}

.modal-content {
    position: relative;
    max-width: 420px;
    width: 100%;
    animation: modal-slide-up 0.5s var(--ease-bounce);
}

.glass-card {
    background: linear-gradient(145deg, rgba(255, 249, 251, 0.94), rgba(250, 236, 242, 0.92));
    border: 1px solid rgba(214, 128, 164, 0.28);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 18px 46px rgba(92, 49, 66, 0.22), 0 0 50px rgba(255, 185, 210, 0.22), inset 0 1px 0 rgba(255,255,255,0.65);
}

.close-btn {
    position: absolute;
    top: 16px; right: 16px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #8e5b6f;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(214, 128, 164, 0.28);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #6e3651;
    background: rgba(255, 228, 240, 0.9);
    border-color: rgba(214, 128, 164, 0.45);
}

.modal-header { text-align: center; margin-bottom: 32px; }

.modal-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
    animation: disco-spin 4s linear infinite;
}

.modal-header h3 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; color: #3f2d39; }
.modal-subtitle { font-size: 0.85rem; color: #7c5f6d; font-weight: 400; }

.form-group { margin-bottom: 24px; }

.form-group label {
    display: block;
    font-size: 0.8rem; font-weight: 500;
    letter-spacing: 1px; text-transform: uppercase;
    color: var(--pink-primary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: #3a2b34;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(214, 128, 164, 0.35);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input::placeholder { color: rgba(94, 71, 82, 0.52); }

.form-group input:focus {
    border-color: var(--pink-primary);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 0 0 3px rgba(245,165,184,0.22);
}

.submit-button {
    width: 100%;
    padding: 16px;
    font-family: var(--font-sans);
    font-size: 1.1rem; font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, #ef5d98, #c93b73);
    border: none; border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 8px 24px rgba(201, 59, 115, 0.34), 0 0 34px rgba(239, 93, 152, 0.2);
}

.submit-button:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(201, 59, 115, 0.44), 0 0 56px rgba(239, 93, 152, 0.25); }
.submit-button:active { transform: translateY(0); }
.submit-button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.submit-loader { display: flex; justify-content: center; gap: 6px; }
.submit-loader.hidden { display: none; }

.loader-dot {
    width: 8px; height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: loader-bounce 1.4s ease-in-out infinite;
}
.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

.form-error { text-align: center; color: #ff6b6b; font-size: 0.85rem; margin-top: 16px; }
.form-error.hidden { display: none; }

/* ========================================
   SUCCESS SECTION — Invitation-inspired colors
   ======================================== */

#success-section {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow-y: auto;
}

#success-section.hidden { display: none; }

.success-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        linear-gradient(rgba(255, 245, 248, 0.62), rgba(255, 245, 248, 0.62)),
        url('/images/fondo2.jpg') center center / cover no-repeat;
    animation: fade-in 0.5s ease;
}

.success-card {
    position: relative;
    max-width: 480px;
    width: 100%;
    margin: 0;
    animation: success-entrance 0.8s var(--ease-bounce);
    text-align: center;
    /* Light card with pink/cream tones */
    background: linear-gradient(135deg, #ffffff, #fff8fa, #fef0f5);
    border: 1px solid rgba(245, 165, 184, 0.3);
    border-radius: 24px;
    padding: 40px;
    box-shadow:
        0 20px 60px rgba(245, 165, 184, 0.15),
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 0 80px rgba(245, 165, 184, 0.08);
    color: #1a1a2e;
}

.success-checkmark {
    width: 80px; height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink-hot), var(--pink-deep));
    display: flex; align-items: center; justify-content: center;
    animation: check-pop 0.6s var(--ease-bounce) 0.3s both;
    box-shadow: 0 0 40px rgba(255, 105, 180, 0.3);
}

.check-icon { font-size: 2.5rem; color: var(--white); font-weight: 700; }

.success-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #2d2d3f;
}

.success-title span { color: var(--pink-deep); }

.success-subtitle {
    font-size: 1rem;
    color: #6b6b80;
    margin-bottom: 32px;
}

/* Detail Items — pink/silver themed on light background */
.details-reveal {
    animation: details-slide-up 0.6s var(--ease-out) 0.5s both;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(245, 165, 184, 0.08);
    border-radius: 14px;
    border: 1px solid rgba(245, 165, 184, 0.2);
    margin-bottom: 10px;
    text-align: left;
    transition: all 0.3s ease;
}

.detail-item:hover {
    border-color: rgba(245, 165, 184, 0.4);
    background: rgba(245, 165, 184, 0.12);
    transform: translateX(4px);
}

.detail-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.detail-info { display: flex; flex-direction: column; }

.detail-label {
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--pink-deep);
    font-weight: 600;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d2d3f;
}

/* Map */
.map-container {
    margin: 24px 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(245, 165, 184, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.maps-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-sans);
    font-size: 0.9rem; font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--pink-hot), var(--pink-deep));
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.maps-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

/* ========================================
   CONFETTI
   ======================================== */

#confetti-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 300;
}

.confetti-piece {
    position: absolute;
    width: 10px; height: 10px;
    top: -10px;
    animation: confetti-fall linear forwards;
}

/* ========================================
   ANIMATIONS
   ======================================== */

.animate-item.visible {
    animation: item-entrance 0.8s var(--ease-out) forwards;
}

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

@keyframes image-entrance {
    0% { opacity: 0; transform: scale(0.6) translateY(60px) rotate(-3deg); }
    60% { opacity: 1; transform: scale(1.03) translateY(-5px) rotate(0.5deg); }
    100% { opacity: 1; transform: scale(1) translateY(0) rotate(0deg); }
}

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

@keyframes disco-float-1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-10px, 15px) rotate(5deg); }
    50% { transform: translate(5px, -10px) rotate(-3deg); }
    75% { transform: translate(-5px, -5px) rotate(2deg); }
}

@keyframes disco-float-2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(15px, -10px) rotate(-5deg); }
    66% { transform: translate(-10px, 10px) rotate(3deg); }
}

@keyframes disco-float-3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(8px, -15px); }
}

@keyframes emoji-float {
    0% { opacity: 0; transform: translateY(20px) rotate(0deg); }
    10% { opacity: 0.38; }
    50% { transform: translateY(-15px) rotate(10deg); }
    90% { opacity: 0.38; }
    100% { opacity: 0; transform: translateY(20px) rotate(-10deg); }
}

@keyframes border-shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes btn-shimmer-slide {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

@keyframes btn-icon-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(10deg); }
}

@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(201, 59, 115, 0.34), 0 0 34px rgba(239, 93, 152, 0.2); }
    50% { box-shadow: 0 10px 36px rgba(201, 59, 115, 0.48), 0 0 60px rgba(239, 93, 152, 0.28); }
}

@keyframes disco-spin {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

@keyframes modal-slide-up {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@keyframes loader-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes success-entrance {
    from { opacity: 0; transform: translateY(60px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes check-pop {
    from { opacity: 0; transform: scale(0); }
    50% { transform: scale(1.2); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg) scale(0.5); opacity: 0; }
}

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

@media (max-width: 480px) {
    .invitation-card { gap: 20px; }
    .invitation-image-wrapper { border-radius: 16px; }
    .invitation-image { border-radius: 16px; }
    .cta-button { padding: 16px 36px; font-size: 1rem; }

    #success-section { align-items: flex-start; }
    .success-card { margin: 24px 0; }

    .disco-ball-1 { width: 50px; height: 50px; }
    .disco-ball-2 { width: 35px; height: 35px; }
    .disco-ball-3 { width: 25px; height: 25px; }
    .floating-emoji { font-size: 20px; }

    .success-card { padding: 28px 20px; }
    .success-title { font-size: 1.3rem; }
}

@media (max-width: 360px) {
    .cta-button { padding: 14px 28px; font-size: 0.9rem; }
}

@media (min-width: 768px) {
    .invitation-card { max-width: 520px; }
}
