/* ========================================
   WEB TỎ TÌNH - Premium Style
   Version 2.1 - Simplified
   ======================================== */

/* ========== CSS VARIABLES ========== */
:root {
    /* Pink Theme (Default - Cho bạn nữ) */
    --primary-color: #ff4d6d;
    --primary-light: #ff758f;
    --primary-dark: #ff2a51;
    --secondary-color: #ff8fa3;
    --accent-color: #ffe5ec;
    --text-color: #590d22;
    --text-light: #883e53;

    /* Gradient Colors */
    --gradient-start: #ff9a9e;
    --gradient-end: #fecfef;

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: 20px;

    /* Shadows */
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(31, 38, 135, 0.2);
    --shadow-lg: 0 15px 50px rgba(255, 77, 109, 0.3);
    --shadow-glow: 0 0 40px rgba(255, 77, 109, 0.4);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-full: 50px;

    /* Z-Index */
    --z-background: -1;
    --z-content: 10;
    --z-overlay: 100;
    --z-modal: 1000;
    --z-loading: 9999;
}

/* Blue Theme (Cho bạn nam) */
body.theme-blue {
    --primary-color: #00a8ff;
    --primary-light: #74b9ff;
    --primary-dark: #0984e3;
    --secondary-color: #81ecec;
    --accent-color: #dfe6e9;
    --text-color: #2d3436;
    --text-light: #636e72;
    --gradient-start: #a8edea;
    --gradient-end: #fed6e3;
    --shadow-glow: 0 0 40px rgba(0, 168, 255, 0.4);
}

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: none;
}

body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
}

/* ========== ANIMATIONS ========== */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    to {
        transform: rotate(360deg);
    }
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.3);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ========== LOADING SCREEN ========== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    text-align: center;
    color: var(--text-color);
}

.heart-loader {
    font-size: 3rem;
    animation: heartbeat 1.2s infinite;
    margin-bottom: var(--spacing-sm);
}

.loader p {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.8;
}

/* ========== BACKGROUND SHAPES ========== */
.shape {
    position: fixed;
    filter: blur(80px);
    z-index: var(--z-background);
    animation: float 20s infinite ease-in-out;
    opacity: 0.6;
    pointer-events: none;
}

.shape-1 {
    top: -15%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    border-radius: 50%;
}

.shape-2 {
    bottom: -15%;
    right: -10%;
    width: 450px;
    height: 450px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation-delay: -5s;
}

.shape-3 {
    top: 30%;
    right: 15%;
    width: 200px;
    height: 200px;
    background: var(--primary-light);
    border-radius: 50%;
    animation-delay: -10s;
}

.shape-4 {
    bottom: 30%;
    left: 10%;
    width: 180px;
    height: 180px;
    background: var(--accent-color);
    border-radius: 50%;
    animation-delay: -15s;
}

/* ========== CARDS & CONTAINERS ========== */
.container,
.modal {
    position: relative;
    z-index: var(--z-content);
    padding: var(--spacing-md);
    width: 100%;
    display: flex;
    justify-content: center;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    /* Enable vertical scroll */
    padding-top: 20px;
    /* Space for top scroll */
    padding-bottom: 20px;
    /* Space for bottom scroll */
}

/* Ensure modal content doesn't get cut off when scrolling flex container */
.modal::before {
    content: '';
    display: block;
    height: 20px;
    /* Helper for top spacing */
    flex-shrink: 0;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    padding: var(--spacing-xl) clamp(1.5rem, 5vw, 4rem);
    text-align: center;
    box-shadow: var(--shadow-lg), inset 0 0 20px rgba(255, 255, 255, 0.15);
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.8s ease forwards;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    box-shadow: var(--shadow-glow), inset 0 0 30px rgba(255, 255, 255, 0.2);
}

