
/* =========================================
   DIWALI - UMBRACO WEBSITE CSS
   ========================================= */
.right-side-icon{display: flex; align-items: center; justify-content: center;}
.right-side-icon li{    margin: 0 5px;}
/* HEADER DIYA ICON */

.right-side-icon .home-diya-btn {
     position: relative;
    width: 40px;
    height: 40px;
    display: block;
    cursor: pointer;
    line-height: 0;
    margin-right: 6px;
     isolation: isolate;
    -webkit-tap-highlight-color: transparent;
}

.right-side-icon .diya-container {
    position: relative;
    width: 40px;
    height: 40px;
    min-width:40px;
    min-height: 40px;
    overflow: visible;
}

.right-side-icon .photo-diya {
    width: 100%;
    height: 100%;
}

.right-side-icon .home-diya-btn:focus-visible {
    outline: 2px solid #f5c96d;
    outline-offset: 3px;
}

/* PAGE SCROLL CONTROL */

html.diwali-overlay-open,
body.diwali-overlay-open {
    overflow: hidden !important;
}

#diwaliOverlay,
#diwaliOverlay * {
    box-sizing: border-box;
}

/* ANIMATIONS */

@keyframes floatDiya {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes flameFlicker {
    0% { transform: scale(1) rotate(-1deg); }
    33% { transform: scale(1.04, 0.96) rotate(1.5deg); }
    66% { transform: scale(0.97, 1.03) rotate(-1.5deg); }
    100% { transform: scale(1.02, 0.98) rotate(0.5deg); }
}

/* =========================================
   MAIN DIWALI OVERLAY
   ========================================= */

#diwaliOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #232853 0%, #0d1027 100%);
    z-index: 2147483000;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease, background 0.5s ease;
}

#diwaliOverlay.active {
    display: block;
    opacity: 1;
}

@supports (height: 100dvh) {
    #diwaliOverlay {
        height: 100dvh;
    }
}

/* CLOSE BUTTON */

#diwaliOverlay .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #da8105;
    border: none;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);

}

#diwaliOverlay .close-btn:hover {
    background: #dc2626;
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

/* GAME INFORMATION */

#diwaliOverlay .game-info {
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    color: #fef08a;
    font-size: clamp(12px, 2.5vw, 16px);
    font-weight: 600;
    background: rgba(23, 28, 62, 0.9);
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid rgba(245, 158, 11, 0.5);
    backdrop-filter: blur(8px);
    z-index: 1001;
    pointer-events: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    letter-spacing: 0.5px;
    text-align: center;
    width: 90%;
    max-width: 420px;
}

#diwaliOverlay .diya-counter {
    margin: 15px auto 5px;
    display: table;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    background: #d97706;
    padding: 8px 18px;
    border-radius: 20px;
    z-index: 1001;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* =========================================
   PLACED DIYAS
   ========================================= */

#diwaliOverlay .diya-item {
    position: absolute;
    width: 75px;
    height: 75px;
    transform: translate(-50%, -50%) scale(0);
    animation: popInDiya 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: none;
    z-index: 200;
}

@keyframes popInDiya {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

#diwaliOverlay .diya-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 200, 50, 0.6) 0%, rgba(255, 100, 0, 0.2) 60%, transparent 80%);
    border-radius: 50%;
    animation: glowPulse 1.5s infinite alternate ease-in-out;
}

@keyframes glowPulse {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.7;
    }
    to {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
}

/* =========================================
   RANGOLI DESIGN
   ========================================= */

#diwaliOverlay .rangoli-perspective-wrapper {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 700px;
    perspective: 900px;
    z-index: 300;
    pointer-events: none;
}

#diwaliOverlay .rangoli-container {
    position: relative;
    width: 100%;
    transform: rotateX(68deg) scale(0);
    transform-origin: center bottom;
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.9s ease;
    filter: drop-shadow(0 28px 22px rgba(0, 0, 0, 0.42));
}

#diwaliOverlay .rangoli-container.show {
    transform: rotateX(68deg) scale(1);
    opacity: 1;
}

#diwaliOverlay .rangoli-container::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 55%;
    width: 72%;
    height: 72%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.48) 0%, rgba(0, 0, 0, 0.22) 45%, rgba(0, 0, 0, 0) 72%);
    filter: blur(22px);
    opacity: 0.9;
    z-index: 0;
}

#diwaliOverlay .rangoli-real-img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    z-index: 1;
    filter: drop-shadow(0 0 14px rgba(255, 185, 88, 0.28));
}

/* =========================================
   HAPPY DIWALI 8-PETAL BADGE
   ========================================= */

#diwaliOverlay .happy-diwali-banner {
    position: absolute;
    top: 33%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: clamp(280px, 34vw, 390px);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.8s ease;
}

#diwaliOverlay .happy-diwali-badge-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    pointer-events: none;
}

#diwaliOverlay .happy-diwali-banner.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

