/* ===== ClassScripts — Home redesign ===== */
:root {
  --bg: #0a0a12;
  --bg-2: #0e0e1a;
  --surface: #14141f;
  --surface-2: #1b1b2b;
  --surface-3: #22223540;
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .14);
  --text: #f3f3fa;
  --text-muted: #9a9ab5;
  --text-dim: #6d6d86;
  --primary: #8b5cf6;
  --primary-2: #6366f1;
  --accent: #22d3ee;
  --success: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, .18), rgba(34, 211, 238, .12));
  --ring: 0 0 0 1px var(--border);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}
img, svg, input { max-width: 100%; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: rgba(139, 92, 246, .35); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ===== Background decoration ===== */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-decor .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 40%, transparent 100%);
  opacity: .5;
}
.bg-decor .orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb-1 { width: 520px; height: 520px; background: #8b5cf6; top: -160px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: #22d3ee; top: 120px; right: -160px; opacity: .3; }
.orb-3 { width: 400px; height: 400px; background: #6366f1; bottom: -140px; left: 30%; opacity: .25; }

/* ===== Header ===== */
#header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(10, 10, 18, .72);
  border-bottom: 1px solid var(--border);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.logo svg { filter: drop-shadow(0 2px 8px rgba(139, 92, 246, .5)); }
.logo em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: .18s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-cta {
  background: var(--grad) !important; color: #fff !important; font-weight: 600 !important;
  box-shadow: 0 6px 20px -6px rgba(139, 92, 246, .6);
}
.nav-cta:hover { filter: brightness(1.08); }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav { display: none; flex-direction: column; padding: 8px 20px 16px; gap: 4px; border-bottom: 1px solid var(--border); background: rgba(10, 10, 18, .95); }
.mobile-nav.open { display: flex; }
.mobile-link { padding: 12px 14px; border-radius: 10px; font-weight: 500; color: var(--text-muted); }
.mobile-link:hover { background: var(--surface-2); color: var(--text); }

/* ===== Hero ===== */
.hero { position: relative; padding: 76px 0 60px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; margin-bottom: 24px;
  border: 1px solid var(--border-2); border-radius: 100px; font-size: 13px; font-weight: 500; color: var(--text-muted);
  background: var(--surface-2);
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.hero-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(34px, 7vw, 62px); line-height: 1.05; min-height: 1.1em;
}
.hero-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cursor { color: var(--accent); animation: blink 1s steps(2) infinite; font-weight: 300; }
@keyframes blink { 50% { opacity: 0; } }
.hero-subtitle { max-width: 560px; margin: 20px auto 0; font-size: clamp(15px, 2.4vw, 18px); color: var(--text-muted); }
.hero-subtitle strong { color: var(--text); font-weight: 600; }

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; border-radius: 12px;
  font-weight: 600; font-size: 15px; transition: .2s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(139, 92, 246, .7); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--primary); }

.online-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 7px 16px;
  border: 1px solid var(--border); border-radius: 100px; font-size: 13px; color: var(--text-muted); background: var(--surface);
}
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse 2s infinite; }
.online-pill strong { color: var(--text); }

/* ===== Stats ===== */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 760px; margin: 44px auto 0; width: 100%;
}
.stats-row > * { min-width: 0; }
.stat-card {
  padding: 20px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  text-align: center; transition: .22s;
}
.stat-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.stat-num { font-family: var(--font-mono); font-size: clamp(22px, 4vw, 30px); font-weight: 700; color: var(--text); line-height: 1; }
.stat-num .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { margin-top: 7px; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* ===== Countdown ===== */
.countdown-wrapper { margin: 40px auto 0; max-width: 440px; }
.countdown-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); margin-bottom: 12px; }
.countdown-grid { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cd-item { display: flex; flex-direction: column; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 8px; min-width: 64px; }
.cd-item span { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--text); }
.cd-item label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-top: 4px; }
.cd-sep { font-size: 22px; color: var(--text-dim); font-weight: 700; }

/* ===== Section heading ===== */
.section { padding: 70px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 5vw, 38px); letter-spacing: -.02em; }
.section-sub { margin-top: 12px; color: var(--text-muted); font-size: 15px; }

/* ===== Scripts toolbar ===== */
.scripts-toolbar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.search-box { position: relative; max-width: 440px; margin: 0 auto; width: 100%; }
.search-box i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); }
.search-box input {
  width: 100%; padding: 14px 16px 14px 44px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 15px; font-family: inherit; transition: .18s;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  padding: 8px 16px; border-radius: 100px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--text-muted); transition: .16s;
}
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }

