/* WugZo portal styles */

/* ---------- brand fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/exo2-600.woff2') format('woff2'); }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/exo2-700.woff2') format('woff2'); }
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/exo2-800.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/raleway-400.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/raleway-500.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/raleway-600.woff2') format('woff2'); }
@font-face { font-family: 'Raleway'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/raleway-700.woff2') format('woff2'); }

:root {
  /* WugZo palette */
  --navy: #0a0f1f;        /* Midnight Navy */
  --blue: #2d6bff;        /* Electric Blue */
  --violet: #8a3ffc;      /* Violet */
  --magenta: #ff2ed1;     /* Hot Magenta */
  --silver: #a2a7b3;      /* Silver */

  --bg: #0a0f1f;
  --bg-2: #0e142a;
  --panel: #141b33;
  --panel-2: #1b2342;
  --edge: #26304f;
  --text: #f4f6fc;
  --muted: #a2a7b3;
  --accent: #8a3ffc;      /* brand accent = violet */
  --accent-2: #2d6bff;    /* electric blue */
  --brand-grad: linear-gradient(100deg, #2d6bff 0%, #8a3ffc 52%, #ff2ed1 100%);
  --head-font: 'Exo 2', system-ui, sans-serif;
  --body-font: 'Raleway', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 14px;
  --header-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

/* Exo 2 for headlines/titles; Raleway (body font) everywhere else */
.logo, .kicker, .row-head h2, .page h1, .page h2, .side-panel h1,
.player-bar .title, .site-footer h4 { font-family: var(--head-font); letter-spacing: 0.2px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(11, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo { display: flex; align-items: center; flex: 0 0 auto; }
.logo img.wordmark { height: 24px; width: auto; max-width: none; display: block; }
/* brand gradient text — the hero highlight */
.grad, .zone {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.site-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0; /* allow shrinking on phones — items scroll inside instead of widening the page */
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: var(--panel-2); }
.site-nav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

.search-box {
  margin-left: auto;
  position: relative;
  flex: 0 1 260px;
  min-width: 110px;
}
.search-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.search-box .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
  font-size: 14px;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 16px;
  margin: 26px 0 8px;
}
.hero .card .card-title { font-size: 17px; }
.hero .card:first-child .card-title { font-size: 22px; }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero .card:first-child { grid-column: 1 / -1; }
}

.kicker {
  margin: 30px 0 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.sub { color: var(--muted); margin: 6px 0 0; max-width: 640px; }

/* ---------- rows & cards ---------- */
.row { margin: 30px 0; }
.row-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}
.row-head h2 { margin: 0; font-size: 20px; }
.row-head .see-all { color: var(--accent); font-size: 13px; font-weight: 600; }
.row-head .see-all:hover { text-decoration: underline; }

.row-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 218px;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin: -4px -4px 0;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--edge) transparent;
}
.row-scroller > .card { scroll-snap-align: start; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  padding: 4px;
  margin: 0 -4px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--ga, var(--accent)) 55%, var(--edge));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px color-mix(in srgb, var(--ga, var(--accent)) 25%, transparent);
}
.card-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg-2); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* category emblem: one icon per game TYPE the game belongs to (primary first) —
   same icon = same kind of game, and a card always wears the icon of any
   category page it appears on */
