/* ============================================
   FEBRUARY LOVE LETTERS - ROMANTIC THEME
   Soft & Elegant Blazor Styles
   ============================================ */

/* === CSS Custom Properties === */
:root {
    /* Primary Colors */
    --soft-blush: #F8E1E7;
    --rose-pink: #E8B4B8;
    --cream: #FFF8F0;
    --champagne: #F7E7CE;
    --dusty-rose: #D4A5A5;
    --warm-gold: #D4AF37;
    --soft-white: #FFFBF7;
    --deep-rose: #C9929A;
    --burgundy-text: #8B5A5A;

    /* Gradients */
    --romantic-gradient: linear-gradient(135deg, #FFF8F0 0%, #F8E1E7 50%, #F7E7CE 100%);
    --anniversary-gradient: linear-gradient(135deg, #F8E1E7 0%, #D4AF37 50%, #E8B4B8 100%);
    --modal-gradient: linear-gradient(180deg, #FFFBF7 0%, #F8E1E7 100%);

    /* Shadows */
    --card-shadow: 0 8px 32px rgba(200, 146, 154, 0.2);
    --hover-shadow: 0 12px 40px rgba(200, 146, 154, 0.35);
    --glow-shadow: 0 0 30px rgba(212, 175, 55, 0.4);

    /* Typography */
    --font-romantic: 'Great Vibes', cursive;
    --font-elegant: 'Playfair Display', Georgia, serif;
    --font-clean: 'Lato', system-ui, sans-serif;

    /* Spacing */
    --container-max: 900px;
    --border-radius: 20px;
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-clean);
    background: var(--romantic-gradient);
    min-height: 100vh;
    color: var(--burgundy-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === Romantic App Container === */
.romantic-app {
    position: relative;
    min-height: 100vh;
}

/* === Background Hearts Container === */
.bg-hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-floating-heart {
    position: absolute;
    animation: bgHeartFloat infinite ease-in-out;
    filter: blur(1px);
}

/* === Sparkles Container === */
.sparkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    font-size: 1rem;
    animation: sparkleGlow 3s infinite ease-in-out;
    opacity: 0;
}

/* === Background Gradient Overlay === */
.background-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background-image:
        radial-gradient(ellipse at 10% 20%, rgba(232, 180, 184, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(248, 225, 231, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
}

/* === Main Calendar Wrapper === */
.calendar-wrapper {
    position: relative;
    z-index: 1;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Header Styles === */
.calendar-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 1rem;
}

/* === Title Container with Hearts === */
.title-container {
    position: relative;
    display: inline-block;
}

.title-hearts {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
}

.title-heart {
    position: absolute;
    font-size: 1.5rem;
    animation: heartPulse 2s infinite ease-in-out;
}

.title-heart.left {
    left: -2.5rem;
    animation-delay: 0s;
}

.title-heart.right {
    right: -2.5rem;
    animation-delay: 0.5s;
}

/* === Animated Title === */
.animate-title {
    animation: titleEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

.animate-subtitle {
    animation: subtitleEntrance 1s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-year {
    animation: yearEntrance 0.8s ease-out 0.7s forwards;
    opacity: 0;
}

/* === Footer Hearts === */
.footer-heart {
    display: inline-block;
    animation: heartPulse 1.5s infinite ease-in-out;
    margin: 0 0.5rem;
}

.title {
    font-family: var(--font-romantic);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: var(--deep-rose);
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(200, 146, 154, 0.2);
}

.subtitle {
    font-family: var(--font-elegant);
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: var(--dusty-rose);
    font-style: italic;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.year {
    font-family: var(--font-clean);
    font-size: 1rem;
    color: var(--rose-pink);
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* === Calendar Container === */
.calendar-container {
    background: var(--soft-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 180, 184, 0.3);
    animation: fadeSlideUp 0.8s ease-out 0.2s backwards;
}

/* === Weekday Headers === */
.weekday-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--soft-blush);
}

.weekday-headers span {
    text-align: center;
    font-family: var(--font-clean);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--dusty-rose);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* === Dates Grid === */
.dates-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

/* === Date Cells === */
.date-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: 50%;
    cursor: pointer;
    font-family: var(--font-elegant);
    font-size: 1.3rem;
    color: var(--burgundy-text);
    box-shadow: 0 4px 15px rgba(200, 146, 154, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid transparent;
    animation: bounceIn 0.4s ease-out backwards;
}

.date-cell:hover {
    transform: scale(1.1);
    background: var(--soft-blush);
    box-shadow: var(--hover-shadow);
    border-color: var(--rose-pink);
}

.date-cell:active {
    transform: scale(0.95);
}

.date-cell.empty {
    background: transparent;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

.date-cell.has-note::after {
    content: '';
    position: absolute;
    bottom: 8px;
    width: 6px;
    height: 6px;
    background: var(--rose-pink);
    border-radius: 50%;
}

/* === Valentine's Day (Feb 14) === */
.date-cell.valentines-day {
    background: linear-gradient(135deg, #FF6B8A, #FF4D6D, #E8B4B8);
    color: white;
    border: 3px solid #FF4D6D;
    font-weight: 600;
    animation: valentinesPulse 1.5s infinite ease-in-out;
    box-shadow: 0 0 25px rgba(255, 77, 109, 0.4);
}

.date-cell.valentines-day::before {
    content: '💘';
    position: absolute;
    top: -10px;
    right: -5px;
    font-size: 1rem;
    animation: cupidArrow 1s infinite ease-in-out;
}

.date-cell.valentines-day::after {
    content: '💕';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    animation: heartFloat 2s infinite ease-in-out;
}

.date-cell.valentines-day:hover {
    transform: scale(1.15);
    box-shadow: 0 0 40px rgba(255, 77, 109, 0.6);
}

@keyframes valentinesPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 77, 109, 0.4);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 77, 109, 0.6), 0 0 50px rgba(255, 107, 138, 0.3);
    }
}

@keyframes cupidArrow {
    0%, 100% { transform: rotate(-15deg) scale(1); }
    50% { transform: rotate(15deg) scale(1.2); }
}

@keyframes heartFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}

/* === Valentine's Question Modal === */
.valentine-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.valentine-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.valentine-modal-content {
    background: linear-gradient(135deg, #FFF0F3, #FFE4E8, #FFDCE2);
    border-radius: var(--border-radius);
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 90vw;
    text-align: center;
    box-shadow: 0 25px 80px rgba(255, 77, 109, 0.35);
    border: 3px solid #FF4D6D;
    position: relative;
    overflow: hidden;
}

.valentine-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 77, 109, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(255, 107, 138, 0.1) 0%, transparent 30%);
    pointer-events: none;
}

.valentine-hearts-shower {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.valentine-heart {
    position: absolute;
    animation: valentineRain 3s linear infinite;
    opacity: 0.6;
}

@keyframes valentineRain {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(400px) rotate(360deg);
        opacity: 0;
    }
}

.valentine-question-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: heartBeat 1s infinite ease-in-out;
    display: block;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
}

.valentine-question {
    font-family: var(--font-romantic);
    font-size: 2.2rem;
    color: #C9184A;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(201, 24, 74, 0.2);
}

.valentine-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.valentine-btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    font-family: var(--font-elegant);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.valentine-btn.yes {
    background: linear-gradient(135deg, #FF4D6D, #C9184A);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 77, 109, 0.4);
}

.valentine-btn.yes:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 77, 109, 0.5);
}

.valentine-btn.no {
    background: linear-gradient(135deg, #E8B4B8, #D4A5A5);
    color: var(--burgundy-text);
    box-shadow: 0 5px 15px rgba(200, 146, 154, 0.3);
    transition: all 0.3s ease;
}

.valentine-btn.no:hover {
    transform: translateY(-2px);
}

/* No button escaping animation */
.valentine-btn.no.escaping {
    animation: noButtonEscape 0.4s ease-in-out;
}

@keyframes noButtonEscape {
    0% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-30px) rotate(-10deg); }
    50% { transform: translateX(30px) rotate(10deg); }
    75% { transform: translateX(-20px) rotate(-5deg); }
    100% { transform: translateX(0) rotate(0); }
}

