/* ===== GLOBAL STYLES & VARIABLES ===== */
:root {
    --primary-red: #ff3366;
    --christmas-green: #2ecc71;
    --christmas-gold: #ffd700;
    --dark-blue: #0a192f;
    --light-blue: #64b5f6;
    --snow-white: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial Rounded MT Bold', 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #1a1a2e 25%, #16213e 50%, #0f3460 100%);
    background-size: 400% 400%;
    animation: galaxyShift 20s ease infinite;
    color: var(--snow-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

@keyframes galaxyShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== ANIMATED BACKGROUND ELEMENTS ===== */
.bg-decoration {
    position: fixed;
    z-index: 0;
    pointer-events: none;
}

.twinkle-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite alternate;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.5);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===== SNOWFALL ENHANCED ===== */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: white;
    font-size: 1.5em;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
    animation: snowFall linear forwards;
    user-select: none;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

.heart-flake {
    color: #ff6b8b;
    font-size: 1.8em;
    animation: heartFloat 4s ease-in-out infinite;
}

@keyframes snowFall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes heartFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

/* ===== SCREEN MANAGEMENT ===== */
.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
    z-index: 10;
    visibility: hidden;
}

.screen.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* ===== GLASSMORPHIC CONTAINERS ===== */
.card, .wishes-container {
    background: var(--glass-bg);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: auto;
    max-width: 90%;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
    transition: var(--transition-smooth);
}

.card::before, .wishes-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--christmas-green), var(--christmas-gold), var(--primary-red));
    border-radius: 24px 24px 0 0;
}

.card:hover, .wishes-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(31, 38, 135, 0.3);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-family: 'Brush Script MT', 'Segoe Script', cursive;
    font-weight: normal;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: var(--text-shadow);
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(to right, var(--christmas-gold), var(--primary-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 40px;
}

h2 {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 30px;
    position: relative;
    text-align:center;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--christmas-gold), transparent);
    border-radius: 3px;
}

.big-number {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--christmas-gold), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin: 20px 0;
    display: block;
    line-height: 1;
    font-family: 'Arial Black', sans-serif;
    text-align: center;
}

.sub-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 16px;
    min-width: 120px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.stat-item p {
    margin: 0;
    line-height: 1.4;
}

.stat-item p:first-child {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-item p:last-child {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--christmas-gold);
}

/* ===== BUTTONS ===== */
.btn-main {
    background: linear-gradient(135deg, var(--primary-red), #ff758c);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.3rem;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 40px;
    box-shadow: 0 10px 20px rgba(255, 51, 102, 0.3);
    transition: var(--transition-smooth);
    font-weight: bold;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 51, 102, 0.5);
}

.btn-main:hover::before {
    left: 100%;
}

.btn-main:active {
    transform: translateY(-2px);
}

.nav-arrow {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    font-size: 2rem;
    cursor: pointer;
    margin-top: 30px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.nav-arrow:hover {
    background: var(--primary-red);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 20px var(--primary-red);
}

/* ===== GIFT SECTION ===== */
.gift-container {
    position: relative;
    margin: 60px 0;
    perspective: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gift {
    width: 220px;
    height: 220px;
    position: relative;
    transform-style: preserve-3d;
    animation: giftFloat 5s ease-in-out infinite;
    cursor: pointer;
}

@keyframes giftFloat {
    0%, 100% { 
        transform: translateY(0) rotateX(5deg) rotateY(5deg); 
    }
    25% { 
        transform: translateY(-25px) rotateX(-5deg) rotateY(10deg); 
    }
    50% { 
        transform: translateY(-10px) rotateX(5deg) rotateY(-5deg); 
    }
    75% { 
        transform: translateY(-25px) rotateX(-10deg) rotateY(-5deg); 
    }
}

/* Gift Box Base */
.gift-box {
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, #ff5e62 0%, #ff9966 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.1) 10px,
            rgba(255, 255, 255, 0.1) 20px
        );
    border-radius: 15px;
    position: absolute;
    box-shadow: 
        inset 0 0 40px rgba(0, 0, 0, 0.3),
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 15px rgba(255, 94, 98, 0.2);
    overflow: hidden;
}

/* Gift Pattern */
.gift-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.2) 45%, rgba(255, 255, 255, 0.2) 55%, transparent 55%),
        linear-gradient(transparent 45%, rgba(255, 255, 255, 0.2) 45%, rgba(255, 255, 255, 0.2) 55%, transparent 55%);
    background-size: 30px 30px;
    opacity: 0.3;
    mix-blend-mode: overlay;
}

