/* =========================================================
   Moth Hub — "Themes.Preset" preview theme
   Load this AFTER style.css to reskin a page with the exact
   palette from the Lua theme table:

     Accent      = Color3.fromRGB(91, 125, 167)    #5B7DA7
     Background  = Color3.fromRGB(12, 12, 12)      #0C0C0C
     Main        = Color3.fromRGB(24, 24, 24)      #181818
     Content     = Color3.fromRGB(16, 16, 16)      #101010
     Elements    = Color3.fromRGB(24, 24, 24)      #181818
     Stroke      = Color3.fromRGB(30, 30, 30)      #1E1E1E
     TextColor   = Color3.fromRGB(255, 255, 255)   #FFFFFF
     Unselected  = Color3.fromRGB(177, 177, 177)   #B1B1B1
     Inactive    = Color3.fromRGB(88, 88, 88)      #585858
     Risky       = Color3.fromRGB(255, 205, 90)    #FFCD5A
     Warning     = Color3.fromRGB(255, 95, 95)     #FF5F5F

   Used by public/index-theme.html (homepage example), login-theme.html,
   register-theme.html, and by public/tos.html + public/privacy.html.
   ========================================================= */

:root {
  /* --- Themes.Preset, verbatim --- */
  --theme-accent: #5b7da7;
  --theme-background: #0c0c0c;
  --theme-main: #181818;
  --theme-content: #101010;
  --theme-elements: #181818;
  --theme-stroke: #1e1e1e;
  --theme-text: #ffffff;
  --theme-unselected: #b1b1b1;
  --theme-inactive: #585858;
  --theme-risky: #ffcd5a;
  --theme-warning: #ff5f5f;

  /* --- site tokens remapped onto the preset --- */
  --bg-top: var(--theme-background);
  --bg-mid: var(--theme-background);
  --bg-mid-2: var(--theme-content);
  --bg-foot: var(--theme-background);
  --bg-rgb: 12, 12, 12;
  --card: var(--theme-elements);
  --card-border: var(--theme-stroke);
  /* topbar floats over the hero, so it sits on Main instead of pure Background */
  --topbar-bg: rgba(24, 24, 24, 0.82);
  --topbar-bg-scrolled: rgba(24, 24, 24, 0.94);
  --carousel-bg: var(--theme-content);
  --carousel-arrow-bg: rgba(24, 24, 24, 0.9);
  /* hero starts one step above Main (a touch brighter), the footer one below it */
  --hero-top: #232323;
  --footer-top: var(--theme-main);      /* #181818 — brighter than the page bg */
  --footer-bottom: var(--theme-content); /* #101010 — never as bright as the hero */
  --auth-card-bg: var(--theme-content);
  --input-bg: var(--theme-content);

  --text: var(--theme-text);
  --text-dim: var(--theme-unselected);
  --text-mute: var(--theme-inactive);

  --accent: var(--theme-accent);
  --accent-rgb: 91, 125, 167;
  --accent-strong: #7b9cc4;
  --accent-strong-rgb: 123, 156, 196;
  --accent-light: #a9c1dc;
  --accent-pale: #d7e4f1;
  --accent-glow: rgba(91, 125, 167, 0.5);
  --on-accent: #0c0c0c;            /* Background, used on top of accent fills */

  --danger: var(--theme-warning);
  --warning: var(--theme-warning);
  --risky: var(--theme-risky);
  --success: var(--theme-accent);
}

/* =========================================================
   SURFACES
   ========================================================= */
.topbar {
  background: var(--topbar-bg);
  border-bottom-color: var(--theme-stroke);
}
.topbar.scrolled { background: var(--topbar-bg-scrolled); }
/* no dotted seam under the topbar, no dot texture on the hero */
.topbar::after {
  display: none;
}
.hero.dotted::before {
  display: none;
}

/* Discord mark: solid logo (style.css draws it as an outline) */
.discord-icon path {
  fill-opacity: 1;
  stroke: none;
}

.hero {
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(91, 125, 167, 0.18), transparent 70%),
    linear-gradient(180deg, var(--hero-top) 0%, var(--theme-main) 45%, var(--theme-background) 100%);
}
.hero h1 .glow {
  color: var(--accent-light);
  text-shadow: 0 0 18px var(--accent-glow), 0 0 42px rgba(91, 125, 167, 0.3);
}

.dotted::before {
  background-image: radial-gradient(rgba(91, 125, 167, 0.18) 1.2px, transparent 1.4px);
}

.badge {
  color: var(--accent-light);
  background: rgba(91, 125, 167, 0.12);
  border-color: var(--theme-stroke);
}
.badge .dot {
  background: var(--theme-accent);
  box-shadow: 0 0 8px rgba(91, 125, 167, 0.8);
}

.section-alt { background: var(--theme-content); }

.card {
  background: var(--theme-elements);
  border-color: var(--theme-stroke);
}
.card:hover {
  border-color: rgba(91, 125, 167, 0.55);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(91, 125, 167, 0.16);
}
.card-icon {
  color: var(--accent-light);
  background: rgba(91, 125, 167, 0.14);
  border-color: var(--theme-stroke);
}

.cta {
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(91, 125, 167, 0.18), transparent 70%),
    var(--theme-elements);
  border-color: var(--theme-stroke);
}

/* =========================================================
   BUTTONS — solid accent fills, accented ghost outline
   ========================================================= */
.btn-primary {
  color: var(--on-accent);
  background: var(--theme-accent);
  box-shadow: 0 0 0 rgba(91, 125, 167, 0);
}
.btn-primary:hover {
  color: var(--on-accent);
  background: var(--accent-strong);
  box-shadow: 0 0 18px var(--accent-glow), 0 0 40px rgba(91, 125, 167, 0.25);
}
.btn-ghost {
  color: var(--theme-text);
  border-color: var(--theme-stroke);
  background: var(--theme-main);
}
.btn-ghost:hover {
  color: var(--accent-light);
  border-color: var(--theme-accent);
  box-shadow: none;                 /* no blurred glow on hover */
}

