/* ==========================================
   A & S Romantic Heart Website Styling
   Design System: Deep Midnight & Neon Rose Gold Glow
   ========================================== */

:root {
    --bg-dark: #09030c;
    --bg-gradient: radial-gradient(circle at center, #1e092b 0%, #0c0314 60%, #050108 100%);
    --primary-pink: #ff2a6d;
    --primary-red: #ff0055;
    --accent-gold: #ffd700;
    --rose-glow: rgba(255, 42, 109, 0.4);
    --gold-glow: rgba(255, 215, 0, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(16px);
    --font-heading: 'Playfair Display', serif;
    --font-fancy: 'Great Vibes', cursive;
    --font-sans: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    width: 100vw;
    min-height: 100vh;
    background: var(--bg-dark);
    background-image: var(--bg-gradient);
    color: #ffffff;
    font-family: var(--font-sans);
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ------------------------------------------
   Canvas Background
   ------------------------------------------ */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ------------------------------------------
   Ambient Lights
   ------------------------------------------ */
.ambient-light {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
    animation: floatAmbient 12s infinite alternate ease-in-out;
}

.light-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-pink);
    top: 10%;
    left: 20%;
}

.light-2 {
    width: 500px;
    height: 500px;
    background: #8000ff;
    bottom: 10%;
    right: 15%;
    animation-delay: -6s;
}

.light-3 {
    width: 300px;
    height: 300px;
    background: #ff0055;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
}

@keyframes floatAmbient {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -40px) scale(1.15); }
}

/* ------------------------------------------
   Music Toggle Button
   ------------------------------------------ */
.music-btn {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 100;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-pink);
    border-color: var(--primary-pink);
}

.music-btn .icon-play {
    color: var(--primary-pink);
    animation: pulseIcon 1.5s infinite;
}

.soundwave {
    display: none;
    align-items: center;
    gap: 3px;
    height: 16px;
}

.soundwave span {
    width: 3px;
    height: 100%;
    background: var(--primary-pink);
    border-radius: 3px;
    animation: soundwaveAnim 1s infinite ease-in-out alternate;
}

.soundwave span:nth-child(1) { animation-delay: 0.1s; }
.soundwave span:nth-child(2) { animation-delay: 0.3s; }
.soundwave span:nth-child(3) { animation-delay: 0.2s; }
.soundwave span:nth-child(4) { animation-delay: 0.4s; }

.music-btn.playing .icon-play { display: none; }
.music-btn.playing .soundwave { display: flex; }

@keyframes soundwaveAnim {
    0% { height: 4px; }
    100% { height: 16px; }
}

/* ------------------------------------------
   Main Container
   ------------------------------------------ */
.container {
    position: relative;
    z-index: 10;
    max-width: 800px;
    width: 90%;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Header Tag */
.header-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1s ease-out;
}

.header-tag .sparkle {
    color: var(--accent-gold);
    font-size: 1rem;
}

/* ------------------------------------------
   Heart & Monogram Section
   ------------------------------------------ */
.heart-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.heart-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: heartbeat 1.8s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.heart-wrapper:hover {
    transform: scale(1.08);
}

.glowing-heart-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 25px rgba(255, 0, 85, 0.8))
            drop-shadow(0 0 50px rgba(255, 0, 85, 0.4));
}

.heart-shape {
    transition: all 0.3s ease;
}

/* Monogram A & S */
.monogram-container {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
    pointer-events: none;
}

.letter {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9),
                 0 0 30px var(--accent-gold),
                 0 0 45px var(--primary-pink);
    letter-spacing: -2px;
    line-height: 1;
    animation: letterFloat 3s infinite alternate ease-in-out;
}

.letter-a {
    animation-delay: 0s;
    background: linear-gradient(180deg, #ffffff 30%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.letter-s {
    animation-delay: -1.5s;
    background: linear-gradient(180deg, #ffffff 30%, #ff80bf 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plus-symbol {
    font-family: var(--font-fancy);
    font-size: 3rem;
    color: var(--accent-gold);
    text-shadow: 0 0 20px var(--accent-gold);
    margin: 0 2px;
    transform: translateY(-4px);
    opacity: 0.9;
}

/* Pulse Rings around heart */
.pulse-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 2px solid var(--primary-pink);
    box-shadow: 0 0 20px var(--primary-pink);
    animation: pulseRingAnim 2.5s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
    opacity: 0;
    pointer-events: none;
}

.pulse-ring.delay {
    animation-delay: 1.25s;
}

@keyframes pulseRingAnim {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.08); }
    28% { transform: scale(1); }
    42% { transform: scale(1.12); }
    70% { transform: scale(1); }
    100% { transform: scale(1); }
}

@keyframes letterFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

/* ------------------------------------------
   Subtitle & Typography
   ------------------------------------------ */
.subtitle-box {
    margin-top: 35px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.infinity-symbol {
    font-size: 2.2rem;
    color: var(--accent-gold);
    text-shadow: 0 0 15px var(--accent-gold);
    display: block;
    margin-bottom: 5px;
    animation: glowPulse 2s infinite ease-in-out;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    background: linear-gradient(135deg, #ffffff 0%, #ffe0ec 50%, #ff80ab 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.desc-text {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; filter: drop-shadow(0 0 5px var(--accent-gold)); }
    50% { opacity: 1; filter: drop-shadow(0 0 15px var(--accent-gold)); }
}

/* ------------------------------------------
   Action Buttons
   ------------------------------------------ */
.actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-red) 100%);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(255, 0, 85, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 40px rgba(255, 0, 85, 0.7);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px) scale(1.03);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ------------------------------------------
   Love Counter Card Section
   ------------------------------------------ */
.counter-card {
    margin-top: 40px;
    width: 100%;
    max-width: 600px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
}

.counter-card.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.counter-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.timer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.timer-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 15px 10px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-item span {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px var(--primary-pink);
}

.timer-item label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ------------------------------------------
   Modal / Letter Styling
   ------------------------------------------ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 1, 10, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.modal-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 10, 40, 0.95), rgba(15, 5, 22, 0.95));
    border: 1px solid rgba(255, 42, 109, 0.3);
    border-radius: 28px;
    width: 100%;
    max-width: 520px;
    padding: 35px 30px;
    box-shadow: 0 25px 60px rgba(255, 0, 85, 0.25),
                0 0 40px rgba(0, 0, 0, 0.8);
    text-align: center;
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--primary-pink);
}

.modal-header .modal-heart-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: heartbeat 1.5s infinite;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #ffffff;
}

.modal-header .modal-sub {
    font-size: 0.9rem;
    color: var(--accent-gold);
    margin-top: 4px;
    letter-spacing: 1px;
}

.modal-body {
    margin: 25px 0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typewriter-content {
    font-family: var(--font-fancy);
    font-size: 1.8rem;
    line-height: 1.5;
    color: #ffe6f0;
    text-shadow: 0 0 10px rgba(255, 42, 109, 0.5);
}

.btn-heart-burst {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #ff9900 100%);
    color: #1a0500;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-heart-burst:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.7);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

/* ------------------------------------------
   Responsive Layout (Mobile Adaptations)
   ------------------------------------------ */
@media (max-width: 600px) {
    .heart-wrapper {
        width: 220px;
        height: 220px;
    }

    .letter {
        font-size: 3.2rem;
    }

    .plus-symbol {
        font-size: 2.2rem;
    }

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

    .desc-text {
        font-size: 0.95rem;
    }

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

    .timer-item span {
        font-size: 1.8rem;
    }

    .modal-card {
        padding: 25px 20px;
    }

    .typewriter-content {
        font-size: 1.4rem;
    }
}
