@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Barlow:wght@400;500;600;700&display=swap');

:root {
  --bg: #081009;
  --panel: #0e1a11;
  --panel2: #142418;
  --line: #1d3324;
  --line-strong: #2c4a35;
  --text: #eaf2ec;
  --muted: #8fa899;
  --accent: #ffd23f;
  --accent-dark: #d9ae18;
  --accent-glow: rgba(255, 210, 63, .16);
  --danger: #ff5d5d;
  --brand-green: #0d8a4f;
  --gold: #ffd23f;
  --pink: #ff4fa3;
  --blue: #4fa3ff;
  --r: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 50% -200px, #0c1f12 0%, var(--bg) 60%);
  color: var(--text);
  font-family: 'Barlow', -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 86px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .brand, .countdown, .tile, .btn {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  letter-spacing: .02em;
}

/* ===== Topbar ===== */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; }
.topbar > div:first-child { min-width: 0; flex-shrink: 1; }
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 21px; text-transform: uppercase; color: var(--accent);
}
.brand svg { width: 22px; height: 22px; }
.top-right { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.top-right .btn { min-height: 38px; padding: 8px 13px; font-size: 13px; letter-spacing: .02em; }
.menu-btn { flex-shrink: 0; }
.saldo { text-align: right; display: flex; flex-direction: column; line-height: 1.2; cursor: pointer; }
.saldo small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.saldo strong { font-size: 16px; }
.saldo .bonus { color: var(--accent); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .04em;
  border: 0; cursor: pointer; text-align: center;
  transition: filter .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary { background: var(--accent); color: #0c1409; box-shadow: 0 4px 18px var(--accent-glow); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 24px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent-dark); color: var(--accent); }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ===== Cards / layout ===== */
.content { padding: 0 16px; }
.card {
  background: linear-gradient(180deg, var(--panel) 0%, #0b150d 100%);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 16px; margin-bottom: 12px;
}
.card h2 { font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 14px; }

.banner {
  position: relative; overflow: hidden;
  border-radius: var(--r); border: 1px solid var(--line-strong);
  background: linear-gradient(125deg, #0d8a4f 0%, #0a3d22 55%, #081a0f 100%);
  padding: 26px 18px; margin-bottom: 14px;
}
.banner::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(420px 160px at 85% 0%, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.banner strong {
  display: block; font-family: 'Barlow Condensed', sans-serif;
  color: var(--accent); font-size: 30px; font-weight: 700; line-height: 1.1;
  text-transform: uppercase; text-shadow: 0 0 18px var(--accent-glow);
}

/* ===== Lists / tiles ===== */
.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 52px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 15px; margin-bottom: 8px;
  cursor: pointer; transition: border-color .18s ease, background .18s ease;
}
.list-row:hover { border-color: var(--accent-dark); background: var(--panel2); }
.list-row .mult { color: var(--accent); font-weight: 700; font-family: 'Barlow Condensed', sans-serif; font-size: 17px; white-space: nowrap; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  display: block; min-height: 64px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 10px;
  text-align: center; font-weight: 600; font-size: 17px; text-transform: uppercase;
  cursor: pointer; transition: border-color .18s ease, background .18s ease;
}
.tile small { display: block; color: var(--muted); font-family: 'Barlow', sans-serif; font-weight: 500; font-size: 11px; text-transform: none; margin-top: 4px; }
.tile.on, .tile:hover { border-color: var(--accent); background: var(--panel2); }

.countdown {
  font-size: 38px; font-weight: 700; color: var(--accent); letter-spacing: 4px;
  text-align: center; text-shadow: 0 0 22px var(--accent-glow);
  font-variant-numeric: tabular-nums;
}

/* ===== Forms ===== */
input, select, textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--panel2); color: var(--text);
  font-size: 16px; font-family: 'Barlow', sans-serif; margin-bottom: 10px;
  transition: border-color .18s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-dark); outline: none; }
input::placeholder { color: #5f7568; }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em; }

.flash { margin: 0 16px 12px; padding: 13px 15px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.flash-success { background: #15310f; border-color: var(--accent-dark); }
.flash-error { background: #391313; border-color: var(--danger); }

/* ===== Bottom nav ===== */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex; justify-content: space-around; align-items: flex-end;
  background: rgba(10, 20, 13, .92); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 10px 0 max(12px, env(safe-area-inset-bottom)); z-index: 30;
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 56px; min-height: 44px; color: var(--muted); cursor: pointer;
  transition: color .18s ease;
}
.bottomnav a svg { width: 22px; height: 22px; stroke: currentColor; }
.bottomnav a span { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.bottomnav a:hover, .bottomnav a.on { color: var(--accent); }
.bottomnav a.play {
  background: var(--accent); color: #0c1409; border-radius: 999px;
  padding: 12px 18px 10px; margin-top: -26px; box-shadow: 0 6px 20px var(--accent-glow);
}
.bottomnav a.play:hover { color: #0c1409; filter: brightness(1.07); }

/* ===== Wizard ===== */
.steps { display: flex; gap: 5px; margin: 12px 0 16px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s ease; }
.steps i.on { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px;
  background: var(--panel2); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 14px; margin: 0 6px 6px 0; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--accent-dark); }
.chip.on { background: var(--accent); color: #0c1409; border-color: var(--accent); }

/* ===== Tables ===== */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
table.tbl tr:last-child td { border-bottom: 0; }

/* ===== Cassino ===== */
.casino-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.casino-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; text-align: center; cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.casino-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.casino-card .thumb {
  aspect-ratio: 1; background: linear-gradient(160deg, var(--panel2), #0b150d);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.casino-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.casino-card:hover .thumb img { transform: scale(1.05); }
.casino-card .thumb svg { width: 34px; height: 34px; stroke: var(--muted); }
.casino-card span { display: block; padding: 9px 6px; font-size: 12px; font-weight: 600; line-height: 1.3; }

/* ===== Skeleton / motion ===== */
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== Bichos ===== */
.bicho-cell { display: flex; align-items: center; gap: 8px; }
.bicho-icon { width: 22px; height: 22px; flex-shrink: 0; }

/* ===== Marca ===== */
.brand-logo { height: 38px; width: auto; max-width: 130px; display: block; object-fit: contain; }
@media (max-width: 380px) { .brand-logo { max-width: 96px; } .top-right .btn { padding: 8px 11px; font-size: 12px; } }
.provlogo { width: 16px; height: 16px; border-radius: 4px; }

.banner-img { display: block; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-strong); margin-bottom: 14px; cursor: pointer; transition: box-shadow .2s ease; }
.banner-img:hover { box-shadow: 0 6px 24px var(--accent-glow); }
.banner-img img { display: block; width: 100%; height: auto; }

/* ===== Drawer (menu lateral) ===== */
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.menu-btn:hover { border-color: var(--accent-dark); color: var(--accent); }
.menu-btn svg { width: 20px; height: 20px; }

.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(2px); z-index: 40;
}
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 41;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel) 0%, #0a140c 100%);
  border-right: 1px solid var(--line);
  transform: translateX(-100%); transition: transform .25s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; }
.drawer-nav { flex: 1; overflow-y: auto; padding: 0 8px; }
.drawer-nav a {
  display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 11px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.drawer-nav a svg { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; transition: color .15s ease; }
.drawer-nav a:hover, .drawer-nav a.on { background: var(--panel2); color: var(--accent); }
.drawer-nav a:hover svg, .drawer-nav a.on svg { color: var(--accent); }

.drawer-app {
  margin: 12px 16px max(16px, env(safe-area-inset-bottom));
  display: flex; gap: 10px; align-items: center;
  border: 1px solid var(--accent-dark); border-radius: 12px; padding: 12px;
}
.drawer-app svg { width: 24px; height: 24px; color: var(--accent); flex-shrink: 0; }
.drawer-app strong { display: block; font-size: 13px; }
.drawer-app small { color: var(--muted); font-size: 11px; }
