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

:root {
  --gold: #F0A500;
  --gold-light: #FFD000;
  --gold-dark: #C87800;
  --gold-deep: #8B5500;
  --bg: #0E0C07;
  --bg2: #161208;
  --bg3: #1E1A0E;
  --bg4: #252015;
  --border: rgba(240, 165, 0, 0.12);
  --border2: rgba(240, 165, 0, 0.22);
  --text: #F5EDD5;
  --text2: #9A8C6A;
  --text3: #5C5238;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font-head: 'Oswald', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  ;
}

a {
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.nav {
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(14, 12, 7, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-cta {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  color: #1a1200;
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 22px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.nav-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.ticker {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
  padding: 7px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 26s linear infinite;
  gap: 0;
}

.ticker-item {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #1a1200;
  white-space: nowrap;
  padding: 0 28px;
}

.ticker-item::before {
  content: '◆ ';
  opacity: 0.6;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 26/8;
  background: var(--bg2);
}

@media (max-width: 600px) {
  .hero {
    aspect-ratio: 7/2;
  }
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.slide-placeholder-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    repeating-linear-gradient(45deg, var(--gold) 0, var(--gold) 1px, transparent 0, transparent 50%);
  background-size: 28px 28px;
}

.slide-placeholder-icon {
  font-size: 72px;
  position: relative;
  z-index: 1;
}

.slide-placeholder img {
  width: 100%;
  height: auto;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(240, 165, 0, 0.25);
  color: var(--gold);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--gold);
}

.hero-arrow.left {
  left: 14px;
}

.hero-arrow.right {
  right: 14px;
}

.hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(240, 165, 0, 0.3);
  cursor: pointer;
  transition: all 0.25s;
}

.dot.active {
  background: var(--gold);
  width: 22px;
  border-radius: 3px;
}

.section {
  position: relative;
  z-index: 1;
  padding: 28px 120px 40px;
}

@media(max-width:600px) {
  .section {
    padding: 28px 20px 40px;
  }
}

.section-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.section-title span {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.filter-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: 20px;
}

.filter-wrap::-webkit-scrollbar {
  display: none;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  width: max-content;
}

.filter-tab {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: #1a1200;
  border-color: transparent;
  font-weight: 600;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

@media (max-width: 1024px) {
  .game-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }
}

.game-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border2);
  box-shadow: 0 8px 32px rgba(240, 165, 0, 0.1);
}

.game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: var(--bg4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.game-card:hover .game-thumb img {
  transform: scale(1.05);
}

.thumb-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--bg4);
}

.badge {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-hot {
  background: var(--gold);
  color: #1a1200;
}

.badge-new {
  background: var(--gold-dark);
  color: #fff;
}

.game-info {
  padding: 8px 10px 10px;
}

.game-name {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.game-rtp {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
}

@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }

  100% {
    background-position: 400px 0;
  }
}

.skeleton-thumb,
.skeleton-line {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
}

#scroll-sentinel {
  height: 1px;
  margin-top: 8px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 600px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
  animation: slideUp 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@media (min-width: 600px) {
  .modal {
    border-radius: var(--radius-xl);
    max-height: 88vh;
    animation: popIn 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(60px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes popIn {
  from {
    transform: scale(0.94);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* hero image area */
.modal-hero {
  position: relative;
  height: 180px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
}

@media (min-width: 600px) {
  .modal-hero {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
}

/* blurred bg layer */
#modal-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) brightness(0.45) saturate(1.4);
  transform: scale(1.1);
  z-index: 0;
}

/* contained game image */
#modal-hero-img {
  position: relative;
  z-index: 1;
  height: 88%;
  max-width: 55%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.modal-body {
  padding: 20px 20px 24px;
}

.modal-tag {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.modal-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
  margin-bottom: 14px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 16px;
}

.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.stat-label {
  font-size: 10px;
  color: var(--text3);
  font-weight: 500;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-val {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.section-label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

.strategy-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.strategy-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.strategy-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: #1a1200;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.strategy-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn-main {
  flex: 1;
  text-align: center;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  color: #1a1200;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.modal-btn-main:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 20px;
  text-align: center;
}

.footer-logo img {
  height: 30px;
  object-fit: contain;
  margin-bottom: 10px;
}

.footer-text {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto;
}