/* Dicepalace — black bg, royal purple + gold 3D palette */

:root {
  --bg: #050108;
  --bg-2: #0d0418;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.08);
  --accent: #d4af37;        /* royal gold */
  --accent-2: #f5d97a;      /* light gold */
  --violet: #6a1b9a;
  --violet-2: #3d0a5a;
  --text: #f5f0ff;
  --muted: rgba(245,240,255,0.65);
}

html { scroll-behavior: smooth; }
body {
  background: radial-gradient(ellipse at top, #1a0530 0%, #050108 55%, #000 100%);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- 3D primitives ---------- */
.panel-3d {
  background: linear-gradient(160deg, rgba(106,27,154,0.18), rgba(13,4,24,0.6));
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 1.5rem;
  box-shadow:
    0 30px 60px -20px rgba(106,27,154,0.45),
    0 10px 30px -10px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.6);
}

.btn-gold {
  display: inline-block;
  background: linear-gradient(180deg, #f5d97a 0%, #d4af37 50%, #8f6f1a 100%);
  color: #1a0530;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.85rem 1.75rem;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -2px 4px rgba(0,0,0,0.3),
    0 8px 20px -4px rgba(212,175,55,0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -2px 4px rgba(0,0,0,0.3), 0 14px 28px -4px rgba(212,175,55,0.7); }
.btn-gold:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,0.5);
  color: var(--accent-2);
  background: rgba(106,27,154,0.15);
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(212,175,55,0.12); }

.menu-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  min-height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,0.32);
  background: linear-gradient(180deg, rgba(245,217,122,0.16), rgba(106,27,154,0.2));
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -2px 4px rgba(0,0,0,0.28),
    0 8px 18px -8px rgba(212,175,55,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.menu-3d:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(245,217,122,0.24), rgba(106,27,154,0.28));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -2px 4px rgba(0,0,0,0.24),
    0 12px 24px -8px rgba(212,175,55,0.55);
}
.menu-3d:active { transform: translateY(1px); }

/* Horizontal 3D divider line */
.line-3d {
  height: 6px;
  border: 0;
  margin: 4rem auto;
  max-width: 80%;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.7), transparent);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.15),
    0 4px 12px rgba(212,175,55,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.5);
}

/* ---------- 3D Hero ---------- */
.hero-stage {
  position: relative;
  perspective: 1400px;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(212,175,55,0.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(106,27,154,0.4), transparent 50%);
  z-index: 0;
}

/* Floor grid lines */
.floor-grid {
  position: absolute; left: 50%; bottom: -10%;
  width: 220%; height: 70%;
  transform: translateX(-50%) rotateX(72deg);
  background-image:
    linear-gradient(rgba(212,175,55,0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.35) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  z-index: 0;
}

/* 3D rotating die */
.scene-3d {
  position: relative;
  width: 220px; height: 220px;
  margin: 0 auto;
  perspective: 800px;
}
.die {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: die-spin 14s linear infinite;
}
.die__face {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #2a0648, #6a1b9a 60%, #d4af37);
  border: 2px solid rgba(212,175,55,0.6);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.55), 0 0 40px rgba(212,175,55,0.25);
  font-size: 6rem;
  color: var(--accent-2);
}
.die__face--front  { transform: translateZ(110px); }
.die__face--back   { transform: rotateY(180deg) translateZ(110px); }
.die__face--right  { transform: rotateY(90deg)  translateZ(110px); }
.die__face--left   { transform: rotateY(-90deg) translateZ(110px); }
.die__face--top    { transform: rotateX(90deg)  translateZ(110px); }
.die__face--bottom { transform: rotateX(-90deg) translateZ(110px); }

@keyframes die-spin {
  0%   { transform: rotateX(-20deg) rotateY(0deg); }
  100% { transform: rotateX(-20deg) rotateY(360deg); }
}

/* ---------- Animation: tilt ---------- */
.tilt {
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt:hover {
  transform: perspective(900px) rotateX(6deg) rotateY(-8deg) translateY(-6px) scale(1.03);
  box-shadow: 0 30px 50px -10px rgba(212,175,55,0.35), 0 0 0 1px rgba(212,175,55,0.5);
}

/* ---------- Animation: float ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.float { animation: float 5s ease-in-out infinite; }
.float-slow { animation: float 8s ease-in-out infinite; }

/* ---------- Slot grid + popover ---------- */
.slot-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: visible;
  aspect-ratio: 1;
  cursor: pointer;
  background:
    linear-gradient(160deg, rgba(106,27,154,0.4), rgba(13,4,24,0.9));
  border: 1px solid rgba(212,175,55,0.3);
  box-shadow:
    0 12px 30px -10px rgba(106,27,154,0.6),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -3px 0 rgba(0,0,0,0.5);
}
.slot-card__img-wrap {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
}
.slot-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: saturate(1.1) brightness(0.85);
}
.slot-card:hover img { transform: scale(1.08); filter: saturate(1.3) brightness(1); }

