:root {
  --bg: #050805;
  --bg-secondary: #0b120b;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --surface-soft: rgba(0, 0, 0, 0.26);
  --text: #ffffff;
  --text-muted: #b8c7b8;
  --text-soft: #e8ffe8;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --primary: #39d515;
  --primary-hover: #2fb812;
  --danger: #ff5b5b;
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 14px 30px rgba(0, 0, 0, 0.28);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(57, 213, 21, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(57, 213, 21, 0.08), transparent 28%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 80%);
}

body,
a,
button {
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* =========================
   Layout base
========================= */

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.hero-section,
.section-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.section-block {
  margin-top: 22px;
  padding: 28px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading span,
.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.row-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

/* =========================
   Topbar
========================= */

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid var(--border);
}

.brand,
.topbar-links,
.hero-actions,
.filter-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.home-badge-logo {
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
}

.topbar-links {
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.topbar-links a {
  padding: 10px 12px;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}

.topbar-links a:hover {
  color: var(--text);
  background: var(--surface-strong);
}

/* =========================
   Hero
========================= */

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  top: -140px;
  right: -140px;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(57, 213, 21, 0.12);
  filter: blur(4px);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 60px 36px 42px;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 650px;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-card {
  align-self: end;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: var(--shadow-md);
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 26px rgba(57, 213, 21, 0.75);
}

.hero-card h2 {
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.hero-card p {
  color: var(--text-muted);
  line-height: 1.55;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.hero-stats article {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.hero-stats strong {
  display: block;
  font-size: 1.6rem;
}

.hero-stats span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

/* =========================
   Buttons
========================= */

.primary-btn,
.secondary-btn,
.card-btn,
.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition),
    opacity var(--transition);
}

.primary-btn,
.card-btn {
  color: #071007;
  background: var(--primary);
}

.primary-btn:hover,
.card-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.secondary-btn,
.filter-btn,
.card-btn.secondary {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.07);
}

.secondary-btn:hover,
.filter-btn:hover,
.filter-btn.active {
  border-color: rgba(57, 213, 21, 0.32);
  background: rgba(57, 213, 21, 0.14);
}

.filter-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  min-height: 40px;
  padding: 10px 12px;
  font-size: 0.85rem;
}

/* =========================
   Cards e grids
========================= */

.link-grid,
.tournament-grid,
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card,
.tournament-card,
.about-grid article,
.message-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.24);
}

.tool-card,
.tournament-card {
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.tool-card:hover,
.tournament-card:hover {
  border-color: rgba(57, 213, 21, 0.35);
  background: rgba(57, 213, 21, 0.07);
  transform: translateY(-3px);
}

.tool-card strong,
.tournament-card h3,
.about-grid h3 {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 1rem;
}

.tool-card span,
.tournament-card p,
.about-grid p,
.message-card {
  color: var(--text-muted);
  line-height: 1.55;
}

.message-card {
  margin-bottom: 14px;
}

.message-card[hidden] {
  display: none;
}

.message-card code {
  color: var(--primary);
}

.tournament-card {
  display: grid;
  gap: 12px;
}

.tournament-meta,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions {
  gap: 10px;
  margin-top: 4px;
}

.card-btn {
  min-height: 42px;
  padding: 10px 14px;
  font-size: 0.86rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 900;
}

.badge.active {
  color: var(--primary);
  border-color: rgba(57, 213, 21, 0.35);
}

.badge.finished {
  color: #8fdcff;
  border-color: rgba(143, 220, 255, 0.35);
}

.badge.archived {
  color: #d7b5ff;
  border-color: rgba(215, 181, 255, 0.35);
}

.home-footer {
  margin-top: 18px;
  color: var(--text-muted);
  text-align: center;
}

.home-footer a {
  color: var(--text-muted);
}

/* =========================
   Notícias dinâmicas
========================= */

.news-section {
  position: relative;
  overflow: hidden;
}

.dynamic-html-slot {
  display: grid;
  gap: 14px;
  align-items: start;
}

.dynamic-html-slot :where(h1, h2, h3) {
  color: var(--text-soft);
  letter-spacing: -0.03em;
}

.dynamic-html-slot :where(p, li, span) {
  color: var(--text-muted);
  line-height: 1.65;
}

.dynamic-html-slot :where(a) {
  color: var(--primary);
  font-weight: 900;
}

.dynamic-empty-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.dynamic-empty-card strong {
  color: var(--text-soft);
}

.dynamic-empty-card span {
  color: var(--text-muted);
}

.news-card,
.dynamic-html-slot > article,
.dynamic-html-slot > .news-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(57, 213, 21, 0.35);
  border-radius: 18px;
  background: rgba(12, 31, 12, 0.96);
}

.news-card-image,
.news-card img,
.dynamic-html-slot > article img,
.dynamic-html-slot > .news-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 210px;
  object-fit: cover;
  object-position: center;
}

.news-card-body {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.news-card-tag,
.news-card .news-badge,
.news-card .badge,
.news-card [class*="badge"] {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(57, 213, 21, 0.14);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.news-card h1,
.news-card h2,
.news-card h3,
.dynamic-html-slot > article :is(h1, h2, h3),
.dynamic-html-slot > .news-card :is(h1, h2, h3) {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.news-card p,
.news-card li,
.news-card span,
.dynamic-html-slot > article :is(p, li, span),
.dynamic-html-slot > .news-card :is(p, li, span) {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.45;
}

.news-card ul,
.news-card ol,
.dynamic-html-slot > article :is(ul, ol),
.dynamic-html-slot > .news-card :is(ul, ol) {
  display: grid;
  gap: 4px;
  padding-left: 0;
  list-style: none;
}

.news-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.news-card-actions a,
.news-card a,
.dynamic-html-slot > article a,
.dynamic-html-slot > .news-card a {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #061006;
  background: var(--primary);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.news-card-actions a:hover,
.news-card a:hover,
.dynamic-html-slot > article a:hover,
.dynamic-html-slot > .news-card a:hover {
  background: var(--primary-hover);
}

.news-grid,
.dynamic-html-slot .news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.news-date {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(57, 213, 21, 0.12);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

/* =========================
   Responsivo
========================= */

@media (max-width: 920px) {
  .hero-content,
  .link-grid,
  .tournament-grid,
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-card {
    align-self: stretch;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .topbar,
  .row-heading {
    flex-direction: column;
  }

  .topbar-links {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    justify-content: space-between;
  }

  .hero-content,
  .link-grid,
  .tournament-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-content,
  .section-block {
    padding: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 14vw, 4rem);
  }

  .news-card,
  .dynamic-html-slot > article,
  .dynamic-html-slot > .news-card {
    width: 100%;
    max-width: 100%;
  }
}
