
/* =========================================
   ASHISH & AYUSH FEDERATION
   PREMIUM BACKGROUND & 3D MODAL THEME
========================================= */

:root {
    --fx-primary: #211D70;
    --fx-primary-dark: #171448;
    --fx-primary-light: #49459D;
    --fx-secondary: #ED1C24;
    --fx-secondary-dark: #C8101C;
    --fx-white: #FFFFFF;
    --fx-light-blue: #F3F4FC;
    --fx-light-red: #FFF1F2;
    --fx-background: #FAFAFD;
    --fx-text: #202039;
    --fx-border: #E1E3EF;
}

/* =========================================
   GENERAL RESET
========================================= */

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--fx-background);
    min-height: 100vh;
    padding: 2rem 1.5rem;
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
}

/* =========================================
   ANIMATED PAGE BACKGROUND
========================================= */

.animated-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;

    background: linear-gradient(
        135deg,
        #FFFFFF 0%,
        #F3F4FC 35%,
        #FFF1F2 70%,
        #FFFFFF 100%
    );

    background-size: 300% 300%;
    animation: fxBackground 18s ease infinite;
}

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

    50% {
        background-position: 100% 50%;
    }
}

/* Background glowing effects */

.animated-bg::before,
.animated-bg::after {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    filter: blur(65px);
    pointer-events: none;
}

.animated-bg::before {
    top: -180px;
    right: -100px;
    background: rgba(33, 29, 112, .13);
    animation: fxGlow 14s ease-in-out infinite alternate;
}

.animated-bg::after {
    bottom: -180px;
    left: -100px;
    background: rgba(237, 28, 36, .11);
    animation: fxGlow 18s ease-in-out infinite alternate-reverse;
}

@keyframes fxGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(65px, -50px) scale(1.2);
    }
}

/* =========================================
   MOVING DOTS PATTERN
========================================= */

.dots-pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    background-image: radial-gradient(
        circle at 1px 1px,
        rgba(33, 29, 112, .20) 1.2px,
        transparent 1.2px
    );

    background-size: 34px 34px;
    animation: driftDots 45s linear infinite;
    opacity: .65;
}

@keyframes driftDots {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 68px 68px;
    }
}

/* =========================================
   FLOATING ICONS
========================================= */

.floating-icon {
    position: absolute;
    font-size: 1.5rem;
    opacity: .18;
    color: var(--fx-primary) !important;
    pointer-events: none;
    z-index: 1;
    animation: floatIcon 16s infinite alternate ease-in-out;
}

.floating-icon:nth-child(even) {
    color: var(--fx-secondary) !important;
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes floatIcon {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: .15;
    }

    100% {
        transform: translateY(-35px) rotate(12deg);
        opacity: .30;
    }
}

/* =========================================
   SOFT FLOATING ORBS
========================================= */

.soft-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;

    background: rgba(33, 29, 112, .14) !important;

    animation: slowDrift 28s infinite alternate ease-in-out;
}

.soft-orb:nth-child(even) {
    background: rgba(237, 28, 36, .12) !important;
    animation-delay: -8s;
}

@keyframes slowDrift {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: .5;
    }

    100% {
        transform: translate(8%, -6%) scale(1.15);
        opacity: .8;
    }
}

/* =========================================
   PREMIUM MODAL OVERLAY
========================================= */

#pwa-modal {
    background: rgba(23, 20, 72, .72) !important;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    perspective: 1400px;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* =========================================
   PREMIUM 3D MODAL BOX
========================================= */