.valentine-btn.no.shrinking {
    animation: noButtonShrink 0.5s ease-in-out forwards;
}

@keyframes noButtonShrink {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.5); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

/* Valentine celebration after yes */
.valentine-celebration {
    animation: celebrationPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes celebrationPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.valentine-celebration-text {
    font-family: var(--font-romantic);
    font-size: 2.5rem;
    color: #C9184A;
    margin-bottom: 1rem;
}

.valentine-celebration-emoji {
    font-size: 3rem;
    animation: celebrationBounce 0.5s ease-out;
}

@keyframes celebrationBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.valentine-funny-text {
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    color: var(--burgundy-text);
    font-style: italic;
    margin: 1rem 0;
    animation: fadeInUp 0.5s ease-out 0.3s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Anniversary Date (Feb 22) === */
.date-cell.anniversary {
    background: var(--anniversary-gradient);
    color: var(--burgundy-text);
    border: 3px solid var(--warm-gold);
    font-weight: 600;
    font-size: 1.5rem;
    animation: pulseGlow 2s infinite ease-in-out;
    box-shadow: var(--glow-shadow);
}

.date-cell.anniversary::before {
    content: '\1F48D';
    position: absolute;
    top: -8px;
    right: -4px;
    font-size: 1rem;
    animation: sparkle 1.5s infinite ease-in-out;
}

.date-cell.anniversary:hover {
    transform: scale(1.15);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.6);
}

/* === Footer === */
.calendar-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 2rem;
}

