@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&display=swap');

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TOKENS ── */
:root {
  --bg: #0a0a0a;
  --bg-card: #0f0f0f;
  --border: #1e1e1e;
  --text-primary: #f0ede8;
  --text-secondary: #888;
  --text-muted: #666;
  --accent: #ff3c00;
  --glow: rgba(255,60,0,0.12);

  /* Prime Day */
  --prime-bg: #3d1500;
  --prime-border: #cc4400;
  --prime-sub: #bbb;
  --prime-arrow: #cc4400;

  /* TikTok */
  --tiktok-bg: #0a0a0a;
  --tiktok-border: #2a2a2a;
  --tiktok-color: #f0ede8;

  /* Buttons */
  --btn-green: #2d4a3e;
  --btn-green-text: #a8ebd0;

  /* Converter */
  --result-bg: #1a0800;
  --result-border: #ff3c00;
  --ok-bg: #0d2e1e;
  --ok-text: #a8ebd0;
  --ok-border: #1a5c38;
  --err-bg: #2e0d0d;
  --err-text: #f5a0a0;
  --err-border: #5c1a1a;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f3ef;
    --bg-card: #ffffff;
    --border: #e0dcd6;
    --text-primary: #111;
    --text-secondary: #888;
    --text-muted: #aaa;
    --accent: #ff3c00;
    --glow: rgba(255,60,0,0.07);

    --prime-bg: #ffe8d6;
    --prime-border: #ff6600;
    --prime-sub: #888;
    --prime-arrow: #ff6600;

    --tiktok-bg: #f0ede8;
    --tiktok-border: #d0cdc8;
    --tiktok-color: #111;

    --btn-green: #e2f4ec;
    --btn-green-text: #1e4635;

    --result-bg: #fff3ee;
    --result-border: #ff3c00;
    --ok-bg: #e2f4ec;
    --ok-text: #1e4635;
    --ok-border: #a8ebd0;
    --err-bg: #fdecea;
    --err-text: #7a1a1a;
    --err-border: #f5a0a0;
  }
}