/* ========== TYPOGRAPHY ========== */
h1 {
    color: var(--text-color);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: var(--spacing-xs);
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

h1 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.highlight-name {
    background: linear-gradient(120deg, var(--primary-light), #fff, var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
    font-size: 1.1em;
    display: inline-block;
    text-shadow: none;
}

p.subtitle {
    color: var(--text-light);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    min-height: 3em;
}

/* Typing Cursor */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
    color: var(--primary-color);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: var(--spacing-md);
    text-align: left;
}

.form-group label {
    display: block;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    margin-left: 5px;
}

.form-group label i {
    margin-right: 6px;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    outline: none;
    transition: var(--transition-normal);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.7);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 77, 109, 0.25);
}

textarea.form-control {
    border-radius: var(--radius-md);
    resize: none;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 14px 36px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 1.15rem;
}

.btn-yes {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    animation: pulse 2s infinite;
}

.btn-yes:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    animation: none;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 77, 109, 0.5);
}

.btn-no {
    background: white;
    color: var(--primary-color);
    position: relative;
    z-index: 50;
}

.btn-no:hover {
    background: var(--accent-color);
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    min-height: 60px;
}

/* ========== LINK BOX - IMPROVED ========== */
.result-label {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
}

.link-box {
    display: flex;
    gap: 0;
    margin-bottom: var(--spacing-md);
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-full);
    border: 2px solid var(--primary-light);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(255, 77, 109, 0.15);
}

#generated-link {
    flex: 1;
    padding: 14px 18px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    outline: none;
    min-width: 0;
}

#copy-btn {
    padding: 14px 20px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

#copy-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    padding-left: 25px;
    padding-right: 25px;
}

/* ========== SHARE BUTTONS ========== */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: var(--spacing-md);
}

.action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: white;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-5px) scale(1.1);
}

.action-fb {
    background: linear-gradient(135deg, #1877f2, #3b5998);
}

.action-fb:hover {
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.5);
}

.action-messenger {
    background: linear-gradient(135deg, #00b2ff, #006aff);
}

.action-messenger:hover {
    box-shadow: 0 8px 25px rgba(0, 178, 255, 0.5);
}

.action-zalo {
    background: linear-gradient(135deg, #0068ff, #0044cc);
}

.action-zalo:hover {
    box-shadow: 0 8px 25px rgba(0, 104, 255, 0.5);
}

.zalo-icon {
    font-weight: 800;
    font-size: 1.3rem;
}

.action-native {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.action-native:hover {
    box-shadow: 0 8px 25px rgba(255, 77, 109, 0.5);
}

/* ========== GIF CONTAINER ========== */
.gif-container {
    margin-bottom: var(--spacing-lg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 10px solid white;
    border-bottom: 30px solid white;
    transform: rotate(-2deg);
    transition: var(--transition-normal);
    position: relative;
}

.gif-container::after {
    content: '📸';
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    opacity: 0.5;
}

.gif-container:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.gif-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 1s ease;
}



/* ========== SUCCESS SECTION ========== */
.success-message {
    display: none;
    animation: fadeIn 0.5s ease;
}

/* ── Celestial Heart Link Button ── */
.celestial-heart-link {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: var(--spacing-lg);
    padding: 16px 22px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(30, 5, 30, 0.85), rgba(80, 10, 50, 0.85));
    border: 1px solid rgba(255, 120, 180, 0.3);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    box-shadow: 0 4px 20px rgba(255, 77, 109, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: celestialPulse 3s ease-in-out infinite;
}

.celestial-heart-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 150, 200, 0.15), transparent);
    animation: celestialShimmer 3s ease-in-out infinite;
}

@keyframes celestialShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

@keyframes celestialPulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(255, 77, 109, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: 0 6px 30px rgba(255, 77, 109, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

.celestial-heart-link:hover,
.celestial-heart-link:active {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 40px rgba(255, 77, 109, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 120, 180, 0.5);
}

.celestial-heart-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(255, 100, 150, 0.6));
    animation: heartbeat 2s infinite;
    flex-shrink: 0;
}

