:root {
    --navy-950: #04060f;
    --navy-900: #070a1a;
    --navy-800: #0a0e24;
    --navy-700: #0e1430;
    --navy-600: #1B1464;
    --blue-brand: #0073BC;
    --blue-light: #4aa3ff;
    --blue-bright: #7cc0ff;
    --blue-glow: rgba(74, 163, 255, 0.35);
    --gold: #c9a84c;
    --gold-soft: #e6c878;
    --border: rgba(255, 255, 255, 0.08);
    --header-h: 76px;
    --iframe-crop: 60px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

body {
    background: var(--navy-950);
    -webkit-font-smoothing: antialiased;
}

/* === Background layers === */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(120% 85% at 50% -12%, #0d1638 0%, #080c20 46%, #04060f 100%);
}

.bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.04;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.bg-glow-1 {
    width: 58vw;
    height: 58vw;
    max-width: 760px;
    max-height: 760px;
    top: -28%;
    left: -16%;
    background: radial-gradient(circle, rgba(0, 115, 188, 0.30) 0%, transparent 66%);
    animation: float 26s ease-in-out infinite;
}

.bg-glow-2 {
    width: 52vw;
    height: 52vw;
    max-width: 680px;
    max-height: 680px;
    top: -22%;
    right: -18%;
    background: radial-gradient(circle, rgba(74, 163, 255, 0.22) 0%, transparent 66%);
    animation: float 30s ease-in-out infinite reverse;
}

.bg-glow-3 {
    width: 46vw;
    height: 46vw;
    max-width: 560px;
    max-height: 560px;
    bottom: -26%;
    left: 32%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.13) 0%, transparent 72%);
    animation: float 28s ease-in-out infinite;
    animation-delay: -10s;
}

.bg-mesh {
    position: absolute;
    inset: -40%;
    background:
        conic-gradient(from 220deg at 30% 25%, transparent 0deg, rgba(0, 115, 188, 0.06) 50deg, transparent 100deg),
        conic-gradient(from 40deg at 75% 60%, transparent 0deg, rgba(74, 163, 255, 0.05) 60deg, transparent 120deg);
    animation: meshRotate 70s linear infinite;
    opacity: 0.8;
}

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

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(2%, 3%); }
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(74, 163, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 163, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(124, 192, 255, 0.13) 1px, transparent 1px);
    background-size: 54px 54px, 54px 54px, 54px 54px;
    mask-image: radial-gradient(ellipse 88% 68% at 50% 40%, #000 18%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 88% 68% at 50% 40%, #000 18%, transparent 78%);
}

.bg-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 58% 48% at 50% 42%, transparent 28%, rgba(4, 6, 15, 0.72) 100%);
    pointer-events: none;
}

.app {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* === Header === */
.header {
    flex-shrink: 0;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 24px;
    background:
        linear-gradient(180deg, rgba(13, 19, 48, 0.92) 0%, rgba(7, 11, 28, 0.82) 100%);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid rgba(74, 163, 255, 0.14);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.9);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -60%;
    left: 50%;
    width: 460px;
    height: 220px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(74, 163, 255, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 30%,
        var(--blue-light) 47%,
        var(--gold-soft) 53%,
        transparent 70%);
    background-size: 240% 100%;
    background-repeat: no-repeat;
    animation: beamSweep 6.5s ease-in-out infinite;
}

@keyframes beamSweep {
    0% { background-position: 150% 0; }
    55% { background-position: -50% 0; }
    100% { background-position: -50% 0; }
}

.logo-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 11px 30px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(150deg, #ffffff 0%, #f1f5fc 48%, #e8eef8 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 -1px 2px rgba(27, 20, 100, 0.06) inset,
        0 10px 30px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(0, 115, 188, 0.18),
        0 0 50px -8px rgba(74, 163, 255, 0.45);
    transition: transform 0.3s cubic-bezier(.2, .7, .3, 1), box-shadow 0.3s ease;
}

