:root {
    --bg-0: #040812;
    --bg-1: #081328;
    --bg-2: #0d1c37;
    --panel: rgba(11, 22, 43, 0.78);
    --panel-strong: rgba(13, 29, 56, 0.94);
    --line: rgba(114, 168, 255, 0.26);
    --line-soft: rgba(114, 168, 255, 0.16);
    --text-main: #eef5ff;
    --text-sub: #a5bddf;
    --text-dim: #7b95ba;
    --primary-a: #3cb2ff;
    --primary-b: #2f6dff;
    --primary-glow: rgba(60, 178, 255, 0.42);
    --notify-success: #1fce8f;
    --notify-error: #f35d7a;
    --notify-info: #4aa3ff;
    --notify-warn: #ffb347;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-main);
    font-family: "Segoe UI", Tahoma, sans-serif;
    background:
        radial-gradient(circle at 10% -10%, rgba(66, 170, 255, 0.28), transparent 42%),
        radial-gradient(circle at 90% -30%, rgba(40, 108, 255, 0.2), transparent 48%),
        linear-gradient(145deg, var(--bg-0), var(--bg-1) 54%, var(--bg-2));
    overflow-x: hidden;
}

a {
    color: inherit;
}

.bg-grid,
.bg-aurora,
.bg-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.bg-grid {
    z-index: -3;
    background:
        linear-gradient(rgba(122, 177, 255, 0.05) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(90deg, rgba(122, 177, 255, 0.05) 1px, transparent 1px) 0 0 / 44px 44px;
    opacity: 0.45;
    animation: grid-shift 22s linear infinite;
}

.bg-aurora {
    z-index: -2;
    background:
        radial-gradient(circle at 20% 18%, rgba(88, 178, 255, 0.24), transparent 42%),
        radial-gradient(circle at 76% 24%, rgba(38, 116, 255, 0.22), transparent 47%);
    filter: blur(8px);
    animation: aurora-breathe 9s ease-in-out infinite;
}

.bg-vignette {
    z-index: -1;
    background: radial-gradient(circle at center, transparent 35%, rgba(0, 8, 24, 0.68) 100%);
}

.top-nav {
    width: min(1280px, calc(100% - 1.2rem));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(11px);
    background: linear-gradient(180deg, rgba(5, 12, 27, 0.9), rgba(5, 12, 27, 0.45));
    border-bottom: 1px solid var(--line-soft);
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
}

.brand-mark {
    border-radius: 9px;
    border: 1px solid rgba(104, 171, 255, 0.5);
    padding: 0.14rem 0.45rem;
    color: #dff0ff;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow: 0 0 24px rgba(66, 156, 255, 0.22);
}

.brand-name {
    font-weight: 700;
    color: #b8d8ff;
}

.nav-links {
    display: none;
    gap: 1.2rem;
    align-items: center;
    color: var(--text-sub);
    font-size: 0.92rem;
}

.nav-links a {
    text-decoration: none;
    transition: color 0.18s ease;
}

.nav-links a:hover {
    color: #fff;
}

.nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ghost-link {
    color: var(--text-sub);
    text-decoration: none;
    border-radius: 10px;
    padding: 0.48rem 0.62rem;
}

.ghost-link:hover {
    background: rgba(114, 168, 255, 0.12);
    color: #fff;
}

.home-shell {
    width: min(1180px, calc(100% - 1.2rem));
    margin: 0 auto;
    padding: 1.8rem 0 2.6rem;
}

.hero-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: stretch;
}

.hero-copy,
.hero-visual {
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: linear-gradient(150deg, rgba(10, 20, 39, 0.88), rgba(13, 31, 60, 0.78));
    box-shadow: 0 24px 66px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(10px);
}

.hero-copy {
    padding: clamp(1.3rem, 2.4vw, 2rem);
    animation: rise-in 0.7s ease both;
}

.hero-kicker {
    margin: 0;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    color: #bdd7ff;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(114, 168, 255, 0.32);
    background: rgba(11, 25, 49, 0.72);
    font-size: 0.82rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: #56bbff;
    box-shadow: 0 0 12px var(--primary-glow);
}

