body {
    font-family: 'Inter', sans-serif;
    background: #030712;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Custom Hardware-Accelerated Naval Glassmorphism */
.glass-panel {
    background: rgba(8, 17, 36, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(234, 179, 8, 0.15);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
    will-change: transform, opacity;
}

/* Sliding Carousel Custom System */
.carousel-container {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
}
@media (min-width: 640px) {
    .carousel-container {
        height: 340px;
    }
}
.carousel-card {
    position: absolute !important;
    left: 50% !important;
    top: 0 !important;
    width: calc(100% - 24px) !important;
    max-width: 340px !important;
    height: calc(100% - 16px) !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
    transform: translate(150%, 0) scale(0.9) !important;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.5s ease, box-shadow 0.5s ease;
    will-change: transform, opacity;
    z-index: 1;
}
.carousel-card.active {
    transform: translate(-50%, 0) scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto;
    z-index: 10;
}
.carousel-card.prev {
    transform: translate(-140%, 0) scale(0.85) !important;
    opacity: 0.35 !important;
    pointer-events: none;
    z-index: 5;
}
.carousel-card.next {
    transform: translate(40%, 0) scale(0.85) !important;
    opacity: 0.35 !important;
    pointer-events: none;
    z-index: 5;
}
.carousel-card.far-prev {
    transform: translate(-250%, 0) scale(0.7) !important;
    opacity: 0 !important;
    pointer-events: none;
    z-index: 1;
}
.carousel-card.far-next {
    transform: translate(150%, 0) scale(0.7) !important;
    opacity: 0 !important;
    pointer-events: none;
    z-index: 1;
}

/* Hide scrollbar mechanics */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Shimmer Oceanic Glows */
.glow-sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

/* Indian Navy Modern Octagonal Crest Frame Border Line Effect */
.gold-braid {
    border: 2px dashed rgba(234, 179, 8, 0.4);
    position: relative;
}

/* Radar Grid Animation Canvas Frame */
#radar-canvas {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 80%);
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%2322c55e' opacity='0.25'/%3E%3Ccircle cx='8' cy='8' r='4' fill='%2322c55e' opacity='0.6'/%3E%3Ccircle cx='8' cy='8' r='2' fill='%23ffffff'/%3E%3C/svg%3E") 8 8, default;
}

/* ── LIGHTBOX MODAL ── */
#lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(.4, 0, .2, 1);
}

#lightbox-overlay.lb-open {
    opacity: 1;
    pointer-events: all;
}

#lightbox-card {
    position: relative;
    max-width: min(92vw, 480px);
    width: 100%;
    background: rgba(8, 17, 36, 0.92);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(234, 179, 8, 0.15), 0 30px 80px rgba(0, 0, 0, 0.7);
    transform: scale(0.88) translateY(16px);
    transition: transform 0.38s cubic-bezier(.34, 1.56, .64, 1);
}

#lightbox-overlay.lb-open #lightbox-card {
    transform: scale(1) translateY(0);
}

#lightbox-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    background: #030712;
}

#lightbox-label {
    padding: 10px 16px 12px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(234, 179, 8, 0.7);
    font-family: 'Inter', monospace;
    text-align: center;
    border-top: 1px solid rgba(234, 179, 8, 0.1);
}

#lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(3, 7, 18, 0.8);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #eab308;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

#lightbox-close:hover {
    background: rgba(234, 179, 8, 0.15);
    transform: scale(1.1);
}

/* Profile tag buttons */
.profile-tag {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    user-select: none;
}

.profile-tag:hover {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.2);
}

.profile-tag:active {
    transform: scale(0.96);
}

/* ── 3D HAT POP-OUT ANIMATION ── */
@keyframes pop3d {
    0% {
        transform: scale(1) translateY(0);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }

    20% {
        /* Fast pop-out */
        transform: scale(1.45) translateY(-14px);
        filter: drop-shadow(0 20px 15px rgba(234, 179, 8, 0.55));
    }

    45% {
        /* Hover / Hold at peak */
        transform: scale(1.45) translateY(-14px);
        filter: drop-shadow(0 20px 15px rgba(234, 179, 8, 0.55));
    }

    100% {
        /* Slow, smooth glide back */
        transform: scale(1) translateY(0);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }
}

