/*
  Flyff Echo - the website's one stylesheet (site\www\site.css, served as /site.css by bin\server\web-gateway.exe).
  The shop server's account pages (register / login) use the same file as /static/site.css, so the classes
  below are shared: .site-nav .hero .btn .btn-gold .btn-ghost .section .section-title .cards .card
  .status-badge (.is-online .is-offline .is-unknown) .news-card .tag (.tag-event .tag-update .tag-maintenance)
  .form .field .form-actions .alert (.alert-ok .alert-err) .notice .footer.
  No @import, no url() to another host (the gateway's policy allows only this site's own files).
  Palette after the launcher's skin (launcher\skin\LauncherBG.png): navy, sky blue, cloud white, gold.
*/
:root {
  --bg: #0a1330;
  --bg-2: #0e1a3d;
  --panel: #14224a;
  --panel-2: #1a2b5a;
  --line: #2a3d74;
  --text: #eef2fb;
  --muted: #a9b6d6;
  --sky: #7fa6e6;
  --cloud: #dfe8f7;
  --gold: #f2c14e;
  --gold-light: #ffd977;
  --gold-dark: #b8892a;
  --ink: #1b1404;
  --link: #9cc2ff;
  --ok: #3ccf7c;
  --err: #ff6b6b;
  --grey: #8a93ad;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Sarabun", "Leelawadee UI", "Leelawadee", "Tahoma", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--link); }
a:hover { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted, .small { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

/* ---- top navigation ---- */
.site-nav {
  background: rgba(8, 15, 38, .92);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.site-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 18px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.site-nav .logo {
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .5px;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .4);
  white-space: nowrap;
}
.site-nav .logo span { color: var(--cloud); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0; padding: 0; list-style: none; }
.site-nav li a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--cloud);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav li a:hover, .site-nav li a:focus { background: var(--panel-2); color: var(--gold-light); }

/* ---- hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
/* the picture is a map loading screen: 4:3 with the game's logo and loading bar along its lower edge,
   so it is drawn taller than the hero and from its top - that edge stays out of sight */
.hero-bg {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 125%;
  object-fit: cover;
  object-position: 50% 0;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 19, 48, .92) 0%, rgba(10, 19, 48, .7) 45%, rgba(10, 19, 48, .25) 100%),
    linear-gradient(180deg, rgba(10, 19, 48, 0) 55%, var(--bg) 100%);
}
.hero-inner { width: 100%; max-width: 1100px; margin: 0 auto; padding: 56px 16px 64px; }
.hero h1 {
  margin: 0;
  color: var(--gold);
  font-size: 64px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 3px 0 var(--gold-dark), 0 8px 24px rgba(0, 0, 0, .6);
}
.hero .tagline { margin: 10px 0 0; max-width: 560px; color: var(--cloud); font-size: 21px; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.hero .lead { margin: 8px 0 26px; max-width: 560px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero .small { text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover, .btn:focus { border-color: var(--sky); color: var(--text); }
.btn-gold {
  border: 0;
  border-bottom: 4px solid var(--gold-dark);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--ink);
  font-size: 19px;
  padding: 14px 30px;
  box-shadow: 0 6px 18px rgba(242, 193, 78, .25);
}
.btn-gold:hover, .btn-gold:focus { background: var(--gold-light); color: var(--ink); }
.btn-ghost { background: rgba(10, 19, 48, .45); border: 2px solid var(--cloud); color: var(--cloud); font-size: 17px; padding: 12px 26px; }
.btn-ghost:hover, .btn-ghost:focus { background: rgba(223, 232, 247, .12); border-color: var(--gold-light); color: var(--gold-light); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; }

/* ---- server status ---- */
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 19, 48, .75);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}
.status-badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--grey); flex: none; }
.status-badge.is-online { border-color: rgba(60, 207, 124, .6); }
.status-badge.is-online::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(60, 207, 124, .25); }
.status-badge.is-offline { border-color: rgba(255, 107, 107, .6); }
.status-badge.is-offline::before { background: var(--err); }
.status-badge.is-unknown { color: var(--muted); }
.channels { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.channels li { padding: 3px 10px; border-radius: 999px; background: rgba(10, 19, 48, .75); border: 1px solid var(--line); color: var(--cloud); }
.channels li.is-down { color: var(--grey); text-decoration: line-through; }

/* ---- sections and cards ---- */
.section { padding: 56px 0 8px; }
.section-alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.section-title {
  margin: 0 0 8px;
  color: var(--cloud);
  font-size: 30px;
  font-weight: 800;
}
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(242, 193, 78, 0));
}
.section-lead { margin: 0 0 24px; color: var(--muted); max-width: 720px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; color: var(--gold-light); font-size: 19px; }
.card p { margin: 0; color: var(--muted); }
.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(242, 193, 78, .14);
  border: 1px solid rgba(242, 193, 78, .4);
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
}

