:root {
  --surface: #ececec;
  --text: #2f2f2f;
  --brand: #00d2fe;
  --good: #0db399;
  --bad: #fe5c53;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #d6d6d6 0%, #ececec 42%, #ececec 100%);
  color: var(--text);
  font-family: "Barlow", "Segoe UI", sans-serif;
}

.app-shell {
  width: min(100%, 430px);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--surface);
  padding-bottom: 126px;
}

.topbar {
  height: 80px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #cfd1d4;
  background: #f7f7f7;
}

.brand-logo {
  width: min(54vw, 220px);
  max-width: 220px;
  height: auto;
  display: block;
}

.ticker {
  height: 30px;
  background: var(--brand);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-track {
  color: #fff;
  white-space: nowrap;
  font-weight: 700;
  font-size: clamp(11px, 2.8vw, 12px);
  padding-left: 100%;
  animation: marquee 16s linear infinite;
}

.hero {
  margin: 12px 16px;
  position: relative;
  height: clamp(128px, 34vw, 146px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-stack {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 950px;
  touch-action: pan-y;
  cursor: grab;
}

.hero-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88%;
  transform: translate(-50%, -50%) scale(0.88) rotateY(0deg) translateZ(0);
  opacity: 0.7;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease, filter 320ms ease;
  filter: saturate(0.88) brightness(0.95);
  pointer-events: none;
}

.hero-card[data-offset="-1"] {
  transform: translate(-88%, -50%) scale(0.82) rotateY(17deg) translateZ(-72px);
  z-index: 1;
}

.hero-card[data-offset="0"] {
  transform: translate(-50%, -50%) scale(1) rotateY(0deg) translateZ(0);
  opacity: 1;
  filter: saturate(1);
  z-index: 3;
}

.hero-card[data-offset="1"] {
  transform: translate(-12%, -50%) scale(0.82) rotateY(-17deg) translateZ(-72px);
  z-index: 1;
}

.hero-card img {
  width: 100%;
  display: block;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(9, 34, 61, 0.2);
}

.tx-section {
  padding: 0 16px;
}

.section-head {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  min-height: 30px;
}

.section-head h2 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(22px, 5.6vw, 26px);
  line-height: 1;
  letter-spacing: 0.4px;
}

.live-pill {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ff1f2f;
  color: #fff;
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(10px, 2.7vw, 12px);
  font-weight: 700;
}

.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: live-dot-blink 1s ease-in-out infinite;
}

.tx-marquee {
  max-height: 312px;
  overflow: hidden;
  position: relative;
}

.tx-list {
  display: grid;
  gap: 10px;
  will-change: transform;
}

.tx-card {
  border-radius: 11px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f5;
}

.tx-card.deposit {
  border: 1.5px solid rgba(13, 179, 153, 0.35);
  background-image: linear-gradient(180deg, rgba(13, 179, 153, 0.05), rgba(13, 179, 153, 0));
}

.tx-card.withdraw {
  border: 1.5px solid rgba(254, 92, 83, 0.35);
  background-image: linear-gradient(180deg, rgba(254, 92, 83, 0.05), rgba(254, 92, 83, 0));
}

.tx-left {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
}

.deposit .dot {
  background: var(--good);
}

.withdraw .dot {
  background: var(--bad);
}

.tx-left h3 {
  margin: 0;
  font-size: clamp(15px, 4.1vw, 17px);
  font-weight: 600;
  line-height: 1;
}

.tx-left p {
  margin: 4px 0 0;
  font-size: clamp(12px, 3.4vw, 13px);
  line-height: 1;
}

.deposit .tx-left p {
  color: var(--good);
}

.withdraw .tx-left p {
  color: var(--bad);
}

.tx-right {
  text-align: right;
}

.tx-right strong {
  display: block;
  font-size: clamp(16px, 4.3vw, 18px);
  line-height: 1;
  font-weight: 500;
}

.tx-right span {
  display: block;
  margin-top: 3px;
  font-size: clamp(8px, 2.3vw, 10px);
  font-weight: 800;
}

.cta-row {
  padding: 13px 16px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cta {
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
}

.cta img {
  display: block;
  width: 100%;
  height: auto;
}

.cta-link {
  display: block;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px 8px;
  border-bottom: 1px solid #d2d2d2;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  border: 0;
  background: transparent;
  color: #787878;
  font-size: clamp(11px, 2.8vw, 12px);
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  border-radius: 999px;
  transition: background-color 260ms ease, color 220ms ease, transform 220ms ease;
}

.tabs button span {
  font-size: 12px;
  line-height: 1;
}

.tabs .active {
  color: #fff;
  font-weight: 700;
  background: #00b6f2;
  transform: translateY(-1px);
}

.game-grid {
  margin: 10px 10px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  touch-action: pan-y;
  align-content: start;
}

.game-grid.scrollable {
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.game-card {
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  color: #fff;
  position: relative;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.16);
  transition: transform 220ms ease, opacity 220ms ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1) 58%, rgba(0, 0, 0, 0));
}

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

.game-card span,
.game-card small {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75);
}

.game-card span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 16px;
  font-size: clamp(10px, 2.6vw, 11px);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.game-card small {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 5px;
  font-size: clamp(7px, 1.9vw, 8px);
  font-weight: 700;
  text-align: center;
}

.game-grid.switching .game-card {
  transform: translateY(8px);
  opacity: 0;
}

.promo-list {
  margin: 12px 10px 0;
  display: grid;
  gap: 10px;
}

.promo-img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: reveal 0.4s ease forwards;
}

.delay-1 { animation-delay: 0.07s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.18s; }
.delay-4 { animation-delay: 0.24s; }
.delay-5 { animation-delay: 0.29s; }
.delay-6 { animation-delay: 0.34s; }

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

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@keyframes live-dot-blink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(0.72);
  }
}

@media (min-width: 431px) {
  .app-shell {
    border-left: 1px solid #d6d6d6;
    border-right: 1px solid #d6d6d6;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.09);
  }
}

@media (max-width: 340px) {
  .section-head h2 {
    font-size: 25px;
  }

  .live-pill {
    font-size: 12px;
  }

  .tabs {
    padding-left: 7px;
    padding-right: 7px;
  }

  .tabs button {
    font-size: 10px;
  }

  .app-shell {
    padding-bottom: 114px;
  }
}
