/* ===================================================
   Pay to Play — Shared Styles
   Used by all static pages in /public
   =================================================== */

/* --- Design tokens --- */
:root {
  --purple: #4d2f9a;
  --purple-light: #6b45c9;
  --purple-glow: rgba(107, 69, 201, 0.35);
  --accent: #a78bfa;
  --surface: #0c0a14;
  --surface-raised: #15112a;
  --text: #f0ecf9;
  --text-muted: #9a8fba;
  --radius: 16px;
}

/* --- Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Animated background --- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg::before {
  content: '';
  position: absolute;
  width: 140vmax;
  height: 140vmax;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 180deg,
    transparent 0deg,
    var(--purple) 60deg,
    transparent 120deg,
    transparent 240deg,
    var(--purple-light) 300deg,
    transparent 360deg
  );
  opacity: 0.08;
  animation: bg-spin 25s linear infinite;
}

.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 100%,
    var(--purple-glow) 0%,
    transparent 70%
  );
}

@keyframes bg-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Grain overlay --- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

/* --- Geometric accents --- */
.geo {
  position: fixed;
  z-index: 1;
  pointer-events: none;
}

.geo--ring {
  width: 320px;
  height: 320px;
  border: 1px solid rgba(107, 69, 201, 0.12);
  border-radius: 50%;
  top: -80px;
  right: -100px;
  animation: float 12s ease-in-out infinite;
}

.geo--ring2 {
  width: 200px;
  height: 200px;
  border: 1px solid rgba(107, 69, 201, 0.08);
  border-radius: 50%;
  bottom: 10%;
  left: -60px;
  animation: float 15s ease-in-out infinite reverse;
}

.geo--dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  top: 25%;
  left: 15%;
  animation: pulse 4s ease-in-out infinite;
}

.geo--dot2 {
  width: 4px;
  height: 4px;
  background: var(--purple-light);
  border-radius: 50%;
  opacity: 0.25;
  bottom: 20%;
  right: 18%;
  animation: pulse 5s ease-in-out infinite 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
}

@keyframes text-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* --- Content page layout --- */
.container {
  position: relative;
  z-index: 2;
  max-width: 740px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* --- Page header --- */
.page-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(107, 69, 201, 0.15);
  animation: card-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-header h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header .meta {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Content card --- */
.content-card {
  background: linear-gradient(
    168deg,
    rgba(21, 17, 42, 0.75) 0%,
    rgba(12, 10, 20, 0.88) 100%
  );
  border: 1px solid rgba(107, 69, 201, 0.15);
  border-radius: 24px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  padding: 48px 40px;
  box-shadow:
    0 4px 60px rgba(77, 47, 154, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: card-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* --- Typography --- */
h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(107, 69, 201, 0.15);
  color: var(--text);
}

h2:first-child {
  margin-top: 0;
}

h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--accent);
}

p {
  margin-bottom: 16px;
  color: var(--text);
  opacity: 0.9;
}

ul, ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
  color: var(--text);
  opacity: 0.9;
}

li strong, p strong {
  color: var(--text);
  opacity: 1;
}

em {
  font-style: italic;
  color: var(--text-muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

/* --- Table --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

thead th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(107, 69, 201, 0.1);
  border-bottom: 1px solid rgba(107, 69, 201, 0.2);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(107, 69, 201, 0.08);
  color: var(--text);
  opacity: 0.9;
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* --- Contact block --- */
.contact-block {
  background: rgba(107, 69, 201, 0.08);
  border: 1px solid rgba(107, 69, 201, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 12px;
}

.contact-block p {
  margin-bottom: 8px;
}

.contact-block ul {
  list-style: none;
  padding-left: 0;
}

.contact-block li {
  margin-bottom: 6px;
}

/* --- Definitions block --- */
.definitions {
  background: rgba(107, 69, 201, 0.06);
  border-left: 3px solid var(--purple-light);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.definitions ul {
  list-style: none;
  padding-left: 0;
}

.definitions li {
  margin-bottom: 12px;
}

/* --- Steps block --- */
.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin-bottom: 20px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 32px;
  background: rgba(107, 69, 201, 0.15);
  border: 1px solid rgba(107, 69, 201, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}

/* --- Back link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

/* --- Page footer --- */
.page-footer {
  position: relative;
  z-index: 2;
  margin-top: 48px;
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.4;
}

.page-footer a {
  color: inherit;
  text-decoration: none;
}

.page-footer a:hover {
  color: var(--accent);
}

/* --- Table of Contents --- */
.toc {
  background: rgba(107, 69, 201, 0.06);
  border: 1px solid rgba(107, 69, 201, 0.12);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 36px;
}

.toc-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc ol {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 6px;
  opacity: 1;
}

.toc li::before {
  content: counter(toc) ".";
  display: inline-block;
  width: 24px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.toc a {
  color: var(--text);
  font-size: 0.92rem;
  opacity: 0.85;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.toc a:hover {
  color: var(--accent);
  opacity: 1;
  text-decoration: none;
}

/* --- Mobile --- */
@media (max-width: 600px) {
  .container { padding: 32px 16px 60px; }
  .content-card { padding: 32px 20px; border-radius: 20px; }
  .page-header h1 { font-size: 1.7rem; }
  h2 { font-size: 1.2rem; margin-top: 36px; }
  table { font-size: 0.82rem; }
  thead th, tbody td { padding: 10px 12px; }
  .geo--ring, .geo--ring2 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
