@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0b0e11;
  --bg-elevated: #12161c;
  --bg-panel: #151a21;
  --bg-card: #1a2029;
  --bg-card-hover: #222a35;
  --border: #2a3340;
  --border-soft: #1e2630;
  --text: #ffffff;
  --text-muted: #9aa4b2;
  --text-dim: #6b7585;
  --green: #00e676;
  --green-dark: #00c853;
  --green-glow: rgba(0, 230, 118, 0.35);
  --red: #ff3d57;
  --purple: #6b3fa0;
  --purple-deep: #4a1f7a;
  --gold: #f5c542;
  --sidebar-w: 240px;
  --header-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
}

/* ========== HEADER ========== */
.header {
  grid-column: 1 / -1;
  grid-row: 1;
  height: var(--header-h);
  background: rgba(11, 14, 17, 0.92);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 25%, #ffd76a 0%, #f5a623 35%, #c0392b 70%, #7a1f1f 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 0 16px rgba(245, 166, 35, 0.35);
  position: relative;
  overflow: hidden;
}

.brand-logo::before {
  content: '♛';
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.45));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.brand-text span {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.22em;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  transition: .2s ease;
  white-space: nowrap;
}

.btn-ghost {
  border: 1px solid #3a4554;
  background: transparent;
  color: #fff;
}

.btn-ghost:hover {
  border-color: #5a6678;
  background: rgba(255,255,255,.04);
}

.btn-green {
  background: linear-gradient(180deg, #1aff8c 0%, var(--green) 45%, var(--green-dark) 100%);
  color: #04140c;
  box-shadow: 0 0 18px var(--green-glow);
}

.btn-green:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.balance-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #161b22;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.balance-pill .coin-ico {
  font-size: 16px;
  line-height: 1;
}

.balance-texts {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.balance-pill small {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10px;
}

.balance-pill strong {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.btn-deposit .chev {
  font-size: 11px;
  opacity: .85;
}

.btn-bell {
  position: relative;
}

.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px #0b0e11;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #161b22;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: .2s ease;
}

.icon-btn:hover {
  color: #fff;
  border-color: #445063;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
}

.vip-dots {
  display: flex;
  gap: 4px;
  margin-left: 4px;
}

.vip-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f3a48;
  display: block;
}

.vip-dots i.on {
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}

/* ========== SIDEBAR ========== */
.sidebar {
  grid-column: 1;
  grid-row: 2;
  background: #0e1217;
  border-right: 1px solid var(--border-soft);
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: .18s ease;
  position: relative;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .85;
}

.nav-item:hover {
  background: rgba(255,255,255,.04);
  color: #fff;
}

.nav-item.active {
  background: rgba(0, 230, 118, 0.12);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(0, 230, 118, 0.25);
}

.nav-item.active svg {
  opacity: 1;
}

.badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 6px;
  border-radius: 999px;
}

.badge-live {
  background: var(--red);
  color: #fff;
  animation: pulse 1.6s infinite;
}

.badge-novo {
  background: #e91e8c;
  color: #fff;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .65; }
}

