/* ══════════════════════════════════════════════════════════════════
   rules.css  —  Atlas · Rules Page
   ══════════════════════════════════════════════════════════════════ */

/* ── Background blobs ────────────────────────────────────────────── */
.bg-blobs { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; animation: blobFloat 12s ease-in-out infinite alternate; }
.blob-1 { width: 520px; height: 520px; background: #c7d2fe; top: -120px; left: -100px; animation-duration: 14s; }
.blob-2 { width: 420px; height: 420px; background: #ddd6fe; bottom: -80px; right: -80px; animation-duration: 11s; animation-delay: -4s; }
.blob-3 { width: 300px; height: 300px; background: #e9d5ff; top: 50%; left: 60%; transform: translate(-50%,-50%); animation-duration: 18s; animation-delay: -7s; }
@keyframes blobFloat {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(30px,-20px) scale(1.05); }
  66%  { transform: translate(-20px,25px) scale(0.96); }
  100% { transform: translate(15px,10px) scale(1.02); }
}

/* ── Body & base ─────────────────────────────────────────────────── */
body {
  background: linear-gradient(135deg, #e0e7ff 0%, #f5f3ff 100%);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  color: #1e1b4b;
}

/* ── Main content area (matches navbar pages) ────────────────────── */
.main-content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 62px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px 56px;
}

/* ── Rules page card ─────────────────────────────────────────────── */
.rules-page {
  width: 100%;
  max-width: 760px;
  background: rgba(255,255,255,0.72);
  border: 1.5px solid rgba(255,255,255,0.92);
  border-radius: 24px;
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 8px 40px rgba(99,102,241,0.1), 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.95);
  padding: 40px 44px 36px;
  animation: cardIn 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Title block ─────────────────────────────────────────────────── */
.rules-title-block {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.rules-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.18);
  display: flex; align-items: center; justify-content: center;
}
.rules-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.rules-subtitle {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 4px;
  font-weight: 400;
}

/* ── Warning banner ──────────────────────────────────────────────── */
.rules-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(245,158,11,0.08);
  border: 1.5px solid rgba(245,158,11,0.28);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #b45309;
  margin-bottom: 28px;
  line-height: 1.6;
}
.rules-warning svg { color: #d97706; flex-shrink: 0; margin-top: 1px; }
.rules-warning strong { color: #92400e; }

/* ── Sections ────────────────────────────────────────────────────── */
.rules-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.rules-section {
  background: rgba(99,102,241,0.04);
  border: 1px solid rgba(99,102,241,0.1);
  border-radius: 16px;
  padding: 20px 22px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rules-section:hover {
  border-color: rgba(99,102,241,0.2);
  box-shadow: 0 4px 18px rgba(99,102,241,0.07);
}
.rules-section--danger {
  background: rgba(239,68,68,0.04);
  border-color: rgba(239,68,68,0.15);
}
.rules-section--danger:hover {
  border-color: rgba(239,68,68,0.28);
  box-shadow: 0 4px 18px rgba(239,68,68,0.06);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}
.section-num--danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 2px 8px rgba(239,68,68,0.35);
}
.section-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: #1e1b4b;
  letter-spacing: -0.01em;
}

/* ── List items — FIX: use position:absolute for bullet ──────────── */
.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rules-list li {
  /* NO flex/grid — use relative positioning so inline elements flow normally */
  position: relative;
  padding-left: 18px;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.7;
  font-weight: 400;
}

.rules-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;          /* align to first line cap-height */
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  flex-shrink: 0;
}

.rules-list--danger li::before {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Strong text stays inline — no flex override */
.rules-list li strong {
  color: #1e1b4b;
  font-weight: 600;
}

/* ── Accept block ────────────────────────────────────────────────── */
.rules-accept {
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 28px;
}

.accept-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(99,102,241,0.06);
  border: 1.5px solid rgba(99,102,241,0.15);
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e1b4b;
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
}
.accept-label:hover { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.28); }

.accept-checkbox-wrap { position: relative; flex-shrink: 0; }
.accept-checkbox { position: absolute; opacity: 0; width: 22px; height: 22px; cursor: pointer; z-index: 1; }

.accept-custom-check {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 2px solid rgba(99,102,241,0.3);
  background: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.accept-custom-check svg { opacity: 0; transition: opacity 0.2s; }
.accept-checkbox:checked ~ .accept-custom-check {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(99,102,241,0.4);
}
.accept-checkbox:checked ~ .accept-custom-check svg { opacity: 1; }

.btn-accept {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; padding: 15px 24px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none; border-radius: 14px;
  font-family: inherit; font-size: 0.95rem; font-weight: 600; color: #fff;
  cursor: pointer; letter-spacing: 0.01em;
  box-shadow: 0 4px 18px rgba(99,102,241,0.35);
  transition: all 0.2s;
}
.btn-accept:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,0.45); }
.btn-accept:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Footer ──────────────────────────────────────────────────────── */
.rules-footer {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 0.75rem; color: #9ca3af;
}
.rules-footer-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.55);
  animation: pulseDot 2.2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { box-shadow: 0 0 6px rgba(34,197,94,0.55); }
  50%     { box-shadow: 0 0 14px rgba(34,197,94,0.85); }
}
.rules-footer-sep { opacity: 0.35; }
.rules-footer-link { color: #6366f1; text-decoration: none; font-weight: 500; }
.rules-footer-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════
   DARK THEME  (html.dark is set by navbar.js)
   ══════════════════════════════════════════════════════════════════ */
html.dark body { background: #0a0818; color: #e0e7ff; }
html.dark .blob-1 { background: radial-gradient(circle,#6366f1,#4338ca); opacity: 0.18; }
html.dark .blob-2 { background: radial-gradient(circle,#8b5cf6,#7c3aed); opacity: 0.18; }
html.dark .blob-3 { background: radial-gradient(circle,#a78bfa,#6366f1); opacity: 0.15; }

html.dark .rules-page {
  background: rgba(255,255,255,0.035);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.08), 0 8px 48px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
}
html.dark .rules-title {
  background: linear-gradient(135deg,#a5b4fc,#c4b5fd);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
html.dark .rules-subtitle { color: #7c7aaa; }

html.dark .rules-warning {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.22);
  color: #fcd34d;
}
html.dark .rules-warning strong { color: #fbbf24; }
html.dark .rules-warning svg { color: #f59e0b; }

html.dark .rules-section { background: rgba(99,102,241,0.05); border-color: rgba(99,102,241,0.12); }
html.dark .rules-section:hover { border-color: rgba(99,102,241,0.25); box-shadow: 0 4px 20px rgba(99,102,241,0.08); }
html.dark .rules-section--danger { background: rgba(239,68,68,0.05); border-color: rgba(239,68,68,0.17); }
html.dark .rules-section--danger:hover { border-color: rgba(239,68,68,0.3); }

html.dark .section-title { color: #c7d2fe; }
html.dark .rules-list li { color: #9ca3c9; }
html.dark .rules-list li strong { color: #e0e7ff; }

html.dark .accept-label { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.2); color: #c7d2fe; }
html.dark .accept-label:hover { background: rgba(99,102,241,0.14); border-color: rgba(99,102,241,0.32); }
html.dark .accept-custom-check { border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.1); }

html.dark .rules-footer { color: #5c5a8a; }
html.dark .rules-footer-link { color: #818cf8; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .rules-page { padding: 26px 20px 30px; border-radius: 18px; }
  .rules-title { font-size: 1.3rem; }
  .rules-title-block { gap: 12px; }
  .rules-icon { width: 48px; height: 48px; }
}
