:root {
  --bg: #212529;
  --text: #FFFFFF;
  --muted: #ADB5BD;
  --accent: #4CAF50;
  --card: #2C3034;
  --border: #343A40;
  --radius: 14px;
  --max: 1100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

img {
  max-width: 100%;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px;
}

[id] {
  scroll-margin-top: 140px;
}

.main-title {
  color: var(--accent);
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin: 20px 0 30px 0;
  padding: 0 16px;
  line-height: 1.3;
}

.section {
  background: var(--card);
  border-radius: var(--radius);
  margin: 16px 0;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.section p + p,
.section ul,
.section ol {
  margin-top: 12px;
}

.section ul,
.section ol {
  padding-left: 22px;
}

.section li + li {
  margin-top: 6px;
}

.section h3 {
  margin-top: 24px;
}

.faq-section {
  background: var(--bg);
  border: 2px solid var(--accent);
}

.faq-accordion {
  margin-top: 20px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--accent);
  color: #212529;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  transition: background 0.3s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  background: #57bd5b;
}

.faq-question:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
}

.faq-question h3 {
  color: #212529;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}

.faq-icon {
  flex: 0 0 auto;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 16px 20px;
  margin: 0;
  color: var(--text);
  background: var(--card);
}

h1, h2, h3, h4 {
  color: var(--accent);
  margin-bottom: 16px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

.btn {
  background: var(--accent);
  color: #212529;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  height: 44px;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #2a2a33;
  color: var(--accent);
}

/* Header */
header {
  background: rgba(33, 37, 41, 0.95);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 2px solid var(--accent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  min-height: 130px;
  max-height: 120px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  height: 110px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo img {
  max-height: 90px;
  width: auto;
  max-width: 180px;
  filter: drop-shadow(0 2px 8px rgba(76, 175, 80, 0.3));
  object-fit: contain;
  object-position: left center;
}

.logo .brand {
  display: none;
}

nav {
  display: flex;
  gap: 8px;
  padding: 0;
  align-items: center;
}

nav a {
  color: var(--text);
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(76, 175, 80, 0.2);
  backdrop-filter: blur(10px);
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 44px;
}

nav a:hover {
  background: rgba(76, 175, 80, 0.15);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.burger-menu {
  display: none;
  background: var(--accent);
  color: #212529;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.burger-menu:hover {
  background: #4CAF50;
  transform: scale(1.05);
}

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

/* Fixed mobile button */
.mobile-fixed-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--accent);
  color: #212529;
  padding: 16px 32px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-fixed-btn:hover {
  background: #4CAF50;
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 25px rgba(76, 175, 80, 0.5);
}

/* Mini Game Styles */
.mini-game {
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 20px;
  margin: 20px 0;
  border: 2px solid var(--accent);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
}

.mini-game h2 {
  font-size: 1.5rem;
}

.mini-game .lead {
  color: var(--muted);
  margin-bottom: 20px;
}

.wheel-container {
  position: relative;
  display: inline-block;
  margin: 20px 0;
}

.wheel {
  --wheel-radius: 100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 8px solid #d4af37;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  position: relative;
  /* sectors are offset by half a step so each number sits in the middle of one */
  background: conic-gradient(
    from -22.5deg,
    #dc2626 0deg 45deg,
    #ffffff 45deg 90deg,
    #dc2626 90deg 135deg,
    #ffffff 135deg 180deg,
    #dc2626 180deg 225deg,
    #ffffff 225deg 270deg,
    #dc2626 270deg 315deg,
    #ffffff 315deg 360deg
  );
  transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid #dc2626;
  z-index: 10;
}

.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: #d4af37;
  border-radius: 50%;
  border: 4px solid #b8860b;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.wheel-numbers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.wheel-number {
  position: absolute;
  top: 50%;
  left: 50%;
  /* place at the center, rotate to sector angle, move outwards, rotate text back */
  transform: translate(-50%, -50%) rotate(var(--angle)) translate(0, calc(-1 * var(--wheel-radius))) rotate(calc(-1 * var(--angle)));
  transform-origin: center center;
  font-weight: bold;
  font-size: 18px;
  color: #1f2937;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.85);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.control-label {
  color: var(--muted);
  font-weight: 500;
  margin-right: 8px;
}

.number-btn, .color-btn {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

.number-btn {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

.number-btn.selected {
  background: var(--accent);
  color: #212529;
  border-color: var(--accent);
}

.color-btn.red {
  background: #dc2626;
  color: white;
}

.color-btn.white {
  background: #ffffff;
  color: #1f2937;
  border: 2px solid #e5e7eb;
}

.color-btn.selected {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.spin-btn {
  background: linear-gradient(45deg, var(--accent), #45a049);
  color: #212529;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.spin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

.spin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Win modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay[hidden] {
  display: none;
}

.win-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  border: 2px solid var(--accent);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: modal-in 0.25s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.win-title {
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.win-message {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.win-details {
  color: var(--muted);
  margin-bottom: 20px;
}

.win-result {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.3rem;
}

.win-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.win-actions .btn {
  padding: 12px 25px;
  font-weight: 700;
}

/* Mobile Sidebar */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius);
  margin-top: 12px;
  border: 1px solid var(--border);
}

.mobile-nav.show {
  display: flex;
}

.mobile-nav a {
  color: var(--text);
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(76, 175, 80, 0.2);
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
}

.mobile-nav a:hover {
  background: rgba(76, 175, 80, 0.15);
  border-color: var(--accent);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 16px;
  background: radial-gradient(circle at center, rgba(76,175,80,.08), transparent);
  border-radius: var(--radius);
  margin: 20px 0;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
  background: linear-gradient(45deg, var(--accent), #45a049);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--muted);
  margin-bottom: 30px;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.cta-section {
  background: var(--bg);
  border: 2px solid var(--accent);
  text-align: center;
}

.cta-section .cta {
  margin-top: 0;
}

/* Key Info Table */
.key-info {
  margin: 2rem 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.key-info h2 {
  font-size: clamp(1.25rem, 1.2rem + 1vw, 1.75rem);
  margin: 0 0 1rem 0;
  color: var(--accent);
}

.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
}

.info-table th,
.info-table td {
  padding: clamp(0.8rem, 0.6rem + 0.5vw, 1rem);
  vertical-align: top;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.info-table th {
  width: 60px;
  min-width: 60px;
  max-width: 80px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(76, 175, 80, 0.1);
  text-align: center;
  padding: clamp(0.8rem, 0.6rem + 0.5vw, 1rem) clamp(0.5rem, 0.4rem + 0.3vw, 0.8rem);
}

.info-table tr:first-child th,
.info-table tr:first-child td {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

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

/* Banner */
.banner {
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

.banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Games Grid */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.game {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.game a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.game:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.2);
}

.game img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.game .meta {
  padding: 12px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
}

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

th {
  color: var(--accent);
  background: rgba(76, 175, 80, 0.1);
  font-weight: 600;
}

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

/* Features Grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.feature {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--accent);
}

.feature h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.feature p {
  color: var(--muted);
  line-height: 1.5;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 60px;
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.footer-links {
  margin-top: 8px;
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .main-title {
    font-size: 1.6rem;
    margin: 16px 0 24px 0;
    padding: 0 12px;
  }

  .hero-title {
    font-size: 2rem;
  }

  header {
    min-height: 110px;
    max-height: 90px;
  }

  .header-content {
    padding: 15px 0;
    justify-content: center;
    position: relative;
    height: 90px;
    align-items: center;
  }

  .logo {
    justify-content: center;
  }

  .logo img {
    max-height: 50px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    object-position: left center;
  }

  nav {
    display: none;
  }

  .burger-menu {
    display: block;
    position: absolute;
    right: 16px;
  }

  .mobile-fixed-btn {
    display: block;
  }

  .desktop-btn {
    display: none;
  }

  .cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .games {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

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

  .section {
    padding: 20px;
    margin: 12px 0;
  }

  .key-info {
    padding: 16px;
    margin: 16px 0;
  }

  .info-table thead {
    display: none;
  }

  .info-table tbody {
    display: block;
  }

  .info-table tr {
    display: flex;
    align-items: stretch;
    margin-bottom: 12px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  .info-table th {
    flex-shrink: 0;
    width: 50px;
    min-width: 50px;
    margin-right: 0;
    margin-bottom: 0;
    border: none;
    border-right: 1px solid var(--border);
    border-radius: 0;
    text-align: center;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent) !important;
    color: #FFFFFF !important;
  }

  .info-table td {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 12px;
    margin: 0;
    min-width: 0;
  }

  .info-table tr:first-child th,
  .info-table tr:first-child td {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .info-table tr:last-child th,
  .info-table tr:last-child td {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  footer {
    padding-bottom: 100px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 12px;
  }

  .hero {
    padding: 40px 12px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .games {
    grid-template-columns: repeat(2, 1fr);
  }

  .wheel {
    --wheel-radius: 84px;
    width: 240px;
    height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .wheel {
    transition-duration: 0.6s;
  }

  .win-modal {
    animation: none;
  }
}