#diwaliOverlay .happy-diwali-title {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Comic Sans MS", "Comfortaa", "Comic Neue", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
    font-size: clamp(52px, 5.8vw, 78px);
    font-weight: 900;
    color: #fffaf4;
    line-height: 0.98;
    letter-spacing: -1.8px;
    text-transform: none;
    white-space: nowrap;
    -webkit-text-stroke: 0.6px currentColor;
    text-shadow: none;
}

#diwaliOverlay .happy-diwali-title span:first-child {
    transform: rotate(-2deg);
}

#diwaliOverlay .happy-diwali-title span:last-child {
    transform: rotate(2deg);
    color: #ffe39a;
    font-size: 1.10em;
}

#diwaliOverlay .happy-diwali-sub {
    position: relative;
    z-index: 1;
    color: #fffaf4;
    font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
    font-size: clamp(12px, 1vw, 15px);
    line-height: 1.3;
    margin-top: 12px;
    font-weight: 700;
    letter-spacing: 0;
    max-width: 82%;
}

/* =========================================
   FIREWORKS CANVAS
   ========================================= */

#diwaliOverlay #fxCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 900;
}

/* =========================================
   PHOTO DIYA - COMMON IMAGE STYLES
   ========================================= */

.right-side-icon .photo-diya,
#diwaliOverlay .photo-diya {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.right-side-icon .photo-diya-image,
#diwaliOverlay .photo-diya-image,
.right-side-icon .photo-diya-flame-layer,
#diwaliOverlay .photo-diya-flame-layer {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.right-side-icon .photo-diya-flame-layer,
#diwaliOverlay .photo-diya-flame-layer {
    opacity: 0.22;
    -webkit-mask-image: radial-gradient(ellipse 11.5% 25% at 49.6% 28%, #000 24%, rgba(0,0,0,.82) 44%, transparent 100%);
    mask-image: radial-gradient(ellipse 11.5% 25% at 49.6% 28%, #000 24%, rgba(0,0,0,.82) 44%, transparent 100%);
    transform-origin: 49.6% 36%;
    filter: brightness(1.55) saturate(1.18) blur(.1px);
    animation: photographicFlame 1.05s ease-in-out infinite;
    will-change: transform, opacity, filter;
}

.right-side-icon .photo-diya-halo,
#diwaliOverlay .photo-diya-halo {
    position: absolute;
    left: 49.5%;
    top: 27%;
    width: 24%;
    height: 38%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255,216,96,.30) 0%, rgba(255,164,30,.16) 42%, transparent 76%);
    filter: blur(11px);
    mix-blend-mode: screen;
    animation: photographicGlow .95s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

@keyframes photographicFlame {
    0% {
        opacity: .15;
        transform: translateX(-1.8px) rotate(-2.2deg) scaleX(.95) scaleY(1.02);
        filter: brightness(1.46) saturate(1.12) blur(.1px);
    }
    18% {
        opacity: .34;
        transform: translateX(.6px) rotate(.7deg) scaleX(1.02) scaleY(.98);
        filter: brightness(1.62) saturate(1.22);
    }
    36% {
        opacity: .26;
        transform: translateX(1.7px) rotate(2.4deg) scaleX(1.05) scaleY(.97);
        filter: brightness(1.7) saturate(1.25);
    }
    55% {
        opacity: .19;
        transform: translateX(.1px) rotate(.1deg) scaleX(.98) scaleY(1.03);
        filter: brightness(1.5) saturate(1.16);
    }
    72% {
        opacity: .31;
        transform: translateX(-1.2px) rotate(-1.7deg) scaleX(.96) scaleY(1.01);
        filter: brightness(1.62) saturate(1.2);
    }
    100% {
        opacity: .38;
        transform: translateX(1.1px) rotate(1.9deg) scaleX(1.04) scaleY(.99);
        filter: brightness(1.76) saturate(1.28);
    }
}

@keyframes photographicGlow {
    0% {
        opacity: .40;
        transform: translate(-50%, -50%) scale(.92);
    }
    100% {
        opacity: .92;
        transform: translate(-50%, -50%) scale(1.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .right-side-icon .photo-diya-flame-layer,
    #diwaliOverlay .photo-diya-flame-layer,
    .right-side-icon .photo-diya-halo,
    #diwaliOverlay .photo-diya-halo {
        animation: none;
    }
}

/* =========================================
   MOBILE PORTRAIT
   ========================================= */

@media (max-width: 600px) and (orientation: portrait) {
    #diwaliOverlay .close-btn {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    #diwaliOverlay .diya-counter {
        margin-top: max(14px, env(safe-area-inset-top));
        padding: 7px 14px;
        font-size: 13px;
    }

    #diwaliOverlay .game-info {
        top: 64px;
        padding: 7px 12px;
        width: 87%;
        font-size: 12px;
    }

    #diwaliOverlay .diya-item {
        width: clamp(48px, 16vw, 65px);
        height: clamp(48px, 16vw, 65px);
    }

    #diwaliOverlay .diya-glow {
        width: 105%;
        height: 105%;
    }

    #diwaliOverlay .happy-diwali-banner {
        top: clamp(195px, 34%, 315px);
        width: min(80vw, 330px);
        padding: 22px;
    }

    #diwaliOverlay .happy-diwali-title {
        font-size: clamp(44px, 14vw, 60px);
    }

    #diwaliOverlay .happy-diwali-sub {
        margin-top: 8px;
        font-size: clamp(11px, 2.9vw, 13px);
        line-height: 1.25;
    }

    #diwaliOverlay .rangoli-perspective-wrapper {
        bottom: clamp(38px, 12vh, 95px);
        width: min(94vw, 440px);
        max-width: 440px;
    }
}