#pwa-modal .pwa-box {
    position: relative;
    isolation: isolate;

    max-width: 100%;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);

    overflow-x: hidden;
    overflow-y: auto;

    border: 2px solid var(--fx-primary) !important;
    border-top: 5px solid var(--fx-secondary) !important;
    border-radius: 26px;

    background: linear-gradient(
        145deg,
        #FFFFFF 0%,
        #F3F4FC 45%,
        #FFF1F2 75%,
        #FFFFFF 100%
    ) !important;

    background-size: 250% 250% !important;
    background-clip: padding-box;

    box-shadow:
        0 7px 0 #171448,
        0 14px 0 rgba(23, 20, 72, .14),
        0 28px 60px rgba(23, 20, 72, .32),
        0 0 40px rgba(237, 28, 36, .10);

    transform-origin: center center;

    animation:
        fxModalOpen .65s cubic-bezier(.18,.8,.25,1) both,
        fxModalBackground 14s ease infinite;
}

/* 3D modal opening animation */

@keyframes fxModalOpen {
    0% {
        opacity: 0;
        transform:
            perspective(1200px)
            translateY(45px)
            rotateX(-18deg)
            scale(.82);
    }

    70% {
        opacity: 1;
        transform:
            perspective(1200px)
            translateY(-4px)
            rotateX(3deg)
            scale(1.015);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

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

    50% {
        background-position: 100% 50%;
    }
}

/* =========================================
   MODAL FLOATING BUBBLES
   No additional HTML required
========================================= */

#pwa-modal .pwa-box::before,
#pwa-modal .pwa-box::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
}

/* Royal Blue Bubbles */

#pwa-modal .pwa-box::before {
    background-image:

        radial-gradient(
            circle at 15% 85%,
            rgba(33,29,112,.10) 0 24px,
            rgba(33,29,112,.20) 25px,
            transparent 27px
        ),

        radial-gradient(
            circle at 85% 25%,
            rgba(33,29,112,.08) 0 40px,
            rgba(33,29,112,.15) 41px,
            transparent 43px
        ),

        radial-gradient(
            circle at 45% 65%,
            rgba(33,29,112,.07) 0 12px,
            rgba(33,29,112,.15) 13px,
            transparent 15px
        ),

        radial-gradient(
            circle at 70% 95%,
            rgba(33,29,112,.08) 0 20px,
            transparent 22px
        );

    background-size: 100% 100%;
    background-repeat: no-repeat;

    animation: fxBlueBubbles 12s ease-in-out infinite alternate;
}

/* Red Bubbles */

#pwa-modal .pwa-box::after {
    background-image:

        radial-gradient(
            circle at 10% 20%,
            rgba(237,28,36,.08) 0 32px,
            rgba(237,28,36,.16) 33px,
            transparent 35px
        ),

        radial-gradient(
            circle at 92% 80%,
            rgba(237,28,36,.10) 0 25px,
            rgba(237,28,36,.18) 26px,
            transparent 28px
        ),

        radial-gradient(
            circle at 60% 40%,
            rgba(237,28,36,.07) 0 9px,
            rgba(237,28,36,.15) 10px,
            transparent 12px
        ),

        radial-gradient(
            circle at 30% 95%,
            rgba(237,28,36,.10) 0 16px,
            transparent 18px
        );

    background-size: 100% 100%;
    background-repeat: no-repeat;

    animation: fxRedBubbles 15s ease-in-out infinite alternate;
}

@keyframes fxBlueBubbles {
    0% {
        transform: translateY(15px);
        opacity: .55;
    }

    50% {
        transform: translate(8px, -18px);
        opacity: .9;
    }

    100% {
        transform: translate(-10px, -35px);
        opacity: .65;
    }
}

@keyframes fxRedBubbles {
    0% {
        transform: translate(0, 20px);
        opacity: .5;
    }

    50% {
        transform: translate(-12px, -15px);
        opacity: .85;
    }

    100% {
        transform: translate(10px, -40px);
        opacity: .6;
    }
}

/* =========================================
   MODAL CONTENT
========================================= */

#pwa-modal .pwa-box h1,
#pwa-modal .pwa-box h2,
#pwa-modal .pwa-box h3,
#pwa-modal .pwa-box h4 {
    color: var(--fx-primary);
    font-weight: 800;
    overflow-wrap: anywhere;
}

