/* Design tokens */
:root {
  --bg: #faf7fb;
  --card-bg: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --primary: #ff6a88;
  --primary-2: #ffb86c;
  --accent: #ff5a77;
  --ring: rgba(255, 106, 136, 0.35);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-1: 0 8px 24px rgba(10, 12, 16, 0.08), 0 2px 6px rgba(10, 12, 16, 0.06);
}

/* Neon theme overrides */
.theme-neon {
  --bg: #0a0c10;
  --card-bg: #0f1218;
  --text: #eef3ff;
  --muted: #8b93a7;
  --primary: #00f5d4;
  --primary-2: #7c3aed;
  --accent: #22d3ee;
  --ring: rgba(124, 58, 237, 0.35);
  background: radial-gradient(1200px 600px at 50% -200px, rgba(124, 58, 237, .35) 0%, transparent 60%), var(--bg);
}

/* Base */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

/* 添加到全局 CSS */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  /* background: radial-gradient(1200px 600px at 50% -200px, #ffd1d6 0%, transparent 60%), var(--bg); */
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 247, 251, 0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .2px;
}

.nav {
  display: flex;
  gap: 18px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--text);
}

.hero {
  padding: 0px 0 10px;
}

.hero-title {
  margin: 20px 0 6px;
  font-size: 28px;
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  margin-top: 14px;
}

.ghost-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.theme-neon .ghost-btn {
  border-color: rgba(255, 255, 255, 0.12);
}

.grid-section {
  padding: 14px 0 48px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

/* Force 5 columns on games page with responsive fallbacks */
.games-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1280px) {
  .games-grid.cols-5 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1024px) {
  .games-grid.cols-5 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .games-grid.cols-5 {
    grid-template-columns: repeat(4, 1fr);
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .title {
    font-size: 10px;
  }
}

@media (max-width: 500px) {
  .games-grid.cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 改为3列 */
@media (max-width: 400px) {
  .games-grid.cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 超小屏幕改为2列 */
@media (max-width: 320px) {
  .games-grid.cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 最小屏幕改为1列 */

/* Game Card */
.game-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* 确保卡片在小屏幕上也能正常显示 */
  min-width: 0;
  /* 防止flex项目溢出 */
}

.game-card .cover {
  position: relative;
}


.game-card .cover {
  position: relative;
}

/* Maintain 492x660 portrait ratio; width is flexible */
.game-card .cover::before {
  content: "";
  display: block;
  aspect-ratio: 492 / 660;
  width: 100%;
  background: #f1f1f3;
}

.game-card .cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hover overlay with two CTAs */
.overlay {
  position: absolute;
  inset: 0;
  /* display: grid; */
  display: none;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.65));
  /* opacity: 0; */
  transition: opacity .2s ease;
}

.game-card:hover .overlay {
  /* opacity: 1; */
  /* display: grid; */
}

.game-card:hover .cover img {
  filter: grayscale(25%) brightness(0.72);
}

.cta {
  display: flex;
  gap: 12px;
  flex-direction: column;
  width: min(78%, 280px);
}

/* Both CTAs start as Free style (glass), hover to Real style (gradient) */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(2px);
  cursor: pointer;
  transition: all .15s ease;
}

@media (max-width: 900px) {
  .btn-cta {
    padding: 5px 5px;
    font-size: 12px;
    border-radius: 6px;
  }
}


.btn-cta:hover {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-color: transparent;
  box-shadow: 0 8px 18px var(--ring);
}

.meta {
  padding: 14px 16px 16px;
}

.title {
  margin: 6px 0 10px;
  font-size: 16px;
  font-weight: 800;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.stat {
  display: grid;
  justify-items: center;
  row-gap: 2px;
}

.stat .value {
  color: var(--text);
  font-weight: 700;
}

/* Modal (Play Free) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-backdrop.show {
  display: flex;
}

.modal-backdrop {
  overflow: hidden;
}

.modal {
  width: min(1320px, 96vw);
  height: min(820px, 92vh);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: 48px 1fr;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.04);
}

.theme-neon .modal-header {
  background: rgba(255, 255, 255, 0.06);
}

.modal-close {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.modal-close:hover {
  filter: brightness(1.05);
}

.modal-body {
  position: relative;
}

.modal-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.modal-iframe {
  overflow: hidden;
}

.modal-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  text-align: center;
  padding: 20px;
}

.modal-fallback .btn-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 8px 18px var(--ring);
}

/* Lock background scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Casinos */
.casinos-section {
  padding: 8px 0 40px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 22px;
}

.casinos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.casino-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-1);
  display: grid;
  gap: 12px;
}

.casino-head {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
}

.casino-head img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 8px 18px var(--ring);
}

/* Partners */
.partners-section {
  padding: 8px 0 40px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.partner-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-1);
  display: grid;
  justify-items: center;
  gap: 8px;
}

.partner-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
}

.partner-card .name {
  font-weight: 700;
}

.partner-detail {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  padding: 18px;
  display: grid;
  grid-template-columns: 120px 1fr 220px;
  gap: 16px;
  align-items: center;
}

.partner-detail .logo {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.partner-detail .title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.partner-detail .rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #10b981;
}

.partner-detail .offer {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 800;
  text-align: center;
}

.partner-detail .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
}

.badges {
  display: flex;
  gap: 8px;
}

.badge {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(16, 185, 129, .12);
  color: #065f46;
  font-weight: 700;
  font-size: 12px;
}

.actions {
  display: grid;
  gap: 10px;
}

.actions .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.actions .link {
  text-align: center;
  color: var(--muted);
  text-decoration: underline;
}

@media (max-width: 960px) {
  .partner-detail {
    grid-template-columns: 1fr;
  }

  .partner-detail .offer {
    order: 3;
  }

  .actions {
    order: 4;
  }
}

/* Partner extra rows (outside the card) */
.band {
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 12px;
}

.band-title {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--muted);
  font-weight: 800;
}

.logo-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 0;
}

.logo-card {
  background: #5b3df5;
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  padding: 12px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  color: #ffffff;
}

.logo-card img {
  width: 56px;
  height: 56px;
  border-radius: 0;
  object-fit: contain;
  background: transparent !important;
  filter: none;
}

.logo-card .name {
  font-weight: 800;
  color: #ffffff;
}

.pay-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pay {
  padding: 8px 12px;
  background: var(--card-bg);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
  font-weight: 800;
}

/* Payments */
.payments-section {
  padding: 8px 0 40px;
}

.payments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.payments-list li {
  padding: 8px 12px;
  background: var(--card-bg);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
  color: var(--text);
}

/* FAQ */
.faq-section {
  padding: 8px 0 60px;
}

.faq details {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-1);
}

.faq details+details {
  margin-top: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

/* Responsive tweaks */
@media (min-width: 1280px) {
  .games-grid {
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Contact */
.contact-wrap {
  padding: 18px 0 10px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 18px;
}

.card-title {
  margin: 0 0 10px;
  font-size: 20px;
}

.contact-cta {
  display: grid;
  gap: 12px;
}

.tg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  background: linear-gradient(90deg, #24A1DE, #1E88E5);
  box-shadow: 0 8px 18px rgba(30, 136, 229, .35);
}

.tg-btn svg {
  width: 20px;
  height: 20px;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 900px) {
  .contact-form .row {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--card-bg);
  color: var(--text);
}

.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.title {
  text-align: center;
  font-size: 24px;
}

@media (max-width: 768px) {
  .game-card .title {
    font-size: 12px;
  }

  .game-card .meta {
    padding: 5px 5px 5px
  }
}

.site-footer {
  padding-bottom: 100px;
}