/* ============================================================
   tableplus 2 - Base stylesheet
   Prefix: gd45-
   Canvas: 320-430px mobile-first; desktop keeps mobile canvas centered.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --gd45-sea: #2E8B57;
  --gd45-sea-deep: #246c45;
  --gd45-navajo: #FFDEAD;
  --gd45-sand: #F4A460;
  --gd45-ink: #1A1A2E;
  --gd45-ink-2: #20203a;
  --gd45-ink-3: #2a2a48;
  --gd45-white: #FFFFFF;
  --gd45-wheat: #F5DEB3;
  --gd45-line: rgba(255, 222, 173, 0.18);
  --gd45-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --gd45-radius: 14px;
  --gd45-radius-sm: 10px;
  --gd45-header-h: 58px;
  --gd45-bottom-h: 64px;
  --gd45-max: 460px;
  --gd45-gap: 12px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  background: #0f0f1f;
  color: var(--gd45-white);
  font-family: "Segoe UI", "Helvetica Neue", Roboto, Arial, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
}

body {
  min-height: 100vh;
  font-size: 15px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--gd45-wheat); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--gd45-sand); outline-offset: 2px; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- Phone canvas frame ---------- */
.gd45-shell {
  max-width: var(--gd45-max);
  margin: 0 auto;
  background: linear-gradient(180deg, #14142a 0%, #1b1b34 40%, #14142a 100%);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.45);
}

/* ---------- Header ---------- */
.gd45-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--gd45-header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: linear-gradient(90deg, var(--gd45-ink) 0%, var(--gd45-ink-2) 100%);
  border-bottom: 2px solid var(--gd45-sea);
  box-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.gd45-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.gd45-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--gd45-navajo);
  padding: 2px;
  border: 1px solid var(--gd45-sand);
  flex-shrink: 0;
}

.gd45-brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}
.gd45-brand-name strong {
  color: var(--gd45-white);
  font-size: 15px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.gd45-brand-name span {
  color: var(--gd45-wheat);
  font-size: 10.5px;
  white-space: nowrap;
}

.gd45-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.gd45-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.gd45-btn:active { transform: scale(0.93); }

.gd45-btn-login {
  background: transparent;
  color: var(--gd45-navajo);
  border: 1.5px solid var(--gd45-navajo);
}
.gd45-btn-register {
  background: linear-gradient(90deg, var(--gd45-sand), var(--gd45-sea));
  color: var(--gd45-ink);
  box-shadow: 0 3px 0 rgba(0,0,0,0.25);
}

.gd45-menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gd45-ink-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gd45-line);
}
.gd45-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gd45-navajo);
  position: relative;
}
.gd45-menu-btn span::before,
.gd45-menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--gd45-navajo);
}
.gd45-menu-btn span::before { top: -6px; }
.gd45-menu-btn span::after { top: 6px; }

/* ---------- Full-height slide menu ---------- */
.gd45-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 22, 0.6);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease;
}
.gd45-menu-overlay.gd45-open {
  opacity: 1;
  visibility: visible;
}

.gd45-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 84%;
  max-width: 360px;
  height: 100vh;
  background: linear-gradient(180deg, #16163a, #1d1d3d);
  z-index: 100;
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 30px rgba(0,0,0,0.5);
}
.gd45-menu.gd45-open { transform: translateX(0); }

.gd45-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--gd45-line);
  background: var(--gd45-ink);
}
.gd45-menu-head .gd45-brand-logo {
  width: 32px; height: 32px;
}
.gd45-menu-close {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gd45-ink-3);
  color: var(--gd45-navajo);
  font-size: 20px;
  line-height: 1;
}

.gd45-menu-nav {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  overflow-y: auto;
  flex: 1;
}
.gd45-menu-nav li {
  border-bottom: 1px solid var(--gd45-line);
}
.gd45-menu-nav a {
  display: block;
  padding: 14px 10px;
  color: var(--gd45-white);
  font-size: 15px;
  font-weight: 600;
  position: relative;
  transition: color 0.18s ease, padding 0.18s ease;
}
.gd45-menu-nav a::after {
  content: "›";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gd45-sand);
  font-size: 22px;
}
.gd45-menu-nav a:active {
  color: var(--gd45-navajo);
  padding-left: 18px;
}

.gd45-menu-actions {
  padding: 14px 16px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-top: 1px solid var(--gd45-line);
}
.gd45-menu-actions .gd45-btn { width: 100%; }

/* ---------- Hero carousel ---------- */
.gd45-hero {
  margin: 12px;
  border-radius: var(--gd45-radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--gd45-shadow);
}
.gd45-hero-track {
  display: flex;
  transition: transform 0.45s ease;
}
.gd45-hero-slide {
  min-width: 100%;
  position: relative;
}
.gd45-hero-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.gd45-hero-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 14px 12px;
  background: linear-gradient(0deg, rgba(10,10,22,0.92) 0%, rgba(10,10,22,0) 100%);
}
.gd45-hero-cap h2 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--gd45-navajo);
}
.gd45-hero-cap p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--gd45-wheat);
}
.gd45-hero-cap .gd45-btn { padding: 6px 14px; font-size: 12.5px; }