.footer-text {
    font-family: var(--font-elegant);
    font-style: italic;
    color: var(--dusty-rose);
    font-size: 1rem;
}

/* === Modal Overlay === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(200, 146, 154, 0.4);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === Note Modal === */
.note-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--modal-gradient);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(200, 146, 154, 0.4);
    border: 1px solid rgba(232, 180, 184, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.note-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.note-modal.anniversary-mode {
    border: 2px solid var(--warm-gold);
    animation: glowPulse 2s ease-in-out infinite;
}

/* === Close Button === */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--soft-blush);
    color: var(--burgundy-text);
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-btn:hover {
    background: var(--rose-pink);
    color: var(--soft-white);
    transform: rotate(90deg);
}

/* === Note Header === */
.note-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.date-display {
    display: inline-block;
    font-family: var(--font-clean);
    font-size: 0.9rem;
    color: var(--rose-pink);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    padding: 0.3rem 1rem;
    background: var(--soft-blush);
    border-radius: 20px;
}

.note-title {
    font-family: var(--font-romantic);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--deep-rose);
    font-weight: 400;
    margin: 0;
}

.anniversary-mode .note-title {
    background: linear-gradient(90deg, var(--deep-rose) 0%, var(--warm-gold) 50%, var(--deep-rose) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s infinite;
}

/* === Note Image === */
.note-image-container {
    margin: 1.5rem 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(200, 146, 154, 0.25);
}

.note-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* === Note Text === */
.note-text {
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--burgundy-text);
    text-align: center;
    white-space: pre-wrap;
}

/* === Anniversary Badge === */
.anniversary-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(232, 180, 184, 0.2) 100%);
    border-radius: 15px;
    border: 2px solid var(--warm-gold);
}

.badge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: sparkle 2s infinite;
}

.badge-text {
    font-family: var(--font-elegant);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--deep-rose);
    text-align: center;
}

/* === Theme Badge === */
.theme-badge {
    display: inline-block;
    font-family: var(--font-clean);
    font-size: 0.75rem;
    color: var(--soft-white);
    background: linear-gradient(135deg, var(--rose-pink), var(--deep-rose));
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* === Gift Hint Box === */
.gift-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(248, 225, 231, 0.3) 100%);
    border-radius: 15px;
    border: 2px dashed var(--rose-pink);
    animation: giftPulse 2s infinite ease-in-out;
}

.gift-icon {
    font-size: 1.5rem;
    animation: giftBounce 1s infinite ease-in-out;
}

