@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Oxanium:wght@500;600;700;800&display=swap');

:root {
    color-scheme: dark;
    --bg: #070a10;
    --bg-elev: #0e1420;
    --panel: rgba(14, 20, 31, .86);
    --panel-strong: rgba(11, 16, 26, .95);
    --text: #f5f8fc;
    --muted: #9fb0c7;
    --line: rgba(215, 229, 248, .13);
    --line-strong: rgba(255, 155, 58, .38);
    --accent: #ff932f;
    --accent-2: #ff6b1a;
    --accent-soft: rgba(255, 147, 47, .14);
    --accent-glow: rgba(255, 147, 47, .34);
    --danger: #ff7a8f;
    --success: #6ee7b7;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 24px 60px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Kanit', Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.nav, main, footer { position: relative; z-index: 1; }

/* Custom sleek dark scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #070a10; }
::-webkit-scrollbar-thumb { background: #232f44; border-radius: 999px; border: 2px solid #070a10; }
::-webkit-scrollbar-thumb:hover { background: #384a68; }

/* Full-page game artwork */
.site-backdrop { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; background: #070d19; }
.backdrop-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 80% 50%; transform-origin: 68% 52%; filter: saturate(1.08) contrast(1.04); }
.backdrop-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 147, 47, .12), transparent 42%),
        linear-gradient(90deg, rgba(5, 9, 17, .88), rgba(5, 9, 17, .52) 40%, rgba(5, 9, 17, .1) 74%),
        linear-gradient(0deg, rgba(7, 10, 16, .96), transparent 28%, transparent 78%, rgba(7, 10, 16, .45));
}
.backdrop-streak {
    position: absolute;
    left: 48%;
    right: -20%;
    bottom: 12%;
    height: 1.5px;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 172, 82, .85), transparent);
    transform: rotate(-12deg);
    box-shadow: 0 0 18px rgba(255, 147, 47, .55);
}
.motion-on .backdrop-image { animation: night-camera 18s ease-in-out infinite alternate; }
.motion-on .backdrop-streak { animation: night-streak 7s ease-in-out infinite; }
@keyframes night-camera { from { transform: scale(1.02) translateX(-.3%); } to { transform: scale(1.07) translateX(.3%); } }
@keyframes night-streak { 0%, 36%, 100% { opacity: 0; transform: translateX(18%) rotate(-12deg); } 48% { opacity: .65; } 66% { opacity: 0; transform: translateX(-36%) rotate(-12deg); } }

/* Top Navigation Bar (Glassmorphism) */
.nav {
    position: sticky;
    top: 14px;
    z-index: 30;
    width: min(1280px, calc(100% - 64px));
    min-height: 74px;
    margin: 14px auto 0;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(10, 15, 24, .76);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 238, 255, .12);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    font: 700 1.05rem 'Oxanium', 'Kanit', sans-serif;
    letter-spacing: .8px;
}
.brand b {
    color: var(--accent);
    text-shadow: 0 0 18px rgba(255, 147, 47, .45);
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 40px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(145deg, rgba(255, 147, 47, .28), rgba(255, 107, 26, .1));
    border: 1px solid rgba(255, 157, 66, .75);
    clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
    box-shadow: 0 0 22px rgba(255, 147, 47, .28);
}
.nav nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}
.nav nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: #d3dfef;
    white-space: nowrap;
    font: 600 .84rem 'Oxanium', 'Kanit', sans-serif;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.nav nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}
