:root {
  --bg:     #050505;
  --bg2:    #0a0a0a;
  --card:   #0f172a;
  --card2:  #0f172a;
  --soft:   rgba(255,255,255,.04);
  --soft2:  rgba(255,255,255,.07);
  --border: rgba(226,232,240,.07);
  --text:   #e2e8f0;
  --muted:  #94a3b8;
  --accent: #22c55e;
  --accent2:#4ade80;
  --shadow: 0 16px 40px rgba(0,0,0,.5);
}

body.light {
  --bg:     #f8fafc;
  --bg2:    #f1f5f9;
  --card:   rgba(255,255,255,.97);
  --card2:  rgba(249,250,251,.98);
  --soft:   rgba(0,0,0,.04);
  --soft2:  rgba(0,0,0,.07);
  --border: rgba(0,0,0,.07);
  --text:   #111827;
  --muted:  #6b7280;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

* { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }

body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: #050505;
}
body.light { background: #f8fafc; }

a { color:inherit; text-decoration:none; }

.container { width:min(1180px,92%); margin:0 auto; }

/* ── TOPBAR ── */
.topbar {
  position:sticky; top:0; z-index:100;
  backdrop-filter:blur(14px);
  background:rgba(5,5,5,.8);
  border-bottom:none;
  box-shadow:none;
}
body.light .topbar { background:rgba(255,255,255,.85); backdrop-filter:blur(14px); }

.topbar-inner {
  display:flex; justify-content:space-between;
  align-items:center; gap:22px; padding:18px 8px;
}

.brand { display:flex; align-items:center; gap:16px; }

.logo {
  width:44px; height:44px; border-radius:14px;
  display:grid; place-items:center;
  background:transparent;
  border:1px solid rgba(255,255,255,.05);
  box-shadow:none; filter:none;
  transition:.25s ease;
}
.logo:hover {
  transform:scale(1.05);
  border-color:rgba(255,255,255,.1);
}

.brand h1 {
  font-size:23px; font-weight:900; margin-bottom:2px;
  background:linear-gradient(135deg,#e2e8f0,#ffffff);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent;
}
body.light .brand h1 {
  background:linear-gradient(135deg,#111827,#1e293b);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent;
}
.brand p { color:var(--muted); font-size:.92rem; letter-spacing:.3px; }

.actions-top { display:flex; gap:14px; flex-wrap:wrap; }

/* ── BOTÕES ── */
.btn {
  border:1px solid var(--border);
  background:var(--soft);
  color:var(--text);
  padding:12px 18px; border-radius:20px;
  cursor:pointer; transition:.28s ease;
  font-weight:700; font-size:.95rem;
  display:inline-flex; align-items:center; gap:6px;
  text-decoration:none;
}
.btn:hover {
  transform:translateY(-2px);
  box-shadow:0 4px 20px rgba(0,0,0,.3);
  border-color:rgba(226,232,240,.12);
  background:var(--soft2);
}

.btn-primary {
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  color:#052e16; border:none;
}
.btn-primary:hover { filter:brightness(1.08); }

/* ── HERO ── */
.hero { padding:34px 0 18px; }

.hero-grid {
  display:grid;
  grid-template-columns:1.9fr 1fr;
  gap:22px;
}

/* ── CARD BASE ── */
.card {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:26px;
  box-shadow:var(--shadow);
}

.hero-main, .hero-side { padding:28px; }

.hero-main {
  position:relative; overflow:hidden;
}
.hero-main::before {
  content:""; position:absolute;
  width:300px; height:300px;
  right:-80px; bottom:-100px; border-radius:50%;
  background:radial-gradient(circle, rgba(34,197,94,.06), transparent 65%);
}

.pill {
  display:inline-block; margin-bottom:18px;
  padding:10px 14px; border-radius:999px;
  background:var(--soft); border:1px solid var(--border);
  font-size:.9rem; font-weight:700;
}

.hero-main h2 {
  font-size:clamp(2.2rem,4vw,4rem);
  line-height:1.06; margin-bottom:16px; font-weight:900;
}

.gradient-text {
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}

.hero-main p { color:var(--muted); font-size:1.05rem; line-height:1.7; max-width:780px; }

.stats { display:flex; gap:16px; flex-wrap:wrap; margin-top:28px; }

.stat {
  min-width:145px; padding:18px; border-radius:20px;
  border:1px solid var(--border); background:var(--soft);
}
.stat strong { display:block; font-size:1.8rem; margin-bottom:8px; }

.hero-side h3, .section-title h3 { font-size:1.8rem; margin-bottom:18px; }

/* ── RANKING ── */
.rank-list { display:grid; gap:12px; }

.rank-item {
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 16px; border-radius:18px;
  background:var(--soft); border:1px solid var(--border);
  transition:.2s ease;
}
.rank-item:hover { transform:translateX(4px); }
.rank-name { display:flex; gap:10px; align-items:center; font-weight:700; }

/* ── CONTROLES ── */
.search, .sort-select {
  width:100%; padding:14px 16px; border-radius:16px;
  border:1px solid var(--border); background:var(--card2);
  color:var(--text); outline:none; font-size:1rem;
}

.filters { display:flex; flex-wrap:wrap; gap:10px; }

.filter-btn {
  min-height:42px; padding:10px 16px; border-radius:999px;
  border:1px solid var(--border); background:var(--card);
  color:var(--text); cursor:pointer; font-weight:700;
  transition:.2s ease; white-space:nowrap;
}
.filter-btn:hover { transform:translateY(-1px); background:var(--soft2); }
.filter-btn.active {
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  color:#052e16; border:none;
}

.count, .muted, .model-desc, .model-family { color:var(--muted); }

.section-title {
  display:flex; justify-content:space-between;
  align-items:center; gap:10px; margin:6px 0 18px; flex-wrap:wrap;
}

/* ── GRID DE CARDS ── */
.grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px; padding-bottom:18px;
}

.ai-card, .model-card { padding:20px; transition:.25s ease; }
.ai-card:hover, .model-card:hover {
  transform:translateY(-5px);
  background:#111827;
  border-color:rgba(226,232,240,.12);
}

.ai-header {
  display:flex; justify-content:space-between;
  align-items:start; gap:10px; margin-bottom:14px;
}

.ai-title { font-size:1.6rem; font-weight:800; margin-bottom:8px; }

.tag {
  display:inline-block; padding:6px 12px; border-radius:999px;
  border:1px solid var(--border); background:rgba(34,197,94,.1);
  font-size:.82rem; font-weight:700; color:var(--accent2);
}
body.light .tag { color:#166534; }

.favorite-btn {
  min-width:46px; width:46px; height:38px; padding:0;
  display:grid; place-items:center; font-size:1rem;
}
.favorite-btn.active {
  background:rgba(239,68,68,.15);
  border-color:rgba(239,68,68,.4);
  color:#f87171;
}

.badges { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 14px; }

.badge {
  padding:5px 10px; border-radius:999px;
  background:var(--soft); border:1px solid var(--border);
  font-size:.78rem; font-weight:700;
}

.rating-row {
  display:flex; justify-content:space-between;
  align-items:center; margin:10px 0 8px; gap:10px;
}

.stars { color:#fbbf24; font-size:1.1rem; letter-spacing:2px; }
.score { color:var(--accent2); font-weight:800; }

.bar {
  height:8px; border-radius:999px;
  background:rgba(255,255,255,.08); overflow:hidden; margin-bottom:18px;
}
body.light .bar { background:rgba(0,0,0,.07); }

.bar-fill {
  height:100%; border-radius:999px;
  background:linear-gradient(90deg, var(--accent), var(--accent2));
}

.subtitle {
  font-size:.88rem; letter-spacing:1.6px;
  color:var(--accent2); font-weight:800; margin-bottom:10px;
}

.strengths { display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }

.strength {
  background:var(--soft); border:1px solid var(--border);
  border-radius:14px; padding:12px; line-height:1.35;
}

.card-actions { display:flex; gap:10px; flex-wrap:wrap; }
.card-actions .btn { flex:1; min-width:110px; text-align:center; }

/* ── FOOTER ── */
.footer { text-align:center; color:var(--muted); padding:8px 0 38px; }

/* ── PÁGINA DETALHE ── */
.detail-page { padding:34px 0 60px; }

.detail-hero {
  display:grid; grid-template-columns:1.2fr .8fr;
  gap:22px; margin-bottom:24px;
}

.detail-card { padding:24px; }

.detail-title {
  display:flex; justify-content:space-between;
  align-items:start; gap:12px; margin-bottom:16px;
}
.detail-title h2 { font-size:2.4rem; margin-bottom:10px; }
.detail-desc { color:var(--muted); line-height:1.7; font-size:1.04rem; }

.info-list, .metrics { display:grid; gap:12px; margin-top:18px; }

.info-item {
  background:var(--soft); border:1px solid var(--border);
  border-radius:14px; padding:13px;
}

.back-link { display:inline-flex; margin-bottom:18px; }
.model-family { font-weight:700; margin-bottom:10px; }
.model-desc { line-height:1.6; margin-bottom:14px; }

/* ── RESPONSIVO ── */
@media (max-width:1100px) {
  .grid { grid-template-columns:repeat(3,1fr); }
  .hero-grid, .detail-hero { grid-template-columns:1fr; }
}

@media (max-width:900px) {
  .grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width:640px) {
  .topbar-inner { flex-direction:column; align-items:flex-start; }
  .brand h1 { font-size:1.4rem; }
  .hero-main h2, .detail-title h2 { font-size:2rem; }
  .hero-side h3, .section-title h3 { font-size:1.5rem; }
  .ai-title { font-size:1.3rem; }
  .grid { grid-template-columns:1fr; }
}