.logo-link::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -65%;
    width: 45%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
    transform: skewX(-18deg);
    animation: sheen 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sheen {
    0% { left: -65%; }
    16% { left: 135%; }
    100% { left: 135%; }
}

.logo-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 4%, var(--blue-brand) 26%, var(--blue-light) 50%, var(--gold) 76%, transparent 96%);
    opacity: 0.9;
}

.logo-link:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 -1px 2px rgba(27, 20, 100, 0.06) inset,
        0 16px 42px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 115, 188, 0.24),
        0 0 70px -6px rgba(74, 163, 255, 0.55);
}

.logo-img {
    position: relative;
    z-index: 1;
    height: 58px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* === Content === */
.content {
    flex: 1;
    min-height: 0;
    padding: 6px 10px 10px;
    display: flex;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    align-self: center;
    position: relative;
}

.content::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    border-radius: 20px;
    background: radial-gradient(ellipse 70% 60% at 50% 40%,
        rgba(74, 163, 255, 0.20) 0%,
        rgba(0, 115, 188, 0.08) 42%,
        transparent 70%);
    filter: blur(26px);
    pointer-events: none;
    z-index: 0;
}

.content::after {
    content: '';
    position: absolute;
    inset: 4px 6px 8px;
    border-radius: 16px;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(var(--blue-light), var(--blue-light)) top left / 28px 2px no-repeat,
        linear-gradient(var(--blue-light), var(--blue-light)) top left / 2px 28px no-repeat,
        linear-gradient(var(--gold), var(--gold)) top right / 28px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) top right / 2px 28px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom left / 28px 2px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom left / 2px 28px no-repeat,
        linear-gradient(var(--blue-light), var(--blue-light)) bottom right / 28px 2px no-repeat,
        linear-gradient(var(--blue-light), var(--blue-light)) bottom right / 2px 28px no-repeat;
    opacity: 0.42;
}

.report-card {
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(10, 14, 36, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 0 0 1px rgba(74, 163, 255, 0.12),
        0 24px 64px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(0, 115, 188, 0.08);
}

.report-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(74, 163, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.08) 35%,
        rgba(201, 168, 76, 0.35) 70%,
        rgba(74, 163, 255, 0.25) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

.report-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-brand), var(--blue-light), var(--gold), var(--blue-brand));
    background-size: 200% 100%;
    animation: shimmer 7s linear infinite;
    opacity: 0.85;
    z-index: 3;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.iframe-container {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background:
        radial-gradient(ellipse 90% 55% at 50% -5%, rgba(74, 163, 255, 0.1) 0%, transparent 55%),
        linear-gradient(180deg, #0d1230 0%, #0a0e27 100%);
    position: relative;
}

.iframe-container.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--navy-800);
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.iframe-container:not(.loading)::after {
    opacity: 0;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    transition: opacity 0.3s ease;
}

.iframe-container:not(.loading) .loader {
    opacity: 0;
    pointer-events: none;
}

.loader-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid rgba(74, 163, 255, 0.15);
    border-top-color: var(--blue-light);
    border-right-color: var(--blue-brand);
    animation: spin 0.85s linear infinite;
}

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

iframe {
    width: 100%;
    height: calc(100% + var(--iframe-crop));
    border: none;
    display: block;
}

@media (max-width: 960px) {
    .content {
        max-width: 100%;
        padding: 10px 12px 12px;
    }

    .content::after {
        opacity: 0.25;
    }

    .logo-img {
        height: 50px;
    }

    .logo-link {
        padding: 9px 24px;
    }
}

@media (max-width: 480px) {
    :root {
        --header-h: 76px;
    }

    .header {
        padding: 10px 16px;
    }

    .logo-img {
        height: 44px;
    }

    .logo-link {
        padding: 8px 20px;
        border-radius: 12px;
    }

    .header::before {
        width: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-glow,
    .bg-mesh,
    .header::after,
    .logo-link::before,
    .report-card::after,
    .loader-ring {
        animation: none !important;
    }
}
