* {
  box-sizing: border-box;
}

/* Base */
html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (max-width: 639px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--appbar);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}
.logo {
  min-width: 180px;
  height: 36px;
  position: relative;
}
.logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-name {
  font-weight: 800;
  font-size: 18px;
}

/* Button */
.btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover {
  background: var(--secondary-dark);
  color: var(--secondary-contrast);
}
.btn.primary {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}
.btn.primary:hover {
  background: var(--primary-dark);
}

/* Slider */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  padding-bottom: 42.89473684%;
}

.image-container-banner {
  position: relative;
  padding-bottom: 42.89473684%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s;
}
.slide.active {
  opacity: 1;
}
.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: none;
}
.dot.active {
  background: #fff;
}

/* Sections */
.section {
  margin-top: 24px;
}
.title {
  font-size: 22px;
  font-weight: 800;
}
.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* Provider filter */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.chip.active {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}

/* Grid */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Card (16:21) */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.card-img-wrap {
  position: relative;
  padding-bottom: 131.25%; /* 16:21 ratio */
}
.card-img-wrap > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
}
.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rtp-val {
  font-weight: 700;
  font-size: 13px;
}

/* Progress bar */
.bar {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
}
.bar.red {
  background: color-mix(in srgb, var(--red) 30%, transparent);
}
.bar.yellow {
  background: color-mix(in srgb, var(--yellow) 30%, transparent);
}
.bar.green {
  background: color-mix(in srgb, var(--green) 30%, transparent);
}

/* (optional) legacy play button */
.btn-play {
  margin-top: auto;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
}
.btn-play:hover {
  background: var(--secondary-dark);
  color: var(--secondary-contrast);
}

/* Legend */
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pill i {
  display: inline-block;
  width: 36px;
  height: 10px;
  border-radius: 999px;
}

/* Footer */
footer {
  padding: 24px 0;
  color: var(--muted);
  text-align: center;
}

/* A11y */
@media (prefers-reduced-motion: reduce) {
  .slide {
    transition: none;
  }
  .card {
    transition: none;
  }
}