.sidebar-promo {
  margin-top: auto;
  background: linear-gradient(165deg, #6d3db8 0%, #4a1f7a 55%, #2d114d 100%);
  border-radius: 16px;
  padding: 18px 14px 14px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.sidebar-promo::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto;
  height: 120px;
  background: radial-gradient(circle, rgba(255,215,100,.25), transparent 70%);
}

.promo-trophy {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
  position: relative;
}

.sidebar-promo h4 {
  position: relative;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 800;
}

.sidebar-promo p {
  position: relative;
  margin: 6px 0 12px;
  font-size: 11px;
  color: #e8d7ff;
  font-weight: 600;
}

.sidebar-promo strong {
  display: block;
  color: var(--gold);
  font-size: 15px;
  margin-top: 2px;
}

.btn-purple {
  width: 100%;
  background: linear-gradient(180deg, #9b59d8, #7b3fb8);
  color: #fff;
  border-radius: 999px;
  padding: 10px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  position: relative;
}

.btn-purple:hover {
  filter: brightness(1.08);
}

/* ========== MAIN ========== */
.main {
  grid-column: 2;
  grid-row: 2;
  padding: 18px 22px 28px;
  overflow-x: hidden;
}

.hero {
  position: relative;
  border-radius: 18px;
  min-height: 280px;
  overflow: hidden;
  background-color: #0a1a2e;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  touch-action: pan-y;
  user-select: none;
}

.hero-track {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 280px;
  transition: transform .55s cubic-bezier(.22, .9, .28, 1);
  will-change: transform;
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 280px;
  background-color: #0a1a2e;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: .25s ease;
}

.hero-dot.on {
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
  width: 18px;
  border-radius: 999px;
}

.hero-art {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: min(420px, 48%);
  height: 210px;
  z-index: 1;
}

.slot-machine {
  position: absolute;
  right: 40px;
  bottom: 10px;
  width: 170px;
  height: 180px;
  background: linear-gradient(180deg, #2a3344, #121820);
  border: 4px solid #c9a227;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 20px rgba(0,230,118,.15);
}

.slot-machine::before {
  content: '777';
  position: absolute;
  inset: 24px 16px 50px;
  background: #0b0e11;
  border-radius: 10px;
  border: 2px solid #3d4a5c;
  display: grid;
  place-items: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  color: var(--green);
  letter-spacing: .12em;
  text-shadow: 0 0 12px var(--green-glow);
}

.slot-machine::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff5a6a, #c62828);
}

.king-figure {
  position: absolute;
  right: 170px;
  bottom: 8px;
  width: 150px;
  height: 190px;
  background:
    radial-gradient(circle at 50% 20%, #ffe08a 0 18px, transparent 19px),
    radial-gradient(circle at 50% 48%, #ffd29d 0 28px, transparent 29px),
    linear-gradient(180deg, transparent 55%, #8b1e2d 55%, #5c1220 100%);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.4));
}

.king-figure::before {
  content: '👑';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 34px;
}

.coin {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a0, #d4a017);
  box-shadow: 0 0 10px rgba(245, 197, 66, .5);
  animation: floatCoin 3.2s ease-in-out infinite;
}

.coin:nth-child(1) { top: 18%; right: 28%; animation-delay: 0s; }
.coin:nth-child(2) { top: 35%; right: 12%; animation-delay: .4s; }
.coin:nth-child(3) { top: 55%; right: 22%; animation-delay: .8s; }
.coin:nth-child(4) { top: 22%; right: 42%; animation-delay: 1.2s; }

@keyframes floatCoin {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.trust-bar {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: #12171e;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.trust-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.trust-texts strong {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.trust-texts span {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.trust-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 230, 118, .08);
  border: 1px solid rgba(0, 230, 118, .18);
  display: grid;
  place-items: center;
  color: var(--green);
  flex-shrink: 0;
}

.section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 14px;
  letter-spacing: .12em;
  font-weight: 800;
}

.section-head a {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
}

.section-head a:hover {
  color: var(--green);
}

.categories-wrap {
  position: relative;
  margin: 0 -4px;
}

.categories-wrap::before,
.categories-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 2;
  pointer-events: none;
}

.categories-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
}

.categories-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
}

.categories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 12px 10px;
  cursor: grab;
  scrollbar-width: none;
  touch-action: pan-x;
}

.categories::-webkit-scrollbar {
  display: none;
}

.categories.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-height: 96px;
  min-width: 118px;
  width: 118px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, transform .2s ease;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  scroll-snap-align: start;
  user-select: none;
}

.cat-card .icon {
  font-size: 26px;
  line-height: 1;
}

.cat-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  text-align: center;
}

.cat-label small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  color: inherit;
}

.cat-card:hover {
  background: var(--bg-card-hover);
  color: #fff;
  transform: translateY(-2px);
}

.cat-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(0,230,118,.25), 0 0 22px rgba(0,230,118,.18);
  color: var(--green);
  background: rgba(0, 230, 118, 0.06);
}