/* Gift Ribbon */
.gift-ribbon {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.gift-ribbon::before,
.gift-ribbon::after {
    content: '';
    position: absolute;
    background: linear-gradient(45deg, var(--christmas-gold), #ffed4e);
    border: 3px solid #e6c300;
}

.gift-ribbon::before {
    /* Horizontal ribbon */
    width: 100%;
    height: 25px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.gift-ribbon::after {
    /* Vertical ribbon */
    width: 25px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Gift Lid */
.gift-lid {
    width: 110%;
    height: 35%;
    background: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
    position: absolute;
    top: -20%;
    left: -5%;
    border-radius: 15px 15px 0 0;
    z-index: 3;
    transform-origin: bottom center;
    transition: transform 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 
        0 -15px 30px rgba(0, 0, 0, 0.3),
        inset 0 -10px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-lid::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    bottom: 15px;
}

/* Gift Bow */
.gift-bow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--christmas-gold), #ffed4e);
    border-radius: 50% 50% 0 50%;
    transform: rotate(45deg);
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
}

.gift-bow::before,
.gift-bow::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border: 25px solid var(--christmas-gold);
    border-radius: 50%;
    opacity: 0.8;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.gift-bow::before {
    left: -60px;
    top: -30px;
    border-right-color: transparent;
    border-bottom-color: transparent;
}

.gift-bow::after {
    right: -60px;
    top: -30px;
    border-left-color: transparent;
    border-bottom-color: transparent;
}

/* Bow Center */
.gift-bow-center {
    position: absolute;
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    z-index: 1;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Gift Opening Animation */
.gift.open .gift-lid {
    transform: translateY(-120px) rotateX(-130deg);
}

.gift.open .gift-bow {
    animation: bowFly 1.5s ease-out forwards;
}

@keyframes bowFly {
    0% {
        transform: translateX(-50%) rotate(45deg);
        top: -40px;
    }
    50% {
        transform: translateX(-50%) rotate(720deg) scale(1.3);
        top: -100px;
    }
    100% {
        transform: translateX(-50%) rotate(1440deg) scale(1);
        top: -200px;
        opacity: 0;
    }
}

/* Gift Sparkles */
.gift-sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    filter: blur(1px);
}

/* ===== CONFETTI ===== */
.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    background: linear-gradient(45deg, var(--christmas-red), var(--christmas-gold));
    border-radius: 3px;
    animation: confettiExplode 2s ease-out forwards;
    z-index: 20;
    transform-origin: center;
}

@keyframes confettiExplode {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x, 200px), var(--y, 600px)) scale(0) rotate(1440deg);
        opacity: 0;
    }
}

/* ===== WISHES SECTION ===== */
.wishes-container {
    max-width: 1000px;
}

.wishes-header {
    margin-bottom: 30px;
}

.wishes-body {
    font-size: 1.3rem;
    line-height: 1.8;
    text-align: center;
    padding: 20px 0;
}

.wish-item {
    padding: 15px;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--christmas-green);
    transition: var(--transition-smooth);
}

.wish-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
    border-left-color: var(--christmas-gold);
}

/* ===== FINAL SCREEN ===== */
#fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.love-text {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.love-text h1 {
    font-size: 4.5rem;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--primary-red), var(--christmas-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 0, 85, 0.5);
}

.heart-beat {
    font-size: 6rem;
    color: var(--primary-red);
    display: inline-block;
    animation: heartbeat 1.2s ease-in-out infinite;
    text-shadow: 0 0 40px currentColor;
    margin: 40px 0;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.1); }
    20% { transform: scale(1); }
    30% { transform: scale(1.15); }
    40% { transform: scale(1); }
}

.final-message {
    font-size: 1.4rem;
    line-height: 1.8;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== HIGHLIGHTS & ICONS ===== */
.highlight {
    color: var(--christmas-gold);
    font-weight: bold;
    text-shadow: 0 0 10px currentColor;
}

.icon {
    font-size: 4rem;
    margin: 20px 0;
    display: block;
    color: var(--christmas-green);
    text-shadow: 0 0 20px currentColor;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .card, .wishes-container {
        padding: 30px 20px;
        width: 100%;
    }
    
    h1 { font-size: 2.8rem; }
    h2 { 
       font-size: 1.8rem;
       text-align: center; 

}
    .big-number { font-size: 4rem; }
    
    .gift {
        width: 150px;
        height: 150px;
    }
    
    .love-text h1 { font-size: 3.5rem; }
    .heart-beat { font-size: 4.5rem; }
    
    .btn-main {
        padding: 15px 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .sub-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-item {
        width: 100%;
        max-width: 250px;
    }
    
    .wish-item {
        font-size: 1.1rem;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--christmas-green), var(--christmas-gold));
    border-radius: 10px;
}

/* ===== LOADING STATE ===== */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.loading-spinner::after {
    content: '';
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--christmas-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

p {
  text-align:center;
  }

.justify-text {
    text-align: justify;
}

.image-container {
    text-align: center;
    margin-bottom: 20px;
    display:fit-content;
}

i {
  background: linear-gradient(45deg, #44ff00, #3ef9a2); 
  -webkit-background-clip: text; 
  -moz-background-clip: text; 
  background-clip: text; 
  color: transparent;
  text-align: center;
}