h1 {
    margin: 1rem 0 0;
    font-size: clamp(2rem, 5.3vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    max-width: 15ch;
}

.hero-sub {
    margin: 1rem 0 0;
    width: min(60ch, 100%);
    color: var(--text-sub);
    line-height: 1.58;
    font-size: clamp(0.98rem, 1.45vw, 1.18rem);
}

.hero-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.64rem;
    flex-wrap: wrap;
}

.hero-metrics {
    margin-top: 1.3rem;
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-metrics article {
    border-radius: 14px;
    padding: 0.75rem 0.7rem;
    border: 1px solid var(--line-soft);
    background: rgba(11, 23, 46, 0.84);
    animation: rise-in 0.9s ease both;
}

.hero-metrics h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2.3vw, 1.7rem);
}

.hero-metrics p {
    margin: 0.25rem 0 0;
    color: var(--text-dim);
    font-size: 0.86rem;
}

.hero-visual {
    position: relative;
    overflow: hidden;
    padding: clamp(1rem, 2.3vw, 1.5rem);
    display: grid;
    align-content: center;
    gap: 0.85rem;
    animation: rise-in 0.84s ease both;
}

.orbit {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.orbit span {
    position: absolute;
    border-radius: 999px;
    border: 1px dashed rgba(108, 164, 255, 0.26);
}

.orbit span:nth-child(1) {
    width: 220px;
    height: 220px;
    animation: spin 14s linear infinite;
}

.orbit span:nth-child(2) {
    width: 310px;
    height: 310px;
    animation: spin-reverse 19s linear infinite;
}

.orbit span:nth-child(3) {
    width: 420px;
    height: 420px;
    opacity: 0.7;
    animation: spin 24s linear infinite;
}

.preview-card {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(114, 168, 255, 0.35);
    border-radius: 16px;
    background: rgba(8, 19, 40, 0.94);
    padding: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    animation: bob 6s ease-in-out infinite;
}

.preview-title {
    margin: 0;
    font-weight: 700;
    color: #d7e8ff;
}

.preview-card ul {
    margin: 0.7rem 0;
    padding-left: 1rem;
    color: #bad2f3;
    line-height: 1.7;
}

.preview-card code {
    display: block;
    border-radius: 10px;
    padding: 0.66rem 0.74rem;
    border: 1px solid rgba(114, 168, 255, 0.3);
    background: rgba(16, 36, 67, 0.76);
    color: #d8e9ff;
    overflow-x: auto;
}

.chip-row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip-row span {
    border-radius: 999px;
    border: 1px solid rgba(114, 168, 255, 0.28);
    background: rgba(12, 27, 52, 0.82);
    color: #cfe2ff;
    font-size: 0.84rem;
    padding: 0.46rem 0.78rem;
    transition: transform 0.18s ease, border-color 0.2s ease;
}

.chip-row span:hover {
    transform: translateY(-2px);
    border-color: rgba(114, 168, 255, 0.58);
}

.panel {
    border-radius: 24px;
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    box-shadow: 0 22px 62px rgba(0, 0, 0, 0.46);
}

.glass {
    background: linear-gradient(145deg, var(--panel), var(--panel-strong));
    padding: clamp(1rem, 2.8vw, 1.7rem);
}

.staff-login {
    width: min(860px, 100%);
    margin: 1rem auto 0;
    animation: rise-in 0.96s ease both;
}

.code-showcase {
    width: min(900px, 100%);
    margin: 2.2rem auto 0;
    display: grid;
    gap: 1rem;
}

.section-head {
    text-align: center;
    margin-bottom: 0.2rem;
}

.section-kicker {
    margin: 0;
    color: #93beff;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-head h2 {
    margin: 0.45rem 0 0;
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
}

.section-head p {
    margin: 0.7rem auto 0;
    color: var(--text-sub);
    max-width: 60ch;
}

.code-card {
    border-radius: 16px;
    border: 1px solid rgba(114, 168, 255, 0.24);
    background: rgba(8, 18, 37, 0.9);
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
    animation: rise-in 0.75s ease both;
}

.code-card-head {
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.9rem;
    align-items: center;
    border-bottom: 1px solid rgba(114, 168, 255, 0.16);
    background: rgba(14, 30, 57, 0.85);
}

.code-card-head h3 {
    margin: 0;
    font-size: 1.18rem;
}

.code-card-head p {
    margin: 0.15rem 0 0;
    color: var(--text-sub);
    font-size: 0.9rem;
}

.code-copy {
    border: 1px solid rgba(114, 168, 255, 0.35);
    background: rgba(38, 83, 150, 0.22);
    color: #d9e9ff;
    border-radius: 9px;
    padding: 0.5rem 0.74rem;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.code-copy:hover {
    border-color: rgba(114, 168, 255, 0.6);
    transform: translateY(-1px);
}

.code-card pre {
    margin: 0;
    padding: 1rem;
    background: rgba(6, 14, 30, 0.95);
    color: #9fd5ff;
    font-family: Consolas, "Cascadia Code", "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.65;
    overflow-x: auto;
}

.site-footer {
    width: min(1180px, calc(100% - 1.2rem));
    margin: 0 auto 2rem;
    border-top: 1px solid rgba(114, 168, 255, 0.12);
    padding-top: 2rem;
}

.footer-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    padding-bottom: 1rem;
}

.footer-grid h3,
.footer-grid h4 {
    margin: 0;
}

.footer-grid p {
    color: var(--text-sub);
    line-height: 1.6;
}

.footer-grid ul {
    list-style: none;
    margin: 0.8rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.58rem;
}

.footer-grid a {
    text-decoration: none;
    color: #c6dcff;
}

.footer-grid a:hover {
    color: #fff;
}

.footer-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-actions a {
    border: 1px solid rgba(114, 168, 255, 0.2);
    border-radius: 10px;
    background: rgba(14, 30, 58, 0.64);
    padding: 0.42rem 0.7rem;
    font-size: 0.88rem;
}

.footer-newsletter {
    margin-top: 0.7rem;
    border: 1px solid rgba(114, 168, 255, 0.18);
    border-radius: 14px;
    background: rgba(9, 21, 42, 0.74);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.9rem;
    align-items: center;
}

.footer-newsletter h4 {
    margin: 0;
}

.footer-newsletter p {
    margin: 0.4rem 0 0;
    color: var(--text-sub);
}

.newsletter-form {
    display: flex;
    gap: 0.55rem;
    width: min(460px, 100%);
}

.newsletter-form input {
    flex: 1;
    min-width: 180px;
}

.newsletter-form button {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(120deg, var(--primary-a), var(--primary-b));
    color: #eff6ff;
    font-weight: 700;
    padding: 0 1rem;
    cursor: pointer;
}

.footer-meta {
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(114, 168, 255, 0.12);
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-meta div {
    display: inline-flex;
    gap: 0.95rem;
}

.eyebrow {
    margin: 0;
    color: #9fc6ff;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.73rem;
}

.brand h2 {
    margin: 0.5rem 0 0;
    font-size: clamp(1.52rem, 2.8vw, 2.1rem);
}

.sub {
    margin: 0.7rem 0 1rem;
    color: var(--text-sub);
}

.form-block {
    display: grid;
    gap: 0.88rem;
}

label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.92rem;
}

input {
    width: 100%;
    border: 1px solid rgba(114, 168, 255, 0.35);
    border-radius: 11px;
    background: rgba(7, 17, 35, 0.9);
    color: var(--text-main);
    padding: 0.76rem 0.84rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    outline: none;
    border-color: rgba(114, 168, 255, 0.75);
    box-shadow: 0 0 0 2px rgba(61, 141, 255, 0.24);
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.76rem;
    flex-wrap: wrap;
}

.row.end {
    justify-content: flex-end;
}

.remember-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.54rem;
    color: var(--text-sub);
    cursor: pointer;
}