.slot-card__label {
  position: absolute; left: 0.6rem; right: 0.6rem; bottom: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, rgba(13,4,24,0.6), rgba(13,4,24,0.95));
  backdrop-filter: blur(8px);
  border-radius: 0.75rem;
  border: 1px solid rgba(212,175,55,0.3);
  font-size: 0.78rem;
}
.slot-card__title {
  display: block; color: var(--accent-2); font-weight: 700; letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slot-card__provider { color: var(--muted); font-size: 0.7rem; }

.slot-card__badge {
  position: absolute; top: 0.6rem; left: 0.6rem;
  background: linear-gradient(180deg, #f5d97a, #d4af37);
  color: #1a0530; font-size: 0.65rem; font-weight: 800;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(212,175,55,0.5);
}

.slot-card__popover {
  position: absolute;
  left: 50%; bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(8px);
  width: 240px;
  background: linear-gradient(160deg, #1a0530, #2a0648);
  border: 1px solid rgba(212,175,55,0.5);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  font-size: 0.78rem;
  color: var(--text);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.8), 0 0 0 1px rgba(212,175,55,0.2);
}
.slot-card__popover::after {
  content: ''; position: absolute; left: 50%; bottom: -7px;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: #2a0648;
  border-right: 1px solid rgba(212,175,55,0.5);
  border-bottom: 1px solid rgba(212,175,55,0.5);
}
.slot-card:hover .slot-card__popover,
.slot-card:focus-within .slot-card__popover {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.slot-card__popover .row { display: flex; justify-content: space-between; padding: 0.15rem 0; border-bottom: 1px dashed rgba(212,175,55,0.15); }
.slot-card__popover .row:last-child { border-bottom: 0; }
.slot-card__popover .key { color: var(--muted); }
.slot-card__popover .val { color: var(--accent-2); font-weight: 700; }

/* Mobile: popover below instead */
@media (max-width: 640px) {
  .slot-card__popover { bottom: auto; top: calc(100% + 12px); }
  .slot-card__popover::after { top: -7px; bottom: auto; border: 0; border-left: 1px solid rgba(212,175,55,0.5); border-top: 1px solid rgba(212,175,55,0.5); background: #1a0530; }
}

/* ---------- Review prose ---------- */
.review-prose { color: var(--text); line-height: 1.8; font-size: 1.02rem; }
.review-prose h2 {
  font-size: 1.75rem; font-weight: 800; margin: 2.5rem 0 1rem;
  background: linear-gradient(90deg, #f5d97a, #d4af37);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.01em;
}
.review-prose h3 { font-size: 1.25rem; font-weight: 700; color: var(--accent-2); margin: 1.75rem 0 0.6rem; }
.review-prose p  { margin: 0.85rem 0; color: rgba(245,240,255,0.9); }
.review-prose ul, .review-prose ol { padding-left: 1.4rem; margin: 0.85rem 0; }
.review-prose ul { list-style: none; }
.review-prose ul li { position: relative; padding-left: 0.5rem; margin: 0.4rem 0; }
.review-prose ul li::before {
  content: '◆'; color: var(--accent); position: absolute; left: -1rem; font-size: 0.75rem; top: 0.35rem;
}
.review-prose ol { list-style: decimal; }
.review-prose ol li { margin: 0.4rem 0; padding-left: 0.25rem; }
.review-prose ol li::marker { color: var(--accent); font-weight: 800; }
.review-prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.review-prose strong { color: var(--accent-2); }
.review-prose table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.25rem 0;
  border-radius: 1rem; overflow: hidden;
  border: 1px solid rgba(212,175,55,0.3);
  font-size: 0.92rem;
  background: rgba(13,4,24,0.5);
}
.review-prose th, .review-prose td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid rgba(212,175,55,0.15); }
.review-prose th { background: linear-gradient(180deg, rgba(106,27,154,0.4), rgba(106,27,154,0.2)); color: var(--accent-2); font-weight: 700; }
.review-prose tr:last-child td { border-bottom: 0; }

/* ---------- Single page prose ---------- */
.prose-dp { line-height: 1.75; color: var(--text); }
.prose-dp h1 { font-size: 2.5rem; font-weight: 800; margin: 0.5rem 0 1.25rem; background: linear-gradient(90deg,#f5d97a,#d4af37); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prose-dp h2 { font-size: 1.6rem; font-weight: 800; color: var(--accent-2); margin: 2rem 0 0.75rem; }
.prose-dp h3 { font-size: 1.2rem; font-weight: 700; color: var(--accent-2); margin: 1.5rem 0 0.5rem; }
.prose-dp p { margin: 0.85rem 0; color: rgba(245,240,255,0.9); }
.prose-dp a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose-dp strong { color: var(--accent-2); }
.prose-dp ul, .prose-dp ol { padding-left: 1.4rem; margin: 0.85rem 0; }
.prose-dp ul { list-style: none; }
.prose-dp ul li { position: relative; margin: 0.4rem 0; }
.prose-dp ul li::before { content: '◆'; color: var(--accent); position: absolute; left: -1.1rem; top: 0.4rem; font-size: 0.7rem; }
.prose-dp ol { list-style: decimal; }
.prose-dp ol li::marker { color: var(--accent); font-weight: 800; }
.prose-dp table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.25rem 0; border-radius: 1rem; overflow: hidden; border: 1px solid rgba(212,175,55,0.3); font-size: 0.92rem; background: rgba(13,4,24,0.4); }
.prose-dp th, .prose-dp td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid rgba(212,175,55,0.12); }
.prose-dp th { background: linear-gradient(180deg, rgba(106,27,154,0.4), rgba(106,27,154,0.2)); color: var(--accent-2); font-weight: 700; }
.prose-dp tr:last-child td { border-bottom: 0; }
.prose-dp details { background: var(--surface); border: 1px solid rgba(212,175,55,0.2); border-radius: 0.9rem; padding: 0.85rem 1.1rem; margin: 0.6rem 0; }
.prose-dp details summary { cursor: pointer; font-weight: 700; color: var(--accent-2); list-style: none; }
.prose-dp details summary::before { content: '▸ '; transition: transform 0.2s; display: inline-block; }
.prose-dp details[open] summary::before { transform: rotate(90deg); }

.review-hero-frame {
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,0.25);
  background: linear-gradient(160deg, rgba(106,27,154,0.18), rgba(13,4,24,0.65));
  box-shadow:
    0 24px 50px -18px rgba(106,27,154,0.45),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.review-hero-image {
  display: block;
  width: 100%;
  height: auto;
}

.page-cta-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.75rem;
  padding: 0.78rem 1.2rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(212,175,55,0.45);
  background: linear-gradient(180deg, #f5d97a 0%, #d4af37 48%, #8f6f1a 100%);
  color: #1a0530;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.65),
    inset 0 -3px 6px rgba(0,0,0,0.28),
    0 12px 24px -6px rgba(212,175,55,0.58);
  transform: translateZ(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.page-cta-3d:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    inset 0 -3px 6px rgba(0,0,0,0.22),
    0 16px 30px -6px rgba(212,175,55,0.72);
}
.page-cta-3d:active { transform: translateY(1px); }

/* ---------- RG quiz ---------- */
.rg-quiz {
  background: linear-gradient(160deg, rgba(106,27,154,0.25), rgba(13,4,24,0.7));
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.rg-quiz fieldset { border: 0; padding: 0; margin-bottom: 1rem; }
.rg-quiz label { cursor: pointer; margin-right: 1.25rem; color: var(--text); }
.rg-quiz input[type=radio] { accent-color: var(--accent); margin-right: 0.35rem; }

/* ---------- Tabs ---------- */
.tab-btn {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,175,55,0.2);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active {
  background: linear-gradient(180deg, #f5d97a, #d4af37);
  color: #1a0530;
  border-color: transparent;
  box-shadow: 0 6px 16px -4px rgba(212,175,55,0.5);
}

/* ---------- Quick nav pills ---------- */
.quick-pill {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,175,55,0.25);
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.25rem;
  transition: all 0.2s;
}
.quick-pill:hover { background: rgba(212,175,55,0.12); transform: translateY(-2px); }

/* ---------- Footer ---------- */
.footer-link { color: var(--muted); transition: color 0.2s; }
.footer-link:hover { color: var(--accent-2); }