/* ── BASE ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ── HERO ── */
.hero {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  pointer-events: none;
}
.identity { display: flex; align-items: center; gap: 1.25rem; }
.channel-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
}
.identity-text { display: flex; flex-direction: column; gap: 0.3rem; }
.channel-name {
  font-family: -apple-system, Roboto, sans-serif;
  font-size: 2.6rem; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.05;
}
.hero-title {
  font-family: -apple-system, Roboto, sans-serif;
  font-size: 1.8rem; font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ── SECTIONS ── */
.section { padding: 2.5rem 2.5rem; border-bottom: 1px solid var(--border); }
.section-top { padding: 2rem 2.5rem; border-bottom: 1px solid var(--border); }
.section-header {
  font-family: -apple-system, Roboto, sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.section-prime-highlight { background: var(--prime-bg); border-bottom: 1px solid var(--prime-border); }
.section-footer { border-bottom: none; }

/* ── CONTENT TEXT ── */
.content-text { font-size: 14px; line-height: 1.75; color: var(--text-primary); }
.content-text p { margin-bottom: 1.1rem; }
.content-text p:last-child { margin-bottom: 0; }
.content-text a { color: var(--accent); text-decoration: none; }
.content-text a:hover { text-decoration: underline; }
.content-text strong { font-weight: 500; }

/* ── LINK CARDS ── */
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.link-card {
  display: flex; align-items: center; gap: 12px;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  background: var(--bg-card);
  transition: border-color 0.2s;
  cursor: pointer;
}
.link-card:hover { border-color: var(--accent); }
.link-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Icon colours — light defaults */
.link-icon.yt  { background: #fff0ed; color: #ff3c00; }
.link-icon.tg  { background: #e8f4fd; color: #2aabee; }
.link-icon.wa  { background: #e8f8ee; color: #25d366; }
.link-icon.ig  { background: #fce8f0; color: #e1306c; }
.link-icon.amz { background: #fff8e8; color: #e68900; }
.link-icon.tt  { background: var(--tiktok-bg); color: var(--tiktok-color); border: 1px solid var(--tiktok-border); }
.link-icon.em  { background: #f0f0f0; color: #444; }
.link-icon.cv  { background: #f3e8ff; color: #7c22cc; }

/* Icon colours — dark overrides */
@media (prefers-color-scheme: dark) {
  .link-icon.yt  { background: #1a0000; color: #ff3c00; }
  .link-icon.tg  { background: #001629; color: #2aabee; }
  .link-icon.wa  { background: #001a09; color: #25d366; }
  .link-icon.ig  { background: #1a0014; color: #e1306c; }
  .link-icon.amz { background: #1a1000; color: #ff9900; }
  .link-icon.em  { background: #1a1a1a; color: #aaa; }
  .link-icon.cv  { background: #1a0a1a; color: #cc77ff; }
}

.link-text { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.link-name { font-size: 14px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-sub  { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }

/* ── PRIME DAY BANNER (index) ── */
.prime-banner {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px dashed var(--prime-border);
  border-radius: 12px;
  background: var(--prime-bg);
  cursor: pointer;
  transition: border-color 0.2s;
  text-decoration: none;
}
.prime-banner:hover { border-color: #ff7a00; }
.prime-badge {
  background: #00a8e0; color: #fff;
  font-family: -apple-system, Roboto, sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 5px;
  white-space: nowrap;
}
.prime-text { display: flex; flex-direction: column; gap: 3px; }
.prime-title { font-family: -apple-system, Roboto, sans-serif; font-size: 16px; font-weight: 700; color: var(--text-primary); letter-spacing: 0.04em; }
.prime-sub   { font-size: 12px; color: var(--prime-sub); line-height: 1.5; }
.prime-arrow { margin-left: auto; font-size: 20px; color: var(--prime-arrow); flex-shrink: 0; }

/* ── PRIME SECTION HEADER ── */
.prime-section-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.prime-section-label  { font-family: -apple-system, Roboto, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }

/* ── COUNTDOWN ── */
.countdown-wrap  { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.countdown-block { display: flex; flex-direction: column; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 0.28rem 0.45rem; min-width: 34px; transition: border-color 0.5s; }
.countdown-block.urgent { border-color: var(--accent); }
.countdown-num   { font-family: -apple-system, Roboto, sans-serif; font-size: 0.8rem; font-weight: 700; color: var(--accent); line-height: 1; }
.countdown-num.urgent { color: #ff3c00; }
.countdown-label { font-size: 7px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }
.countdown-done  { font-size: 0.8rem; font-weight: 700; color: var(--accent); }

/* ── EMAIL FORM (index / lista) ── */
.form-container { margin-top: 1.5rem; max-width: 450px; }
.form-grid { display: grid; gap: 12px; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 11px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.input-field { background: var(--bg); border: 1px solid var(--border); color: var(--text-primary); padding: 0.8rem 1rem; border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none; transition: border-color 0.2s; width: 100%; }
.input-field:focus { border-color: var(--accent); }
.rgpd-row { display: flex; align-items: flex-start; gap: 10px; }
.rgpd-row input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.rgpd-row label { font-size: 11px; color: var(--text-secondary); line-height: 1.5; cursor: pointer; }
.btn-submit { background: var(--btn-green); color: var(--btn-green-text); border: none; padding: 0.9rem 1rem; border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity 0.2s; width: 100%; }
.btn-submit:hover { opacity: 0.85; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.social-proof { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.social-proof-num { font-weight: 700; color: var(--text-primary); }
.form-feedback { padding: 0.85rem 1rem; border-radius: 10px; font-size: 14px; display: none; }
.form-feedback.success { background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-border); display: block; }
.form-feedback.error   { background: var(--err-bg); color: var(--err-text); border: 1px solid var(--err-border); display: block; }
.already-subscribed { padding: 1rem 1.1rem; border: 1px solid var(--ok-border); border-radius: 10px; background: var(--ok-bg); color: var(--ok-text); font-size: 14px; display: none; margin-top: 1.5rem; }

/* ── STICKY BAR ── */
.sticky-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-card); border-top: 1px solid var(--border); padding: 0.65rem 1.5rem; display: flex; align-items: center; gap: 0.85rem; z-index: 100; transform: translateY(100%); transition: transform 0.3s ease; }
.sticky-bar.visible { transform: translateY(0); }
.sticky-bar-text { font-size: 13px; color: var(--text-secondary); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-prime-badge { background: #00a8e0; color: #fff; font-family: -apple-system, Roboto, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; padding: 14px 22px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; line-height: 1; }
.sticky-bar-btn { background: var(--btn-green); color: var(--btn-green-text); border: none; padding: 0.65rem 1.2rem; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: opacity 0.2s; flex-shrink: 0; }
.sticky-bar-btn:hover { opacity: 0.85; }
.sticky-bar-btn.done { background: #1a5c38; color: #a8ebd0; cursor: default; }

/* ── PRIZES ── */
.prize-list  { display: flex; flex-direction: column; gap: 8px; margin-top: 1.25rem; }
.prize-item  { display: flex; align-items: center; gap: 12px; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); }
.prize-num   { font-family: -apple-system, Roboto, sans-serif; font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; flex-shrink: 0; min-width: 24px; }
.prize-name  { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.prize-value { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--text-secondary); flex-shrink: 0; }

/* ── DATES ── */
.date-list  { display: flex; flex-direction: column; gap: 8px; margin-top: 1.25rem; }
.date-item  { display: flex; align-items: flex-start; gap: 12px; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); }
.date-badge { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; flex-shrink: 0; padding-top: 1px; min-width: 70px; }
.date-desc  { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.date-desc strong { color: var(--text-primary); font-weight: 500; }

/* ── RULES ── */
.rule-list { display: flex; flex-direction: column; gap: 0; margin-top: 1.25rem; }
.rule-item { display: flex; align-items: flex-start; gap: 12px; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.rule-item:last-child { border-bottom: none; }
.rule-emoji { flex-shrink: 0; font-size: 15px; padding-top: 1px; width: 22px; text-align: center; }
.rule-text  { font-size: 14px; line-height: 1.65; color: var(--text-primary); }
.rule-text a { color: var(--accent); text-decoration: none; }
.rule-text a:hover { text-decoration: underline; }
.rule-text strong { font-weight: 500; }

/* ── RIFAS ── */
.rifas-table { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 4px; }
.rifa-row    { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.rifa-arrow  { color: var(--accent); flex-shrink: 0; }
.rifa-label  { flex: 1; }
.rifa-count  { font-weight: 500; color: var(--text-primary); flex-shrink: 0; }

/* ── GOOGLE FORM EMBED ── */
.form-wrap { margin-top: 1.5rem; overflow: hidden; }
.form-wrap iframe { width: 100%; border: none; display: block; }

/* ── CTA BUTTON (IG sorteio) ── */
.btn-ig {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: opacity 0.2s;
  width: 100%; max-width: 450px;
}
.btn-ig:hover { opacity: 0.85; }

/* ── CONVERTER BUTTON ── */
.btn-converter {
  display: flex; align-items: center; gap: 8px;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card); color: var(--text-primary);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s;
  width: fit-content;
}
.btn-converter:hover { border-color: var(--accent); color: var(--accent); }
.btn-converter svg { flex-shrink: 0; }

/* ── CONVERTER TOOL (CONVERTER page) ── */
.input-row  { display: flex; gap: 10px; }
.url-input  { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text-primary); padding: 0.8rem 1rem; border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none; transition: border-color 0.2s; }
.url-input::placeholder { color: var(--text-muted); }
.url-input:focus { border-color: var(--accent); }
.btn-convert { background: var(--accent); color: #fff; border: none; padding: 0 1.25rem; border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 7px; transition: background 0.3s, opacity 0.2s; flex-shrink: 0; }
.btn-convert:hover { opacity: 0.85; }
.btn-convert:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-convert.done { background: var(--btn-green); color: var(--btn-green-text); }

.status-msg { min-height: 22px; font-size: 13px; margin-top: 10px; color: var(--text-secondary); }
.status-msg.ok  { color: var(--ok-text); }
.status-msg.err { color: var(--err-text); }

.success-msg { display: none; margin-top: 1.25rem; background: var(--ok-bg); border: 1px solid var(--ok-border); border-radius: 10px; padding: 1.1rem 1.25rem; color: var(--ok-text); }
.result-link { font-size: 14px; font-weight: 500; color: var(--ok-text); word-break: break-all; line-height: 1.5; margin: 8px 0 14px; font-family: -apple-system, 'Courier New', monospace; text-decoration: underline; cursor: pointer; }
.result-actions { display: flex; }
.btn-sm { background: #1a5c38; border: 1px solid var(--ok-border); color: var(--ok-text); padding: 0.7rem 1.5rem; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 7px; transition: opacity 0.2s; }
.btn-sm:hover { opacity: 0.85; }
@media (prefers-color-scheme: light) {
  .btn-convert.done { background: #1a6640; color: #e2f4ec; }
  .btn-sm { background: #1a6640; color: #e2f4ec; border-color: #1a6640; }
}

.hist-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.hist-section-header { font-family: -apple-system, Roboto, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.btn-clear { background: none; border: none; font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--text-muted); cursor: pointer; padding: 0; transition: color 0.2s; }
.btn-clear:hover { color: var(--text-secondary); }
.hist-empty { font-size: 14px; color: var(--text-muted); padding: 0.25rem 0; }
.hist-item { display: flex; align-items: center; gap: 10px; padding: 0.85rem 1.1rem; border: 1px solid var(--border); border-radius: 10px; background: #181818; margin-bottom: 8px; transition: border-color 0.2s; }
.hist-item:hover { border-color: var(--text-muted); }
@media (prefers-color-scheme: light) { .hist-item { background: #eeeae4; } }
.hist-n    { font-size: 11px; color: var(--text-muted); min-width: 18px; font-variant-numeric: tabular-nums; }
.hist-link { font-size: 12px; color: var(--text-primary); word-break: break-all; flex: 1; line-height: 1.45; font-family: -apple-system, 'Courier New', monospace; }
.hist-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.hist-copy { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; display: flex; align-items: center; transition: color 0.2s; font-size: 16px; }
.hist-copy:hover { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .hero        { padding: 2rem 1.5rem; }
  .channel-name { font-size: 2.1rem; }
  .hero-title  { font-size: 1.5rem; }
  .section     { padding: 2rem 1.5rem; }
  .section-top { padding: 1.5rem; }
  .sticky-bar-text { display: none; }
  .input-row { flex-direction: column; }
  .btn-convert { justify-content: center; padding: 0.8rem 1rem; }
}