.providers {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.provider-card {
  background: #141a22;
  border: 1px solid var(--border);
  border-radius: 12px;
  height: 68px;
  display: grid;
  place-items: center;
  color: #8b95a5;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .04em;
  text-align: center;
  padding: 8px;
  transition: .2s ease;
}

.provider-card:hover {
  border-color: #445063;
  color: #fff;
}

.top-wins {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.win-card {
  background: #141a22;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.win-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a2029;
}

.win-info {
  min-width: 0;
}

.win-info .user {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-info .game {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-info .amount {
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
}

.toolbar {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #12171e;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--text-dim);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.filter-select {
  background: #12171e;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  min-width: 170px;
  outline: none;
}

.games-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.game-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #161b22;
  border: 1px solid var(--border-soft);
  aspect-ratio: 3 / 4.1;
  display: flex;
  flex-direction: column;
  transition: .22s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,230,118,.35);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}

.game-art {
  flex: 1;
  position: relative;
  overflow: hidden;
  background-color: #12161c;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.game-art.has-capa {
  background-image: none !important;
}

.game-art .capa-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  z-index: 0;
  pointer-events: none;
}

.api-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(245, 197, 66, 0.1);
  border: 1px solid rgba(245, 197, 66, 0.35);
  color: #f5d76e;
  font-size: 12px;
  font-weight: 600;
}

.api-banner code {
  color: #fff;
  background: rgba(0,0,0,.25);
  padding: 2px 6px;
  border-radius: 4px;
}

.api-empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}

#modal-play.modal-overlay {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  background: #000;
  z-index: 400;
}

.modal-play {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  border-radius: 0;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
  animation: none;
}

.play-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  min-height: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(10, 12, 16, 0.96);
  flex-shrink: 0;
  z-index: 5;
}

.play-modal-bar strong {
  font-size: 12px;
  letter-spacing: .06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.play-modal-actions .modal-close {
  position: static;
  width: 36px;
  height: 36px;
  background: #1c2430;
}

.play-modal-body {
  position: relative;
  flex: 1;
  background: #000;
  min-height: 0;
  width: 100%;
}

.play-modal-body iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.play-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: #0b0e11;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  padding: 24px;
  text-align: center;
}

.game-art::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(8,10,14,.92) 70%);
}

.game-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: .04em;
}

.game-badge.hot { background: var(--red); color: #fff; }
.game-badge.novo { background: var(--green); color: #04140c; }

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
}

.game-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 48px;
  z-index: 2;
  text-align: center;
  padding: 0 8px;
}

.game-meta h3 {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.game-meta span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: .06em;
  font-weight: 700;
}

.game-play {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 10px;
  background: rgba(10, 12, 16, .72);
  backdrop-filter: blur(4px);
}

.game-play .btn {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  border-radius: 8px;
}

.footer {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 12px;
}

/* ========== MODALS ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #171d26 0%, #11161d 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  padding: 28px 26px 24px;
  position: relative;
  animation: slideUp .25s ease;
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1c2430;
  color: var(--text-muted);
  display: grid;
  place-items: center;
}

.modal-close:hover {
  color: #fff;
}

.modal-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.modal-brand .brand-logo {
  width: 52px;
  height: 52px;
}

.modal-brand h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  letter-spacing: .08em;
}

.modal-brand p {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .04em;
}

.form-group input {
  width: 100%;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  color: #fff;
  outline: none;
  transition: .18s ease;
}

.form-group input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, .12);
}

.modal .btn-green {
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  border-radius: 12px;
}

.modal-switch {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.modal-switch button {
  color: var(--green);
  font-weight: 800;
}

.flash {
  position: fixed;
  top: 80px;
  right: 22px;
  z-index: 300;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: slideUp .25s ease;
  max-width: 320px;
}

.flash.success {
  background: rgba(0, 230, 118, .12);
  border: 1px solid rgba(0, 230, 118, .4);
  color: var(--green);
}

.flash.error {
  background: rgba(255, 61, 87, .12);
  border: 1px solid rgba(255, 61, 87, .4);
  color: #ff8a9a;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #161b22;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Fallback gradients (só background-image — não reseta size/repeat) */