.celestial-heart-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.celestial-heart-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 120, 180, 0.5);
    letter-spacing: 0.02em;
}

.celestial-heart-sub {
    font-size: 0.78rem;
    color: rgba(255, 200, 220, 0.7);
    font-weight: 300;
    margin-top: 2px;
}

.celestial-heart-arrow {
    font-size: 1.4rem;
    color: rgba(255, 150, 200, 0.6);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.celestial-heart-link:hover .celestial-heart-arrow {
    transform: translateX(5px);
    color: rgba(255, 200, 230, 0.9);
}

/* Create your own link section */
.create-your-own {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.create-your-own p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}


/* ========== MUSIC BUTTON ========== */
.music-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: var(--z-overlay);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.music-btn.playing {
    background: var(--primary-color);
    color: white;
    animation: spin 3s linear infinite;
    box-shadow: 0 0 20px rgba(255, 77, 109, 0.6);
}

/* ========== ENTRANCE OVERLAY ========== */
#entrance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #2e1c2b 0%, #0a0a0a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
    transition: opacity 1s ease, visibility 1s ease;
}

#entrance-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gift-container {
    text-align: center;
    perspective: 1000px;
    cursor: pointer;
}

.gift-box {
    position: relative;
    width: 150px;
    height: 120px;
    margin: 0 auto;
    animation: shakeBox 1.5s infinite ease-in-out;
    transform-style: preserve-3d;
    transition: transform 1s ease;
}

@keyframes shakeBox {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(3deg) scale(1.02);
    }

    75% {
        transform: rotate(-3deg) scale(1.02);
    }
}

.box-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.ribbon-body {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 100%;
    background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
}

.lid {
    position: absolute;
    top: -25px;
    left: -8px;
    width: 166px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: all 0.5s ease;
    transform-origin: top center;
}

.ribbon-v {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 100%;
    background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
}

.ribbon-h {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 35px;
    background: linear-gradient(90deg, #fff 0%, #f0f0f0 100%);
}

.gift-box.open {
    animation: none;
}

.gift-box.open .lid {
    animation: flyLid 1.2s forwards cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes flyLid {
    0% {
        transform: translateY(0) rotate(0);
    }

    40% {
        transform: translateY(-50px) rotate(-15deg);
    }

    100% {
        transform: translateY(-500px) rotate(-50deg) translateX(80px);
        opacity: 0;
    }
}

.hint-text {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 60px;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 1px;
    animation: fadeInText 2s infinite alternate;
}

@keyframes fadeInText {
    from {
        opacity: 0.5;
        transform: translateY(0);
    }

    to {
        opacity: 1;
        transform: translateY(-5px);
    }
}

/* ========== FLOATING HEARTS ========== */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    bottom: -30px;
    font-size: 24px;
    animation: floatUp linear forwards;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.5) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-100vh) scale(1.2) rotate(360deg);
        opacity: 0;
    }
}

/* ========== SHOOTING STARS ========== */
.star {
    position: fixed;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.5);
    animation: shootingStar 3s linear forwards;
    z-index: var(--z-background);
}

.star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent);
}

@keyframes shootingStar {
    0% {
        transform: rotate(215deg) translateX(0);
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        transform: rotate(215deg) translateX(-800px);
        opacity: 0;
    }
}

/* ========== CURSOR PARTICLES ========== */
.cursor-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: fadeParticle 1s forwards;
    z-index: 9998;
}

@keyframes fadeParticle {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

/* ========== CLICK HEARTS ========== */
.click-heart {
    position: fixed;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ff4d6d"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') no-repeat center/contain;
    pointer-events: none;
    z-index: 9999;
    animation: burstHeart 1s ease-out forwards;
}

@keyframes burstHeart {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(var(--x), var(--y)) scale(1.5) rotate(var(--r));
        opacity: 0;
    }
}

/* ========== LOVE BUBBLES ========== */
.love-bubble {
    position: fixed;
    bottom: -80px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
    box-shadow: 0 5px 20px rgba(255, 77, 109, 0.2);
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 600;
    pointer-events: none;
    z-index: 50;
    animation: loveBubbleUp 7s linear forwards;
}