.gift-text {
    font-family: var(--font-elegant);
    font-size: 1rem;
    color: var(--burgundy-text);
    font-style: italic;
}

@keyframes giftPulse {
    0%, 100% { border-color: var(--rose-pink); }
    50% { border-color: var(--warm-gold); }
}

@keyframes giftBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* === Future Locked Date === */
.date-cell.future-locked {
    background: linear-gradient(135deg, var(--champagne), var(--soft-blush));
    opacity: 0.7;
    cursor: pointer;
    position: relative;
}

.date-cell.future-locked .lock-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
    animation: lockWiggle 2s infinite ease-in-out;
}

.date-cell.future-locked:hover {
    opacity: 1;
    transform: scale(1.05);
    animation: lockedShake 0.5s ease-in-out;
}

@keyframes lockWiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes lockedShake {
    0%, 100% { transform: scale(1.05) translateX(0); }
    25% { transform: scale(1.05) translateX(-3px); }
    75% { transform: scale(1.05) translateX(3px); }
}

/* === Future Modal (Witty Message) === */
.future-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.future-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.future-modal-content {
    background: linear-gradient(135deg, var(--soft-white), var(--champagne));
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    max-width: 400px;
    width: 90vw;
    text-align: center;
    box-shadow: 0 25px 80px rgba(200, 146, 154, 0.4);
    border: 2px solid var(--rose-pink);
    position: relative;
}

.future-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.future-main-icon {
    font-size: 3.5rem;
    display: block;
    animation: peekaboo 2s infinite ease-in-out;
}

.future-sparkle {
    position: absolute;
    font-size: 1rem;
    animation: orbitSparkle 3s infinite ease-in-out;
}

.future-sparkle.s1 { top: 0; right: 0; animation-delay: 0s; }
.future-sparkle.s2 { bottom: 0; left: 0; animation-delay: 1s; }
.future-sparkle.s3 { top: 50%; right: -10px; animation-delay: 2s; }

@keyframes peekaboo {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-10deg); }
    75% { transform: scale(1.1) rotate(10deg); }
}

@keyframes orbitSparkle {
    0%, 100% { opacity: 0.5; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.future-title {
    font-family: var(--font-romantic);
    font-size: 2rem;
    color: var(--deep-rose);
    margin-bottom: 1rem;
}

.future-message {
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    color: var(--burgundy-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.future-countdown {
    padding: 0.75rem 1.5rem;
    background: var(--soft-blush);
    border-radius: 25px;
    display: inline-block;
}

.countdown-text {
    font-family: var(--font-clean);
    font-size: 0.9rem;
    color: var(--deep-rose);
    font-weight: 400;
}

/* === Special Day (Day 1) Calendar Cell === */
.date-cell.special-day {
    background: linear-gradient(135deg, var(--soft-blush), var(--champagne));
    border: 2px solid var(--rose-pink);
    animation: specialDayPulse 2s infinite ease-in-out;
}

.date-cell.special-day .special-icon {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    animation: envelopeFloat 2s infinite ease-in-out;
}

@keyframes specialDayPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(232, 180, 184, 0.4); }
    50% { box-shadow: 0 0 25px rgba(232, 180, 184, 0.6); }
}

@keyframes envelopeFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

/* === Special Letter Modal === */
.special-letter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.special-letter-modal.active {
    opacity: 1;
    visibility: visible;
}

/* === Envelope Container === */
.envelope-container {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.envelope {
    width: 200px;
    height: 140px;
    margin: 0 auto 2rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.envelope:hover {
    transform: scale(1.05);
}

.envelope-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--soft-white) 0%, var(--champagne) 100%);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(200, 146, 154, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.envelope-heart {
    font-size: 3rem;
    animation: heartPulse 1.5s infinite ease-in-out;
    position: relative;
    z-index: 3;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(180deg, var(--rose-pink) 0%, var(--soft-blush) 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform-origin: top center;
    transition: transform 0.8s ease-in-out;
    z-index: 2;
}

.envelope.opening .envelope-flap {
    transform: rotateX(180deg);
}

.envelope.opening .envelope-body {
    animation: envelopeShake 0.5s ease-in-out;
}

@keyframes envelopeShake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.envelope-text {
    font-family: var(--font-elegant);
    font-size: 1.3rem;
    color: var(--burgundy-text);
    font-style: italic;
    margin-bottom: 1.5rem;
    animation: textFade 1s ease-out 0.3s backwards;
}

.open-letter-btn, .read-letter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--rose-pink), var(--deep-rose));
    color: white;
    border: none;
    border-radius: 30px;
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(200, 146, 154, 0.4);
}

.open-letter-btn:hover, .read-letter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(200, 146, 154, 0.5);
}