.nav nav .download-button {
    padding: 0 15px;
    border: 1px solid rgba(255, 147, 47, .75);
    color: #ffd1a3;
    background: rgba(255, 147, 47, .08);
}
.nav nav .download-button:hover {
    background: rgba(255, 147, 47, .2);
    color: #fff;
    box-shadow: 0 0 18px rgba(255, 147, 47, .22);
}
.nav nav .discord-button {
    padding: 0 13px;
    color: #fff;
    background: linear-gradient(135deg, #6270ff, #4e5be0);
    box-shadow: 0 4px 14px rgba(88, 101, 242, .3);
}
.nav nav .discord-button:hover {
    background: linear-gradient(135deg, #727eff, #5865f2);
    transform: translateY(-1px);
}
.nav nav .facebook-button {
    padding: 0 13px;
    color: #fff;
    background: linear-gradient(135deg, #2585ff, #1464cc);
    box-shadow: 0 4px 14px rgba(24, 119, 242, .28);
}
.nav nav .facebook-button:hover {
    background: linear-gradient(135deg, #3a92ff, #1877f2);
    transform: translateY(-1px);
}
.nav nav .register-button {
    padding: 0 18px;
    color: #1c0f04;
    font-weight: 700;
    background: linear-gradient(135deg, #ffa74a, #ff811c);
    box-shadow: 0 6px 20px rgba(255, 147, 47, .32);
}
.nav nav .register-button:hover {
    color: #1c0f04;
    background: linear-gradient(135deg, #ffba6b, #ff932f);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(255, 147, 47, .44);
}
.nav img { display: block; object-fit: contain; flex: 0 0 auto; }

/* Hero Section */
.hero {
    width: min(1280px, calc(100% - 64px));
    min-height: max(660px, calc(100svh - 102px));
    margin: auto;
    padding: 64px 0 84px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-content { width: min(570px, 50%); min-width: 0; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffbe7d;
    font: 700 .7rem 'Oxanium', 'Kanit', sans-serif;
    letter-spacing: 2.6px;
    text-transform: uppercase;
}
.eyebrow-line {
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #ffd19c);
    box-shadow: 0 0 10px var(--accent-glow);
    flex: 0 0 auto;
}
.hero h1 {
    margin: 20px 0 22px;
    font: 800 clamp(3.6rem, 6.4vw, 6.4rem)/.95 'Oxanium', sans-serif;
    letter-spacing: -2.5px;
    text-shadow: 0 12px 38px rgba(0, 0, 0, .55);
}
.hero h1 em {
    color: #ffa752;
    font-style: normal;
    text-shadow: 0 0 36px rgba(255, 147, 47, .36);
}
.hero p {
    max-width: 440px;
    margin: 0;
    color: #d6dfec;
    font-size: 1.02rem;
    line-height: 1.85;
    text-shadow: 0 2px 18px rgba(5, 10, 18, .9);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 26px;
    color: #1f1004;
    background: linear-gradient(135deg, #ffa74a, #ff811c);
    border: 1px solid rgba(255, 195, 130, .45);
    border-radius: var(--radius-sm);
    font: 700 .96rem 'Oxanium', 'Kanit', sans-serif;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(255, 135, 32, .3), inset 0 1px 0 rgba(255, 255, 255, .32);
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover {
    background: linear-gradient(135deg, #ffb96b, #ff9230);
    border-color: rgba(255, 215, 168, .7);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(255, 147, 47, .42), inset 0 1px 0 rgba(255, 255, 255, .42);
}
.btn:active { transform: translateY(0); }
.btn-ghost {
    color: #f3f7fd;
    background: rgba(12, 18, 29, .68);
    backdrop-filter: blur(10px);
    border-color: rgba(220, 232, 248, .26);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}
.btn-ghost:hover {
    color: #fff;
    background: rgba(26, 36, 54, .88);
    border-color: rgba(255, 147, 47, .55);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .35);
}
.btn-full { width: 100%; margin-top: 10px; }

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid rgba(236, 241, 250, .14);
}
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats strong {
    font: 700 1.3rem 'Oxanium', sans-serif;
    color: #fff;
    letter-spacing: .5px;
}
.stats span { color: var(--muted); font-size: .8rem; }

.hero-bottom {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.scroll-link { display: inline-flex; align-items: center; gap: 10px; color: #c4d0e0; font-size: .84rem; transition: color .2s; }
.scroll-link:hover { color: #fff; }
.scroll-link span { color: var(--accent); font-size: 1.2rem; }
.scene-toggle {
    min-height: 38px;
    padding: 7px 14px;
    color: #dce6f3;
    background: rgba(10, 15, 25, .74);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(222, 232, 245, .2);
    border-radius: var(--radius-sm);
    font-size: .78rem;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.scene-toggle:hover { background: rgba(28, 38, 56, .9); border-color: rgba(255, 147, 47, .45); }

/* Download & Features Cards */
.download-section {
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto 48px;
    padding: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(16, 24, 38, .9), rgba(10, 15, 24, .95));
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-card);
    scroll-margin-top: 104px;
}
.download-heading h2 { margin: 12px 0 8px; font-size: clamp(1.65rem, 3vw, 2.1rem); line-height: 1.25; }
.download-heading p { margin: 0; color: var(--muted); }
.download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
    padding: 26px 24px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 147, 47, .24);
    background: linear-gradient(135deg, rgba(255, 147, 47, .08), rgba(12, 18, 29, .75));
}
.download-label { color: #ffbe7d; font: 600 .68rem 'Oxanium', sans-serif; letter-spacing: 2px; }
.download-card h3 { margin: 8px 0 5px; font-size: 1.35rem; }
.download-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.download-cta { flex: 0 0 auto; }
.download-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.download-steps article {
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(8, 12, 20, .6);
}
.download-steps span { display: block; margin-bottom: 6px; color: var(--accent); font: 700 .8rem 'Oxanium', sans-serif; letter-spacing: 1px; }
.download-steps strong { color: #e2eaf6; font-size: .95rem; font-weight: 500; }

.features {
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto 64px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    scroll-margin-top: 104px;
}
.features article {
    min-width: 0;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(16, 23, 36, .9), rgba(10, 15, 24, .95));
    box-shadow: var(--shadow-card);
    transition: border-color .22s ease, transform .22s ease;
}
.features article:hover {
    border-color: rgba(255, 147, 47, .42);
    transform: translateY(-3px);
}
.features article > span {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-soft);
    border: 1px solid rgba(255, 147, 47, .35);
    color: var(--accent);
    font: 700 .8rem 'Oxanium', sans-serif;
}
.features h2 { margin: 16px 0 10px; font-size: 1.22rem; }
.features p { margin: 0; color: var(--muted); line-height: 1.8; font-size: .92rem; }

footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    width: min(1180px, calc(100% - 64px));
    margin: auto;
    padding: 20px 0 36px;
    border-top: 1px solid var(--line);
    color: #95a5bc;
    font-size: .82rem;
}

/* Registration Page */
.register-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 14% 28%, rgba(255, 130, 35, .14), transparent 52%),
        radial-gradient(ellipse at 86% 78%, rgba(45, 100, 210, .12), transparent 50%),
        var(--bg);
}
.register-wrap {
    width: min(1080px, calc(100% - 64px));
    min-height: calc(100svh - 104px);
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    align-items: center;
    gap: 56px;
    padding: 48px 0;
}
.register-intro h1 { margin: 18px 0; font: 700 clamp(2.5rem, 5vw, 4.2rem)/1.14 'Oxanium', 'Kanit', sans-serif; letter-spacing: -1px; }
.register-intro h1 em { color: var(--accent); font-style: normal; text-shadow: 0 0 28px rgba(255, 147, 47, .3); }
.register-intro p { color: var(--muted); font-size: 1.02rem; }
.register-intro ul { margin-top: 26px; padding: 0; list-style: none; color: #d5dfec; }
.register-intro li { margin: 12px 0; display: flex; align-items: center; gap: 10px; }
.register-intro li::before {
    content: '✓';
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    flex: 0 0 auto;
}
.register-card {
    padding: 34px;
    background: linear-gradient(170deg, rgba(16, 23, 36, .92), rgba(10, 15, 24, .96));
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.register-card h2 { margin: 0; font-size: 1.65rem; }
.muted { margin: 6px 0 0; color: var(--muted); }
form { margin-top: 22px; }
label { display: block; margin: 16px 0; color: #d5dfec; font-size: .9rem; }
input {
    width: 100%;
    min-height: 48px;
    margin-top: 7px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(7, 11, 18, .9);
    border: 1px solid #303d52;
    border-radius: var(--radius-sm);
    font-size: .98rem;
    transition: border-color .2s, box-shadow .2s;
}
input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 147, 47, .18);
}
.alert { margin: 18px 0; padding: 14px 16px; border: 1px solid; border-radius: var(--radius-sm); font-size: .9rem; }
.alert.error { color: #ffc5cf; background: rgba(255, 102, 124, .1); border-color: rgba(255, 102, 124, .45); }
.alert.success { color: #bdffdf; background: rgba(88, 230, 169, .1); border-color: rgba(88, 230, 169, .45); }
.terms { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: .78rem; }
.trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Responsive */
@media (max-width: 1100px) {
    .nav { width: calc(100% - 40px); padding: 10px 16px; gap: 12px; }
    .nav nav { gap: 7px; }
    .nav nav > a:not([class]) { display: none; }
    .hero { width: calc(100% - 48px); }
    .hero-content { width: 54%; }
    .hero h1 { font-size: clamp(3.6rem, 7vw, 4.9rem); }
    .hero .eyebrow { letter-spacing: 1.5px; font-size: .64rem; }
    .hero p { max-width: 380px; }
    .stats { gap: 24px; }
}
@media (max-width: 760px) {
    .nav { position: relative; top: 0; width: calc(100% - 28px); margin-top: 12px; padding: 14px; flex-wrap: wrap; gap: 12px; }
    .nav nav { width: 100%; justify-content: flex-start; gap: 8px; }
    .nav nav a { min-height: 36px; font-size: .78rem; padding: 0 10px; }
    .nav nav .download-button, .nav nav .discord-button, .nav nav .facebook-button, .nav nav .register-button { padding: 0 11px; }
    .site-backdrop { position: absolute; top: 100px; bottom: auto; height: 640px; }
    .backdrop-image { position: absolute; top: 0; left: -54%; width: 158%; height: auto; object-fit: contain; object-position: center; transform-origin: 74% 30%; }
    .backdrop-shade { background: linear-gradient(180deg, rgba(7, 10, 16, .1) 12%, rgba(7, 10, 16, .24) 25%, #070a10 62%), linear-gradient(90deg, rgba(7, 10, 16, .28), transparent 75%); }
    .backdrop-streak { top: 34%; bottom: auto; }
    .hero { width: calc(100% - 32px); min-height: 0; padding: clamp(190px, 46vw, 320px) 0 36px; justify-content: flex-start; }
    .hero-content { width: 100%; }
    .hero h1 { font-size: clamp(3.4rem, 10.5vw, 4.8rem); }
    .hero h1 em { display: block; max-width: 560px; }
    .hero p { max-width: 470px; }
    .hero-bottom { position: static; margin-top: 26px; }
    .download-section { width: calc(100% - 32px); margin-bottom: 28px; padding: 24px; }
    .download-card { flex-direction: column; align-items: flex-start; padding: 20px; }
    .download-steps { grid-template-columns: 1fr; gap: 12px; }
    .features { width: calc(100% - 32px); grid-template-columns: 1fr; margin-bottom: 32px; gap: 14px; }
    .features article { padding: 24px; }
    footer { width: calc(100% - 32px); }
    .register-wrap { width: calc(100% - 32px); min-height: 0; grid-template-columns: 1fr; gap: 28px; padding: 30px 0; }
    .register-page .nav { flex-wrap: nowrap; }
    .register-page .nav nav { width: auto; }
    .register-page .nav nav > a:not([class]) { display: inline-flex; }
}
@media (max-width: 420px) {
    .nav, .hero, .download-section, .features, footer, .register-wrap { width: calc(100% - 24px); }
    .nav nav { gap: 6px; }
    .nav nav a { font-size: .72rem; }
    .nav nav .download-button, .nav nav .discord-button, .nav nav .facebook-button, .nav nav .register-button { padding: 0 9px; }
    .hero h1 { font-size: clamp(3rem, 12vw, 3.8rem); letter-spacing: -1.8px; }
    .btn { padding: 0 16px; font-size: .88rem; gap: 8px; }
    .download-cta { width: 100%; }
    .register-card { padding: 24px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .features article { transition: none; }
}