.art-1 { background-image: linear-gradient(160deg, #ff6b9d, #7b2ff7 45%, #1a1035); }
.art-2 { background-image: linear-gradient(160deg, #ffd54f, #ff8f00 40%, #3e2723); }
.art-3 { background-image: linear-gradient(160deg, #4fc3f7, #1565c0 45%, #0d2137); }
.art-4 { background-image: linear-gradient(160deg, #81c784, #2e7d32 40%, #1b2e1c); }
.art-5 { background-image: linear-gradient(160deg, #f48fb1, #ad1457 45%, #31101c); }
.art-6 { background-image: linear-gradient(160deg, #ce93d8, #6a1b9a 40%, #1a1028); }
.art-7 { background-image: linear-gradient(160deg, #ffab91, #e64a19 40%, #2c160e); }
.art-8 { background-image: linear-gradient(160deg, #80cbc4, #00695c 45%, #0e2422); }
.art-9 { background-image: linear-gradient(160deg, #fff59d, #f9a825 40%, #2c2208); }
.art-10 { background-image: linear-gradient(160deg, #90caf9, #283593 45%, #101628); }
.art-11 { background-image: linear-gradient(160deg, #ef9a9a, #c62828 40%, #2a1010); }
.art-12 { background-image: linear-gradient(160deg, #a5d6a7, #1b5e20 45%, #0f1f12); }

.game-art .emoji {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 54px;
  z-index: 1;
  padding-bottom: 30px;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.35));
}

@media (max-width: 1200px) {
  .games-grid { grid-template-columns: repeat(4, 1fr); }
  .providers { grid-template-columns: repeat(3, 1fr); }
  .top-wins { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  :root {
    --header-h: 60px;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 0 10px;
    gap: 8px;
  }

  .header-left {
    flex: 0 0 auto;
  }

  .header-actions {
    flex: 1;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
  }

  .mobile-menu-btn { display: inline-flex; }

  .desktop-only,
  form.desktop-only {
    display: none !important;
  }

  .brand-text {
    display: flex;
  }

  .brand-text strong {
    font-size: 11px;
  }

  .brand-text span {
    font-size: 8px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .brand-logo::before {
    font-size: 18px;
  }

  .balance-pill {
    padding: 5px 8px;
    gap: 5px;
  }

  .balance-pill strong {
    font-size: 11px;
    white-space: nowrap;
  }

  .btn-deposit {
    padding: 8px 10px;
    font-size: 11px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: var(--header-h);
    width: min(280px, 85vw);
    height: calc(100vh - var(--header-h));
    z-index: 150;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 20px 0 40px rgba(0,0,0,.45);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    grid-column: 1;
    padding: 12px 12px 24px;
  }

  .hero,
  .hero-track,
  .hero-slide {
    min-height: 200px;
  }

  .hero {
    border-radius: 16px;
  }

  .hero-slide {
    background-position: center center;
  }

  .section-cats {
    margin-top: 14px;
  }

  .section-cats .section-head {
    display: none;
  }

  .categories-wrap {
    margin: 0 -12px;
  }

  .categories-wrap::before,
  .categories-wrap::after {
    width: 20px;
  }

  .categories {
    gap: 8px;
    padding: 2px 12px 8px;
  }

  .cat-card {
    min-height: 84px;
    min-width: 96px;
    width: 96px;
    border-radius: 12px;
    gap: 6px;
    font-size: 10px;
    padding: 8px 4px;
  }

  .cat-card .icon {
    font-size: 22px;
  }

  .trust-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }

  .trust-texts strong {
    font-size: 11px;
  }

  .trust-texts span {
    font-size: 10px;
  }

  .providers {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .top-wins {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .top-wins .win-card {
    min-width: 200px;
    flex: 0 0 200px;
    scroll-snap-align: start;
    display: flex;
  }

  .win-info .amount {
    color: var(--gold);
  }

  .games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .game-card {
    border-radius: 10px;
    /* ~1cm mais alto na fileira de 3 */
    aspect-ratio: 3 / 5.1;
  }

  .game-art {
    background-position: center 38% !important;
  }

  .game-art .capa-img {
    object-position: center 38%;
  }

  .game-meta h3 {
    font-size: 11px;
  }

  .game-meta span {
    font-size: 9px;
  }

  .game-play .btn {
    font-size: 10px;
    padding: 7px 4px;
  }

  .fav-btn {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .game-badge {
    font-size: 8px;
    padding: 3px 5px;
  }

  .footer {
    text-align: center;
    margin-bottom: 8px;
  }

  .flash {
    top: 70px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .header {
    padding: 0 8px;
  }

  .btn-deposit {
    padding: 7px 8px;
    font-size: 10px;
  }

  .balance-texts small {
    display: none;
  }

  .hero,
  .hero-track,
  .hero-slide {
    min-height: 180px;
  }

  .toolbar {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .section-providers {
    display: none;
  }
}