.animate-3d-pop {
    animation: pop3d 4s ease-in-out infinite;
    will-change: transform, filter;
}

/* ── HIDDEN CARDS IN SLIDER HINT EFFECT ── */
div[id^="card-"] {
    opacity: 0.2;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out, border-color 0.6s;
    transform: scale(0.96);
    pointer-events: auto;
}

div[id^="card-"] p,
div[id^="card-"] h4,
div[id^="card-"] p+div,
div[id^="card-"] .pt-3 {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

div[id^="card-"].card-visible {
    opacity: 1;
}

div[id^="card-"].card-visible p,
div[id^="card-"].card-visible h4,
div[id^="card-"].card-visible p+div,
div[id^="card-"].card-visible .pt-3 {
    opacity: 1;
}

/* ── NAVAL BACKDROP ANIMATIONS ── */
@keyframes sweep {

    0%,
    100% {
        transform: rotate(-22deg);
    }

    50% {
        transform: rotate(12deg);
    }
}

@keyframes sweep-rev {

    0%,
    100% {
        transform: rotate(8deg);
    }

    50% {
        transform: rotate(-18deg);
    }
}

@keyframes sail {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(100vw + 300px));
    }
}

@keyframes wave-back-anim {
    0% { background-position-x: 0; }
    100% { background-position-x: 3000px; }
}

@keyframes wave-mid-anim {
    0% { background-position-x: 0; }
    100% { background-position-x: -4000px; }
}

@keyframes wave-front-anim {
    0% { background-position-x: 0; }
    100% { background-position-x: 6000px; } /* massive, slow ocean swells in front */
}

.searchlight-beam {
    animation: sweep 12s ease-in-out infinite;
}

.searchlight-beam-reverse {
    animation: sweep-rev 9s ease-in-out infinite;
}

.warship {
    animation: sail 20s linear infinite;
}

.wave-back {
    animation: wave-back-anim 120s linear infinite;
    background: repeat-x bottom center url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none' fill='%23082f49'%3E%3Cpath d='M0 60 Q150 80 300 60 T600 60 T900 60 T1200 60 L1200 120 L0 120 Z' opacity='0.3'/%3E%3C/svg%3E");
    background-size: 3000px 100%;
}

.wave-mid {
    animation: wave-mid-anim 90s linear infinite;
    background: repeat-x bottom center url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none' fill='%23075985'%3E%3Cpath d='M0 60 Q150 85 300 60 T600 60 T900 60 T1200 60 L1200 120 L0 120 Z' opacity='0.45'/%3E%3C/svg%3E");
    background-size: 4000px 100%;
}

.wave-front {
    animation: wave-front-anim 60s linear infinite;
    background: repeat-x bottom center url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none' fill='%23020617'%3E%3Cpath d='M0 60 Q150 90 300 60 T600 60 T900 60 T1200 60 L1200 120 L0 120 Z' opacity='0.9'/%3E%3C/svg%3E");
    background-size: 6000px 100%;
}

/* ── FLEET DEPLOYMENT ANIMATIONS ── */
@keyframes sail {
    0% {
        transform: translateX(-200px);
    }

    100% {
        transform: translateX(100vw);
    }
}

@keyframes sail-rev {
    0% {
        transform: translateX(100vw) scaleX(-1);
    }

    100% {
        transform: translateX(-200px) scaleX(-1);
    }
}

@keyframes fly-squadron {
    0% {
        transform: translateX(100vw);
    }

    100% {
        transform: translateX(-200px);
    }
}

.ship-1 {
    animation: sail 18s linear infinite;
}

.ship-2 {
    animation: sail 22s linear infinite -11s;
    /* Starts halfway across */
}

.ship-3 {
    animation: sail-rev 26s linear infinite -6s;
    /* Starts 23% across */
}

.ship-4 {
    animation: sail-rev 30s linear infinite -18s;
    /* Starts 60% across */
}

.squadron-container {
    position: absolute;
    top: 7%;
    left: 0;
    width: 140px;
    height: 70px;
    pointer-events: none;
    z-index: 5;
    animation: fly-squadron 4s linear infinite;
}

.ship-card {
    animation: sail 15s linear infinite -3s;
}

