* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    width: 100%;
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar,
.wish-card-container::-webkit-scrollbar,
html::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
body,
html,
.wish-card-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ========== OPENING SCREEN ========== */
.opening-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.opening-screen.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Animated Diya */
.diya-container {
    margin-bottom: 30px;
}

.diya {
    width: 80px;
    height: 80px;
    background: linear-gradient(to bottom, #ff8c00 0%, #ff6b00 100%);
    border-radius: 50% 50% 40% 40%;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.flame {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 40px;
    background: linear-gradient(to top, #ff6b00, #ffeb3b, #fff);
    border-radius: 50% 50% 20% 20%;
    box-shadow: 0 0 20px #ffeb3b, 0 0 40px #ff6b00;
    animation: flicker 0.5s ease-in-out infinite alternate;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) scale(1.1); opacity: 0.9; }
}

/* Opening Text */
.opening-text {
    font-size: 3rem;
    color: #fff;
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

.sparkle {
    display: inline-block;
    animation: sparkle 1.5s ease-in-out infinite;
    font-size: 2.5rem;
}

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

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 235, 59, 0.6); }
}

.subtitle {
    font-size: 1.3rem;
    color: #ffd700;
    margin-bottom: 40px;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Open Button */
.open-button {
    padding: 18px 40px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: pulse 2s ease-in-out infinite;
}

.open-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.6);
}

.open-button:active {
    transform: translateY(-2px);
}

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

/* Fireworks */
.fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.firework {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    animation: fireworkAnimation 3s ease-out infinite;
}

.firework:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.firework:nth-child(2) {
    top: 30%;
    right: 20%;
    animation-delay: 1s;
}

.firework:nth-child(3) {
    bottom: 30%;
    left: 50%;
    animation-delay: 2s;
}

@keyframes fireworkAnimation {
    0% { transform: scale(1); opacity: 0; }
    10% { opacity: 1; }
    50% { transform: scale(20); opacity: 0.5; }
    100% { transform: scale(40); opacity: 0; }
}

/* ========== WISH CARD ========== */
.wish-card-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    overflow: visible;
}

.wish-card-container.active {
    opacity: 1;
    pointer-events: all;
}

.wish-card {
    background: linear-gradient(135deg, #fff 0%, #fef9f3 100%);
    border-radius: 30px;
    padding: 50px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: cardAppear 1s ease-out, cardFloat 3s ease-in-out infinite;
    border: 3px solid #ff8c00;
    margin: 0 auto;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.5) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

@keyframes cardFloat {
    0%, 100% { 
        transform: translateY(0px);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    }
    50% { 
        transform: translateY(-10px);
        box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
    }
}

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 30px;
    animation: slideDown 1s ease-out;
}

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

