/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.language-selector select {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9) 0%, rgba(255, 165, 0, 0.9) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a0033;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    outline: none;
}

.language-selector select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.language-selector select option {
    background: #fff;
    color: #1a0033;
    padding: 5px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, 
        #1a0033 0%,    /* Deep purple */
        #2d1b69 25%,   /* Royal purple */
        #1e3c72 50%,   /* Royal blue */
        #2a5298 75%,   /* Lighter royal blue */
        #1a0033 100%   /* Back to deep purple */
    );
    background-size: 400% 400%;
    animation: royalGradient 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

@keyframes royalGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating bokeh lights */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 165, 0, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(255, 193, 7, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(255, 215, 0, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    animation: floatBokeh 20s ease-in-out infinite;
}

@keyframes floatBokeh {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 0.8; }
}

.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    max-width: 100vw;
    animation: fadeInUp 1s ease-out;
}

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

/* Floating sparks animation */
.sparks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 50%, transparent 100%);
    border-radius: 50%;
    animation: floatSpark 8s linear infinite;
}

@keyframes floatSpark {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Corner motifs */
.motifs-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.motif {
    position: absolute;
    width: clamp(180px, 20vw, 300px);
    height: clamp(180px, 20vw, 300px);
    object-fit: contain;
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.motif:hover {
    transform: scale(1.05);
}

.motif-top-left {
    top: 0;
    left: 0;
}

.motif-top-right {
    top: 0;
    right: 0;
}

.motif-bottom-left {
    bottom: 0;
    left: 0;
}

.motif-bottom-right {
    bottom: 0;
    right: 0;
}

/* Hanging oil lamps within motifs */
.hanging-lamps-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.hanging-lamps-vertical {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: clamp(5px, 1vw, 10px);
    top: clamp(180px, 20vh, 250px);
}

.hanging-lamps-vertical.left-side {
    left: clamp(80px, 10vw, 150px);
}

.hanging-lamps-vertical.right-side {
    right: clamp(80px, 10vw, 150px);
}

.lamp-chain {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: gentle-sway 4s ease-in-out infinite;
}

.lamp-chain:nth-child(1) { animation-delay: 0s; }
.lamp-chain:nth-child(2) { animation-delay: 0.8s; }
.lamp-chain:nth-child(3) { animation-delay: 1.6s; }

.chain-link {
    width: 1px;
    height: clamp(15px, 2vw, 25px);
    background: linear-gradient(180deg, #8B4513, #654321);
    border-radius: 1px;
    margin-bottom: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.chain-link.long {
    height: clamp(30px, 4vw, 50px);
}

.chain-link.longer {
    height: clamp(45px, 6vw, 75px);
}

.hanging-lamp {
    width: clamp(25px, 4vw, 35px);
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) 
            drop-shadow(0 0 10px rgba(255, 165, 0, 0.6));
    transition: transform 0.3s ease;
}

.hanging-lamp:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)) 
            drop-shadow(0 0 20px rgba(255, 165, 0, 0.8));
}

/* Main content */
.main-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #FFD700;
    padding: 2rem 1rem 5rem 1rem;
    max-width: 90vw;
}

/* Personalized message for shared links */
.personalized-message {
    position: relative;
    z-index: 4;
    text-align: center;
    margin: 2rem 0;
    padding: 0;
}

.personalized-message h3 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.3rem, 4.5vw, 2rem);
    background: linear-gradient(90deg, #FFD700, #FFF, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 500;
    animation: shimmer 3s linear infinite;
}

.greeting-section {
    margin-bottom: 3rem;
}

.lotus-symbol {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.happy-flower {
    width: clamp(120px, 15vw, 200px);
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.happy-flower:hover {
    transform: scale(1.05);
}

.diwali-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(3.5rem, 11vw, 7rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    letter-spacing: 3px;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 20px rgba(255, 215, 0, 0.6)); }
    50% { filter: brightness(1.2) drop-shadow(0 0 40px rgba(255, 215, 0, 0.9)); }
}

