/* Clawsino — shared site styles */

/* =========================================
   1. TOKENS
   ========================================= */
:root {
  --felt: #064e3b;
  --felt2: #0a7a5a;
  --card: rgba(7, 23, 34, .65);
  --line: rgba(255, 255, 255, .12);
  --text: #ecfeff;
  --muted: #a7f3d0;
  --gold: #fbbf24;
  --accent: #22c55e;
  --danger: #ef4444;
}

/* =========================================
   2. BASE / RESET
   ========================================= */
html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(255, 255, 255, .12), transparent 60%),
    radial-gradient(900px 600px at 90% 20%, rgba(251, 191, 36, .12), transparent 55%),
    linear-gradient(160deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .2)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 8px),
    linear-gradient(140deg, var(--felt), var(--felt2));
  background-attachment: fixed;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

pre {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .20);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

a {
  color: var(--gold);
}

ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

li {
  margin: 6px 0;
}

/* =========================================
   3. TYPOGRAPHY
   ========================================= */
.h1 {
  font-size: 44px;
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 0;
  font-weight: 1000;
}

.sub {
  margin-top: 10px;
  font-size: 16px;
  color: rgba(167, 243, 208, .92);
  line-height: 1.5;
}

.brand {
  font-weight: 950;
  letter-spacing: -0.04em;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand .chip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: conic-gradient(from 120deg, #fff 0 12%, #ef4444 12% 25%, #fff 25% 37%, #ef4444 37% 50%, #fff 50% 62%, #ef4444 62% 75%, #fff 75% 87%, #ef4444 87% 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  border: 1px solid rgba(255, 255, 255, .18);
}

.small {
  color: rgba(167, 243, 208, .88);
  font-size: 13px;
  line-height: 1.45;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.textLink {
  color: rgba(167, 243, 208, .92);
  text-decoration: none;
}
.textLink:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
  opacity: .95;
}

/* =========================================
   4. LAYOUT
   ========================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 18px 70px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topRight {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  white-space: nowrap;
}

/* Grid systems */
.grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 16px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.row > * {
  flex: 1 1 220px;
}

/* Bottom Bar */
.bottomBar {
  margin-top: 40px;
  padding: 12px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.bottomBarLinks {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bottomLink {
  color: var(--muted);
  font-weight: 950;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.bottomLink:hover {
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  border-color: var(--line);
}

/* =========================================
   5. COMPONENTS
   ========================================= */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px);
  margin-top: 16px;
}

.btn {
  padding: 11px 14px;
  border: 0;
  border-radius: 14px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(180deg, #34d399, #16a34a);
  color: #032012;
}

.btn.ghost {
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.danger {
  background: linear-gradient(180deg, #fb7185, #ef4444);
  color: white;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 950;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
}

.badge.win {
  background: rgba(34, 197, 94, .15);
  border-color: rgba(34, 197, 94, .35);
}

.badge.lose {
  background: rgba(239, 68, 68, .15);
  border-color: rgba(239, 68, 68, .35);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .18);
  font-weight: 950;
}
.pill b { color: #fff; }

.pill.win { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.12); }
.pill.lose { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.12); }

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdownSummary {
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.dropdownSummary::-webkit-details-marker {
  display: none;
}

.dropdownPanel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  z-index: 50;
  background: rgba(7, 23, 34, .92);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  backdrop-filter: blur(10px);
}

.btnBlock {
  width: 100%;
  justify-content: center;
}

.chevron {
  opacity: .75;
}

/* Leaderboard */
.lbRow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.lbRank {
  font-weight: 1000;
}

/* Form Controls */
label {
  display: block;
  font-weight: 900;
  margin: 10px 0 6px;
  color: rgba(236, 254, 255, .92);
}

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  outline: none;
  min-height: 44px;
  box-sizing: border-box;
}

input::placeholder, textarea::placeholder {
  color: rgba(236, 254, 255, .45);
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(251, 191, 36, .55);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, .15);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(236, 254, 255, .7) 50%), linear-gradient(135deg, rgba(236, 254, 255, .7) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 6px), calc(100% - 13px) calc(1em + 6px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.hr {
  height: 1px;
  background: rgba(255, 255, 255, .12);
  margin: 14px 0;
}

.field {
  margin-top: 10px;
}

/* =========================================
   6. PAGE-SPECIFIC SECTIONS
   ========================================= */

/* --- HOME PAGE --- */
.hero { margin-top: 14px; }
.heroGrid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  grid-template-areas: "copy art" "how art";
  gap: 16px;
  align-items: stretch;
}
.heroCopy { grid-area: copy; }
.heroHow { grid-area: how; }
.heroArt {
  grid-area: art;
  position: relative;
  overflow: hidden;
}
.heroArt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 320px at 20% 10%, rgba(251, 191, 36, .18), transparent 60%), radial-gradient(500px 260px at 90% 20%, rgba(34, 197, 94, .14), transparent 60%);
  pointer-events: none;
}
.heroArt img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: 50% 0%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  display: block;
}