.card-emblem {
  position: absolute;
  left: 9px;
  bottom: 9px;
  min-width: 42px;
  height: 42px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 21px;
  line-height: 1;
  border-radius: 11px;
  background: rgba(9, 13, 24, 0.82);
  border: 2px solid color-mix(in srgb, var(--cc, #fff) 70%, transparent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  z-index: 2;
}
.card-emblem i { font-style: normal; }
.hero .card:first-child .card-emblem { min-width: 52px; height: 52px; font-size: 27px; border-radius: 13px; }
.card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 10, 18, 0.45);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.card-play span {
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--ga, var(--accent));
  color: #071508;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--ga, var(--accent)) 45%, transparent);
}
.card:hover .card-play { opacity: 1; }
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
}
.card-title { font-weight: 700; font-size: 14.5px; }
.card-tag { color: var(--muted); font-size: 12px; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .card, .card-play { transition: none; }
  .card:hover { transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.chip {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.active {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
}

.empty-note { color: var(--muted); padding: 30px 0 10px; text-align: center; }

/* ---------- game page ---------- */
.breadcrumb { margin: 18px 0 12px; color: var(--muted); font-size: 13px; }
.breadcrumb a:hover { color: var(--accent); }

.player-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 980px) { .player-grid { grid-template-columns: minmax(0, 1fr); } }

.player-wrap {
  position: relative;
  background: #060910;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
}
.player-wrap iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: min(78vh, 720px);
  border: 0;
  background: #0b0e17;
}
@media (max-width: 700px) {
  /* portrait phones: a 4:3 box is a postage stamp — give games a tall window instead */
  .player-wrap iframe { aspect-ratio: auto; height: min(70vh, 600px); }
}
.player-wrap:fullscreen { border-radius: 0; }
.player-wrap:fullscreen iframe { height: 100%; max-height: none; aspect-ratio: auto; }
.player-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--edge);
  background: var(--panel);
}
@media (max-width: 600px) {
  .icon-btn span { display: none; } /* icon-only buttons on phones */
  .player-bar .title { font-size: 14.5px; }
}
.player-bar .title { font-weight: 800; font-size: 16px; margin-right: auto; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn.active { background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); border-color: var(--accent); color: var(--accent); }
.icon-btn.active-down { background: color-mix(in srgb, #ff5d5d 16%, var(--panel-2)); border-color: #ff5d5d; color: #ff5d5d; }

/* ---------- embed snippet panel (play page) ---------- */
.embed-panel {
  margin-top: 12px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
}
.embed-panel h3 { margin: 0 0 4px; font-size: 15px; }
.embed-panel p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.embed-panel textarea {
  width: 100%;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: var(--panel-2);
  color: var(--text);
  font: 500 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.embed-panel textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.embed-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.btn-copy {
  padding: 9px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--brand-grad, var(--accent));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.btn-copy:hover { filter: brightness(1.1); }
.embed-size { color: var(--muted); font-size: 12px; }

.side-panel {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 18px;
}
.side-panel h1 { margin: 0 0 2px; font-size: 22px; }
.side-panel .tagline { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.side-panel .tag-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.side-panel .tag-chips a {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--edge);
  color: var(--muted);
}
.side-panel .tag-chips a:hover { color: var(--accent); border-color: var(--accent); }
.side-panel h3 { margin: 18px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }
.side-panel p { margin: 0; font-size: 14.5px; color: #c6cde0; }
.controls-list { margin: 0; padding: 0; list-style: none; font-size: 14px; color: #c6cde0; }
.controls-list li { padding: 5px 0; border-bottom: 1px dashed var(--edge); }
.controls-list li:last-child { border-bottom: 0; }

/* ---------- static pages ---------- */
.page { max-width: 760px; margin: 34px auto 60px; }
.page h1 { font-size: 32px; margin: 0 0 6px; }
.page .updated { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.page h2 { font-size: 20px; margin: 30px 0 8px; }
.page p, .page li { color: #c6cde0; font-size: 15.5px; }
.page a { color: var(--accent); }
.page a:hover { text-decoration: underline; }
.callout {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 18px 0;
}

/* ---------- forms ---------- */
.form-card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 24px;
  margin: 22px 0;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.field label .req { color: var(--accent); }
.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  outline: none;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.file-drop {
  display: block;
  border: 2px dashed var(--edge);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.file-drop:hover, .file-drop.drag {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.file-drop.has-file { border-style: solid; border-color: var(--accent); color: var(--text); }
.file-drop input { display: none; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #c6cde0; }
.check-row input { margin-top: 3px; accent-color: var(--accent); }
.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 12px 28px;
  font: 700 15px/1 var(--head-font);
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--violet) 40%, transparent);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.55; cursor: default; }
.hp-field { position: absolute; left: -6000px; top: -6000px; }
.progress { height: 7px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin: 14px 0 0; display: none; }
.progress i { display: block; height: 100%; width: 0%; background: var(--accent); transition: width 0.2s; }
.submit-status { margin: 14px 0 0; font-size: 14.5px; display: none; }
.submit-status.ok { color: var(--accent); }
.submit-status.err { color: #ff5d5d; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--edge);
  background: var(--bg-2);
  padding: 36px 0 28px;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 26px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { margin: 0 0 10px; color: var(--text); font-size: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--edge); font-size: 13px; }