/* ===== Scripts grid ===== */
.scripts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; width: 100%; }
.scripts-grid > * { min-width: 0; }
.script-tile {
  display: flex; align-items: center; gap: 12px; padding: 16px; width: 100%; min-width: 0; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: .2s;
}
.script-tile:hover { transform: translateY(-3px); border-color: var(--primary); background: var(--surface-2); box-shadow: 0 14px 34px -18px rgba(139, 92, 246, .5); }
.script-tile-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--border); font-size: 20px; color: var(--primary); overflow: hidden;
}
.script-tile-icon img { width: 28px; height: 28px; object-fit: contain; }
.script-tile-label { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.script-tile-sub { font-size: 12px; font-weight: 400; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-tile-count { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.script-tile-count i { font-size: 10px; opacity: .7; }
.no-results { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 40px 0; }

/* ===== Hub cards (gabaritos / classx) ===== */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; width: 100%; }
.hub-grid > * { min-width: 0; }
.hub-card {
  position: relative; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; transition: .22s; display: flex; flex-direction: column;
}
.hub-card::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: .22s; }
.hub-card:hover { transform: translateY(-4px); border-color: var(--border-2); }
.hub-card:hover::before { opacity: 1; }
.hub-card > * { position: relative; }
.hub-icon { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--grad); color: #fff; margin-bottom: 16px; box-shadow: 0 8px 22px -8px rgba(139, 92, 246, .7); }
.hub-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.hub-card p { margin-top: 8px; color: var(--text-muted); font-size: 14px; flex: 1; }
.hub-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.hub-tag { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }
.hub-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; font-size: 14px; color: var(--accent); }
.hub-link i { transition: .18s; }
.hub-card:hover .hub-link i { transform: translateX(3px); }

/* ===== FAQ ===== */
.faq-list { max-width: 740px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; transition: .18s; }
.faq-item.open { border-color: var(--border-2); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 18px 20px; font-weight: 600; font-size: 15px; text-align: left; }
.faq-q i { color: var(--primary); transition: .25s; flex-shrink: 0; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 20px 18px; color: var(--text-muted); font-size: 14px; }

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); padding: 48px 0 36px; margin-top: 30px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.footer-copy { color: var(--text-muted); font-size: 14px; }
.footer-socials { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.footer-social-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 500; transition: .18s; }
.footer-social-btn:hover { border-color: var(--border-2); transform: translateY(-2px); }
.footer-social-btn.discord:hover { border-color: #5865f2; color: #fff; }
.footer-sub { font-size: 12px; color: var(--text-dim); margin-top: 8px; }

/* ===== Float donate ===== */
.float-donate-btn {
  position: fixed; bottom: 22px; right: 22px; z-index: 90; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 100px; background: var(--grad); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 30px -8px rgba(139, 92, 246, .7); transition: .2s;
}
.float-donate-btn:hover { transform: translateY(-3px) scale(1.03); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Reuse: popups & modal (scoped) ===== */
.roven-popup, .script-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 5, 10, .72); backdrop-filter: blur(6px); }
.roven-popup.open, .script-modal.open { display: flex; }
.roven-popup-card, .script-modal-card { position: relative; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; animation: popin .3s ease; }
@keyframes popin { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.roven-popup-close, .script-modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); transition: .16s; }
.roven-popup-close:hover, .script-modal-close:hover { color: var(--text); border-color: var(--border-2); }
.roven-popup-top { height: 96px; display: grid; place-items: center; background: var(--grad-soft); border-bottom: 1px solid var(--border); }
.roven-popup-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--grad); color: #fff; }
.classx-popup-paw { width: 56px; height: 56px; color: var(--primary); }
.roven-popup-body { padding: 22px; }
.roven-popup-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 8px; }
.roven-popup-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.roven-popup-desc { margin-top: 10px; color: var(--text-muted); font-size: 14px; }
.classx-new { color: var(--text); font-weight: 600; }
.classx-offer { color: var(--success); font-weight: 700; }
.roven-popup-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 20px; border-radius: 11px; background: var(--grad); color: #fff; font-weight: 600; font-size: 14px; width: 100%; justify-content: center; transition: .18s; }
.roven-popup-btn:hover { filter: brightness(1.08); }

.script-modal-card { max-width: 440px; }
.script-modal-head { display: flex; align-items: center; gap: 14px; padding: 24px 22px 16px; }
.script-tile-icon#script-modal-icon-wrap { width: 50px; height: 50px; }
.script-modal-head h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.script-modal-head p { font-size: 13px; color: var(--text-muted); }
.script-modal-list { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.script-modal-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); transition: .16s; }
.script-modal-item:hover { border-color: var(--primary); background: var(--surface-3); }
.script-modal-item.is-disabled { opacity: .55; }
.script-modal-item-name { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.provider-logo { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; }
.script-modal-item-go, .script-modal-item-status { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); }
.script-modal-item-status { color: var(--text-dim); }
.script-link-badge { font-size: 10px; padding: 2px 7px; border-radius: 100px; background: var(--grad); color: #fff; }

/* ===== Mobile ===== */
@media (max-width: 860px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .scripts-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 48px 0; }
  .cd-item { min-width: 52px; padding: 10px 6px; }
  .cd-item span { font-size: 22px; }
  .hub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .scripts-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 30px; }
  .countdown-grid { gap: 5px; }
  .cd-item { min-width: 46px; padding: 9px 5px; }
  .cd-item span { font-size: 19px; }
  .cd-sep { font-size: 18px; }
  .btn-primary, .btn-secondary { flex: 1; justify-content: center; }
  .hero-cta { width: 100%; }
}
@media (max-width: 400px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .float-donate-btn span { display: none; }
  .float-donate-btn { padding: 12px; }
  .faq-q { font-size: 14px; padding: 16px; }
}