.btn-heart, .btn-arrow {
    animation: pulse 1s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* === Teaser Container === */
.teaser-container {
    text-align: center;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.teaser-container.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.teaser-note {
    background: var(--soft-white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 50px rgba(200, 146, 154, 0.3);
    max-width: 350px;
    margin: 0 auto 2rem;
    position: relative;
    border: 1px solid var(--soft-blush);
}

.teaser-decoration {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.teaser-decoration.top {
    margin-bottom: 1rem;
}

.teaser-decoration.bottom {
    margin-top: 1rem;
    font-family: var(--font-romantic);
    font-size: 1.5rem;
    color: var(--deep-rose);
}

.teaser-text {
    font-family: var(--font-elegant);
    font-size: 1.2rem;
    color: var(--burgundy-text);
    line-height: 1.8;
    font-style: italic;
}

/* === Letter Container === */
.letter-container {
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s ease;
    position: relative;
    background: var(--soft-white);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
}

/* Close button for letter container - sticky at top */
.letter-container > .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1100;
    background: var(--rose-pink);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
}

.letter-container > .close-btn:hover {
    background: var(--deep-rose);
    transform: rotate(90deg) scale(1.1);
}

/* Make the letter paper scrollable, not the container */
.letter-container .letter-paper {
    overflow-y: auto;
    max-height: calc(85vh - 80px);
    margin: 50px 0 20px 0;
}

.letter-container.visible {
    opacity: 1;
    transform: scale(1);
}

.letter-paper {
    background: linear-gradient(180deg, #FFFEF9 0%, #FFF8F0 50%, #F7E7CE 100%);
    padding: 3rem 2.5rem;
    border-radius: 5px;
    box-shadow:
        0 2px 5px rgba(0,0,0,0.1),
        0 20px 60px rgba(200, 146, 154, 0.3);
    position: relative;
    border: 1px solid rgba(200, 146, 154, 0.2);
}

.letter-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            transparent,
            transparent 31px,
            rgba(200, 146, 154, 0.1) 31px,
            rgba(200, 146, 154, 0.1) 32px
        );
    pointer-events: none;
}

.letter-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--soft-blush);
}

.letter-date {
    font-family: var(--font-clean);
    font-size: 0.85rem;
    color: var(--dusty-rose);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.5rem;
}

.letter-title {
    font-family: var(--font-romantic);
    font-size: 2rem;
    color: var(--deep-rose);
    margin: 0;
}

.letter-content {
    position: relative;
    z-index: 1;
}

.letter-paragraph {
    font-family: var(--font-elegant);
    font-size: 1.05rem;
    color: var(--burgundy-text);
    line-height: 2;
    margin-bottom: 1.2rem;
    min-height: 1.5em;
}

.letter-paragraph.signature {
    font-style: italic;
    text-align: right;
    margin-top: 1.5rem;
}

.animated-word {
    display: inline;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease-out;
}

.animated-word.visible {
    opacity: 1;
    transform: translateY(0);
}

.letter-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
}

.letter-seal {
    font-size: 2.5rem;
    animation: sealPulse 2s infinite ease-in-out;
}

