:root {
  color-scheme: dark;
  --background: #000000;
  --surface: #191916;
  --surface-raised: #20201c;
  --text: #f4f1e9;
  --muted: #a5a196;
  --gold: #d6ae61;
  --gold-light: #f1d696;
  --line: rgba(255, 255, 255, .16);
  --danger: #ff9a84;
  --success: #b9e0a5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--background);
  font-family: 'Segoe UI', sans-serif;
}

.page-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.topbar { height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.login-trigger { min-height: 36px; padding: 0 15px; border: 1px solid rgba(214, 174, 97, .6); border-radius: 999px; color: var(--gold-light); background: transparent; font: 700 10px 'Segoe UI', sans-serif; letter-spacing: .14em; cursor: pointer; transition: background .2s, border-color .2s; }
.login-trigger:hover { border-color: var(--gold-light); background: rgba(214, 174, 97, .1); }
.brand { position: relative; isolation: isolate; display: inline-flex; align-items: center; color: var(--text); text-decoration: none; font: 800 clamp(22px, 2.8vw, 32px) 'Segoe UI', sans-serif; letter-spacing: -.045em; line-height: 1; }
.brand::before, .brand::after { display: none; }
.brand::before { background: radial-gradient(ellipse at 30% 55%, rgba(199, 116, 48, .45), transparent 55%), radial-gradient(ellipse at 72% 42%, rgba(209, 153, 65, .5), transparent 58%); opacity: .66; animation: brand-smoke-drift 8s ease-in-out infinite alternate; }
.brand::after { background: radial-gradient(ellipse at 37% 48%, rgba(222, 164, 76, .42), transparent 48%), radial-gradient(ellipse at 76% 58%, rgba(180, 96, 44, .42), transparent 56%); opacity: .54; animation: brand-smoke-drift-alt 10s ease-in-out infinite alternate; }
.brand-name { display: inline-flex; align-items: baseline; gap: .22em; text-shadow: 0 0 18px rgba(214, 174, 97, .12); }
.brand img { display: block; width: calc(clamp(150px, 17vw, 210px) + 30px); height: auto; }
.brand strong { color: var(--gold-light); letter-spacing: -.035em; }
@keyframes brand-smoke-drift { from { transform: translate(-52%, -48%) scale(.92, .86); } to { transform: translate(-47%, -54%) scale(1.06, 1.04); } }
@keyframes brand-smoke-drift-alt { from { transform: translate(-47%, -54%) scale(1.04, .92); } to { transform: translate(-53%, -46%) scale(.92, 1.08); } }
.season-label { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .04em; }

.hero { min-height: calc(100vh - 158px); display: grid; grid-template-columns: minmax(0, 1fr) 410px; align-items: center; gap: clamp(50px, 9vw, 130px); padding: 70px 0; }
.hero-copy { padding-bottom: 24px; }
.eyebrow { margin: 0 0 15px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .2em; }
h1, h2 { font-family: 'Segoe UI', sans-serif; }
h1 { margin: 0; font-size: clamp(38px, 4.7vw, 56px); font-weight: 700; letter-spacing: -.06em; line-height: 1.08; }
h1 span { color: var(--gold-light); }
.hero-title-row { display: flex; align-items: center; justify-content: space-between; gap: clamp(18px, 3vw, 34px); }
.hero-heading { flex: 1 1 auto; min-width: 0; }
.country-flags { display: flex; width: max-content; flex-wrap: nowrap; align-items: center; gap: 9px; margin-top: 14px; white-space: nowrap; }
.country-flag { display: block; width: 34px; height: 23px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(255, 255, 255, .42); border-radius: 3px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.server-status { flex: 0 0 190px; padding: 12px 0 12px 17px; border-left: 1px solid rgba(214, 174, 97, .38); color: var(--muted); font-size: 10px; line-height: 1.5; }
.server-status p { margin: 0; }
.server-state-line { color: #d7d3c8; white-space: nowrap; }
.server-light { margin-right: 3px; font-size: 11px; }
.server-state-line strong { color: #a9d88d; letter-spacing: .08em; }
.server-status[data-state='checking'] .server-state-line strong { color: var(--muted); }
.server-status[data-state='offline'] .server-state-line strong { color: #ef9488; }
.server-status[data-state='unavailable'] .server-state-line strong { color: var(--gold); }
.server-hosting-line { margin-top: 9px !important; color: var(--gold); font-size: 9px; letter-spacing: .035em; }
.server-hosting-line strong { color: var(--gold-light); }
.server-players-line { margin-top: 9px !important; color: #c3c9d0; }
.server-players-line strong { margin-left: 5px; color: #e8f1e1; font-size: 13px; font-variant-numeric: tabular-nums; }
.intro { max-width: 420px; margin: 21px 0 34px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.hero-feature-row { display: grid; min-height: 350px; grid-template-columns: minmax(288px, 1fr) minmax(250px, 300px); align-items: start; gap: 18px; }
.download-button { display: inline-flex; width: 288px; min-width: 288px; align-items: center; gap: 13px; margin-top: 88px; padding: 13px 17px; border: 1px solid rgba(217, 39, 46, .6); border-radius: 12px; color: var(--text); background: #090d15; text-decoration: none; transition: border-color .2s, transform .2s, background .2s; }
.download-button:hover { border-color: #e53945; background: #0d1420; transform: translateY(-2px); }
.character-logo { width: 100%; margin: 0; padding: 0; }
.character-logo img { display: block; width: 100%; height: auto; }
.download-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 50%; background: transparent; }
.download-icon img { display: block; width: 40px; height: 40px; object-fit: contain; }
.download-button strong, .download-button small { display: block; }
.download-button strong { font-size: 12px; }
.download-button small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.signup-card { padding: 28px; border: 1px solid rgba(214, 174, 97, .42); border-radius: 18px; background: #080808; box-shadow: 0 24px 80px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .035); }
.card-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 25px; }
.card-heading .eyebrow { margin-bottom: 4px; font-size: 9px; }
h2 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
form { display: flex; flex-direction: column; }
.credential-box { display: flex; flex-direction: column; padding: 8px 15px 16px; border: 1px solid rgba(214, 174, 97, .35); border-radius: 12px; background: #000; }
label { margin: 14px 0 8px; color: #e6e0d4; font-size: 12px; font-weight: 600; }
input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; outline: none; color: var(--text); background: #111; font: 14px 'Segoe UI', sans-serif; transition: border-color .18s, box-shadow .18s; }
input:focus { border-color: rgba(214, 174, 97, .75); box-shadow: 0 0 0 3px rgba(214, 174, 97, .1); }
.field-hint { margin-top: 6px; color: #8f8a80; font-size: 10px; line-height: 1.45; }
.submit-button { display: flex; height: 48px; align-items: center; justify-content: space-between; margin-top: 22px; padding: 0 15px; border: 0; border-radius: 8px; color: #19150d; background: linear-gradient(100deg, #d4aa58, #f0d38f); font: 700 13px 'Segoe UI', sans-serif; cursor: pointer; transition: filter .2s, transform .2s; }
.submit-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.submit-button:disabled { cursor: wait; opacity: .65; transform: none; }
.submit-button span { font-size: 19px; }
.form-message { min-height: 18px; margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-message[data-state='error'] { color: var(--danger); }
.form-message[data-state='success'] { color: var(--success); }
.privacy-note { margin: 13px 0 0; color: #827d73; font-size: 10px; }
.privacy-note span { margin-right: 5px; color: #9bbd7e; font-size: 8px; }
.login-dialog { width: min(440px, calc(100% - 32px)); max-height: min(90vh, 720px); padding: 27px; border: 1px solid rgba(214, 174, 97, .55); border-radius: 16px; color: var(--text); background: #090909; box-shadow: 0 24px 90px rgba(0, 0, 0, .8); }
.login-dialog::backdrop { background: rgba(0, 0, 0, .78); backdrop-filter: blur(4px); }
.login-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.login-dialog-heading .eyebrow { margin-bottom: 7px; }
.dialog-close { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font: 20px 'Segoe UI', sans-serif; line-height: 1; cursor: pointer; }
.dialog-close:hover { color: var(--text); border-color: var(--gold); }
.login-dialog .credential-box { padding-top: 4px; }
.player-characters { margin-top: 18px; }
.player-characters h3 { margin: 0 0 12px; color: var(--gold-light); font-size: 14px; }
.player-characters ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.player-characters li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #111; }
.character-name { display: block; font-size: 13px; font-weight: 700; }
.character-details { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.logout-button { margin-top: 17px; padding: 8px 0; border: 0; color: var(--gold); background: transparent; font: 600 11px 'Segoe UI', sans-serif; cursor: pointer; }
.logout-button:hover { color: var(--gold-light); }
.player-characters[hidden] { display: none; }
.footer { display: flex; justify-content: space-between; padding: 18px 0 22px; border-top: 1px solid var(--line); color: #77736a; font-size: 10px; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 42px; padding: 58px 0; }
  .hero-copy { padding-bottom: 0; }
  .signup-card { width: min(100%, 480px); }
}

@media (max-width: 480px) {
  .page-shell { width: min(100% - 32px, 1120px); }
  .topbar { height: 74px; }
  .topbar-actions { gap: 8px; }
  .season-label { font-size: 10px; }
  .brand { font-size: 22px; }
  .login-trigger { min-height: 34px; padding: 0 11px; font-size: 9px; }
  .hero { min-height: auto; gap: 34px; padding: 47px 0; }
  .hero-title-row { align-items: flex-start; flex-direction: column; gap: 18px; }
  h1 { font-size: clamp(36px, 10vw, 48px); }
  .country-flags { gap: 8px; margin-top: 11px; }
  .country-flag { width: 31px; height: 21px; }
  .server-status { flex-basis: auto; width: 100%; padding: 10px 0 0; border-top: 1px solid rgba(214, 174, 97, .32); border-left: 0; }
  .server-status p { display: inline-block; margin-right: 11px; }
  .server-hosting-line, .server-players-line { margin-top: 0 !important; }
  .signup-card { padding: 22px 19px; }
  .hero-feature-row { min-height: 0; grid-template-columns: 1fr; gap: 2px; }
  .download-button { margin-top: 48px; }
  .character-logo { width: min(78vw, 330px); justify-self: center; }
  .credential-box { padding-right: 12px; padding-left: 12px; }
  .footer { gap: 12px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand::before, .brand::after { animation: none; }
}

@media (min-width: 481px) and (max-width: 560px) {
  .hero-feature-row { min-height: 0; grid-template-columns: 1fr; gap: 2px; }
  .download-button { margin-top: 48px; }
  .character-logo { width: min(78vw, 330px); justify-self: center; }
}