.gd45-hero-dots {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 5px;
}
.gd45-hero-dots button {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.18s ease, width 0.18s ease;
}
.gd45-hero-dots button.gd45-active {
  background: var(--gd45-sand);
  width: 18px;
  border-radius: 4px;
}

/* ---------- Section ---------- */
.gd45-section {
  padding: 6px 12px 14px;
}
.gd45-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 10px;
  font-size: 16px;
  color: var(--gd45-white);
  font-weight: 800;
}
.gd45-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gd45-sand), var(--gd45-sea));
}
.gd45-section-title small {
  font-size: 11px;
  font-weight: 500;
  color: var(--gd45-wheat);
  margin-left: auto;
}

/* ---------- Game grid ---------- */
.gd45-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.gd45-game {
  background: var(--gd45-ink-2);
  border: 1px solid var(--gd45-line);
  border-radius: var(--gd45-radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}
.gd45-game:active {
  transform: scale(0.95);
  border-color: var(--gd45-sand);
}
.gd45-game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #000;
}
.gd45-game-name {
  font-size: 11px;
  color: var(--gd45-wheat);
  text-align: center;
  padding: 5px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Cards ---------- */
.gd45-card {
  background: linear-gradient(180deg, var(--gd45-ink-2), var(--gd45-ink-3));
  border: 1px solid var(--gd45-line);
  border-radius: var(--gd45-radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--gd45-shadow);
}
.gd45-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--gd45-navajo);
}
.gd45-card p {
  margin: 0;
  font-size: 13px;
  color: var(--gd45-white);
  opacity: 0.92;
}

.gd45-grid-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.gd45-mini-card {
  background: var(--gd45-ink-2);
  border: 1px solid var(--gd45-line);
  border-radius: var(--gd45-radius-sm);
  padding: 12px;
  text-align: center;
  transition: transform 0.12s ease;
}
.gd45-mini-card:active { transform: scale(0.96); }
.gd45-mini-card .gd45-num {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--gd45-sand);
}
.gd45-mini-card .gd45-lab {
  display: block;
  font-size: 11.5px;
  color: var(--gd45-wheat);
  margin-top: 4px;
}

/* ---------- Winners strip ---------- */
.gd45-winners {
  background: linear-gradient(90deg, #1c1c3e, #252548);
  border: 1px solid var(--gd45-line);
  border-radius: var(--gd45-radius);
  padding: 10px 12px;
  overflow: hidden;
  margin: 0 12px 10px;
}
.gd45-winners strong {
  display: block;
  color: var(--gd45-navajo);
  font-size: 13px;
  margin-bottom: 6px;
}
.gd45-winners-track {
  display: flex;
  gap: 14px;
  animation: gd45scroll 22s linear infinite;
  white-space: nowrap;
}
.gd45-winner-item {
  font-size: 12px;
  color: var(--gd45-white);
}
.gd45-winner-item b { color: var(--gd45-sand); }
@keyframes gd45scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Content prose ---------- */
.gd45-prose {
  padding: 4px 12px 16px;
}
.gd45-prose h2 {
  font-size: 17px;
  color: var(--gd45-navajo);
  margin: 18px 0 8px;
}
.gd45-prose h3 {
  font-size: 14.5px;
  color: var(--gd45-wheat);
  margin: 14px 0 6px;
}
.gd45-prose p {
  font-size: 13.5px;
  color: var(--gd45-white);
  opacity: 0.92;
  margin: 0 0 10px;
}
.gd45-prose ul {
  margin: 0 0 10px;
  padding-left: 18px;
}
.gd45-prose li {
  font-size: 13.5px;
  color: var(--gd45-white);
  opacity: 0.92;
  margin-bottom: 4px;
}
.gd45-prose a {
  color: var(--gd45-sand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- CTA banner ---------- */
.gd45-cta {
  margin: 14px 12px;
  padding: 16px;
  border-radius: var(--gd45-radius);
  background: linear-gradient(135deg, var(--gd45-sea), var(--gd45-sand));
  color: var(--gd45-ink);
  text-align: center;
  box-shadow: var(--gd45-shadow);
}
.gd45-cta h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.gd45-cta p {
  margin: 0 0 10px;
  font-size: 12.5px;
}
.gd45-cta .gd45-btn {
  background: var(--gd45-ink);
  color: var(--gd45-navajo);
}

/* ---------- Extended footer ---------- */
.gd45-ext-footer {
  margin: 12px;
  padding: 16px;
  background: linear-gradient(180deg, var(--gd45-ink-2), #11112a);
  border: 1px solid var(--gd45-line);
  border-radius: var(--gd45-radius);
}
.gd45-ext-footer h3 {
  color: var(--gd45-navajo);
  font-size: 15px;
  margin: 0 0 8px;
}
.gd45-ext-footer p {
  color: var(--gd45-white);
  opacity: 0.88;
  font-size: 12.5px;
  margin: 0 0 12px;
}
.gd45-foot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin-bottom: 12px;
}
.gd45-foot-grid a {
  font-size: 12px;
  color: var(--gd45-wheat);
  padding: 4px 0;
}
.gd45-promo-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.gd45-promo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 8px;
  border-radius: 999px;
  background: var(--gd45-ink-3);
  border: 1px solid var(--gd45-line);
  color: var(--gd45-navajo);
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.12s ease;
}
.gd45-promo-pill:active { transform: scale(0.95); }

.gd45-disclaimer {
  background: rgba(46, 139, 87, 0.12);
  border-left: 3px solid var(--gd45-sea);
  border-radius: 6px;
  padding: 10px;
  font-size: 11.5px;
  color: var(--gd45-wheat);
}

/* ---------- Bottom copyright bar (above mobile nav) ---------- */
.gd45-legal {
  padding: 8px 14px 18px;
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
}

/* ---------- Mobile bottom nav ---------- */
.gd45-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  background: linear-gradient(90deg, var(--gd45-ink), var(--gd45-ink-2));
  border-top: 2px solid var(--gd45-sea);
  box-shadow: 0 -4px 14px rgba(0,0,0,0.4);
  display: flex;
  align-items: stretch;
  height: var(--gd45-bottom-h);
}
.gd45-bottom::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--gd45-sand);
  border-radius: 0 0 4px 4px;
}
.gd45-bottom-inner {
  max-width: var(--gd45-max);
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
}
.gd45-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px 4px;
  color: var(--gd45-wheat);
  position: relative;
  min-height: 44px;
  transition: transform 0.12s ease, color 0.18s ease;
}
.gd45-nav-btn:active { transform: scale(0.9); }
.gd45-nav-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}
.gd45-nav-btn span {
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}
.gd45-nav-btn.gd45-active {
  color: var(--gd45-navajo);
}
.gd45-nav-btn.gd45-active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--gd45-sand);
}
.gd45-nav-btn.gd45-promo {
  color: var(--gd45-navajo);
}
.gd45-nav-btn.gd45-promo span {
  font-weight: 700;
}

