/* ============================================================================
   rankea — skin narrassol
   Tokens neutros (claro/escuro) vêm do nsol-theme.css compartilhado.
   Acento: laranja narrassol #ff6b35; fonte Baloo 2.
   ========================================================================== */

:root {
  --primary: #ff6b35;
  --primary-dark: #e85a25;
  --bg: var(--nsol-bg);
  --surface: var(--nsol-surface);
  --border: var(--nsol-border);
  --text: var(--nsol-text);
  --text-muted: var(--nsol-text-muted);
  --shadow: var(--nsol-shadow);
  --shadow-md: var(--nsol-shadow-md);
  --radius: 14px;
  --nav-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Baloo 2', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + 40px);
}
a { text-decoration: none; color: inherit; }
img { display: block; }

.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ── Topo ── */
.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 6px;
}
.brand { font-size: 1.4rem; font-weight: 700; }
.brand-highlight { color: var(--primary); }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s;
}
.theme-toggle:active { background: var(--border); }

/* ── Hero / form ── */
.hero { text-align: center; margin: 18px 0 20px; }
.hero h1 { font-size: 1.6rem; font-weight: 800; }
.hero p { color: var(--text-muted); margin-top: 4px; font-size: .95rem; }

.rank-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 24px;
}
.rank-form label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.rank-form textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: .9rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.rank-form textarea:focus { border-color: var(--primary); }
.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.form-row select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: .85rem;
  background: var(--bg);
  color: var(--text);
}
.btn-rankear {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: background .15s;
}
.btn-rankear:hover { background: var(--primary-dark); }
.btn-rankear[disabled] { opacity: .6; cursor: wait; }

/* ── Estados ── */
.estado {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 16px;
}
.estado.erro { color: #dc2626; }

/* ── Estatísticas ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-value { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: .72rem; color: var(--text-muted); }

/* ── Ranking ── */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 14px;
}
.rank-pos {
  width: 38px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
  flex-shrink: 0;
}
.rank-row.top1 { border-color: var(--primary); }
.rank-row img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  background: var(--border);
  flex-shrink: 0;
}
.rank-info { flex: 1; min-width: 0; }
.rank-user { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-user .verified { color: #0095f6; font-size: .85em; margin-left: 4px; }
.rank-nome { font-size: .8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-stats { text-align: right; flex-shrink: 0; }
.rank-stat-v { font-weight: 800; color: var(--primary); }
.rank-stat-l { font-size: .68rem; color: var(--text-muted); }
.rank-row.com-erro { opacity: .6; }
.rank-row.com-erro .rank-nome { color: #dc2626; }

@media (max-width: 480px) {
  .stats-grid { gap: 6px; }
  .stat-value { font-size: 1rem; }
}