/* ── BACKGROUND PLANES FOR MAIN CONTENT ── */
@keyframes fly-left-to-right {
    0% {
        transform: translateX(-100px);
    }
    100% {
        transform: translateX(100vw);
    }
}

@keyframes fly-right-to-left {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(-100px);
    }
}

.bg-plane-lr {
    position: absolute;
    pointer-events: none;
    animation: fly-left-to-right linear infinite;
    will-change: transform;
}

.special-zoom-plane {
    position: absolute;
    pointer-events: none;
    transform: translateX(-150px) scale(0.6);
    opacity: 0;
    will-change: transform;
}

.special-zoom-plane.fly-active {
    animation: special-fly-zoom 20s linear 1 forwards;
    animation-delay: 1s;
}

@keyframes special-fly-zoom {
    0% {
        transform: translateX(-150px) scale(0.6);
        opacity: 0.1;
    }
    15% {
        opacity: 0.8;
    }
    45% {
        transform: translateX(calc(50vw - 30px)) scale(2.2);
        opacity: 1;
    }
    55% {
        transform: translateX(calc(50vw - 30px)) scale(2.2);
        opacity: 1;
    }
    85% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(110vw) scale(4.5);
        opacity: 0;
    }
}

.pew-bubble {
    position: absolute;
    bottom: 120%;
    left: 50%;
    background: #eab308;
    color: #030712;
    font-size: 8px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    white-space: nowrap;
    opacity: 0;
    z-index: 15;
}

.special-zoom-plane.fly-active .pew-bubble {
    animation: bubble-show 20s linear 1 forwards;
    animation-delay: 1s;
}

@keyframes bubble-show {
    0%, 43%, 57%, 100% {
        opacity: 0;
        transform: translate3d(-50%, 6px, 0) scale(0.6);
    }
    45%, 55% {
        opacity: 1;
        transform: translate3d(-50%, 0, 0) scale(1);
    }
}

#hero-stars {
    opacity: 0;
    transform: scale(0.5);
    will-change: transform, opacity;
}

#hero-stars.stars-active {
    animation: stars-appear 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 21s; /* 1s delay + 20s plane flight duration */
}

@keyframes stars-appear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.bg-plane-rl {
    position: absolute;
    pointer-events: none;
    animation: fly-right-to-left linear infinite;
    will-change: transform;
}

.plane-img-lr {
    width: 100%;
    height: auto;
    /* Colorize plane to match Gold theme (#eab308) starting from black */
    filter: brightness(0) saturate(100%) invert(77%) sepia(83%) saturate(1212%) hue-rotate(354deg) brightness(101%) contrast(93%);
    transform: scaleX(-1); /* mirror image to face right */
}

.plane-img-rl {
    width: 100%;
    height: auto;
    /* Colorize plane to match Blue theme (#0ea5e9) starting from black */
    filter: brightness(0) saturate(100%) invert(52%) sepia(97%) saturate(1510%) hue-rotate(178deg) brightness(97%) contrast(97%);
}

/* Lasers */
.laser-lr {
    position: absolute;
    top: 50%;
    left: 100%;
    width: 24px;
    height: 3px;
    background: #ffffff; /* White core for intense brightness */
    box-shadow: 0 0 8px #eab308, 0 0 16px #eab308, 0 0 24px #facc15;
    border-radius: 99px;
    opacity: 0;
    animation: shoot-laser-lr 0.6s linear infinite;
}

.laser-rl {
    position: absolute;
    top: 50%;
    right: 100%;
    width: 24px;
    height: 3px;
    background: #ffffff; /* White core for intense brightness */
    box-shadow: 0 0 8px #0ea5e9, 0 0 16px #0ea5e9, 0 0 24px #38bdf8;
    border-radius: 99px;
    opacity: 0;
    animation: shoot-laser-rl 0.6s linear infinite;
}

@keyframes shoot-laser-lr {
    0% {
        transform: translate3d(0, -50%, 0);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translate3d(260px, -50%, 0);
        opacity: 0;
    }
}

@keyframes shoot-laser-rl {
    0% {
        transform: translate3d(0, -50%, 0);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translate3d(-260px, -50%, 0);
        opacity: 0;
    }
}