/* =========================================
   LANDSCAPE SMALL SCREENS
   ========================================= */

@media (max-height: 500px) and (orientation: landscape) {
    #diwaliOverlay .close-btn {
        top: 10px;
        right: max(12px, env(safe-area-inset-right));
        width: 36px;
        height: 36px;
        font-size: 17px;
    }

    #diwaliOverlay .game-info {
        top: 52px;
        width: min(80vw, 420px);
        padding: 5px 10px;
        font-size: 11px;
    }

    #diwaliOverlay .diya-counter {
        margin-top: 7px;
        padding: 5px 13px;
        font-size: 12px;
    }

    #diwaliOverlay .diya-item {
        width: clamp(30px, 11vh, 52px);
        height: clamp(30px, 11vh, 52px);
    }

    #diwaliOverlay .diya-glow {
        width: 105%;
        height: 105%;
    }

    #diwaliOverlay .happy-diwali-banner {
        top: 31%;
        width: min(48vh, 290px);
        padding: 14px;
    }

    #diwaliOverlay .happy-diwali-title {
        font-size: clamp(28px, 9vh, 46px);
        line-height: 1;
    }

    #diwaliOverlay .happy-diwali-sub {
        margin-top: 5px;
        font-size: clamp(9px, 2vh, 11px);
        line-height: 1.15;
    }

    #diwaliOverlay .rangoli-perspective-wrapper {
        bottom: 10px;
        width: min(54vw, 450px);
        max-width: 450px;
    }

    #diwaliOverlay .rangoli-container.show {
        transform: rotateX(68deg) scale(1);
    }
}

/* VERY SMALL MOBILE */

@media (max-width: 359px) and (max-height: 650px) and (orientation: portrait) {
    #diwaliOverlay .happy-diwali-banner {
        top: 210px;
    }

    #diwaliOverlay .rangoli-perspective-wrapper {
        bottom: 43px;
        width: 96vw;
    }
}

/* =========================================
   FINAL HEADER ICON FIX
   HEADER ONLY - OVERLAY UNAFFECTED
   ========================================= */

/* .right-side-icon .home-diya-btn,
.right-side-icon .diya-container,
.right-side-icon .photo-diya {
    animation: none !important;
    transform: none !important;
    transition: none !important;
    filter: none !important;
}

.right-side-icon .home-diya-btn,
.right-side-icon .diya-container {
    width:50px !important;
    height: 50px !important;
    min-width: 50px;
    min-height: 50px;
} */

.right-side-icon .photo-diya-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
    transition: none !important;
    filter: none !important;
    image-rendering: auto;
}

/* NO DUPLICATE FLAME OR HALO IN HEADER */

.right-side-icon .photo-diya-flame-layer,
.right-side-icon .photo-diya-halo {
    display: none !important;
}


/* Golden-orange round glow */
.right-side-icon .home-diya-btn::before {
    content: "";
    position: absolute;
    inset: -11px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 225, 90, 0.90) 0%,
        rgba(255, 210, 65, 0.65) 28%,
        rgba(255, 190, 45, 0.35) 52%,
        rgba(255, 190, 45, 0) 75%
    );
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
    animation: headerDiyaPulse 2.5s ease-in-out infinite;
}

.right-side-icon .diya-container {
    position: relative;
    z-index: 1;
}

.right-side-icon .photo-diya {
    position: relative;
    width: 100%;
    height: 100%;
    animation: none !important;
    transform: none !important;
}

.right-side-icon .photo-diya-image {
    opacity: 1;
    filter: none !important;
    animation: none !important;
}

/* No duplicate flame or old halo */
.right-side-icon .photo-diya-flame-layer,
.right-side-icon .photo-diya-halo {
    display: none !important;
}

/* Only glow intensity changes */
@keyframes headerDiyaPulse {
    0%, 100% {
        opacity: 0.35;
    }
    50% {
        opacity: 1;
    }
}

/* Hover - brighter glow */
.right-side-icon .home-diya-btn:hover::before {
    animation: none;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .right-side-icon .home-diya-btn::before {
        animation: none;
        opacity: 0.65;
    }
}