:root {
  --bg: #061018;
  --bg-2: #0a1822;
  --card: rgba(12, 22, 32, 0.86);
  --card-strong: rgba(16, 28, 40, 0.94);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f6f8fb;
  --muted: #9bb0bf;
  --gold: #f0c56d;
  --gold-2: #c9942e;
  --teal: #2bb7d8;
  --violet: #8d6ef6;
  --danger: #ff8f8f;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(43, 183, 216, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(240, 197, 109, 0.16), transparent 26%),
    linear-gradient(180deg, #040b12 0%, #08121b 48%, #0b1822 100%);
}

button,
input,
select {
  font: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
}

h1 {
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: 0.95;
}

h2 {
  font-size: clamp(2.1rem, 3vw, 2.8rem);
}

.hidden {
  display: none !important;
}

.shell {
  width: min(1320px, calc(100% - 36px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.lead,
.hero-copy,
.muted,
.tiny {
  color: var(--muted);
  line-height: 1.7;
}

.login-shell,
.app-shell {
  min-height: 100vh;
  position: relative;
}

.login-shell {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card,
.stat-card,
.card,
.game-panel,
.theme-card,
.summary-card,
.roulette-board,
.roulette-wheel,
.table-surface,
.baccarat-side,
.dialog-inner {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.login-card {
  width: min(560px, calc(100vw - 32px));
  padding: 34px;
  border-radius: 32px;
}

.login-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 22px;
}

.adult-check {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  color: var(--muted);
}

.login-actions {
  margin-top: 22px;
}

.login-message {
  min-height: 1.6em;
  color: var(--danger);
  margin-top: 14px;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(110px);
  opacity: 0.28;
  pointer-events: none;
}

.ambient-a {
  width: 320px;
  height: 320px;
  background: rgba(43, 183, 216, 0.55);
  left: -80px;
  top: 120px;
}

.ambient-b {
  width: 360px;
  height: 360px;
  background: rgba(240, 197, 109, 0.38);
  right: -100px;
  top: 340px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  padding: 42px 0 24px;
}

.top-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  width: min(640px, 100%);
}

.stat-card {
  border-radius: 22px;
  padding: 18px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 1.16rem;
}

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
  padding-bottom: 40px;
}

.card {
  border-radius: 28px;
  padding: 24px;
}

.sidebar {
  display: grid;
  gap: 22px;
  align-content: start;
}

.wallet-panel {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  margin-top: 16px;
}

.inline-field {
  display: flex;
  gap: 10px;
}

input,
select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 13px 15px;
}

.primary,
.ghost,
.info-button,
.tab,
.bet-pill,
.theme-card {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

.primary:hover,
.ghost:hover,
.info-button:hover,
.tab:hover,
.bet-pill:hover,
.theme-card:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1c1408;
  font-weight: 800;
  padding: 13px 18px;
  border-radius: 16px;
}

.ghost,
.info-button,
.tab,
.bet-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 13px 16px;
  border-radius: 16px;
}

.full {
  width: 100%;
}

.info-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.message-box,
.game-log {
  border-radius: 18px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  line-height: 1.6;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tab.active {
  background: linear-gradient(135deg, rgba(240, 197, 109, 0.22), rgba(43, 183, 216, 0.12));
  border-color: rgba(240, 197, 109, 0.3);
}

.game-panel {
  display: none;
  border-radius: 30px;
  padding: 24px;
}

.game-panel.active {
  display: block;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.control-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.control-row.compact {
  align-items: center;
}

.theme-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.theme-card {
  text-align: left;
  border-radius: 22px;
  padding: 18px;
  background: var(--card-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-card.active {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}

.theme-card p {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.55;
}

.slot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  margin-top: 18px;
}

.slot-machine {
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(43,183,216,0.16), transparent 30%),
    linear-gradient(180deg, rgba(10,20,30,0.96), rgba(13,24,34,0.98));
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.slot-cell {
  aspect-ratio: 0.88;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.07);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
}

.slot-meta {
  display: grid;
  gap: 14px;
}

.summary-card {
  border-radius: 22px;
  padding: 18px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.summary-card strong {
  color: var(--gold);
  font-size: 2rem;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.roulette-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.roulette-wheel {
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(6, 16, 20, 0.94) 0 30%, transparent 31%),
    conic-gradient(
      #1d5b42 0deg 9.72deg,
      #7c1f2a 9.72deg 19.44deg,
      #131313 19.44deg 29.16deg,
      #7c1f2a 29.16deg 38.88deg,
      #131313 38.88deg 48.6deg,
      #7c1f2a 48.6deg 58.32deg,
      #131313 58.32deg 68.04deg,
      #7c1f2a 68.04deg 77.76deg,
      #131313 77.76deg 87.48deg,
      #7c1f2a 87.48deg 97.2deg,
      #131313 97.2deg 106.92deg,
      #7c1f2a 106.92deg 116.64deg,
      #131313 116.64deg 126.36deg,
      #7c1f2a 126.36deg 136.08deg,
      #131313 136.08deg 145.8deg,
      #7c1f2a 145.8deg 155.52deg,
      #131313 155.52deg 165.24deg,
      #7c1f2a 165.24deg 174.96deg,
      #131313 174.96deg 184.68deg,
      #7c1f2a 184.68deg 194.4deg,
      #131313 194.4deg 204.12deg,
      #7c1f2a 204.12deg 213.84deg,
      #131313 213.84deg 223.56deg,
      #7c1f2a 223.56deg 233.28deg,
      #131313 233.28deg 243deg,
      #7c1f2a 243deg 252.72deg,
      #131313 252.72deg 262.44deg,
      #7c1f2a 262.44deg 272.16deg,
      #131313 272.16deg 281.88deg,
      #7c1f2a 281.88deg 291.6deg,
      #131313 291.6deg 301.32deg,
      #7c1f2a 301.32deg 311.04deg,
      #131313 311.04deg 320.76deg,
      #7c1f2a 320.76deg 330.48deg,
      #131313 330.48deg 340.2deg,
      #7c1f2a 340.2deg 349.92deg,
      #131313 349.92deg 360deg
    );
  transition: transform 3s cubic-bezier(.16,.84,.44,1);
}

.roulette-wheel::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid var(--gold);
}

.wheel-center {
  width: 38%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(8, 16, 24, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--gold);
  font-size: 2rem;
  font-weight: 800;
}

.roulette-board,
.table-surface,
.baccarat-side {
  border-radius: 24px;
  padding: 18px;
}

.roulette-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.number-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.bet-pill.red {
  background: rgba(147, 32, 52, 0.36);
}

.bet-pill.black {
  background: rgba(16, 16, 18, 0.9);
}

.bet-pill.green {
  background: rgba(20, 88, 63, 0.72);
}

.table-surface {
  margin-top: 22px;
  background:
    radial-gradient(circle at top, rgba(43, 183, 216, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(12, 48, 40, 0.94), rgba(8, 32, 28, 0.98));
}

.hand-area + .hand-area {
  margin-top: 18px;
}

.cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 100px;
}

.card-face {
  width: 74px;
  height: 102px;
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, #faf7f1, #ded4c6);
  color: #251c11;
}

.card-face.red {
  color: #a12541;
}

.card-face.hidden {
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, #b18a45, #46351a);
  color: #f5dfab;
}

.card-face .big {
  align-self: center;
  font-size: 1.4rem;
}

.baccarat-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.info-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.info-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.dialog-inner {
  width: min(560px, calc(100vw - 28px));
  border-radius: 24px;
  padding: 24px;
}

@media (max-width: 1120px) {
  .layout,
  .slot-layout,
  .roulette-layout,
  .baccarat-layout {
    grid-template-columns: 1fr;
  }

  .hero,
  .panel-head {
    flex-direction: column;
    align-items: start;
  }

  .top-panel {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1320px);
  }

  .top-panel {
    grid-template-columns: 1fr;
  }

  .inline-field,
  .control-row,
  .roulette-actions {
    flex-direction: column;
  }

  .number-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