.remember-wrap input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.remember-box {
    width: 21px;
    height: 21px;
    border-radius: 7px;
    border: 1px solid rgba(114, 168, 255, 0.35);
    background: rgba(9, 22, 44, 0.95);
    position: relative;
}

.remember-box::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.remember-wrap input:checked + .remember-box {
    border-color: #7bc4ff;
    background: linear-gradient(145deg, #4db4ff, #2f6dff);
    box-shadow: 0 0 0 4px rgba(66, 156, 255, 0.22);
}

.remember-wrap input:checked + .remember-box::before {
    transform: rotate(45deg) scale(1);
    opacity: 1;
}

.remember-text {
    font-size: 0.9rem;
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 0.8rem 1.02rem;
    min-width: 142px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    color: #eef5ff;
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.btn-primary {
    background: linear-gradient(120deg, var(--primary-a), var(--primary-b));
    box-shadow: 0 10px 24px rgba(53, 132, 255, 0.28);
}

.btn-secondary {
    background: linear-gradient(120deg, #2f476f, #263a5d);
}

.btn-steam {
    background: linear-gradient(120deg, #264a76, #133861);
}

.btn-outline {
    border: 1px solid rgba(114, 168, 255, 0.64);
    background: rgba(60, 144, 255, 0.08);
    color: #d5e7ff;
}

.link-btn {
    border: 0;
    background: transparent;
    color: #c2dbff;
    text-decoration: underline;
    cursor: pointer;
}

.auth-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.64rem;
}

.note {
    margin: 0.2rem 0 0;
    color: var(--text-sub);
    font-size: 0.9rem;
}

.message {
    min-height: 1.2rem;
    margin: 0;
    font-size: 0.9rem;
}

.message.ok { color: #77f2c2; }
.message.err { color: #ff93a8; }

.dialog {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(11, 24, 46, 0.97);
    color: var(--text-main);
    width: min(92vw, 460px);
    padding: 0;
}

.dialog::backdrop {
    background: rgba(0, 0, 0, 0.62);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.dialog[open].dialog-enter::backdrop {
    opacity: 1;
}

.dialog.dialog-enter {
    animation: dialog-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.dialog.dialog-leave {
    animation: dialog-out 0.22s ease forwards;
}

.dialog-body {
    display: grid;
    gap: 0.82rem;
    padding: 1.2rem;
}

.hidden {
    display: none;
}

.notify-host {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    display: grid;
    gap: 10px;
    width: min(92vw, 360px);
}

.notify {
    background: rgba(7, 18, 35, 0.95);
    border: 1px solid rgba(114, 168, 255, 0.3);
    border-left: 4px solid var(--notify-info);
    border-radius: 13px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
    padding: 0.74rem 0.88rem;
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    animation: notify-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.notify[data-type="success"] { border-left-color: var(--notify-success); }
.notify[data-type="error"] { border-left-color: var(--notify-error); }
.notify[data-type="warn"] { border-left-color: var(--notify-warn); }
.notify[data-type="info"] { border-left-color: var(--notify-info); }

.notify-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.notify-body {
    margin: 0.26rem 0 0;
    color: #c8dcfc;
    font-size: 0.86rem;
}

.notify.hide {
    animation: notify-out 0.24s ease forwards;
}

@keyframes grid-shift {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-44px, -44px, 0); }
}

@keyframes aurora-breathe {
    0%, 100% { opacity: 0.9; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.04); }
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    from { transform: rotate(0); }
    to { transform: rotate(-360deg); }
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes notify-in {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes notify-out {
    to { opacity: 0; transform: translateY(12px) scale(0.96); }
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dialog-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(12px) scale(0.96); }
}

@media (min-width: 980px) {
    .nav-links {
        display: inline-flex;
    }
}

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-newsletter {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .top-nav {
        min-height: 64px;
    }

    .ghost-link,
    .nav-actions .nav-btn:last-child {
        display: none;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .code-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .newsletter-form {
        width: 100%;
        flex-direction: column;
    }

    .newsletter-form button {
        min-height: 44px;
    }

    .footer-meta {
        flex-direction: column;
    }

    .auth-buttons .btn {
        width: 100%;
    }
}
