/* ═══════════════════════════════════════════════════════════
   🇮🇳 INDEPENDENCE DAY — Waving Flag Overlay
   Remove this file + the <link> and <script> in index.html 
   to completely remove the Independence Day theme.
   ═══════════════════════════════════════════════════════════ */

/* ── OVERLAY CONTAINER ── */
.ind-day-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.92) 100%);
    opacity: 1;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    pointer-events: auto;
    overflow: hidden;
}

.ind-day-overlay.hide-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── PARTICLES (tricolor confetti) ── */
.ind-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0;
    animation: indParticleFall linear infinite;
}

@keyframes indParticleFall {
    0%   { opacity: 0; transform: translateY(-10vh) rotate(0deg); }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(110vh) rotate(720deg); }
}

/* ── MAIN CONTENT CARD ── */
.ind-day-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 48px 56px 40px;
    border-radius: 24px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    animation: indCardEntry 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    max-width: 520px;
    width: 90%;
}

@keyframes indCardEntry {
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ── FLAG WRAPPER ── */
.ind-flag-wrapper {
    perspective: 800px;
    width: 260px;
    height: 175px;
    position: relative;
}

/* ── FLAGPOLE ── */
.ind-flagpole {
    position: absolute;
    left: 0;
    top: -12px;
    width: 6px;
    height: calc(100% + 24px);
    background: linear-gradient(180deg, #d4a853 0%, #b8902e 30%, #a07820 60%, #7d5c14 100%);
    border-radius: 3px;
    z-index: 3;
    box-shadow: 2px 0 8px rgba(0,0,0,0.4);
}

.ind-flagpole::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, #f0d080, #c4962a);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(212,168,83,0.6);
}

/* ── FLAG BODY (3 stripes waving) ── */
.ind-flag {
    position: absolute;
    left: 6px;
    top: 0;
    width: 250px;
    height: 170px;
    overflow: hidden;
    transform-origin: left center;
    animation: indFlagWave 3s ease-in-out infinite;
    border-radius: 0 4px 4px 0;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.3);
}

@keyframes indFlagWave {
    0%   { transform: perspective(600px) rotateY(0deg) skewY(0deg); }
    25%  { transform: perspective(600px) rotateY(6deg) skewY(-2deg); }
    50%  { transform: perspective(600px) rotateY(-3deg) skewY(1.5deg); }
    75%  { transform: perspective(600px) rotateY(5deg) skewY(-1deg); }
    100% { transform: perspective(600px) rotateY(0deg) skewY(0deg); }
}

/* Ripple effect overlay */
.ind-flag::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.08) 20%,
        rgba(255,255,255,0.15) 30%,
        rgba(255,255,255,0.08) 40%,
        transparent 60%
    );
    animation: indRipple 2s linear infinite;
    z-index: 5;
    pointer-events: none;
}

@keyframes indRipple {
    0%   { transform: translateX(-60%); }
    100% { transform: translateX(60%); }
}

/* ── THREE STRIPES ── */
.ind-stripe {
    width: 100%;
    height: 33.333%;
    position: relative;
}

.ind-stripe.saffron {
    background: linear-gradient(135deg, #FF9933 0%, #f58c1e 50%, #FF9933 100%);
}

.ind-stripe.white-stripe {
    background: linear-gradient(135deg, #FFFFFF 0%, #f5f5f0 50%, #FFFFFF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ind-stripe.green {
    background: linear-gradient(135deg, #138808 0%, #0f7506 50%, #138808 100%);
}

/* ── ASHOKA CHAKRA ── */
.ind-chakra {
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 4;
    animation: indChakraSpin 4s linear infinite;
}

@keyframes indChakraSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ind-chakra svg {
    width: 100%;
    height: 100%;
}

/* ── TEXT CONTENT ── */
.ind-day-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ind-day-greeting {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    animation: indTextFadeIn 1.2s ease 0.4s both;
}

.ind-day-headline {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    animation: indTextFadeIn 1.2s ease 0.6s both;
}

.ind-day-headline .saffron-text { color: #FF9933; }
.ind-day-headline .white-text   { color: #FFFFFF; }
.ind-day-headline .green-text   { color: #138808; }

.ind-day-sub {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
    max-width: 380px;
    animation: indTextFadeIn 1.2s ease 0.8s both;
}

.ind-day-year {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: rgba(255,255,255,0.35);
    margin-top: 4px;
    animation: indTextFadeIn 1.2s ease 1s both;
}

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

/* ── CLOSE / SKIP BUTTON ── */
.ind-day-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
    font-family: 'Poppins', sans-serif;
}

.ind-day-close:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* ── TRICOLOR BOTTOM BORDER ── */
.ind-day-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 3px;
    background: linear-gradient(90deg, #FF9933 0%, #FF9933 33%, #FFFFFF 33%, #FFFFFF 66%, #138808 66%, #138808 100%);
    border-radius: 0 0 24px 24px;
}

/* ── CORNER FLAG RIBBON (after overlay closes) ── */
.ind-corner-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    z-index: 998;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    animation: indRibbonIn 0.6s ease 0.3s forwards;
}

@keyframes indRibbonIn {
    to { opacity: 1; }
}

.ind-corner-ribbon-inner {
    position: absolute;
    top: 22px;
    left: -32px;
    width: 170px;
    padding: 6px 0;
    text-align: center;
    transform: rotate(-45deg);
    font-family: 'Poppins', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(90deg, #FF9933 0%, #FF9933 33%, #e8e8e8 33%, #e8e8e8 66%, #138808 66%, #138808 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ind-corner-ribbon-inner span {
    /* text on white stripe needs dark color */
    color: #023653;
    font-weight: 800;
    text-shadow: none;
    mix-blend-mode: normal;
}

/* ── MOBILE ── */
@media (max-width: 600px) {
    .ind-day-card {
        padding: 36px 28px 32px;
        gap: 20px;
    }

    .ind-flag-wrapper {
        width: 200px;
        height: 136px;
    }

    .ind-flag {
        width: 190px;
        height: 130px;
    }

    .ind-chakra {
        width: 30px;
        height: 30px;
    }

    .ind-day-headline {
        font-size: 1.5rem;
    }

    .ind-day-sub {
        font-size: 0.8rem;
    }

    .ind-day-greeting {
        font-size: 0.7rem;
    }

    .ind-corner-ribbon {
        width: 90px;
        height: 90px;
    }

    .ind-corner-ribbon-inner {
        top: 16px;
        left: -36px;
        width: 150px;
        font-size: 0.5rem;
        padding: 4px 0;
    }
}
