:root {
  --bg: #0c1f0e;
  --bg-gradient: linear-gradient(135deg, #0c1f0e, #1a2f0d);
  --surface: #142b10;
  --accent: #d97706;
  --accent2: #16a34a;
  --text: #fef9c3;
  --text-muted: rgba(255, 255, 255, 0.6);
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  margin: 0;
}

a {
  color: var(--text);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(6px);
  background: rgba(12, 31, 14, 0.9);
  border-bottom: 1px solid rgba(217, 119, 6, 0.4);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--text);
}

.hud {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  background: rgba(20, 43, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.page {
  padding: 22px 0 90px;
}

.notice-bar {
  margin: 14px 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.5);
  background: rgba(22, 163, 74, 0.15);
  color: var(--text);
  font-size: 0.9rem;
}

.card {
  background: linear-gradient(180deg, rgba(20, 43, 16, 0.96), rgba(20, 43, 16, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
  border-radius: var(--radius);
}

.ticker-track {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 30s linear infinite;
}

.ticker-item {
  display: inline-block;
  margin-right: 28px;
  color: #fde68a;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.hero {
  margin-top: 12px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.45);
  min-height: 280px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/hero.webp') center/cover no-repeat;
  opacity: 0.4;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 2px,
    transparent 2px,
    transparent 7px
  );
  animation: stoneFlicker 4s ease-in-out infinite;
}

@keyframes stoneFlicker {
  0%,
  100% {
    opacity: 0.24;
  }
  50% {
    opacity: 0.1;
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 28px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.hero-mascot {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #1f3a19;
  animation: shimmer 2.4s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(217, 119, 6, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(217, 119, 6, 0.6);
  }
}

.hero h1 {
  margin: 0 0 8px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
}

.vine {
  width: 140px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent2), transparent);
  transform-origin: left center;
  animation: vineGrow 2.2s ease-out;
}

@keyframes vineGrow {
  from {
    transform: scaleX(0.04);
    opacity: 0.2;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

.bonus-row,
.slot-grid,
.quest-grid,
.stats-grid,
.faq-grid,
.badge-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.bonus-row {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.slot-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.quest-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

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

.badge-grid {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.card-pad {
  padding: 14px;
}

.small {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn,
button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: linear-gradient(140deg, var(--accent), #f59e0b);
  color: #271302;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
}

.btn-alt {
  background: linear-gradient(140deg, var(--accent2), #22c55e);
  color: #03260f;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.slot-art {
  position: relative;
  min-height: 130px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  background: linear-gradient(120deg, #2f4e1d, #14301b);
}

.slot-art img {
  width: 100%;
  height: 100%;
  min-height: 130px;
  object-fit: cover;
  display: block;
}

.slot-art.missing::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: 0.04em;
  background: linear-gradient(140deg, rgba(217, 119, 6, 0.35), rgba(22, 163, 74, 0.25));
}

.badge {
  display: inline-block;
  background: rgba(217, 119, 6, 0.28);
  border: 1px solid rgba(217, 119, 6, 0.6);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 9px;
  margin-bottom: 8px;
}

.progress-wrap {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.25s ease;
}

.wheel {
  width: 130px;
  height: 130px;
  margin: 8px auto;
  border-radius: 50%;
  transition: transform 3s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.slot-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 320px;
}

.board {
  display: grid;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: 10px;
}

.cell {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  min-height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.35rem;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.toasts {
  position: fixed;
  right: 16px;
  bottom: 88px;
  z-index: 1000;
  display: grid;
  gap: 8px;
}

.toast {
  background: #173813;
  border: 1px solid rgba(22, 163, 74, 0.7);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 220px;
}

.coin-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 999;
}

.coin {
  position: absolute;
  top: -40px;
  font-size: 1.2rem;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(420deg);
    opacity: 0.2;
  }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.overlay.open {
  display: flex;
}

.overlay-card {
  width: min(520px, 94vw);
  padding: 18px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.chips button {
  padding: 6px 10px;
}

input[type='text'] {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  margin: 8px 0;
  font-family: 'Nunito', sans-serif;
}

.cookie {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  background: rgba(6, 14, 6, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

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

.site-footer {
  background: rgba(6, 15, 8, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 18px 0 74px;
}

.footer-top {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.leader-table {
  width: 100%;
  border-collapse: collapse;
}

.leader-table th,
.leader-table td {
  text-align: left;
  padding: 9px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.leader-table tr.me {
  background: rgba(22, 163, 74, 0.15);
}

.badge-item {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.badge-item.locked {
  filter: grayscale(1);
  opacity: 0.6;
}

@media (max-width: 980px) {
  .slot-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hud {
    justify-content: flex-start;
  }
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-mascot {
    width: 120px;
    height: 120px;
  }
  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
