/* The elyvar.net landing page, in the game's menu look (Client/src/style.css, characterScreens.css). */

@font-face {
  font-family: 'Cinzel';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/cinzel-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cinzel-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel Decorative';
  font-weight: 900;
  font-display: swap;
  src: url('fonts/cinzel-decorative-latin-900-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Crimson Text';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/crimson-text-latin-400-normal.woff2') format('woff2');
}

:root {
  --font-display: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-heading: 'Cinzel', Georgia, serif;
  --font-body: 'Crimson Text', Georgia, 'Times New Roman', serif;

  --text: #e2d8c3;
  --muted: #9a8f7b;
  --gold: #d4ab55;
  --gold-bright: #f3d88f;
  --gold-dark: #7a5620;
  --label: #c8b07a;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 48px;
  background:
    radial-gradient(ellipse at 50% 30%, rgb(40 70 60 / 0.55), transparent 60%),
    radial-gradient(ellipse at 50% 100%, #1a1410, #07080b 70%) fixed;
  background-color: #07080b;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.45;
  overflow-x: hidden;
}

/* ---- Crest + logo (as on the game's menu screens) ------------------------ */

.crest {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 440 / 180;
  background: url('crest.svg') center / contain no-repeat;
}

.logo {
  position: absolute;
  left: 50%;
  top: calc(82 / 180 * 100%);
  transform: translate(-50%, calc(-50% + 0.08em));
  white-space: nowrap;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 9vw, 44px);
  letter-spacing: 0.02em;
  line-height: 1;
  background: linear-gradient(#ffffff 0%, #d9d3c5 40%, #8c8578 52%, #c9c2b2 70%, #f1ece0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Tabs: the game's gold-ruled top bar, with a big Play in the middle ---- */

.tabs {
  display: flex;
  align-items: center;
  margin: 18px 0 28px;
  padding: 0 30px;
  background: linear-gradient(rgb(12 10 8 / 0.94), rgb(32 25 16 / 0.9));
  border-block: 1px solid var(--gold-dark);
}

.tab {
  padding: 12px 26px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
}

.tab:hover,
.tab[aria-current] {
  color: var(--gold-bright);
}

/* Play: taller and wider than the others, forest green with the gold rim like the menus' primary buttons. */
.tab--play {
  margin: -10px 6px;
  padding: 20px 48px;
  font-size: 1.15rem;
  letter-spacing: 0.22em;
  color: var(--gold-bright);
  background:
    linear-gradient(rgb(255 255 255 / 0.14), transparent 45%),
    linear-gradient(#35603a, #1d3b22 60%, #132a18);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.6), 0 4px 14px rgb(0 0 0 / 0.5);
}

.tab--play:hover {
  color: #fff6d8;
  background:
    linear-gradient(rgb(255 255 255 / 0.2), transparent 45%),
    linear-gradient(#3f7045, #234528 60%, #17321d);
}

/* ---- Three columns: leaderboards | game information | updates -------------- */

.layout {
  width: min(1400px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.center {
  min-height: 560px;
}

.placeholder {
  margin: 12px 0;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.shot {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border: 1px dashed rgb(212 171 85 / 0.35);
  background: rgb(0 0 0 / 0.25);
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* The updates scroll inside their column instead of stretching the page. */
.updates {
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

/* ---- Panels (the game's); the updates themselves use updates.css --------- */

.panel {
  width: 100%;
  border: 1px solid rgb(212 171 85 / 0.55);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.55), inset 0 0 0 2px rgb(212 171 85 / 0.12);
  background:
    radial-gradient(ellipse at 50% 0%, rgb(255 210 140 / 0.08), transparent 65%),
    url('grain.svg'),
    linear-gradient(rgb(27 25 30 / 0.94), rgb(14 13 17 / 0.96));
  background-origin: border-box;
  padding: 22px 24px 24px;
}

.panel-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--label);
  text-align: center;
}

/* ---- Scrollbars: a square track with a 1px gold outline, a plain square thumb 2px inside it ---- */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgb(0 0 0 / 0.35);
  border: 1px solid var(--gold-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  /* 1px over the track's outline + a 2px gap: the thumb sits inside the outline. */
  border: 3px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--gold);
}

::-webkit-scrollbar-button,
::-webkit-scrollbar-corner {
  display: none;
}

/* Firefox can't draw the outline or shape: only the colours. */
@supports (-moz-appearance: none) {
  * {
    scrollbar-color: var(--gold-dark) rgb(0 0 0 / 0.35);
  }
}

/* Narrow screens: one column, game information first. */
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    width: min(680px, 100%);
  }
  .center {
    order: -1;
    min-height: 0;
  }
  .updates {
    max-height: 70vh;
  }
}

@media (max-width: 520px) {
  .shots {
    grid-template-columns: minmax(0, 1fr);
  }

  .tabs {
    padding: 0 8px;
  }
  .tab {
    padding: 12px 12px;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }
  .tab--play {
    padding: 18px 26px;
    font-size: 1rem;
  }
  .panel {
    padding: 18px 16px 20px;
  }
}