.love-bubble::before {
    content: '❤️ ';
    filter: drop-shadow(0 0 5px var(--primary-color));
}

@keyframes loveBubbleUp {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: translateY(-30px) scale(1);
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-110vh) scale(1);
        opacity: 0;
    }
}

/* ========== FOOTER ========== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    text-align: center;
    z-index: var(--z-overlay);
    pointer-events: none;
}

.footer-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    padding: 10px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-light);
}

.footer a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    pointer-events: auto;
    transition: var(--transition-fast);
}

.footer a:hover {
    color: var(--primary-color);
}

.footer .divider {
    opacity: 0.5;
}

/* ========== 3D CARD GLARE ========== */
.card-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
    :root {
        --spacing-xl: 2rem;
    }

    .card {
        padding: var(--spacing-lg) var(--spacing-sm);
        margin: var(--spacing-sm);
        max-height: 85vh;
        overflow-y: auto;
    }

    h1 {
        font-size: 1.5rem;
    }

    .btn {
        width: 100%;
        padding: 14px 24px;
    }

    .btn-no {
        width: auto;
        min-width: 120px;
    }

    .btn-group {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .music-btn {
        bottom: 70px;
        left: 15px;
        width: 48px;
        height: 48px;
    }

    .footer-content {
        font-size: 0.75rem;
        padding: 8px 15px;
    }

    .gift-box {
        transform: scale(0.85);
    }

    .share-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .love-counter {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }

    .counter-text {
        align-items: center;
    }

    .counter-value {
        font-size: 2.5rem;
    }

    .link-box {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    #generated-link {
        text-align: center;
        padding: 12px;
    }

    #copy-btn {
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
        padding: 12px;
    }
}

/* ========== HIDDEN UTILITY ========== */
.hidden {
    display: none !important;
}

/* ========== SWIPEABLE CARDS ========== */
.wishes-container {
    position: relative;
    width: 100%;
    margin: var(--spacing-lg) auto;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-stack {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 200px;
}

.wish-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff, #fff0f3);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(255, 77, 109, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transform-origin: 50% 100%;
    overflow: hidden;
}

.wish-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    opacity: 0.5;
    pointer-events: none;
}

.wish-card:nth-last-child(1) {
    transform: scale(1) translateY(0) rotate(0deg);
    z-index: 3;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.12),
        0 10px 20px rgba(255, 77, 109, 0.15);
}

.wish-card:nth-last-child(2) {
    transform: scale(0.96) translateY(12px);
    opacity: 0.7;
    z-index: 2;
    filter: brightness(0.95);
}

.wish-card:nth-last-child(3) {
    transform: scale(0.92) translateY(24px);
    opacity: 0.4;
    z-index: 1;
    filter: brightness(0.9);
}

.wish-card:nth-last-child(n+4) {
    opacity: 0;
    pointer-events: none;
}

.wish-card.moving {
    transition: none;
    cursor: grabbing;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.wish-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transform: translateZ(20px);
}

.wish-content {
    font-size: 1.3rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.4;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(255, 77, 109, 0.1);
    padding: 0 10px;
    transform: translateZ(10px);
}

.instruction {
    text-align: center;
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.7;
    animation: fadeIn 1s ease 1s backwards;
}

/* QR Code Styles */
#qr-code-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: row;
    /* Change to row to put button on side */
    align-items: center;
    /* Center vertically */
    justify-content: center;
    gap: 1rem;
    /* Reduce gap to fit better */
    animation: fadeIn 0.5s ease;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
}

#qr-code {
    background: white;
    padding: 8px;
    /* Reduce padding */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 150px;
    /* Limit size on mobile */
}

#qr-code img,
#qr-code canvas {
    border-radius: 8px;
    display: block;
    width: 100%;
    /* Make responsive */
    height: auto;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}