#pwa-modal .pwa-box p {
    color: #626477;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

#pwa-modal .pwa-box img {
    max-width: 100%;
}

/* =========================================
   PREMIUM 3D CLOSE BUTTON
========================================= */

.custom-close-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;

    border: 1px solid rgba(255,255,255,.30);
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
    cursor: pointer;
    color: #FFFFFF;

    background: linear-gradient(
        145deg,
        #FF4249,
        #C8101C
    );

    box-shadow:
        0 3px 0 #9F0B15,
        0 7px 15px rgba(237,28,36,.28);

    transition:
        transform .3s ease,
        background .3s ease,
        box-shadow .3s ease;
}

.custom-close-btn:hover {
    background: linear-gradient(
        145deg,
        #49459D,
        #171448
    );

    transform: rotate(90deg) scale(1.08);

    box-shadow:
        0 3px 0 #171448,
        0 8px 18px rgba(33,29,112,.30);
}

.custom-close-btn:active {
    transform: scale(.94);
}

.custom-close-btn:focus-visible {
    outline: 3px solid #FF4249;
    outline-offset: 4px;
}

.custom-close-btn i {
    font-size: 14px;
    color: #FFFFFF;
}

/* =========================================
   TABLET RESPONSIVE
========================================= */

@media (max-width: 991px) {

    body {
        padding: 1.5rem 1rem;
    }

    .animated-bg::before,
    .animated-bg::after {
        width: 350px;
        height: 350px;
    }

    .floating-icon {
        font-size: 1.3rem;
    }

    #pwa-modal .pwa-box {
        border-radius: 22px;
    }
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media (max-width: 576px) {

    body {
        padding: 1rem 12px;
    }

    .animated-bg::before,
    .animated-bg::after {
        width: 240px;
        height: 240px;
        filter: blur(45px);
    }

    .dots-pattern {
        background-size: 26px 26px;
        opacity: .45;
    }

    .floating-icon {
        font-size: 1.1rem;
    }

    #pwa-modal {
        padding: 12px;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    #pwa-modal .pwa-box {
        width: 100%;
        max-width: 100%;

        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);

        border-radius: 20px;
        border-top-width: 4px !important;

        box-shadow:
            0 5px 0 #171448,
            0 18px 35px rgba(23,20,72,.25);

        animation-duration: .5s, 14s;
    }

    #pwa-modal .pwa-box::before,
    #pwa-modal .pwa-box::after {
        background-size: 85% 85%;
    }

    #pwa-modal .pwa-box h2 {
        font-size: clamp(18px, 5vw, 24px);
    }

    #pwa-modal .pwa-box p {
        font-size: 13px;
    }

    .custom-close-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 360px) {

    body {
        padding: 12px 8px;
    }

    #pwa-modal {
        padding: 8px;
    }

    #pwa-modal .pwa-box {
        border-radius: 16px;

        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
    }

    #pwa-modal .pwa-box h2 {
        font-size: 18px;
    }
}

/* =========================================
   REDUCED MOTION SUPPORT
========================================= */

@media (prefers-reduced-motion: reduce) {

    .animated-bg,
    .animated-bg::before,
    .animated-bg::after,
    .dots-pattern,
    .floating-icon,
    .soft-orb,
    #pwa-modal .pwa-box,
    #pwa-modal .pwa-box::before,
    #pwa-modal .pwa-box::after {
        animation: none !important;
    }

    .custom-close-btn {
        transition: none !important;
    }
}



/* =========================================
   PWA MODAL FINAL FIX
========================================= */

#pwa-modal {
    background: rgba(23, 20, 72, .70) !important;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    padding: 20px !important;
    overflow-y: auto !important;
    perspective: 1200px;
}

/* Premium 3D Modal */

