@font-face {
  font-family: Shark;
  src: url("fonts/SHARKBOY%26lavagirl.woff2") format("woff2"),
    url("fonts/SHARKBOY%26lavagirl.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: Circe;
  src: url("fonts/Circe-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: Circe;
  src: url("fonts/Circe-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Circe;
  src: url("fonts/Circe-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Circe;
  src: url("fonts/Circe-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #e8eef6;
  --card: #ffffff;
  --ink: #1c2430;
  --muted: #8b95a8;
  --line: #e6ebf2;
  --blue: #2f80f6;
  --blue-2: #4c92ff;
  --purple: #7a3df0;
  --purple-2: #9a5cff;
  --shadow: 0 12px 32px rgba(36, 52, 84, 0.08);
  --radius: 22px;
  --dock: 148px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 10% -10%, #ffffff 0%, transparent 60%),
    radial-gradient(700px 380px at 100% 0%, #dfe8ff 0%, transparent 55%),
    var(--bg);
  font-family: Circe, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.45;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.app {
  width: min(1080px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0 calc(var(--dock) + 24px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { width: 54px; height: 54px; }
.brand b {
  font-family: Shark, Circe, sans-serif;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #0273f5;
  line-height: 1;
}
.icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  color: #314056;
}
.icon-btn svg { width: 22px; height: 22px; }

.auth-card,
.panel,
.mode-card,
.footer-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
}
.btn {
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.btn svg { width: 18px; height: 18px; }
.btn-blue { background: linear-gradient(180deg, var(--blue-2), var(--blue)); }
.btn-purple { background: linear-gradient(180deg, var(--purple-2), var(--purple)); }
.btn-white {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.12);
}
.btn-ghost {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d7deea;
  font-weight: 700;
  font-size: 14px;
}
.btn-ghost.primary {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
}

.modes {
  display: grid;
  grid-template-columns: repeat(7, minmax(76px, 1fr));
  gap: 8px;
  padding: 10px 8px;
  margin-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.modes::-webkit-scrollbar { display: none; }
.mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 72px;
  color: #5d6778;
  font-size: 13px;
  font-weight: 700;
}
.mode i {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 16px rgba(47, 84, 140, 0.16);
}
.mode svg { width: 22px; height: 22px; }
.mode.is-on { color: var(--blue); }
.mode.is-on i { outline: 3px solid #d7e6ff; outline-offset: 2px; }
.tone-slots { background: #6b7287; }
.tone-live { background: #f0b429; }
.tone-bets { background: #3aaa62; }
.tone-classic { background: #7b61ff; }
.tone-mines { background: #ff5d4a; }
.tone-crash { background: #ff6f9c; }
.tone-roulette { background: #4d7dff; }

.slider { position: relative; margin-bottom: 14px; }
.slides { overflow: hidden; border-radius: 24px; }
.track {
  display: flex;
  transition: transform 0.45s ease;
}
.slide {
  min-width: 100%;
  min-height: 0;
  padding: 16px 52px 14px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  align-items: end;
  background: #111 center/cover no-repeat;
  position: relative;
}
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 12, 20, 0.72), rgba(8, 12, 20, 0.28));
}
.slide > * { position: relative; z-index: 1; }
.slide h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15;
  font-weight: 800;
}
.slide p { margin: 0; color: rgba(255,255,255,0.86); font-size: 15px; }
.slide-aurora {
  background:
    radial-gradient(420px 180px at 80% 20%, rgba(255, 214, 102, 0.55), transparent 60%),
    linear-gradient(135deg, #5b3df5 0%, #2a6bff 55%, #13b7c9 100%);
}
.timer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}
.timer div {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.timer b { font-size: 16px; line-height: 1; font-weight: 800; }
.timer span { font-size: 10px; opacity: 0.85; margin-top: 2px; }
.slide .btn { width: 100%; height: 40px; }
.arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #243044;
  box-shadow: 0 6px 16px rgba(0,0,0,0.16);
}
.arrow.prev { left: 10px; }
.arrow.next { right: 10px; }
.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.dots button {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #c5cedb;
}
.dots button.is-on { width: 18px; background: var(--blue); }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 6px 0 12px;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  color: #303846;
  font-weight: 700;
  font-size: 15px;
}
.chip.is-on {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 16px rgba(47, 128, 246, 0.28);
}

.tools {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.search, .providers { position: relative; }
.search input, .providers > button, .sheet input, .chat-form input {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 0 16px 0 44px;
  outline: none;
}
.providers > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 44px;
  font-weight: 700;
  text-align: left;
}
.search svg, .providers > svg, .field-icon {
  position: absolute;
  left: 14px;
  top: 15px;
  width: 20px;
  height: 20px;
  color: var(--blue);
}
.menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(28, 39, 68, 0.16);
  padding: 6px;
  max-height: 260px;
  overflow: auto;
}
.menu button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}
.menu button:hover, .menu button.is-on { background: #eef4ff; color: var(--blue); }

.shelf {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
}
.shelf svg { width: 22px; height: 22px; color: var(--blue); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.game {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #d7deea;
  min-height: 120px;
}
.game img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}
.game .meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 10px 8px;
  background: linear-gradient(transparent, rgba(10, 16, 32, 0.78));
  color: #fff;
}
.game strong { display: block; font-size: 13px; line-height: 1.2; }
.game em { font-style: normal; font-size: 11px; opacity: 0.8; }
.game .demo {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-4px);
  transition: 0.2s ease;
}
.game:hover .demo, .game:focus-visible .demo { opacity: 1; transform: none; }

.empty {
  grid-column: 1 / -1;
  background: var(--card);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.story {
  margin-top: 18px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px 8px;
}
.story h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  font-weight: 800;
}
.story h3 {
  margin: 8px 0 8px;
  font-size: 22px;
  line-height: 1.25;
}
.story p,
.story li {
  margin: 0 0 12px;
  color: #3d4758;
  font-size: 16px;
}
.story ul { margin: 0 0 12px; padding-left: 18px; }
.story figure {
  margin: 4px auto 16px;
  max-width: 420px;
}
.story img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
}
.story figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.more-wrap { display: flex; justify-content: center; margin: 16px 0 8px; }
.more {
  height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.mode-view { display: grid; gap: 12px; }
.mode-card { padding: 22px; }
.mode-card h2 { margin: 0 0 8px; font-size: 26px; }
.mode-card p { margin: 0 0 16px; color: #5c6778; }
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  border-radius: 18px;
  padding: 16px;
  min-height: 110px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-weight: 800;
}
.tile span { font-weight: 400; font-size: 13px; opacity: 0.9; }
.t1 { background: linear-gradient(160deg, #2f80f6, #6a4bff); }
.t2 { background: linear-gradient(160deg, #f0b429, #ff7a45); }
.t3 { background: linear-gradient(160deg, #13b7c9, #2f80f6); }
.t4 { background: linear-gradient(160deg, #7a3df0, #ff6f9c); }

.footer-card { margin-top: 18px; padding: 8px 16px 16px; }
.footer-card details { border-bottom: 1px solid var(--line); }
.footer-card summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 800;
  list-style: none;
}
.footer-card summary::-webkit-details-marker { display: none; }
.footer-card details p { margin: 0 0 12px; color: #5c6778; }
.legal {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.legal a { color: var(--blue); }

.dock {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 16px));
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(28, 39, 68, 0.18);
  overflow: hidden;
}
.dock-auth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
}
.dock-auth .actions { display: flex; gap: 8px; }
.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px 8px;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #8b95a8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 0;
  position: relative;
}
.tab svg { width: 22px; height: 22px; }
.tab.is-on { color: var(--blue); }
.badge {
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 24, 38, 0.38);
  z-index: 35;
}
.sheet {
  position: fixed;
  z-index: 36;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 16px));
  max-height: min(78vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(18, 24, 38, 0.28);
  padding: 16px 16px 18px;
}
.sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.sheet h3 { margin: 0; font-size: 20px; }
.sheet .close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f2f5fa;
  font-size: 20px;
}
.prize {
  border-radius: 18px;
  padding: 18px;
  color: #fff;
  background:
    radial-gradient(200px 80px at 90% 0%, rgba(255, 214, 102, 0.7), transparent 70%),
    linear-gradient(135deg, #5b3df5, #2f80f6);
  margin-bottom: 12px;
}
.prize b { display: block; font-size: 28px; }
.list { display: grid; gap: 8px; }
.list article, .chat-log p {
  background: #f4f7fb;
  border-radius: 14px;
  padding: 12px 14px;
}
.list b { display: block; }
.list span, .note { color: #5c6778; font-size: 14px; }
.links { display: grid; gap: 4px; }
.links a, .links button {
  text-align: left;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.chat-log { display: grid; gap: 8px; margin-bottom: 12px; }
.chat-log .me { background: #e8f1ff; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; padding-left: 14px; }
.chat-form button {
  height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

@media (max-width: 560px) {
  .slide { grid-template-columns: 1fr; min-height: 0; }
  .timer { justify-content: space-between; }
  .timer div { width: 64px; height: 64px; flex-basis: 64px; }
  .tools { grid-template-columns: 1fr; }
  .brand b { font-size: 28px; }
  .btn { font-size: 15px; }
  .arrow { top: 72px; }
}
@media (min-width: 800px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .modes { overflow: visible; }
}
@media (hover: none) {
  .game .demo { opacity: 1; transform: none; }
}