/* ---- the three steps ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
}
.steps b { display: block; margin-bottom: 4px; color: var(--gold-light); font-size: 18px; }
.steps li { color: var(--muted); }
.steps .btn { margin-top: 12px; padding: 8px 16px; font-size: 15px; }

/* ---- jobs ---- */
.jobs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.job { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.job-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 10px; }
.job-head img { width: 56px; height: 56px; flex: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)); }
.job-head h3 { margin: 0; }
.job-head .base { display: block; color: var(--sky); font-size: 13px; letter-spacing: .3px; }
.job p { padding: 0 16px; }
.job-tree { margin: auto 0 0; padding: 14px 16px 16px; text-align: center; }
.job-tree img { width: 225px; max-width: 100%; height: auto; opacity: .9; }
.job-tree figcaption { color: var(--grey); font-size: 12px; }

/* ---- maps ---- */
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.map { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
/* a loading screen: the logo and the bar along its lower edge stay below the frame */
.map img { display: block; width: 100%; height: 133.4%; object-fit: cover; object-position: 50% 0; }
.map figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 14px 10px;
  background: linear-gradient(180deg, rgba(10, 19, 48, 0), rgba(10, 19, 48, .92));
  color: var(--cloud);
  font-weight: 700;
}
.map figcaption span { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }

/* ---- news ---- */
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.news-card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--sky); border-radius: var(--radius); padding: 18px 20px; }
.news-card.is-pinned { border-left-color: var(--gold); }
.news-card h3 { margin: 0 0 6px; font-size: 18px; color: var(--text); }
.news-card .meta { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.news-card .body { white-space: pre-line; overflow-wrap: anywhere; color: var(--cloud); }
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 13px; background: #2c3a63; color: #fff; margin-right: 6px; }
.tag-event { background: #1f8f50; }
.tag-update { background: #6c4fd0; }
.tag-maintenance { background: #c43c3c; }

/* ---- forms (the shop server's account pages) ---- */
.form {
  width: 100%;
  max-width: 460px;
  margin: 32px auto;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form h1, .form h2 { margin: 0 0 16px; color: var(--gold); font-size: 26px; }
.field { display: block; margin: 0 0 16px; }
.field label, .field > span { display: block; margin-bottom: 6px; color: var(--cloud); font-weight: 700; font-size: 15px; }
.field input, .field select, .field textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(242, 193, 78, .2); }
.field .hint { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.field.has-error input, .field.has-error select { border-color: var(--err); }
.field .error { display: block; margin-top: 4px; color: var(--err); font-size: 14px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.form-actions .btn { flex: 1 1 auto; }
.alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); }
.alert-ok { border-color: rgba(60, 207, 124, .6); background: rgba(60, 207, 124, .12); color: #bff3d4; }
.alert-err { border-color: rgba(255, 107, 107, .6); background: rgba(255, 107, 107, .12); color: #ffd0d0; }
.notice { padding: 14px 16px; border-radius: var(--radius); border: 1px dashed var(--line); background: rgba(127, 166, 230, .08); color: var(--cloud); }

/* ---- footer ---- */
.footer { margin-top: 56px; padding: 24px 0 36px; border-top: 1px solid var(--line); background: #070e25; color: var(--muted); font-size: 14px; }
.footer p { margin: 6px 0; }
.footer a { overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .hero { min-height: 0; }
  .hero-inner { padding: 40px 16px 48px; }
  .hero h1 { font-size: 44px; }
  .hero .tagline { font-size: 18px; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(10, 19, 48, .55) 0%, rgba(10, 19, 48, .85) 60%, var(--bg) 100%);
  }
  .hero-actions .btn { flex: 1 1 100%; }
  .section { padding-top: 40px; }
  .section-title { font-size: 25px; }
  .site-nav .wrap { justify-content: center; }
  .site-nav li a { padding: 4px 8px; font-size: 14px; }
}