#pwa-modal .pwa-box {
    --primary: #211D70;
    --secondary: #ED1C24;

    position: relative;
    isolation: isolate;

    width: 100% !important;
    max-width: 420px !important;
    height: auto !important;

    max-height: calc(100vh - 50px) !important;
    max-height: calc(100dvh - 50px) !important;

    padding: 35px 28px 28px !important;

    border: 1px solid #E1E3EF !important;
    border-top: 5px solid #ED1C24 !important;
    border-radius: 25px !important;

    background: linear-gradient(
        135deg,
        #FFFFFF,
        #F3F4FC,
        #FFF1F2,
        #FFFFFF
    ) !important;

    background-size: 300% 300% !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    scrollbar-width: none;
    -ms-overflow-style: none;

    box-shadow:
        0 6px 0 #211D70,
        0 12px 0 rgba(33,29,112,.15),
        0 25px 55px rgba(23,20,72,.30) !important;

    animation:
        pwaPremiumOpen .55s ease both,
        pwaGradientMove 12s ease infinite !important;
}

/* Hide scrollbar without disabling scroll */

#pwa-modal .pwa-box::-webkit-scrollbar {
    display: none;
    width: 0;
}

/* 3D Opening Effect */

@keyframes pwaPremiumOpen {
    0% {
        opacity: 0;
        transform: perspective(1200px)
                   rotateX(-15deg)
                   translateY(30px)
                   scale(.88);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

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

    50% {
        background-position: 100% 50%;
    }
}

/* =========================================
   ANIMATED BUBBLE BACKGROUND
========================================= */

#pwa-modal .pwa-box::before,
#pwa-modal .pwa-box::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    border: none !important;
    border-radius: inherit;
}

#pwa-modal .pwa-box::before {
    background:
        radial-gradient(circle at 10% 80%,
            rgba(33,29,112,.10) 0 20px,
            transparent 22px),

        radial-gradient(circle at 90% 25%,
            rgba(33,29,112,.08) 0 35px,
            transparent 37px),

        radial-gradient(circle at 70% 90%,
            rgba(33,29,112,.09) 0 13px,
            transparent 15px),

        radial-gradient(circle at 20% 35%,
            rgba(33,29,112,.06) 0 10px,
            transparent 12px) !important;

    animation: pwaBubbleBlue 9s ease-in-out
               infinite alternate !important;
}

#pwa-modal .pwa-box::after {
    background:
        radial-gradient(circle at 85% 85%,
            rgba(237,28,36,.09) 0 24px,
            transparent 26px),

        radial-gradient(circle at 15% 15%,
            rgba(237,28,36,.08) 0 30px,
            transparent 32px),

        radial-gradient(circle at 50% 75%,
            rgba(237,28,36,.07) 0 12px,
            transparent 14px) !important;

    animation: pwaBubbleRed 12s ease-in-out
               infinite alternate !important;
}

@keyframes pwaBubbleBlue {
    from {
        transform: translate(0, 15px);
    }

    to {
        transform: translate(10px, -35px);
    }
}

@keyframes pwaBubbleRed {
    from {
        transform: translate(0, 20px);
    }

    to {
        transform: translate(-12px, -30px);
    }
}

/* =========================================
   MODAL LOGO
========================================= */

#pwa-modal .pwa-box img {
    max-width: 100%;
    object-fit: contain;
}

#pwa-modal .pwa-logo,
#pwa-modal .pwa-logo img {
    border-color: #ED1C24 !important;
}

/* =========================================
   HEADING AND TEXT
========================================= */

#pwa-modal .pwa-box h1,
#pwa-modal .pwa-box h2,
#pwa-modal .pwa-box h3,
#pwa-modal .pwa-title {
    color: #211D70 !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
}

#pwa-modal .pwa-box p,
#pwa-modal .pwa-description,
#pwa-modal .pwa-desc {
    color: #626477 !important;
    line-height: 1.7 !important;
}