.decoration-line {
    height: 3px;
    background: linear-gradient(to right, transparent, #ff8c00, #ffd700, #ff8c00, transparent);
    margin: 15px 0;
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.festival-title {
    font-size: 2.5rem;
    color: #d97706;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { 
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }
    50% { 
        text-shadow: 2px 2px 8px rgba(217, 119, 6, 0.5), 0 0 20px rgba(255, 140, 0, 0.3);
    }
}

.diya-emoji {
    font-size: 2.5rem;
    animation: rotate 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

/* Card Body */
.card-body {
    color: #333;
    line-height: 1.8;
    animation: fadeIn 1.5s ease-out 0.5s both;
}

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

.greeting {
    text-align: center;
    margin-bottom: 25px;
    animation: scaleIn 1s ease-out 0.8s both;
}

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

.dear {
    font-size: 1.5rem;
    color: #7e22ce;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    animation: colorChange 3s ease-in-out infinite;
}

@keyframes colorChange {
    0%, 100% { color: #7e22ce; }
    50% { color: #d97706; }
}

.message {
    margin: 25px 0;
    text-align: justify;
}

.message p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #444;
    animation: slideInLeft 1s ease-out both;
}

.message p:nth-child(2) {
    animation-delay: 0.3s;
}

.message p:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message strong {
    color: #d97706;
    font-weight: 700;
}

.blessing {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    border: 2px solid #fbbf24;
    animation: pulseBlessing 2s ease-in-out infinite, slideInRight 1s ease-out 1s both;
}

@keyframes pulseBlessing {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(251, 191, 36, 0);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    }
}

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

.blessing p {
    margin: 10px 0;
    font-size: 1.2rem;
    color: #92400e;
    font-weight: 500;
    animation: bounce 2s ease-in-out infinite;
}

.blessing p:nth-child(1) {
    animation-delay: 0s;
}

.blessing p:nth-child(2) {
    animation-delay: 0.3s;
}

.blessing p:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.signature {
    text-align: right;
    margin-top: 40px;
    font-size: 1.2rem;
    color: #666;
    animation: fadeInUp 1s ease-out 1.3s both;
}

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

.your-name {
    font-size: 1.5rem;
    color: #d97706;
    font-weight: 700;
    margin-top: 10px;
}

/* Card Footer */
.card-footer {
    margin-top: 40px;
    margin-bottom: 0;
    text-align: center;
    animation: fadeIn 1s ease-out 1.5s both;
}

.rangoli {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: 
        radial-gradient(circle, #ff6b6b 20%, transparent 20%),
        radial-gradient(circle, #fbbf24 20%, transparent 20%),
        radial-gradient(circle, #10b981 20%, transparent 20%),
        radial-gradient(circle, #3b82f6 20%, transparent 20%);
    background-size: 50% 50%;
    background-position: 0 0, 100% 0, 0 100%, 100% 100%;
    border-radius: 50%;
    animation: rotateRangoli 10s linear infinite, rangoliPulse 2s ease-in-out infinite;
}

@keyframes rotateRangoli {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1); }
}

@keyframes rangoliPulse {
    0%, 100% { 
        box-shadow: 0 0 0 rgba(255, 107, 107, 0);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.6);
    }
}

/* Floating Diyas */
.floating-diya {
    position: absolute;
    font-size: 3rem;
    animation: floatDiya 4s ease-in-out infinite;
    opacity: 0.6;
    pointer-events: none;
}

.diya1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.diya2 {
    top: 20%;
    right: 5%;
    animation-delay: 1s;
}

.diya3 {
    bottom: 20%;
    left: 8%;
    animation-delay: 2s;
}

.diya4 {
    bottom: 15%;
    right: 8%;
    animation-delay: 3s;
}

@keyframes floatDiya {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* Sparkles */
.sparkles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.sparkle-float {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkleFloat 5s ease-in-out infinite;
    opacity: 0;
}

.sparkle-float:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.sparkle-float:nth-child(2) { top: 30%; right: 15%; animation-delay: 1s; }
.sparkle-float:nth-child(3) { top: 50%; left: 20%; animation-delay: 2s; }
.sparkle-float:nth-child(4) { bottom: 30%; right: 10%; animation-delay: 3s; }
.sparkle-float:nth-child(5) { bottom: 20%; left: 15%; animation-delay: 4s; }
.sparkle-float:nth-child(6) { top: 70%; right: 20%; animation-delay: 2.5s; }

@keyframes sparkleFloat {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0; }
    50% { transform: translateY(-30px) scale(1.5); opacity: 1; }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .opening-text {
        font-size: 2rem;
        padding: 0 20px;
    }
    
    .subtitle {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .open-button {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
    
    .diya {
        width: 60px;
        height: 60px;
    }
    
    .flame {
        width: 15px;
        height: 30px;
    }
    
    .wish-card {
        padding: 25px 20px;
        border-radius: 20px;
        margin: 0 auto;
    }
    
    .wish-card-container {
        padding: 30px 15px;
    }
    
    .card-footer {
        margin-bottom: 0;
    }
    
    .festival-title {
        font-size: 1.6rem;
    }
    
    .dear {
        font-size: 1.1rem;
    }
    
    .message p {
        font-size: 0.95rem;
        text-align: left;
    }
    
    .blessing {
        padding: 20px 15px;
    }
    
    .blessing p {
        font-size: 0.95rem;
    }
    
    .signature {
        font-size: 1rem;
    }
    
    .your-name {
        font-size: 1.2rem;
    }
    
    .floating-diya {
        font-size: 2rem;
        display: none;
    }
    
    .rangoli {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .opening-text {
        font-size: 1.5rem;
        padding: 0 15px;
    }
    
    .sparkle {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .open-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .diya {
        width: 50px;
        height: 50px;
    }
    
    .flame {
        width: 12px;
        height: 25px;
        top: -25px;
    }
    
    .wish-card {
        padding: 20px 15px;
        border-radius: 15px;
        border: 2px solid #ff8c00;
        margin: 0 auto;
    }
    
    .wish-card-container {
        padding: 20px 10px;
    }
    
    .card-footer {
        margin-top: 30px;
        margin-bottom: 0;
    }
    
    .festival-title {
        font-size: 1.3rem;
    }
    
    .diya-emoji {
        font-size: 1.5rem;
    }
    
    .dear {
        font-size: 1rem;
    }
    
    .message p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .blessing {
        padding: 15px 10px;
        margin: 20px 0;
    }
    
    .blessing p {
        font-size: 0.85rem;
        margin: 8px 0;
    }
    
    .signature {
        margin-top: 30px;
        font-size: 0.95rem;
    }
    
    .your-name {
        font-size: 1.1rem;
    }
    
    .rangoli {
        width: 60px;
        height: 60px;
    }
    
    .sparkle-float {
        font-size: 1rem;
    }
}
