/* === Style Block 1 === */
/* Font load hone se pehle icons ko transparent rakhega */
html:not(.fonts-loaded) .material-symbols-outlined {
    color: transparent !important;
}

/* === Style Block 2 === */
#profileDashboardModal .nbd-shell { background: #fdf8ef; position: relative; }
#profileDashboardModal .nbd-x {
    position: fixed !important; top: 16px !important; right: 16px !important; z-index: 50 !important; width: 40px !important; height: 40px !important;
    border-radius: 50% !important; background: #111110 !important; color: #fff !important; border: none !important; cursor: pointer;
    display: grid !important; place-items: center; box-shadow: 0 4px 18px rgba(17,17,16,0.4); min-height: 0 !important;
    transition: transform 0.25s ease, background 0.2s ease; padding: 0 !important; margin: 0 !important;
}
#profileDashboardModal .nbd-x:hover { transform: scale(1.08) rotate(90deg); background: #333 !important; }
#profileDashboardModal .nbd-x svg { width: 18px !important; height: 18px !important; stroke: #fff !important; stroke-width: 2.5; stroke-linecap: round; fill: none !important; }
@media (min-width: 768px) {
    #profileDashboardModal .nbd-x { position: absolute !important; top: 18px !important; right: 18px !important; }
}
@media (min-width: 768px) {
    #profileDashboardModal { align-items: center !important; justify-content: center !important; padding: 24px !important; }
    #profileDashboardModal .nbd-shell {
        max-width: 1080px; width: 100%; height: auto; max-height: 94dvh;
        border-radius: 28px; box-shadow: 0 50px 110px -30px rgba(17,17,16,0.5);
        border: 1px solid rgba(212,160,23,0.18); overflow: hidden;
    }
}
/* My Orders & My Backpack modal theming */
#myOrdersModal .modal-content, #myBackpackModal .modal-content { background: #fdf8ef; }
#myOrdersModal .modal-content > div:first-child,
#myBackpackModal .modal-content > div:first-child {
    background: rgba(253,248,239,0.92) !important; backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212,160,23,0.15) !important;
}
#myOrdersModal .modal-content > div:first-child h2,
#myBackpackModal .modal-content > div:first-child h2 {
    font-family: 'Playfair Display', Georgia, serif !important; color: #111110;
}
#myOrdersModal .modal-content > div:first-child button,
#myBackpackModal .modal-content > div:first-child button {
    background: #111110 !important; color: #fff !important; border: none;
}
#myOrdersModal .modal-content > div:first-child button:hover,
#myBackpackModal .modal-content > div:first-child button:hover {
    background: #2a2a28 !important;
}
#myOrdersModal .modal-content > div:first-child button svg,
#myBackpackModal .modal-content > div:first-child button svg { stroke: #fff !important; }

/* === Style Block 3 === */
/* Apple Pro Typography settings */
.apple-dark-glass {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    isolation: isolate;
}

/* Ultra-premium Deep Dark Glass */
.synapse-card-shell {
    contain: layout style;
}

