/* Fonts: the design uses Oswald (headings, labels), Lato (top links) and
   Segoe UI (body). Segoe UI is a Windows font, so Open Sans stands in elsewhere. */
@font-face { font-family: "Oswald"; src: url("../fonts/oswald-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("../fonts/oswald-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("../fonts/oswald-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("../fonts/oswald-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/opensans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/opensans-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/opensans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/opensans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* surfaces */
  --bg: #121212;            /* rail, header, chat, top bar */
  --bg-top: #161616;
  --bg-main: #171717;       /* behind the scroll area */
  --bg-card: #1c1c1c;       /* rail pots, cards */
  --bg-field: #232323;      /* inputs, active room */
  --bg-field-2: #1c1c1c;    /* inactive room */
  --bg-btn: #212121;        /* language button */
  --bg-chat-foot: #171717;
  --line: rgba(126, 126, 126, 0.2);
  --line-2: rgba(101, 101, 101, 0.2);

  /* text */
  --text: #ffffff;
  --text-chat: #f3ebfb;
  --muted: #7e7e7e;
  --muted-2: #9b9b9b;
  --muted-3: #5e5e5e;
  --muted-4: #535353;

  /* accents */
  --gold: #ffc701;
  --gold-soft: rgba(255, 199, 1, 0.1);
  --red: #ff4a59;
  --green: #4ade80;
  --ink-on-gold: #171717;

  /* type */
  --f-head: "Oswald", "Arial Narrow", sans-serif;
  --f-link: "Lato", "Segoe UI", sans-serif;
  --f-body: "Segoe UI", "Open Sans", system-ui, sans-serif;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* turns a blue-grey icon gold (#ffc701) for active and hover states */
  --to-gold: brightness(0) saturate(100%) invert(79%) sepia(63%) saturate(1500%) hue-rotate(358deg) brightness(103%) contrast(104%);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The striped yellow button (CREATE CODE, CLAIM EARNINGS, DEPOSIT...). The
   stripes are the design's own image; a light sweep crosses it on hover. */
.btn-gold {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 24px;
  font-family: var(--f-head); font-weight: 600; font-size: 14px; line-height: 21px; text-transform: uppercase;
  color: var(--ink-on-gold);
  background: #ffc239 url("../assets/ui/button-stripes.jpg") left center / auto 100% repeat-x;
  border-radius: 2px;
  transition: transform 0.15s var(--ease-out), filter 0.2s, box-shadow 0.25s;
}
.btn-gold::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%); pointer-events: none;
}
.btn-gold:hover { box-shadow: 0 0 22px rgba(255, 194, 57, 0.4); }
.btn-gold:hover::after { transform: translateX(120%); transition: transform 0.7s var(--ease-out); }
.btn-gold:active { transform: translateY(1px) scale(0.98); }
.btn-gold:disabled { filter: grayscale(0.7) brightness(0.6); cursor: not-allowed; box-shadow: none; }
.btn-gold.is-busy { pointer-events: none; filter: brightness(0.85); }

/* The outline button (TIER BENEFITS, LEVEL BENEFITS, VIEW): the same stripes
   show only as a 2px border round a dark inside. */
.btn-line {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 24px;
  font-family: var(--f-head); font-weight: 600; font-size: 14px; line-height: 21px; text-transform: uppercase;
  color: var(--gold); border-radius: 2px;
  background: #ffc239 url("../assets/ui/button-stripes.jpg") left center / auto 100%;
  transition: color 0.2s, transform 0.15s, box-shadow 0.25s;
}
.btn-line::before { content: ""; position: absolute; inset: 2px; z-index: -1; border-radius: 1px; background: #0e0e0e; transition: opacity 0.2s; }
.btn-line:hover { color: var(--ink-on-gold); box-shadow: 0 0 18px rgba(255, 194, 57, 0.3); }
.btn-line:hover::before { opacity: 0; }
.btn-line:active { transform: scale(0.97); }

/* Grey outlined button (VIEW OUTCOME). */
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px;
  font-family: var(--f-head); font-weight: 500; font-size: 14px; text-transform: uppercase;
  color: #a2a2a2; border: 2px solid #a2a2a2; border-radius: 2px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { color: #ffffff; border-color: #ffffff; background: rgba(255, 255, 255, 0.04); }

/* Tabs: the active one carries the grey diagonal-stripe image. */
.tabs { display: flex; gap: 8px; }
.tab {
  height: 33px; padding: 6px 16px; border-radius: 2px; overflow: hidden;
  font: 500 14px/21px var(--f-head); text-transform: uppercase; color: var(--muted-2);
  transition: color 0.2s, background-color 0.2s;
}
.tab:hover { color: #d0d0d0; }
.tab.is-on { color: #1d1d1d; background: #383838 url("../assets/ui/tab-active-stripes.jpg") left center / auto 100% repeat-x; }

/* Stat card: value over a label, coin on the left (Affiliates, Profile, Coinflip...). */
.stat {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 80px; padding: 0 16px;
  background: linear-gradient(195.24deg, rgba(18, 18, 18, 0.5), rgba(18, 18, 18, 0)), #232323;
  border: 2px solid var(--line); border-radius: 4px;
}
.stat b { display: block; font: 700 20px/20px var(--f-head); }
.stat small { display: block; margin-top: 8px; font-size: 15px; line-height: 16px; color: var(--muted-2); }

/* Fields: dark input with an optional coin and trash button. */
.field {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 16px;
  background: linear-gradient(184.39deg, rgba(18, 18, 18, 0.5), rgba(18, 18, 18, 0)), #232323;
  border: 1px solid var(--line); border-radius: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus-within { border-color: rgba(255, 199, 1, 0.55); box-shadow: 0 0 0 3px rgba(255, 199, 1, 0.08); }
.field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: #ffffff; }
.field input::placeholder { color: var(--muted-2); text-transform: uppercase; }
.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.is-tap { animation: tap 0.25s var(--ease-out); }
@keyframes tap { 50% { transform: scale(0.9); color: var(--gold); } }

/* respect people who turn motion off */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