@keyframes sealPulse {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.letter-gift-hint {
    margin-top: 1.5rem;
    animation: fadeSlideUp 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes textFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Responsive for Special Letter === */
@media (max-width: 480px) {
    .envelope {
        width: 160px;
        height: 110px;
    }

    .envelope-heart {
        font-size: 2.5rem;
    }

    .letter-paper {
        padding: 2rem 1.5rem;
    }

    .letter-title {
        font-size: 1.6rem;
    }

    .letter-paragraph {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .teaser-note {
        padding: 2rem 1.5rem;
        margin: 0 1rem 2rem;
    }
}

/* === Floating Hearts Container === */
.floating-hearts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.floating-heart {
    position: absolute;
    bottom: -20px;
    animation: floatUp 4s ease-out forwards;
    opacity: 0.7;
    font-size: 1.2rem;
}

/* === Confetti === */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    animation: confettiFall 4s ease-out forwards;
}

.confetti-piece.square {
    width: 10px;
    height: 10px;
}

.confetti-piece.circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.confetti-piece.heart {
    background: none !important;
    width: auto;
    height: auto;
    font-size: 1rem;
}

/* === Animations === */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(212, 175, 55, 0.3),
            0 4px 15px rgba(200, 146, 154, 0.2);
    }
    50% {
        box-shadow:
            0 0 40px rgba(212, 175, 55, 0.5),
            0 0 60px rgba(232, 180, 184, 0.3),
            0 4px 15px rgba(200, 146, 154, 0.2);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    25% {
        opacity: 0.8;
        transform: scale(1.1) rotate(5deg);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2) rotate(-5deg);
    }
    75% {
        opacity: 0.9;
        transform: scale(1.05) rotate(3deg);
    }
}

@keyframes floatUp {
    0% {
        opacity: 0.8;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-400px) rotate(45deg) scale(0.5);
    }
}

/* === Music Toggle Button === */
.music-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--rose-pink), var(--deep-rose));
    border: none;
    border-radius: 30px;
    color: white;
    font-family: var(--font-clean);
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(200, 146, 154, 0.4);
    transition: all 0.3s ease;
    animation: musicButtonEntrance 1s ease-out 1s backwards;
}

.music-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 35px rgba(200, 146, 154, 0.5);
}

.music-toggle:active {
    transform: scale(0.95);
}

.music-toggle .music-icon {
    font-size: 1.3rem;
    animation: musicIconBounce 1s ease-in-out infinite;
}

.music-toggle.playing .music-icon {
    animation: musicIconPulse 0.5s ease-in-out infinite;
}

.music-toggle .music-label {
    font-weight: 500;
}

.music-toggle .music-waves {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
}

.music-toggle .wave {
    width: 3px;
    background: white;
    border-radius: 2px;
    animation: waveAnimation 0.5s ease-in-out infinite;
}

.music-toggle .wave:nth-child(1) {
    height: 8px;
    animation-delay: 0s;
}

.music-toggle .wave:nth-child(2) {
    height: 14px;
    animation-delay: 0.1s;
}

.music-toggle .wave:nth-child(3) {
    height: 10px;
    animation-delay: 0.2s;
}

@keyframes musicButtonEntrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes musicIconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes musicIconPulse {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.15) rotate(5deg); }
}

@keyframes waveAnimation {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

/* Mobile adjustments for music button */
@media (max-width: 480px) {
    .music-toggle {
        bottom: 15px;
        right: 15px;
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .music-toggle .music-icon {
        font-size: 1.1rem;
    }
}

/* === Landing Page Animations === */
@keyframes bgHeartFloat {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) translateX(20px) rotate(10deg);
    }
    50% {
        transform: translateY(-15px) translateX(-15px) rotate(-5deg);
    }
    75% {
        transform: translateY(-40px) translateX(10px) rotate(5deg);
    }
}

@keyframes sparkleGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

@keyframes titleEntrance {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
        filter: blur(10px);
    }
    50% {
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes subtitleEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px);
        letter-spacing: 0.3em;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 0.05em;
    }
}