.diwali-title:first-of-type {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 300;
    background: linear-gradient(90deg, #FFD700 0%, #FFF 50%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: -0.5rem;
    animation: shimmer 3s linear infinite;
}

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

.subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.9rem, 2.5vw, 1.5rem);
    margin: 1rem 0;
    color: rgba(255, 215, 0, 0.9);
    letter-spacing: 10px;
    font-weight: 300;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInScale 1s ease-out 0.5s forwards;
}

.light-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
    margin-bottom: 2rem;
    font-style: italic;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Celebration section */
.celebration-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.celebration-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(300px, 40vw, 500px);
    height: clamp(300px, 40vw, 500px);
    background: radial-gradient(circle at center, 
        rgba(255, 215, 0, 0.3) 0%, 
        rgba(255, 165, 0, 0.2) 30%,
        rgba(255, 193, 7, 0.1) 50%,
        transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.child-image {
    width: clamp(150px, 25vw, 250px);
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    position: relative;
    z-index: 2;
}

.diya-flames {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 3;
}

.flame {
    width: 8px;
    height: 15px;
    background: linear-gradient(180deg, #FFD700, #FFA500, #FF6B35);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 1.5s ease-in-out infinite alternate;
}

.floor-diyas {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 3;
}

.diya {
    width: 25px;
    height: 20px;
    background: linear-gradient(45deg, #FF6B35, #FF8E53);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.diya .flame {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 12px;
}

.rangoli {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.flower {
    font-size: 1.2rem;
    animation: rotate 4s linear infinite;
}

/* Premium Name form section */
.name-form-section {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 400px;
    z-index: 1000;
    padding: 1rem;
    text-align: center;
    pointer-events: auto;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
}

.name-form-section:hover {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transform: translateX(-50%) translateY(-2px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.name-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 500;
    color: #FFD700;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.name-input {
    width: 100%;
    max-width: 250px;
    padding: 0.8rem 1rem;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 25px;
    color: #FFD700;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.name-input::placeholder {
    color: rgba(255, 215, 0, 0.5);
    font-weight: 400;
}

.name-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.6);
}

.submit-btn {
    background: #FFD700;
    border: none;
    border-radius: 25px;
    padding: 0.8rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    font-weight: 600;
    color: #1a0033;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.submit-btn:hover {
    background: #FFA500;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

@keyframes goldShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes zoomPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-icon {
    font-size: 1.2em;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
}

/* Personalized message styling */
.personalized-message .sender-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    animation: rainbowGlow 3s ease-in-out infinite;
}

.personalized-message .sender-name span {
    display: inline-block !important;
    animation: letterGlow 2s ease-in-out infinite alternate;
    transition: all 0.3s ease;
    font-weight: 900 !important;
}

.personalized-message .sender-name span:hover {
    transform: scale(1.2);
    filter: brightness(1.5);
}

.personalized-message .wishing-text {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 700;
    background: linear-gradient(45deg, 
        #FF0000, #FF4500, #FFD700, #32CD32, 
        #00CED1, #4169E1, #8A2BE2, #FF1493);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    animation: fadeInUp 1s ease-out 0.5s both, rainbowMove 3s ease-in-out infinite;
}

@keyframes glow {
    0% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    100% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 165, 0, 0.6); }
}

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

@keyframes rainbowGlow {
    0% { filter: brightness(1) saturate(1); }
    25% { filter: brightness(1.2) saturate(1.3); }
    50% { filter: brightness(1.4) saturate(1.5); }
    75% { filter: brightness(1.2) saturate(1.3); }
    100% { filter: brightness(1) saturate(1); }
}

@keyframes letterGlow {
    0% { 
        filter: brightness(1) saturate(1);
        transform: translateY(0px);
    }
    100% { 
        filter: brightness(1.3) saturate(1.4);
        transform: translateY(-2px);
    }
}

@keyframes goldPulse {
    0% { 
        filter: brightness(1) saturate(1);
        transform: scale(1);
    }
    100% { 
        filter: brightness(1.3) saturate(1.2);
        transform: scale(1.02);
    }
}

@keyframes rainbowMove {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* Blessing message */
.blessing-message {
    position: relative;
    text-align: center;
    z-index: 3;
    padding: 2rem 1rem 0 1rem;
    max-width: 90vw;
    margin: 0 auto;
}

.blessing-message p {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: #FFD700;
    opacity: 0.8;
    line-height: 1.4;
}

/* Animations */
@keyframes flicker {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gentle-sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .main-content {
        padding: 1rem 0.5rem 4rem 0.5rem;
    }
    
    .motif {
        width: clamp(140px, 18vw, 220px);
        height: clamp(140px, 18vw, 220px);
    }
    
    .greeting-section {
        margin-bottom: 2rem;
    }
    
    .celebration-section {
        gap: 0.8rem;
    }
    
    .floor-diyas {
        gap: 0.8rem;
    }
    
    .rangoli {
        gap: 0.3rem;
    }
    
    .blessing-message {
        padding: 1rem 0.5rem 0 0.5rem;
    }
    
    .name-form-section {
        padding: 0.8rem;
        bottom: 10px;
        width: calc(100% - 20px);
        max-width: 350px;
    }
    
    .name-input {
        max-width: 200px;
        padding: 0.6rem 0.8rem;
    }
    
    .submit-btn {
        padding: 0.6rem 1.2rem;
        font-size: clamp(0.8rem, 2.5vw, 1rem);
    }
    
    .hanging-lamps-vertical.left-side {
        left: clamp(50px, 8vw, 100px);
        top: clamp(150px, 18vh, 200px);
    }
    
    .hanging-lamps-vertical.right-side {
        right: clamp(50px, 8vw, 100px);
        top: clamp(150px, 18vh, 200px);
    }
    
    .hanging-lamp {
        width: clamp(20px, 3vw, 30px);
    }
    
    .chain-link {
        height: clamp(12px, 2vw, 20px);
    }
    
    .chain-link.long {
        height: clamp(24px, 3vw, 40px);
    }
    
    .chain-link.longer {
        height: clamp(36px, 5vw, 60px);
    }
}

@media (max-width: 480px) {
    .motif {
        width: clamp(100px, 15vw, 180px);
        height: clamp(100px, 15vw, 180px);
    }
    
    .celebration-section {
        gap: 0.5rem;
    }
    
    .floor-diyas {
        gap: 0.5rem;
    }
    
    .diya {
        width: 20px;
        height: 16px;
    }
    
    .diya .flame {
        width: 5px;
        height: 10px;
        top: -10px;
    }
    
    .flower {
        font-size: 1rem;
    }
    
    .hanging-lamps-vertical.left-side {
        left: clamp(30px, 6vw, 70px);
        top: clamp(120px, 15vh, 160px);
    }
    
    .hanging-lamps-vertical.right-side {
        right: clamp(30px, 6vw, 70px);
        top: clamp(120px, 15vh, 160px);
    }
    
    .hanging-lamp {
        width: clamp(15px, 2.5vw, 25px);
    }
    
    .chain-link {
        height: clamp(10px, 1.5vw, 15px);
    }
    
    .chain-link.long {
        height: clamp(20px, 2.5vw, 30px);
    }
    
    .chain-link.longer {
        height: clamp(30px, 4vw, 45px);
    }
}

@media (max-width: 320px) {
    .container {
        padding: 0.25rem;
    }
    
    .main-content {
        padding: 0.5rem 0.25rem;
    }
    
    .motif {
        width: clamp(80px, 12vw, 140px);
        height: clamp(80px, 12vw, 140px);
    }
}


/* Performance optimizations */
.motif, .child-image {
    will-change: transform;
}

.flame {
    will-change: opacity, transform;
}

.flower {
    will-change: transform;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .flame, .flower {
        animation: none;
    }
    
    .motif {
        transition: none;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .motif {
        filter: none;
    }
    
    .flame {
        animation: none;
    }
}