#pwa-modal .pwa-tagline,
#pwa-modal .pwa-subtitle {
    color: #211D70 !important;
    background: #F3F4FC !important;
    border-color: #E1E3EF !important;
}

/* =========================================
   INSTALL APP BUTTON
========================================= */

#pwa-modal .pwa-install-btn,
#pwa-modal .pwa-install,
#pwa-modal #install-btn,
#pwa-modal #pwa-install-btn,
#pwa-modal #installAppBtn,
#pwa-modal .btn-install,
#pwa-modal button[id*="install" i],
#pwa-modal button[class*="install" i] {
    width: 100% !important;

    background: linear-gradient(
        135deg,
        #49459D,
        #211D70,
        #171448
    ) !important;

    color: #FFFFFF !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 15px 20px !important;

    font-size: 16px !important;
    font-weight: 700 !important;

    box-shadow:
        0 4px 0 #171448,
        0 10px 22px rgba(33,29,112,.24) !important;

    transition: .3s ease !important;
}

#pwa-modal .pwa-install-btn:hover,
#pwa-modal .pwa-install:hover,
#pwa-modal #install-btn:hover,
#pwa-modal #pwa-install-btn:hover,
#pwa-modal #installAppBtn:hover,
#pwa-modal .btn-install:hover,
#pwa-modal button[id*="install" i]:hover,
#pwa-modal button[class*="install" i]:hover {
    background: linear-gradient(
        135deg,
        #ED1C24,
        #C8101C
    ) !important;

    color: #FFFFFF !important;
    transform: translateY(-3px);

    box-shadow:
        0 4px 0 #9F0B15,
        0 10px 22px rgba(237,28,36,.25) !important;
}

/* =========================================
   CLOSE BUTTON
========================================= */

#pwa-modal .pwa-close,
#pwa-modal .close-btn,
#pwa-modal .custom-close-btn,
#pwa-modal #pwa-close,
#pwa-modal button[class*="close" i] {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 10;

    width: 34px !important;
    height: 34px !important;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none !important;
    border-radius: 50% !important;

    background: linear-gradient(
        135deg,
        #FF4249,
        #C8101C
    ) !important;

    color: #FFFFFF !important;

    box-shadow: 0 4px 10px
                rgba(237,28,36,.25) !important;

    cursor: pointer;
    transition: .3s ease;
}

#pwa-modal .pwa-close:hover,
#pwa-modal .close-btn:hover,
#pwa-modal .custom-close-btn:hover,
#pwa-modal #pwa-close:hover,
#pwa-modal button[class*="close" i]:hover {
    background: #211D70 !important;
    transform: rotate(90deg);
}

/* =========================================
   SECONDARY LINKS
========================================= */

#pwa-modal .pwa-box a {
    color: #211D70 !important;
    font-weight: 600;
}

#pwa-modal .pwa-box a:hover {
    color: #ED1C24 !important;
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media (max-width: 576px) {

    #pwa-modal {
        padding: 14px !important;
    }

    #pwa-modal .pwa-box {
        width: 100% !important;
        max-width: 370px !important;

        max-height: calc(100vh - 36px) !important;
        max-height: calc(100dvh - 36px) !important;

        padding: 30px 20px 24px !important;
        border-radius: 22px !important;
    }

    #pwa-modal .pwa-box h1,
    #pwa-modal .pwa-box h2,
    #pwa-modal .pwa-title {
        font-size: clamp(18px, 5.5vw, 23px) !important;
    }

    #pwa-modal .pwa-box p {
        font-size: 13px !important;
    }
}

@media (max-width: 360px) {

    #pwa-modal {
        padding: 10px !important;
    }

    #pwa-modal .pwa-box {
        padding: 28px 15px 20px !important;
        border-radius: 18px !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    #pwa-modal .pwa-box,
    #pwa-modal .pwa-box::before,
    #pwa-modal .pwa-box::after {
        animation: none !important;
    }
}
