:root {
  --ink: #06100e;
  --ink-soft: #0b1916;
  --panel: #10231e;
  --paper: #eff8ef;
  --muted: #9aafa8;
  --acid: #39f0a5;
  --acid-deep: #14bb79;
  --amber: #ffb44c;
  --line: rgba(220, 255, 239, 0.14);
  --display: "Archivo Black", Impact, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--body); font-size: 16px; overflow-x: hidden; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { color: var(--ink); background: var(--acid); }

.noise { position: fixed; inset: 0; z-index: 99; opacity: .035; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.site-header { position: fixed; top: 0; left: 0; right: 0; height: 78px; display: flex; align-items: center; gap: 34px; padding: 0 clamp(20px, 5vw, 76px); border-bottom: 1px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(4,12,10,.92), rgba(4,12,10,.36)); backdrop-filter: blur(14px); z-index: 50; transition: height .3s, background .3s; }
.site-header.is-scrolled { height: 66px; background: rgba(4,12,10,.94); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 15px; letter-spacing: -.025em; white-space: nowrap; }
.brand b { color: var(--acid); font-weight: inherit; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; flex: 0 0 52px; filter: drop-shadow(0 5px 12px rgba(0,0,0,.32)); }
.brand-mark { width: 28px; height: 28px; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 2px; transform: rotate(45deg); }
.brand-mark i { background: var(--acid); display: block; }
.brand-mark i:first-child { grid-row: 1 / 3; }
.brand-mark i:last-child { opacity: .42; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(20px, 3vw, 46px); }
.site-nav a { color: #c8d7d2; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: color .2s; }
.site-nav a:hover { color: var(--acid); }
.nav-auth-button { padding: 0; border: 0; background: transparent; color: var(--acid); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.nav-auth-button:hover { color: white; }
.header-cta { padding: 11px 17px; border: 1px solid var(--acid); color: var(--acid); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: .2s; }
.header-cta:hover { background: var(--acid); color: var(--ink); }
.menu-button { display: none; margin-left: auto; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; }
.menu-button span { display: block; width: 24px; height: 2px; margin: 6px auto; background: var(--paper); transition: .25s; }

.hero { min-height: 780px; height: 100svh; position: relative; display: flex; align-items: center; isolation: isolate; overflow: hidden; }
.hero-backdrop { position: absolute; inset: 0; z-index: -3; background: linear-gradient(90deg, rgba(3,10,8,.94) 0%, rgba(3,10,8,.72) 38%, rgba(3,10,8,.18) 78%), linear-gradient(0deg, var(--ink), transparent 24%), url("./assets/hero.png") center / cover no-repeat; transform: scale(1.02); }
.hero-glow { position: absolute; z-index: -2; width: 50vw; height: 50vw; right: -15vw; bottom: -20vw; border-radius: 50%; background: rgba(36,235,151,.17); filter: blur(90px); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to right, black, transparent 70%); }
.hero-content { width: min(800px, 76vw); margin-left: clamp(20px, 8vw, 132px); padding-top: 48px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #cfe4db; font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 0 rgba(57,240,165,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(57,240,165,0); } 100% { box-shadow: 0 0 0 0 rgba(57,240,165,0); } }
h1, h2 { font-family: var(--display); text-transform: uppercase; letter-spacing: -.055em; margin: 0; line-height: .94; }
h1 { margin-top: 24px; font-size: clamp(4rem, 8vw, 8.8rem); text-shadow: 0 9px 40px rgba(0,0,0,.35); }
h1 span, h2 em { color: var(--acid); font-style: normal; }
.hero-copy { max-width: 580px; margin: 28px 0 34px; color: #bdccc7; font-size: clamp(1rem, 1.3vw, 1.18rem); line-height: 1.7; }
.server-connect { display: flex; align-items: stretch; width: min(610px, 100%); }
.ip-card { flex: 1; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; padding: 17px 58px 17px 21px; border: 0; background: var(--acid); color: var(--ink); cursor: pointer; text-align: left; transition: transform .2s, box-shadow .2s; }
.ip-card:hover { transform: translateY(-3px); box-shadow: 0 14px 45px rgba(30,218,139,.22); }
.ip-meta { font-size: .65rem; font-weight: 800; letter-spacing: .16em; opacity: .62; }
.ip-card strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: clamp(1rem, 2vw, 1.3rem); }
.copy-icon { position: absolute; top: 50%; right: 20px; width: 23px; transform: translateY(-50%); }
.copy-icon svg { fill: none; stroke: currentColor; stroke-width: 2; }
.player-count { display: flex; align-items: center; gap: 12px; min-width: 180px; padding: 15px 21px; border: 1px solid var(--line); background: rgba(4,16,13,.8); backdrop-filter: blur(10px); }
.status-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 15px var(--acid); }
.player-count div { display: flex; flex-direction: column; }
.player-count strong { font-size: 1.05rem; }
.player-count small { color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .1em; }
.online-count { margin-top: 7px; color: var(--acid); font-size: .72rem; font-weight: 700; }
.player-count[data-server-status="unavailable"] .status-dot,
.player-count[data-server-status="loading"] .status-dot { background: #82968f; box-shadow: none; }
.player-count[data-server-status="unavailable"] .online-count { color: var(--muted); }
.copy-feedback { min-height: 20px; margin: 11px 0 0; color: #82968f; font-size: .75rem; }
.hero-side-note { position: absolute; right: clamp(22px, 4.5vw, 76px); top: 50%; display: flex; flex-direction: column; align-items: center; gap: 12px; transform: translateY(-45%); }
.hero-side-note span { color: var(--acid); font-weight: 800; font-size: .75rem; }
.hero-side-note div { width: 1px; height: 80px; background: linear-gradient(var(--acid), transparent); }
.hero-side-note p { writing-mode: vertical-rl; margin: 0; color: #a9bbb5; font-size: .68rem; line-height: 1.5; letter-spacing: .13em; text-transform: uppercase; }
.scroll-cue { position: absolute; left: clamp(20px, 8vw, 132px); bottom: 30px; display: flex; align-items: center; gap: 12px; color: #83938e; font-size: .67rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.scroll-cue span { width: 42px; height: 1px; background: var(--acid); }

.world-section { padding: clamp(100px, 12vw, 180px) clamp(20px, 8vw, 132px); background: var(--paper); color: var(--ink); }
.section-heading { display: grid; grid-template-columns: 1fr 2.1fr 1.1fr; gap: 40px; align-items: start; }
.section-index { color: var(--acid-deep); font-size: .68rem; font-weight: 800; letter-spacing: .15em; }
.section-heading h2, .feature-copy h2, .rules-intro h2, .profile-copy h2, .join-section h2 { font-size: clamp(2.7rem, 5vw, 5.7rem); }
.section-heading p { margin: 0; font-size: 1rem; line-height: 1.75; color: #50615b; }
.world-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 2px; margin-top: 80px; }
.world-card { min-height: 330px; padding: 26px 30px; display: flex; flex-direction: column; justify-content: space-between; background: #dfe9df; transition: transform .35s, background .35s; }
.world-card:hover { transform: translateY(-7px); background: #d7e4d8; }
.world-card--large { grid-row: span 2; min-height: 662px; background: var(--ink-soft); color: white; }
.world-card--large:hover { background: #0d211b; }
.world-card--accent { background: var(--acid); }
.world-card--accent:hover { background: #2cde98; }
.card-number { align-self: flex-end; font-size: .68rem; font-weight: 800; letter-spacing: .1em; opacity: .55; }
.pixel-icon { font-size: clamp(4rem, 8vw, 8rem); color: var(--acid); line-height: 1; }
.world-card:not(.world-card--large) .pixel-icon { font-size: 4rem; color: var(--ink); }
.world-card span { font-size: .63rem; font-weight: 800; letter-spacing: .16em; color: var(--acid-deep); }
.world-card--large span { color: var(--acid); }
.world-card h3 { margin: 11px 0; max-width: 500px; font-family: var(--display); font-size: clamp(1.7rem, 3vw, 3.2rem); line-height: 1.05; letter-spacing: -.04em; text-transform: uppercase; }
.world-card:not(.world-card--large) h3 { font-size: clamp(1.35rem, 2.1vw, 2.2rem); }
.world-card p { max-width: 480px; margin: 0; color: #85968f; line-height: 1.7; }
.world-card:not(.world-card--large) p { color: #43544e; font-size: .9rem; }

.features-section { position: relative; padding: 160px clamp(20px, 8vw, 132px) 130px; overflow: hidden; }
.feature-rail { position: absolute; top: 28px; left: -20px; white-space: nowrap; font-family: var(--display); font-size: clamp(4rem, 9vw, 10rem); color: transparent; -webkit-text-stroke: 1px rgba(59,240,165,.12); letter-spacing: -.04em; }
.feature-layout { position: relative; display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(50px, 9vw, 150px); }
.feature-copy { position: sticky; top: 130px; align-self: start; }
.feature-copy h2 { margin-top: 22px; }
.feature-copy p { max-width: 430px; margin-top: 28px; color: var(--muted); line-height: 1.75; }
.feature-list { border-top: 1px solid var(--line); }
.feature-item { display: grid; grid-template-columns: 48px 1fr 30px; gap: 20px; align-items: start; padding: 34px 0; border-bottom: 1px solid var(--line); }
.feature-item > span { color: var(--acid); font-size: .68rem; font-weight: 800; }
.feature-item h3 { margin: 0 0 9px; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.feature-item p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.feature-item b { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line); color: var(--acid); font-weight: 400; }

.rules-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 9vw, 150px); padding: 130px clamp(20px, 8vw, 132px); background: var(--paper); color: var(--ink); }
.rules-intro h2 { margin-top: 24px; }
.rule { border-top: 1px solid #bdc9c0; }
.rule:last-child { border-bottom: 1px solid #bdc9c0; }
.rule summary { display: grid; grid-template-columns: 48px 1fr 30px; gap: 18px; align-items: center; padding: 27px 0; cursor: pointer; list-style: none; }
.rule summary::-webkit-details-marker { display: none; }
.rule summary span { color: var(--acid-deep); font-size: .68rem; font-weight: 800; }
.rule summary strong { font-size: 1.15rem; }
.rule summary i { position: relative; width: 24px; height: 24px; }
.rule summary i::before, .rule summary i::after { content: ""; position: absolute; top: 11px; left: 3px; width: 18px; height: 2px; background: var(--ink); transition: .25s; }
.rule summary i::after { transform: rotate(90deg); }
.rule[open] summary i::after { transform: rotate(0); }
.rule p { margin: -4px 36px 28px 66px; color: #50615b; line-height: 1.7; }

.profile-section { position: relative; min-height: 750px; display: grid; grid-template-columns: 1fr 440px; gap: 100px; align-items: center; padding: 130px clamp(20px, 10vw, 165px); overflow: hidden; background: #081511; }
.profile-copy { position: relative; z-index: 2; }
.soon { display: inline-block; margin: 24px 0 18px; padding: 7px 10px; background: rgba(57,240,165,.12); color: var(--acid); border: 1px solid rgba(57,240,165,.3); font-size: .65rem; font-weight: 800; letter-spacing: .13em; }
.profile-copy p { max-width: 610px; color: var(--muted); line-height: 1.75; }
.profile-copy ul { display: flex; flex-wrap: wrap; gap: 20px 30px; padding: 0; margin: 32px 0 0; list-style: none; color: #cad8d3; font-size: .8rem; font-weight: 700; }
.profile-copy li { display: flex; align-items: center; gap: 9px; }
.profile-copy li span { width: 7px; height: 7px; background: var(--acid); }
.profile-login-button { margin-top: 34px; padding: 15px 19px; border: 1px solid var(--acid); background: var(--acid); color: var(--ink); font-weight: 800; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.profile-login-button:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(57,240,165,.16); }
.profile-card { position: relative; z-index: 2; padding: 28px; border: 1px solid rgba(57,240,165,.27); background: rgba(15,35,29,.78); box-shadow: 0 45px 100px rgba(0,0,0,.35); backdrop-filter: blur(18px); }
.profile-card-top { display: flex; justify-content: space-between; color: var(--muted); font-size: .61rem; letter-spacing: .13em; font-weight: 800; }
.profile-card-top b { color: var(--acid); }
.avatar-placeholder { width: 116px; height: 116px; display: grid; place-items: center; margin: 42px auto 23px; background: var(--acid); color: var(--ink); box-shadow: 10px 10px 0 rgba(57,240,165,.12); }
.avatar-placeholder span { font-family: var(--display); font-size: 3.5rem; }
.profile-card h3 { margin: 0; text-align: center; font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; }
.profile-card > p { color: var(--muted); text-align: center; font-size: .8rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 30px; border-top: 1px solid var(--line); }
.stat-row div { padding: 20px 5px 0; text-align: center; border-right: 1px solid var(--line); }
.stat-row div:last-child { border: 0; }
.stat-row small { display: block; color: #71867f; font-size: .54rem; font-weight: 800; letter-spacing: .1em; }
.stat-row strong { display: block; margin-top: 7px; color: var(--acid); }
.profile-balance { margin-top: 24px; padding: 20px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(160,220,80,.05); text-align: center; }
.profile-balance small { display: block; color: #91a49d; font-size: .65rem; letter-spacing: .12em; }
.profile-balance strong { display: block; margin: 8px 0; color: var(--acid); font-size: 1.7rem; overflow-wrap: anywhere; }
.profile-balance span { display: block; color: #91a49d; font-size: .7rem; line-height: 1.5; }
.profile-logout-button { width: 100%; margin-top: 25px; padding: 12px 16px; border: 1px solid var(--line); background: transparent; color: #c5d5cf; font-weight: 700; cursor: pointer; }
.profile-logout-button:hover { border-color: var(--acid); color: var(--acid); }
.profile-orbit { position: absolute; width: 780px; height: 780px; right: -130px; top: 50%; border: 1px solid rgba(57,240,165,.09); border-radius: 50%; transform: translateY(-50%); }
.profile-orbit::before, .profile-orbit::after { content: ""; position: absolute; border: 1px solid rgba(57,240,165,.09); border-radius: 50%; inset: 120px; }
.profile-orbit::after { inset: 260px; background: rgba(57,240,165,.04); }
.profile-orbit span { position: absolute; width: 10px; height: 10px; background: var(--acid); transform: rotate(45deg); }
.profile-orbit span:nth-child(1) { left: 72px; top: 135px; }.profile-orbit span:nth-child(2) { right: 0; top: 380px; }.profile-orbit span:nth-child(3) { left: 230px; bottom: 35px; }

.join-section { padding: clamp(100px, 13vw, 180px) 20px; text-align: center; background: var(--acid); color: var(--ink); }
.join-section > p { margin: 0 0 20px; font-size: .75rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.join-section h2 em { color: var(--ink); -webkit-text-stroke: 2px var(--ink); -webkit-text-fill-color: transparent; }
.join-copy { display: flex; align-items: center; justify-content: space-between; gap: 40px; width: min(540px, 92vw); margin: 45px auto 15px; padding: 19px 22px; border: 2px solid var(--ink); background: var(--ink); color: white; cursor: pointer; transition: transform .2s; }
.join-copy:hover { transform: translateY(-4px); }
.join-copy span { font-weight: 800; }
.join-copy b { color: var(--acid); font-size: .68rem; letter-spacing: .1em; }
.join-section small { font-size: .68rem; font-weight: 700; opacity: .65; }

footer { min-height: 150px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; padding: 30px clamp(20px, 5vw, 76px); background: #040b09; }
footer p { color: var(--muted); font-size: .75rem; }
footer > span { justify-self: end; color: #62736d; font-size: .62rem; letter-spacing: .12em; }
[hidden] { display: none !important; }
.auth-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(2,8,6,.82); backdrop-filter: blur(12px); }
.auth-dialog { position: relative; width: min(470px, 100%); padding: 38px; border: 1px solid rgba(57,240,165,.3); background: #0a1814; box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.auth-close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; color: white; font-size: 1.5rem; cursor: pointer; }
.auth-logo { width: 78px; height: 78px; object-fit: contain; display: block; margin-bottom: 20px; }
.auth-kicker { color: var(--acid); font-size: .68rem; font-weight: 800; letter-spacing: .15em; }
.auth-dialog h2 { margin: 12px 0 14px; font-size: clamp(2rem, 7vw, 3.1rem); }
.auth-dialog > p { margin: 0 0 27px; color: var(--muted); line-height: 1.6; }
.auth-dialog form { display: grid; gap: 10px; }
.auth-dialog label { margin-top: 8px; color: #d8e4df; font-size: .8rem; font-weight: 700; }
.auth-dialog input { width: 100%; padding: 15px 16px; border: 1px solid var(--line); outline: 0; background: #06100e; color: white; font: inherit; }
.auth-dialog input:focus { border-color: var(--acid); box-shadow: 0 0 0 3px rgba(57,240,165,.09); }
.auth-dialog form > button { margin-top: 9px; padding: 15px 18px; border: 0; background: var(--acid); color: var(--ink); font-weight: 800; cursor: pointer; }
.auth-dialog form > button:disabled { cursor: wait; opacity: .65; }
.auth-dialog > small { display: block; margin-top: 19px; color: #71867f; font-size: .72rem; }
.auth-message { min-height: 21px; margin: 4px 0 0; color: #ff9e7a; font-size: .78rem; line-height: 1.5; }
body.auth-open { overflow: hidden; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .75s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .site-nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 12px 24px 24px; background: rgba(4,12,10,.98); transform: translateY(-130%); transition: transform .3s; z-index: -1; }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav a { width: 100%; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
  .nav-auth-button { width: 100%; padding: 18px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: .9rem; }
  .menu-button { display: block; }
  .menu-button[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-button[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .header-cta { display: none; }
  .section-heading { grid-template-columns: 1fr 2.6fr; }
  .section-heading p { grid-column: 2; }
  .feature-layout, .rules-section { grid-template-columns: 1fr; }
  .feature-copy { position: static; }
  .profile-section { grid-template-columns: 1fr; gap: 55px; }
  .profile-card { width: min(440px, 100%); }
  .profile-orbit { right: -400px; }
}

@media (max-width: 700px) {
  .site-header { height: 66px; padding: 0 18px; }
  .brand { font-size: 12px; gap: 7px; }
  .brand-logo { width: 44px; height: 44px; flex-basis: 44px; }
  .hero { min-height: 720px; }
  .hero-content { width: auto; margin: 0 18px; padding-top: 30px; }
  h1 { font-size: clamp(3.4rem, 17vw, 5rem); }
  .hero-copy { margin: 22px 0 28px; font-size: .95rem; }
  .server-connect { flex-direction: column; }
  .player-count { min-width: 0; }
  .hero-side-note { display: none; }
  .scroll-cue { left: 18px; bottom: 20px; }
  .world-section, .features-section, .rules-section, .profile-section { padding-left: 18px; padding-right: 18px; }
  .section-heading { display: block; }
  .section-heading h2 { margin: 24px 0; }
  .world-grid { grid-template-columns: 1fr; margin-top: 50px; }
  .world-card, .world-card--large { min-height: 390px; grid-row: auto; }
  .world-card:not(.world-card--large) { min-height: 300px; }
  .features-section { padding-top: 125px; }
  .feature-layout { gap: 60px; }
  .feature-item { grid-template-columns: 32px 1fr 24px; gap: 12px; }
  .rules-section { gap: 50px; padding-top: 90px; padding-bottom: 90px; }
  .rule p { margin-left: 50px; }
  .profile-section { padding-top: 95px; padding-bottom: 95px; }
  .profile-copy ul { flex-direction: column; gap: 13px; }
  .join-copy { gap: 12px; padding: 17px 14px; }
  .join-copy b { font-size: .58rem; }
  footer { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 45px 20px; }
  footer > span { justify-self: center; }
  .auth-dialog { padding: 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
