:root {
    --bg-1: #0c1227;
    --bg-2: #1d2b64;
    --card: #fefefe;
    --ink: #0b0d12;
    --muted: #4b5563;
    --line: #111827;
    --sun: #ffcf3f;
    --accent: #ff5b3d;
    --accent-2: #19b5ff;
    --success: #0f766e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "M PLUS Rounded 1c", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 207, 63, 0.28) 0%, transparent 26%),
        radial-gradient(circle at 90% 8%, rgba(25, 181, 255, 0.22) 0%, transparent 24%),
        linear-gradient(155deg, var(--bg-1) 0%, var(--bg-2) 55%, #3a5ab6 100%);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.14;
    background-image: radial-gradient(#fff 1px, transparent 1px);
    background-size: 8px 8px;
}

a {
    color: #082f49;
    font-weight: 700;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #ffcf3f 0%, #ffd95a 65%, #ffeaa2 100%);
    border: 3px solid var(--line);
    border-radius: 18px;
    box-shadow: 6px 6px 0 #0f172a;
    padding: 14px 18px;
    gap: 12px;
    animation: drop-in 0.45s ease-out;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 2px 2px 0 #111827;
    transition: transform 0.15s ease;
}

.account-pill:hover {
    transform: translateY(-1px);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #111827;
    background: linear-gradient(160deg, #f97316 0%, #facc15 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #111827;
    box-shadow: 4px 4px 0 #1f2937;
    background: #fff;
    overflow: hidden;
    margin-bottom: 8px;
}

.avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.title {
    margin: 0;
    font-family: "Bangers", "Impact", sans-serif;
    letter-spacing: 1px;
    font-size: 34px;
    line-height: 1;
}

.hero-banner {
    margin-top: 18px;
    background: linear-gradient(135deg, #fff 0%, #fff7db 45%, #ffe3cb 100%);
    border: 3px solid var(--line);
    border-radius: 18px;
    box-shadow: 6px 6px 0 #172554;
    padding: 18px;
    animation: pop-in 0.5s ease-out;
}

.hero-banner h2 {
    margin: 0 0 8px;
    font-family: "Bangers", "Impact", sans-serif;
    letter-spacing: 0.6px;
    font-size: 30px;
}

.speech {
    display: inline-block;
    background: #fff;
    border: 3px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 4px 4px 0 #1f2937;
    font-weight: 700;
}

.speech strong {
    color: #9f1239;
}

.grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card {
    background: var(--card);
    border: 3px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 5px 5px 0 #1f2937;
    animation: pop-in 0.45s ease-out;
}

label {
    display: block;
    margin: 8px 0 6px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 700;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

button {
    margin-top: 10px;
    border: 2px solid #111827;
    border-radius: 10px;
    background: linear-gradient(180deg, #ff6f59 0%, #f43f5e 100%);
    color: #fff;
    font-family: "M PLUS Rounded 1c", "Trebuchet MS", sans-serif;
    font-weight: 700;
    padding: 10px 14px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #111827;
    transition: transform 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

button.secondary {
    background: linear-gradient(180deg, #0ea5e9 0%, #2563eb 100%);
}

.danger {
    color: #b91c1c;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.api-table th, .api-table td {
    border: 2px solid var(--line);
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

.api-table th {
    background: #e0f2fe;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    min-width: 980px;
}

.mission-slider {
    margin-top: 16px;
    overflow: hidden;
    border: 3px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 5px 5px 0 #1f2937;
}

.mission-track {
    display: flex;
}

.mission-slide {
    min-width: 100%;
    padding: 16px;
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 14px;
    align-items: center;
}

.slide-art {
    height: 150px;
    border: 3px solid var(--line);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 62px;
    box-shadow: 4px 4px 0 #1f2937;
}

.slide-art.one {
    background: linear-gradient(135deg, #ffd166 0%, #ff9f1c 100%);
}

.slide-art.two {
    background: linear-gradient(135deg, #fda4af 0%, #fb7185 100%);
}

.slide-art.three {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
}

.slide-art.four {
    background: linear-gradient(135deg, #86efac 0%, #34d399 100%);
}

.slide-copy h3 {
    margin: 0 0 8px;
    font-size: 26px;
    font-family: "Bangers", "Impact", sans-serif;
    letter-spacing: 0.5px;
}

.slide-copy p {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 0 14px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid #111827;
    background: #cbd5e1;
}

.dot.active {
    background: #f43f5e;
}

.explorer-gate {
    margin-top: 16px;
    border: 3px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.96) 0%, rgba(236, 253, 245, 0.96) 50%, rgba(224, 242, 254, 0.96) 100%),
        repeating-linear-gradient(45deg, rgba(15, 23, 42, 0.04) 0 10px, rgba(15, 23, 42, 0.08) 10px 20px);
    box-shadow: 6px 6px 0 #1f2937;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    align-items: center;
}

.explorer-gate h3 {
    margin: 0 0 6px;
    font-family: "Bangers", "Impact", sans-serif;
    letter-spacing: 0.5px;
    font-size: 30px;
}

.explorer-gate p {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.explorer-points {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.explorer-points li {
    border: 2px solid #0f172a;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
}

.explorer-btn {
    margin-top: 0;
    font-size: 18px;
    padding: 14px 20px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #111827;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(180deg, #22d3ee 0%, #2563eb 52%, #1e3a8a 100%);
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #111827, 0 10px 25px rgba(37, 99, 235, 0.4);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
    letter-spacing: 0.3px;
    animation: cta-pulse 1.8s ease-in-out infinite;
}

.explorer-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.explorer-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.portal-visual {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #0f172a;
    box-shadow:
        inset 0 0 0 4px rgba(191, 219, 254, 0.55),
        inset 0 0 35px rgba(56, 189, 248, 0.55),
        0 10px 20px rgba(15, 23, 42, 0.35);
    background: radial-gradient(circle at 50% 50%, #0b1f70 0%, #122c8f 46%, #0b1a5c 68%, #070d2a 100%);
    overflow: hidden;
}

.portal-visual::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 2px solid rgba(191, 219, 254, 0.7);
    border-radius: 50%;
    box-shadow: inset 0 0 18px rgba(147, 197, 253, 0.5);
}

.portal-visual::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 48%, rgba(186, 230, 253, 0.45) 0%, rgba(14, 165, 233, 0.3) 30%, rgba(37, 99, 235, 0.08) 60%, rgba(15, 23, 42, 0.05) 85%);
}

.portal-rim,
.portal-ring,
.portal-vortex,
.portal-core {
    position: absolute;
    border-radius: 50%;
}

.portal-rim {
    inset: 2px;
    border: 2px solid rgba(224, 242, 254, 0.9);
    box-shadow: 0 0 10px rgba(125, 211, 252, 0.75);
}

.portal-ring {
    border: 3px dashed rgba(186, 230, 253, 0.9);
    opacity: 0.9;
}

.portal-ring.r1 {
    inset: 18px;
    animation: portal-spin 4.8s linear infinite;
}

.portal-ring.r2 {
    inset: 28px;
    border-style: solid;
    border-color: rgba(125, 211, 252, 0.9) transparent rgba(125, 211, 252, 0.9) transparent;
    animation: portal-spin-reverse 3.6s linear infinite;
}

.portal-ring.r3 {
    inset: 40px;
    border-style: dotted;
    border-width: 2px;
    border-color: rgba(191, 219, 254, 0.95);
    animation: portal-spin 2.8s linear infinite;
}

.portal-vortex {
    inset: 28px;
    background:
        conic-gradient(from 0deg, rgba(147, 197, 253, 0.7), rgba(59, 130, 246, 0.15), rgba(34, 211, 238, 0.7), rgba(30, 64, 175, 0.2), rgba(147, 197, 253, 0.7));
    filter: blur(0.3px);
    animation: vortex-spin 2.2s linear infinite;
}

.portal-core {
    inset: 56px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0%, rgba(186, 230, 253, 0.95) 28%, rgba(56, 189, 248, 0.75) 62%, rgba(30, 64, 175, 0.25) 100%);
    box-shadow: 0 0 18px rgba(125, 211, 252, 0.95), 0 0 28px rgba(56, 189, 248, 0.72);
    animation: portal-core-pulse 1.7s ease-in-out infinite;
}

.spark {
    position: absolute;
    width: 18px;
    height: 3px;
    border-radius: 10px;
    background: #fef08a;
    box-shadow: 0 0 12px #fde047;
    animation: spark-blink 1.2s ease-in-out infinite;
    z-index: 3;
}

.spark.s1 { top: 10px; left: 18px; transform: rotate(24deg); }
.spark.s2 { top: 30px; right: 6px; transform: rotate(-18deg); animation-delay: 0.3s; }
.spark.s3 { bottom: 18px; left: 6px; transform: rotate(-34deg); animation-delay: 0.6s; }
.spark.s4 { bottom: 8px; right: 20px; transform: rotate(16deg); animation-delay: 0.9s; }

.portal-caption {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    color: #1e3a8a;
    letter-spacing: 0.3px;
}

.api-scene {
    isolation: isolate;
}

.api-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
    z-index: -1;
}

.api-orb.orb-a {
    width: 120px;
    height: 120px;
    right: 24px;
    top: 96px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.5) 0%, rgba(59, 130, 246, 0.2) 55%, rgba(59, 130, 246, 0) 100%);
    animation: api-orb-float 5.5s ease-in-out infinite;
}

.api-orb.orb-b {
    width: 80px;
    height: 80px;
    left: 22px;
    top: 240px;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.45) 0%, rgba(250, 204, 21, 0) 100%);
    animation: api-orb-float 4.2s ease-in-out infinite reverse;
}

.api-orb.orb-c {
    width: 64px;
    height: 64px;
    right: 280px;
    top: 390px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.42) 0%, rgba(244, 63, 94, 0) 100%);
    animation: api-orb-float 6.1s ease-in-out infinite;
}

.api-enter {
    animation: api-enter-rise 0.55s ease both;
}

.api-card-float {
    animation: api-card-float 3.8s ease-in-out infinite;
}

.api-send-btn {
    position: relative;
    overflow: hidden;
}

.method-switch {
    display: flex;
    gap: 8px;
}

.method-switch button {
    margin-top: 0;
    min-width: 82px;
}

.method-switch .method-active {
    background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0f172a;
}

.api-send-btn::after {
    content: "";
    position: absolute;
    top: -80%;
    left: -20%;
    width: 26%;
    height: 260%;
    transform: rotate(24deg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
    animation: api-button-glint 2.4s linear infinite;
}

.api-response-hit {
    animation: api-response-hit 0.7s ease;
}

.api-response-pre-hit {
    animation: api-response-pre-hit 0.7s ease;
}

pre {
    white-space: pre-wrap;
    background: #0b1220;
    color: #d1e8ff;
    border: 2px solid #1e293b;
    border-radius: 10px;
    padding: 10px;
    min-height: 120px;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    border: 2px solid #111827;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.modal-card {
    width: min(520px, 100%);
    background: #fff;
    border: 3px solid var(--line);
    border-radius: 16px;
    box-shadow: 8px 8px 0 #111827;
    padding: 18px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.x-btn {
    margin-top: 0;
    min-width: 42px;
    padding: 8px 10px;
}

@keyframes drop-in {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes portal-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes portal-spin-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes portal-pulse {
    0%, 100% { transform: scale(0.92); opacity: 0.72; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes vortex-spin {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.02); }
}

@keyframes portal-core-pulse {
    0%, 100% { transform: scale(0.94); opacity: 0.85; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes spark-blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #111827, 0 10px 25px rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #111827, 0 14px 30px rgba(14, 165, 233, 0.62); }
}

@keyframes api-enter-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes api-card-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes api-orb-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -8px, 0); }
}

@keyframes api-button-glint {
    0% { left: -35%; }
    100% { left: 130%; }
}

@keyframes api-response-hit {
    0% { box-shadow: 5px 5px 0 #1f2937; }
    40% { box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #111827, 0 14px 26px rgba(56, 189, 248, 0.5); }
    100% { box-shadow: 5px 5px 0 #1f2937; }
}

@keyframes api-response-pre-hit {
    0% { border-color: #1e293b; }
    40% { border-color: #38bdf8; }
    100% { border-color: #1e293b; }
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .mission-slide {
        grid-template-columns: 1fr;
    }

    .explorer-gate {
        grid-template-columns: 1fr;
    }
}
