:root {
  --bg: #1a2f39;
  --bg-soft: #1a2c38;
  --card: #1f3843;
  --text: #b1bad3;
  --text-strong: #ffffff;
  --accent: #1874e1;
  --accent-dark: #1462be;
  --border: #2f4553;
  --warning: #ffb800;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: #7db8ff;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #1a2f39;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2c4252;
  color: #ffffff;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid #3a5363;
  font-size: 0.95rem;
  min-height: 44px;
  height: 44px;
  line-height: 1;
}

.auth-register {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  min-height: 44px;
  height: 44px;
  line-height: 1;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  width: 96px;
  height: auto;
  filter: brightness(0) invert(1);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
}

.footer-logo img {
  width: 84px;
  height: auto;
  filter: brightness(0) invert(1);
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-strong);
  font-size: 0.95rem;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #1258ab;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease;
}

.cta-btn:hover {
  text-decoration: none;
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* Ensure header auth buttons have the same compact size. */
.auth-register.cta-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero {
  height: auto;
  min-height: unset;
  padding-top: 32px;
  padding-bottom: 32px;
}

.hero-compact {
  padding-top: 0px !important;
  padding-bottom: 0px !important;
}

.hero-compact .hero-box {
  padding: 0px 22px 0px 22px !important; /* tighter hero content box */
}

/* Hero height must be content-driven only. */
.hero.hero-compact,
.hero.hero-compact .hero-box.hero-stake {
  height: auto !important;
  min-height: unset !important;
}

/* Reduce internal vertical spacing only for compact main hero. */
.hero-compact .hero-left h1 {
  margin-bottom: 0px !important;
}

.hero-compact .hero-main-btn {
  margin-bottom: 0px !important;
}

.hero-compact .hero-aff-title {
  margin: 0 !important;
}

.hero-box {
  background: linear-gradient(180deg, #1e3540, #14252f);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
}

/* Main homepage hero visual block removed: keep content positioning. */
.hero-box.hero-stake {
  background: transparent;
  border: none;
  border-radius: 0;
  padding-right: 0;
}

.hero-stake {
  display: flex;
  gap: 0;
  background: linear-gradient(180deg, #1e3540, #14252f);
  align-items: stretch; /* right banner height matches left content height */
}

.hero-split {
  gap: 0;
}

.hero-bg-banner {
  flex: 1.05;
  align-self: flex-start;
  display: block;
  width: auto;
  height: 220px; /* fixed crop window to remove top/bottom whitespace */
  max-height: none;
  overflow: hidden;
  margin: 0;
  padding-right: 0;
  text-align: right;
  transform: none !important;
  position: relative;
  top: auto !important;
  margin-top: 0 !important;
  border-radius: 14px;
}

.hero-bg-banner {
  background-image: url('/plinkogame.png');
  background-repeat: no-repeat;
  background-size: cover;
  /* move visible area to eliminate internal top/bottom whitespace */
  /* Y-smaller => show more of the top; Y-larger => crop more from top */
  background-position: right 50%;
}

.hero-bg-banner img {
  display: none; /* use background-image instead for predictable cropping */
  border-radius: 14px;
  filter: saturate(1.05) contrast(1.05);
}

.hero-left {
  position: relative;
  z-index: 1;
  flex: 1;
}

.hero-left h1 {
  max-width: 510px;
  margin-bottom: 14px;
}

.hero-main-btn {
  margin-bottom: 10px;
}

.hero-cta-center {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.hero-aff-title {
  margin: 0 0 4px;
  color: #9ebecf;
  font-weight: 700;
  font-size: clamp(0.78rem, 1.3vw, 0.92rem); /* ~12.5-15px */
  line-height: 1.05;
}

.hero-aff-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  background: #3b566b;
  border: 1px solid #496980;
  color: #ffffff;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  word-break: break-all;
}

.hero-aff-link:hover {
  background: #46647c;
  text-decoration: none;
}

.hero-social-row {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  column-gap: 8px;
  row-gap: 6px;
  justify-content: start;
  width: max-content;
  max-width: 100%;
  align-items: center;
  margin: 0;
}

.hero-aff-link.social {
  width: auto !important;
  background: #2c4252 !important; /* OAuth/secondary auth style */
  border: 1px solid #3a5363 !important;
  border-radius: 12px !important;
  padding: 10px 20px !important;
  font-size: 0.98rem !important; /* ~15.5px */
  justify-content: center;
  white-space: nowrap;
  justify-self: start; /* prevent stretching in grid */
  align-self: center;
  height: 44px !important;
  min-height: 44px !important;
  line-height: 1 !important;
}

.hero-aff-link.social img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  background: #ffffff;
  border-radius: 50%;
  padding: 1px;
}

.hero-right {
  display: block;
}

.hero-feature-image {
  display: block;
  border-radius: 16px;
  border: none;
  overflow: hidden;
  text-decoration: none;
}

.hero-feature-image:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.hero-feature-image img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  line-height: 1.3;
}

h1 {
  margin-top: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
}

h2 {
  margin-top: 2.1rem;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
}

h3 {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}

.lead {
  font-size: 1.08rem;
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0 20px;
}

.badge {
  background: #102331;
  color: #8cbcff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 6px 10px;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 18px;
}

.plinko-demo-inline {
  display: block;
  width: 100%;
  margin: 12px auto 18px;
  text-align: center;
}

.plinko-demo-inline img {
  width: 100%;
  max-width: 920px;
  height: auto;
  display: block;
  border-radius: 16px;
  border: none;
  margin: 0 auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transform: translateZ(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.plinko-demo-inline:hover img {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

.sticky-box {
  position: sticky;
  top: 90px;
}

.cta-banner {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  text-align: center;
}

.cta-banner p {
  margin-top: 0;
}

ul,
ol {
  padding-left: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 12px 0;
}

th,
td {
  border: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-strong);
  background: #1a2c38;
}

.last-winners-section {
  margin-top: 36px;
  margin-bottom: 0;
}

.last-winners-heading {
  margin: 0 0 14px;
  font-size: 1.15rem;
  color: var(--text-strong);
}

.last-winners-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.last-winners-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.last-winners-table thead th {
  background: #1a2c38;
  border: 0;
  color: #9ebecf;
  font-weight: 800;
  padding: 14px 12px;
  font-size: 0.9rem;
}

.last-winners-table tbody td {
  border: 0;
  border-bottom: 1px solid rgba(47, 69, 83, 0.65);
  padding: 14px 12px;
  vertical-align: middle;
}

.last-winners-table tbody tr:last-child td {
  border-bottom: 0;
}

.lw-game {
  font-weight: 800;
  color: #e7f2ff;
  white-space: nowrap;
}

.lw-payout {
  font-weight: 900;
  white-space: nowrap;
}

.lw-payout.win {
  color: #22d07a;
}

.lw-payout.loss {
  color: #ff8a65;
}

/* Last Winners smooth streaming animation */
.lw-anim-in {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.lw-anim-in-active {
  opacity: 1;
  transform: translateY(0);
}

.lw-anim-out {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.lw-anim-out-active {
  opacity: 0;
  transform: translateY(10px);
}

.last-winners-games {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.lw-games-strip {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.small-note {
  font-size: 0.92rem;
  color: #93a6c0;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--border);
  background: #12232d;
  color: #9ebecf;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
  padding: 26px 0;
}

.footer-col h3 {
  margin-top: 0;
}

.footer-divider {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.footer-bottom {
  padding: 0 0 22px;
}

.footer-copyright {
  margin: 0 0 10px;
  color: #9ebecf;
  font-size: 0.92rem;
}

.footer-legal-wide {
  grid-column: 1 / -1;
}

.footer-grid h3 {
  margin-top: 0;
  font-size: 1rem;
}

.footer-plain {
  margin: 0 0 10px;
  color: #9ebecf;
  font-weight: 600;
}

.legal-fine {
  margin: 10px 0 0;
  color: #9ebecf;
  font-size: 0.76rem;
  line-height: 1.45;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-right {
  text-align: left;
}

.footer-links-right li {
  display: block;
  width: 100%;
}

.footer-links-right a {
  display: block;
  text-align: left;
}

.footer-links li {
  margin-bottom: 8px;
}

.legal {
  border-top: 1px solid var(--border);
  padding: 14px 0 22px;
  font-size: 0.86rem;
}

.warning {
  color: #ffffff;
  font-weight: 600;
}

.site-footer a {
  color: #9ebecf;
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.hero-links-row {
  margin-top: -8px;
  margin-bottom: 2px;
}

.quick-nav a {
  background: #102331;
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 8px;
  color: #d7e2f7;
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .hero-stake {
    flex-direction: column;
  }

  /* On phones the banner should sit under the Google/Facebook buttons */
  .hero-bg-banner {
    width: 100%;
    flex: none;
    height: 160px;
    align-self: stretch;
    margin-top: 12px;
  }

  .content-wrap {
    grid-template-columns: 1fr;
  }

  .sticky-box {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-buttons {
    width: 100%;
    justify-content: space-between;
  }

  .auth-login,
  .auth-register {
    flex: 1;
    text-align: center;
  }

  .main-nav ul {
    gap: 12px;
  }

  .hero-box {
    padding: 20px;
  }

  .hero-right {
    margin-top: 8px;
  }
}

@media (max-width: 520px) {
  .hero-social-row {
    column-gap: 8px;
    row-gap: 6px;
  }

  .hero-aff-link.social {
    padding: 10px 20px !important;
    font-size: 0.98rem !important; /* ~15.5px */
    height: 44px !important;
    min-height: 44px !important;
  }

  .hero-aff-link.social img {
    width: 22px !important;
    height: 22px !important;
    padding: 1px;
  }
}