.apple-dark-glass {
    /* Absolute dark gradient simulating polished dark metal/glass */
    background: linear-gradient(180deg, rgba(28, 28, 30, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
    box-shadow:
        inset 0 1px 0px rgba(255, 255, 255, 0.15),
        /* Crisp top highlight */
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        /* Microscopic inner border */
        0 30px 60px rgba(0, 0, 0, 0.6);
    /* Deep elevation shadow */
    /* Removed backdrop-filter: blur(20px) completely as it is disastrous for mobile scroll repaints
   when layered over moving elements or multiple backgrounds on Android/iOS.
   The deep black/metal background gradient achieves the dark glass aesthetic beautifully without the 60fps loss. */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Metallic White Gradient for Heading */
.text-silver-gradient {
    background: linear-gradient(180deg, #FFFFFF 0%, #8E8E93 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button hover transition - smooth & weighty */
.apple-btn-hover {
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (hover: hover) {
    .apple-btn-hover:hover {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
        background-color: #ffffff;
    }
}

/* Pill hover effect - snappy */
.pill-hover {
    transition: all 0.2s ease-out;
}

@media (hover: hover) {
    .pill-hover:hover {
        background-color: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

/* Optimize animation layer to avoid composite invalidation */
.animate-hardware {
    will-change: transform, opacity;
}

@media (min-width: 768px) {
    .apple-dark-glass {
        transform: translateZ(0);
    }

    .animate-hardware {
        transform: translateZ(0);
    }
}

@media (max-width: 767px) {
    .synapse-card-shell {
        transition: none !important;
    }

    .apple-dark-glass {
        transform: none !important;
        -webkit-backface-visibility: visible;
        backface-visibility: visible;
    }

    .animate-hardware {
        transform: none !important;
        will-change: auto !important;
    }
}

/* === Style Block 4 === */
.nxh-scene { position: relative; overflow: hidden; padding: 60px 0 70px; }
.nxh-scene::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #f5f2ed 0%, #faf8f4 30%, #faf8f4 70%, #f5f2ed 100%); }
.nxh-scene__waves { position: absolute; left: 0; right: 0; bottom: 0; top: 0; pointer-events: none; opacity: 0.45; }
.nxh-scene__wave { position: absolute; left: -2%; right: -2%; height: auto; }
.nxh-scene__wave--1 { bottom: 8%; }
.nxh-scene__wave--2 { top: 12%; opacity: 0.3; }
.nxh-scene__dots { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, rgba(212,160,23,0.08) 1px, transparent 1px); background-size: 32px 32px; }
#nex-hero { padding: 0; max-width: 80rem; margin: 0 auto; padding: 0 1.25rem; position: relative; z-index: 2; }
/* Synapse-style horizontal card */
.nxh-card { position: relative; background: #faf8f5; border: none; border-radius: 26px; overflow: hidden; display: flex; align-items: stretch; min-height: 460px; text-decoration: none; transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s; box-shadow: 0 20px 56px rgba(17,17,16,0.11), 0 1px 0 rgba(255,255,255,0.8); }
.nxh-card:hover { transform: translateY(-3px); box-shadow: 0 28px 64px rgba(17,17,16,0.14), 0 1px 0 rgba(255,255,255,0.8); }
.nxh-card:active { transform: scale(0.99); }
/* Red bookmark */
.nxh-bkmk { position: absolute; top: 0; right: 48px; z-index: 3; filter: drop-shadow(0 2px 4px rgba(0,0,0,.16)); }
.nxh-bkmk path { fill: #d42b2b; }
/* Left text body */
.nxh-body { flex: 0 0 44%; padding: 52px 32px 48px 52px; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
/* Badge */
.nxh-badge { display: flex; align-items: center; gap: 7px; font: 600 .72rem/1 Inter, system-ui; letter-spacing: .09em; color: rgba(17,17,16,.44); text-transform: uppercase; margin-bottom: 20px; }
.nxh-bdot { width: 7px; height: 7px; border-radius: 50%; background: #d42b2b; flex: none; }
/* Heading */
.nxh-ttl { font: 700 2.4rem/1.2 'Playfair Display', Georgia, serif; color: #111110; margin: 0 0 4px; }
.nxh-ttl em { font-style: italic; }
/* Gold underline */
.nxh-gline { display: block; width: 84px; height: 3px; background: #d4a017; border-radius: 2px; margin: 12px 0 20px; }
/* Subtitle */
.nxh-sub { font: 400 .9rem/1.7 Inter, system-ui; color: rgba(17,17,16,.5); margin: 0 0 26px; }
/* Feature tiles */
.nxh-feats { display: flex; gap: 10px; margin-bottom: 30px; }
.nxh-feat { flex: 1; display: flex; flex-direction: column; gap: 4px; border: 1px solid rgba(17,17,16,.09); border-radius: 14px; padding: 14px 11px; background: rgba(255,255,255,.55); }
.nxh-fic { width: 32px; height: 32px; border-radius: 10px; background: #f0e8d4; display: grid; place-items: center; margin-bottom: 6px; flex: none; }
.nxh-fic svg { width: 16px; height: 16px; stroke: #7a5c14; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nxh-feat strong { font: 700 .76rem/1.3 Inter, system-ui; color: #111110; }
.nxh-feat small { font: 400 .7rem/1.4 Inter, system-ui; color: rgba(17,17,16,.4); }
/* CTA */
.nxh-cta { display: inline-flex; align-items: center; gap: 8px; background: #111110; color: #fdfbf6; border-radius: 999px; padding: 14px 26px; font: 600 .9rem Inter, system-ui; align-self: flex-start; margin-bottom: 14px; transition: background .2s, transform .2s; }
.nxh-card:hover .nxh-cta { background: #2a2a28; }
.nxh-cta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
/* Hint */
.nxh-hint { font: 400 italic .78rem/1.4 Inter, system-ui; color: rgba(17,17,16,.34); margin: 0; }
/* Right illustration */
.nxh-art { flex: 1; position: relative; overflow: hidden; }
.nxh-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.nxh-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, #faf8f5 0%, rgba(250,248,245,0.25) 22%, transparent 50%); z-index: 1; pointer-events: none; }
/* Mobile */
@media(max-width: 640px) {
    .nxh-scene { padding: 30px 0 40px; }
    .nxh-card { flex-direction: column; min-height: auto; }
    .nxh-art { height: 220px; flex: none; width: 100%; }
    .nxh-art::before { background: linear-gradient(to bottom, transparent 50%, #faf8f5 96%); }
    .nxh-body { flex: none; padding: 28px 24px 40px; }
    .nxh-ttl { font-size: 1.8rem; }
    .nxh-feats { display: none; }
    .nxh-bkmk { display: none; }
    .nxh-gline { margin: 10px 0 16px; }
}

/* === Style Block 5 === */
#drive-loader-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483640;
    background: rgba(255, 255, 255, 0.4);
    /* Soft white */
    backdrop-filter: blur(16px);
    /* Apple-like blur */
    -webkit-backdrop-filter: blur(16px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
}

#drive-loader-overlay.dl-active {
    display: flex;
    animation: dl-fade-in 0.15s ease-out forwards;
}

@keyframes dl-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dl-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e5e7eb;
    border-top-color: #000000;
    border-radius: 50%;
    animation: dl-spin 0.65s linear infinite;
    will-change: transform;
}

@keyframes dl-spin {
    to {
        transform: rotate(360deg);
    }
}

.dl-label {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.02em;
}

/* === Style Block 6 === */
#pdfLoadingSpinner.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
