/* referral.css — GTAVI INSIDER viral referral loop, neon-noir Vice City.
 *
 * Classes are `crf-`-prefixed to avoid collisions. Uses the site's CSS custom
 * properties (var(--cyan), var(--coral), var(--surface), var(--line),
 * var(--paper)) with fallbacks so the widget also survives on any page.
 * Headings inherit the page's Pricedown @font-face.
 */

/* Fallback toast if gamify.css isn't on the page (referral.js reuses
 * .cg-toast when it exists; this only paints the unstyled one). */
.crf-toast-fallback {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px);
  background: rgba(12, 12, 22, .96); color: #fff; border: 1px solid rgba(34, 211, 238, .45);
  border-radius: 12px; padding: 12px 18px; font-size: 14px; line-height: 1.45;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  max-width: min(92vw, 480px); z-index: 9999; box-shadow: 0 8px 40px rgba(255, 45, 120, .18);
}
.crf-toast-fallback.cg-show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }

.crf-widget {
  --crf-cyan: var(--cyan, #22d3ee);
  --crf-pink: var(--coral, #ff2d78);
  --crf-line: var(--line, rgba(255, 255, 255, .12));
  --crf-surface: var(--surface, rgba(255, 255, 255, .04));
  background: linear-gradient(160deg, rgba(255, 45, 120, .08), rgba(10, 10, 20, .4) 40%, rgba(34, 211, 238, .06));
  border: 1px solid var(--crf-line);
  border-radius: 18px;
  padding: clamp(20px, 4vw, 36px);
  margin: clamp(24px, 5vw, 48px) auto;
  max-width: 860px;
  position: relative;
  overflow: hidden;
}
.crf-widget::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 200px at 20% 0%, rgba(255, 45, 120, .12), transparent 60%),
              radial-gradient(600px 200px at 85% 100%, rgba(34, 211, 238, .10), transparent 60%);
}

.crf-head { margin-bottom: 18px; position: relative; }
.crf-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--crf-cyan); margin-bottom: 8px;
}
.crf-title {
  font-family: 'Pricedown', 'Bebas Neue', sans-serif; font-weight: 400;
  font-size: clamp(34px, 6vw, 54px); line-height: 1.02; letter-spacing: .015em;
  margin: 0 0 10px;
  background: linear-gradient(92deg, #ff2d78, #ff9a3c 55%, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.crf-sub { font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .78); max-width: 60ch; margin: 0; }
.crf-sub strong { color: #fff; }

.crf-attrib {
  border: 1px solid rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .08);
  border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px;
}
.crf-attrib strong { color: var(--crf-cyan); }

.crf-codebox {
  display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap;
  background: rgba(0, 0, 0, .35); border: 1px dashed rgba(34, 211, 238, .5);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
}
.crf-codewrap { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; }
.crf-codelabel {
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
.crf-code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 26px; font-weight: 600; letter-spacing: .12em; color: var(--crf-cyan);
  text-shadow: 0 0 18px rgba(34, 211, 238, .45);
}

.crf-btn {
  appearance: none; border: 1px solid var(--crf-line); border-radius: 12px;
  background: var(--crf-surface); color: #fff; font-size: 15px; font-weight: 600;
  padding: 12px 20px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  font-family: inherit;
}
.crf-btn:hover { transform: translateY(-1px); border-color: rgba(34, 211, 238, .6); box-shadow: 0 6px 22px rgba(34, 211, 238, .18); }
.crf-btn:active { transform: translateY(0); }
.crf-btn:focus-visible { outline: 2px solid var(--crf-cyan); outline-offset: 2px; }

.crf-copy { align-self: center; background: rgba(34, 211, 238, .14); border-color: rgba(34, 211, 238, .55); }

.crf-share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.crf-x { background: rgba(255, 255, 255, .06); }
.crf-fb { background: rgba(24, 119, 242, .16); border-color: rgba(24, 119, 242, .5); }
.crf-tg { background: rgba(36, 161, 222, .14); border-color: rgba(36, 161, 222, .5); }
.crf-wa { background: rgba(37, 211, 102, .12); border-color: rgba(37, 211, 102, .45); }
.crf-native { margin-left: auto; }

.crf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.crf-stat {
  background: rgba(0, 0, 0, .3); border: 1px solid var(--crf-line);
  border-radius: 12px; padding: 12px 8px; text-align: center;
}
.crf-big { font-family: 'Pricedown', 'Bebas Neue', sans-serif; font-size: 34px; color: #fff; line-height: 1.1; }
.crf-stat:nth-child(2) .crf-big { color: var(--crf-pink); }
.crf-cap { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin-top: 4px; }

.crf-progress {
  height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .08);
  overflow: hidden; margin-bottom: 8px;
}
.crf-progress-fill {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #ff2d78, #ff9a3c, #22d3ee);
  transition: width .6s ease;
}
.crf-device-note { font-size: 14px; color: rgba(255, 255, 255, .62); margin: 0 0 18px; }

.crf-featured {
  border: 1px solid rgba(255, 45, 120, .45); background: rgba(255, 45, 120, .07);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 20px;
}
.crf-feat-eyebrow {
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--crf-pink); margin-bottom: 6px;
}
.crf-feat-name { font-family: 'Pricedown', 'Bebas Neue', sans-serif; font-size: 28px; color: #fff; line-height: 1.1; }
.crf-feat-ends { font-size: 14px; color: rgba(255, 255, 255, .6); margin: 4px 0 8px; }
.crf-feat-copy { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .78); margin: 0; }
.crf-feat-copy a { color: var(--crf-cyan); font-weight: 600; }

.crf-board-wrap { margin-bottom: 18px; }
.crf-board-title { font-family: 'Pricedown', 'Bebas Neue', sans-serif; font-size: 26px; color: #fff; margin: 0 0 10px; }
.crf-board { width: 100%; border-collapse: collapse; font-size: 14px; }
.crf-board th {
  text-align: left; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5); padding: 8px 10px; border-bottom: 1px solid var(--crf-line);
}
.crf-board td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.crf-board tbody tr.crf-you td { background: rgba(34, 211, 238, .08); }
.crf-rank { color: var(--crf-cyan); font-weight: 700; width: 2.5em; }
.crf-code { font-family: 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .06em; }
.crf-youbadge {
  display: inline-block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(34, 211, 238, .18); color: var(--crf-cyan);
  border: 1px solid rgba(34, 211, 238, .5); border-radius: 99px; padding: 1px 8px; margin-left: 6px;
}
.crf-hits { text-align: right; font-weight: 700; }
.crf-board-note {
  font-size: 13px; color: rgba(255, 255, 255, .55); margin: 10px 0 0; font-style: italic;
}

.crf-legal {
  font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, .55);
  border-top: 1px solid var(--crf-line); padding-top: 14px; margin: 0;
}
.crf-legal strong { color: rgba(255, 255, 255, .8); }

.crf-toast-url { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 13px; color: var(--crf-cyan, #22d3ee); word-break: break-all; }

@media (max-width: 560px) {
  .crf-share-row .crf-btn { flex: 1 1 45%; }
  .crf-native { margin-left: 0; }
  .crf-stats { grid-template-columns: 1fr 1fr 1fr; }
  .crf-big { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .crf-btn, .crf-toast-fallback, .crf-progress-fill { transition: none; }
  .crf-btn:hover { transform: none; }
}