@keyframes yearEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    60% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes heartPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(232, 180, 184, 0.3), 0 25px 80px rgba(200, 146, 154, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.4), 0 25px 80px rgba(200, 146, 154, 0.4);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(-10vh) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* === Stagger Animations for Date Cells === */
.date-cell:nth-child(1) { animation-delay: 0.1s; }
.date-cell:nth-child(2) { animation-delay: 0.12s; }
.date-cell:nth-child(3) { animation-delay: 0.14s; }
.date-cell:nth-child(4) { animation-delay: 0.16s; }
.date-cell:nth-child(5) { animation-delay: 0.18s; }
.date-cell:nth-child(6) { animation-delay: 0.2s; }
.date-cell:nth-child(7) { animation-delay: 0.22s; }
.date-cell:nth-child(8) { animation-delay: 0.24s; }
.date-cell:nth-child(9) { animation-delay: 0.26s; }
.date-cell:nth-child(10) { animation-delay: 0.28s; }
.date-cell:nth-child(11) { animation-delay: 0.3s; }
.date-cell:nth-child(12) { animation-delay: 0.32s; }
.date-cell:nth-child(13) { animation-delay: 0.34s; }
.date-cell:nth-child(14) { animation-delay: 0.36s; }
.date-cell:nth-child(15) { animation-delay: 0.38s; }
.date-cell:nth-child(16) { animation-delay: 0.4s; }
.date-cell:nth-child(17) { animation-delay: 0.42s; }
.date-cell:nth-child(18) { animation-delay: 0.44s; }
.date-cell:nth-child(19) { animation-delay: 0.46s; }
.date-cell:nth-child(20) { animation-delay: 0.48s; }
.date-cell:nth-child(21) { animation-delay: 0.5s; }
.date-cell:nth-child(22) { animation-delay: 0.52s; }
.date-cell:nth-child(23) { animation-delay: 0.54s; }

/* === Responsive Styles === */
@media (max-width: 768px) {
    .calendar-wrapper {
        padding: 1.5rem 1rem 2rem;
    }

    .calendar-container {
        padding: 1rem;
    }

    .dates-grid {
        gap: 6px;
    }

    .date-cell {
        font-size: 1rem;
    }

    .date-cell.anniversary {
        font-size: 1.2rem;
    }

    .weekday-headers span {
        font-size: 0.7rem;
    }

    .note-modal {
        padding: 2rem 1.5rem;
    }

    .close-btn {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .title {
        margin-bottom: 0.3rem;
    }

    .dates-grid {
        gap: 4px;
    }

    .date-cell {
        font-size: 0.9rem;
    }

    .date-cell.anniversary::before {
        font-size: 0.8rem;
        top: -6px;
        right: -2px;
    }

    .note-modal {
        width: 95%;
        padding: 1.5rem 1rem;
        max-height: 90vh;
    }

    .note-title {
        font-size: 1.6rem;
    }

    .note-text {
        font-size: 1rem;
    }

    .anniversary-badge {
        padding: 1rem;
    }

    .badge-text {
        font-size: 1rem;
    }
}

/* === Very Small Screens (iPhone SE, etc.) === */
@media (max-width: 360px) {
    .calendar-wrapper {
        padding: 1rem 0.5rem;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .date-cell {
        font-size: 0.8rem;
    }
}

/* === Touch-specific styles === */
@media (hover: none) and (pointer: coarse) {
    .date-cell:hover {
        transform: none;
        background: var(--cream);
        box-shadow: 0 4px 15px rgba(200, 146, 154, 0.15);
        border-color: transparent;
    }

    .date-cell:active {
        transform: scale(0.95);
        background: var(--soft-blush);
    }

    .date-cell.anniversary:hover {
        transform: none;
    }

    .date-cell.anniversary:active {
        transform: scale(0.95);
    }
}

/* === Safe area insets for notched phones === */
@supports (padding: max(0px)) {
    .calendar-wrapper {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
        padding-bottom: max(3rem, env(safe-area-inset-bottom));
    }

    .note-modal {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === Focus States === */
.date-cell:focus {
    outline: 3px solid var(--rose-pink);
    outline-offset: 3px;
}

.close-btn:focus {
    outline: 3px solid var(--rose-pink);
    outline-offset: 3px;
}

/* === Error UI === */
#blazor-error-ui {
    background: var(--rose-pink);
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    z-index: 1000;
    padding: 0.5rem;
    text-align: center;
    color: white;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
}