/* =========================================================
   CAROUSEL / SHOWCASE
   ========================================================= */
.carousel-viewport {
  background: var(--theme-content);
  border-color: var(--theme-stroke);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px var(--theme-stroke),
    0 0 60px rgba(91, 125, 167, 0.1);
}
.carousel-caption {
  background: linear-gradient(180deg, transparent, rgba(12, 12, 12, 0.92));
}
.carousel-arrow {
  background: var(--carousel-arrow-bg);
  border-color: var(--theme-stroke);
}
.carousel-arrow:hover {
  color: var(--accent-light);
  border-color: var(--theme-accent);
  box-shadow: 0 0 16px rgba(91, 125, 167, 0.4);
}
.carousel-bar .track { background: #2b2b2b; }
.carousel-bar .fill {
  background: var(--theme-accent);
  box-shadow: 0 0 10px rgba(91, 125, 167, 0.6);
}
.carousel-bar.done .fill { opacity: 0.35; }

/* =========================================================
   AUTH PAGES
   ========================================================= */
.auth-wrap {
  background:
    radial-gradient(700px 380px at 50% 10%, rgba(91, 125, 167, 0.16), transparent 70%),
    var(--theme-background);
}
.auth-card {
  background: var(--theme-content);
  border-color: var(--theme-stroke);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 50px rgba(91, 125, 167, 0.08);
}
.auth-card .sub,
.auth-alt,
.hint { color: var(--theme-unselected); }

.field label { color: var(--theme-unselected); }
.input {
  background: var(--input-bg);
  border-color: var(--theme-stroke);
}
.input:hover { border-color: #2b2b2b; }
.input:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(91, 125, 167, 0.18), 0 0 16px rgba(91, 125, 167, 0.22);
}
.input.mono { color: var(--theme-text); }

.form-msg.error {
  color: #ffd6d6;
  background: rgba(255, 95, 95, 0.1);
  border: 1px solid rgba(255, 95, 95, 0.35);
}
.form-msg.ok {
  color: var(--accent-pale);
  background: rgba(91, 125, 167, 0.14);
  border: 1px solid rgba(91, 125, 167, 0.4);
}

/* =========================================================
   LEGAL PAGES — same brighter top as the hero, at a smaller scale
   ========================================================= */
.legal {
  background:
    radial-gradient(760px 300px at 50% 0, rgba(91, 125, 167, 0.14), transparent 70%),
    linear-gradient(180deg, var(--hero-top) 0, var(--theme-background) 340px);
  background-repeat: no-repeat;
}
.legal-head { border-bottom-color: var(--theme-stroke); }
.legal h2 { color: var(--accent-light); }
.data-table th { background: var(--theme-content); }
.data-table th,
.data-table td { border-bottom-color: var(--theme-stroke); }
.callout {
  border-left-color: var(--theme-warning);
  background: rgba(255, 95, 95, 0.08);
  color: #ffd6d6;
}
.callout.info {
  border-left-color: var(--theme-accent);
  background: rgba(91, 125, 167, 0.14);
  color: var(--accent-pale);
}

/* =========================================================
   FOOTER — brighter than the page background, dimmer than the hero
   ========================================================= */
.footer {
  background: linear-gradient(180deg, var(--footer-top) 0%, var(--footer-bottom) 100%);
  border-top-color: var(--theme-stroke);
}
.footer::before {
  background: linear-gradient(90deg, transparent, rgba(91, 125, 167, 0.5), transparent);
}
.footer-top { border-bottom-color: var(--theme-stroke); }

/* the footer moth is flat, not neon */
.footer .brand-logo {
  color: var(--theme-unselected);
  filter: none;
  animation: none;
}
.footer .brand-name span { text-shadow: none; }

/* =========================================================
   PALETTE LEGEND (theme preview page only)
   ========================================================= */
.section-head code {
  color: var(--accent-light);
  font: 500 0.9em var(--mono);
}

.palette {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
}

.swatch {
  padding: 12px;
  border-radius: 12px;
  background: var(--theme-main);
  border: 1px solid var(--theme-stroke);
}
.swatch .chip {
  display: block;
  height: 48px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.swatch b {
  display: block;
  color: var(--theme-text);
  font-size: 0.92rem;
  font-weight: 600;
}
.swatch small {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font: 500 0.76rem var(--mono);
}

.sw-accent .chip { background: var(--theme-accent); }
.sw-background .chip { background: var(--theme-background); }
.sw-main .chip { background: var(--theme-main); }
.sw-content .chip { background: var(--theme-content); }
.sw-elements .chip { background: var(--theme-elements); }
.sw-stroke .chip { background: var(--theme-stroke); }
.sw-text .chip { background: var(--theme-text); }
.sw-unselected .chip { background: var(--theme-unselected); }
.sw-inactive .chip { background: var(--theme-inactive); }
.sw-risky .chip { background: var(--theme-risky); }
.sw-warning .chip { background: var(--theme-warning); }

/* Risky / Warning in action */
.notice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.notice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--theme-main);
  border: 1px solid var(--theme-stroke);
}
.notice .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.notice.risky { color: var(--theme-risky); }
.notice.risky .dot {
  background: var(--theme-risky);
  box-shadow: 0 0 10px rgba(255, 205, 90, 0.7);
}
.notice.warning { color: var(--theme-warning); }
.notice.warning .dot {
  background: var(--theme-warning);
  box-shadow: 0 0 10px rgba(255, 95, 95, 0.7);
}