/* ---------- Helpers ---------- */
.gd45-container {
  padding-bottom: calc(var(--gd45-bottom-h) + 18px);
}
.gd45-hide { display: none !important; }
.gd45-text-center { text-align: center; }

/* ---------- Responsive keep 4-5 columns ---------- */
@media (min-width: 360px) {
  .gd45-grid { gap: 10px; }
  .gd45-game-name { font-size: 11.5px; }
}
@media (min-width: 400px) {
  .gd45-grid { grid-template-columns: repeat(5, 1fr); }
  .gd45-foot-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .gd45-winners-track { animation: none; }
  .gd45-hero-track { transition: none; }
}

/* ---------- Help page variations ---------- */
.gd45-help-hero {
  margin: 12px;
  padding: 18px 16px;
  border-radius: var(--gd45-radius);
  background: linear-gradient(135deg, #1f5f45, #35243f);
  border: 1px solid var(--gd45-line);
}
.gd45-help-hero h1 { margin: 0 0 6px; font-size: 22px; color: var(--gd45-navajo); }
.gd45-help-hero p { margin: 0; font-size: 13px; color: var(--gd45-wheat); }
.gd45-step-list { padding: 0 12px; counter-reset: gd45step; }
.gd45-step-list article { counter-increment: gd45step; padding: 14px 14px 14px 48px; margin: 0 0 10px; background: var(--gd45-ink-2); border-left: 4px solid var(--gd45-sand); border-radius: var(--gd45-radius-sm); position: relative; }
.gd45-step-list article::before { content: counter(gd45step); position: absolute; left: 14px; top: 14px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gd45-sea); color: var(--gd45-white); font-weight: 800; }
.gd45-step-list h2 { margin: 0 0 5px; font-size: 16px; color: var(--gd45-navajo); }
.gd45-step-list p { margin: 0; font-size: 13.5px; color: var(--gd45-white); opacity: .92; }
.gd45-help-aside { margin: 12px; padding: 14px; border-radius: var(--gd45-radius); background: rgba(244,164,96,.12); border: 1px solid var(--gd45-line); }
.gd45-help-aside h2 { margin: 0 0 7px; font-size: 16px; color: var(--gd45-navajo); }
.gd45-help-aside p { margin: 0; font-size: 13px; color: var(--gd45-wheat); }
.gd45-faq-list { padding: 4px 12px 16px; }
.gd45-faq-list details { margin: 0 0 8px; border: 1px solid var(--gd45-line); border-radius: var(--gd45-radius-sm); background: linear-gradient(180deg, var(--gd45-ink-2), var(--gd45-ink-3)); overflow: hidden; }
.gd45-faq-list summary { padding: 13px 14px; cursor: pointer; color: var(--gd45-navajo); font-weight: 700; font-size: 14px; list-style-position: inside; }
.gd45-faq-list details p { margin: 0; padding: 0 14px 14px 32px; font-size: 13px; color: var(--gd45-white); opacity: .92; }
.gd45-faq-note { margin: 12px; padding: 12px 14px; border-radius: var(--gd45-radius-sm); background: #26264a; color: var(--gd45-wheat); font-size: 12.5px; }