.kpis { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.kpi {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  font-weight: 950;
}
.kpi span { color: rgba(167, 243, 208, .9); font-weight: 900; }

.ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ctas .btn { padding: 12px 16px; }

.step { display: flex; gap: 12px; }
.step .n {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 1000;
  background: rgba(251, 191, 36, .16);
  border: 1px solid rgba(251, 191, 36, .35);
  color: #fde68a;
  flex: 0 0 auto;
}
.step .t { font-weight: 1000; }
.step .d { margin-top: 4px; }

/* --- GAME / DICE --- */
.table {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: radial-gradient(900px 500px at 50% 0%, rgba(251, 191, 36, .08), transparent 60%), rgba(0, 0, 0, .15);
  padding: 14px;
}

.dice {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .78));
  color: #0b1220;
  display: grid;
  place-items: center;
  font-weight: 1000;
  font-size: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
  transform: rotate(6deg);
}
.dice.rolling { animation: tumble .45s infinite; }

.bigroll {
  font-size: 62px;
  font-weight: 1000;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  font-variant-numeric: tabular-nums;
  min-width: 5ch;
  display: inline-block;
  will-change: transform;
}
.bigroll.rolling { animation: pulse 500ms ease-in-out infinite; }

.rollbox {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.progress {
  height: 12px;
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fbbf24, #22c55e);
  transition: width 220ms ease;
}

.zone {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.zone .bar {
  flex: 1;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
  position: relative;
}
.zone .win {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  background: rgba(34, 197, 94, .25);
}
.zone .marker {
  position: absolute;
  top: -6px;
  width: 2px;
  height: 28px;
  background: rgba(251, 191, 36, .85);
  left: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3);
}

.history {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#resultText { min-height: 1.45em; }

/* --- SLOTS --- */
.slotgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.cell {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .78));
  color: #0b1220;
  height: 86px;
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 1000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
}
.cell.rolling { animation: reel .22s infinite; }
.cell.win {
  outline: 3px solid rgba(251, 191, 36, .8);
  box-shadow: 0 0 0 6px rgba(251, 191, 36, .15), 0 20px 40px rgba(0, 0, 0, .45);
}

.winflash { animation: flash 900ms ease 1; }
.confetti {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  overflow: hidden;
}
.spark {
  position: absolute;
  width: 8px;
  height: 14px;
  border-radius: 4px;
  opacity: .9;
  animation: fall 900ms linear 1;
}

/* --- LOGIN / LINKS --- */
.heroImg {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: 240px;
}
.heroImg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
}

.linkRow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.linkRow:last-child { border-bottom: 0; }
.linkRow .title { font-weight: 1000; }
.linkRow .meta { opacity: .9; }


/* =========================================
   7. ANIMATIONS
   ========================================= */
@keyframes pulse {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

@keyframes tumble {
  0% { transform: rotate(6deg) scale(1); }
  50% { transform: rotate(-10deg) scale(1.04); }
  100% { transform: rotate(6deg) scale(1); }
}

@keyframes reel {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

@keyframes flash {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.35); }
  100% { filter: brightness(1); }
}

@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); }
  100% { transform: translateY(260px) rotate(260deg); opacity: 0; }
}


/* =========================================
   8. MOBILE RESPONSIVE OVERRIDES
   ========================================= */
@media (max-width: 900px) {
  .heroGrid {
    grid-template-columns: 1fr;
    grid-template-areas: "art" "copy" "how";
  }
  .heroArt img { max-height: 360px; }
  .grid2 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  /* Login grid */
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .container { padding: 18px 14px 50px; }
  .card { padding: 14px; border-radius: 16px; }
  
  .h1 { font-size: 34px; }
  .sub { font-size: 14px; }
  .ctas .btn { width: 100%; justify-content: center; }
  .kpi { width: 100%; justify-content: space-between; }
  pre { font-size: 12px; }
  
  .step { gap: 10px; }
  .step .n { width: 30px; height: 30px; border-radius: 10px; }
  
  .heroArt img {
    max-height: 420px;
    object-fit: contain;
    background: rgba(0, 0, 0, .18);
  }

  /* Navigation / Top Bar mobile */
  .topRight { width: 100%; justify-content: stretch; }
  .nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    order: 1;
  }
  .nav::-webkit-scrollbar { height: 0; }
  .nav .btn { flex: 0 0 auto; }
  #badges { width: 100%; justify-content: flex-start; order: 2; }
  .topRight .btn.danger { width: 100%; justify-content: center; order: 3; }

  /* Game specifics */
  .bigroll { font-size: 54px; }
  .btn { padding: 10px 12px; border-radius: 12px; }
  label { margin-top: 8px; }
  .zone { margin-top: 8px; }
  .formgrid { grid-template-columns: 1fr; }

  /* Slots specifics */
  .reel { height: 80px; font-size: 38px; }
}
