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

:root {
  --bg: #030603;
  --panel: rgba(7, 11, 7, 0.86);
  --panel-soft: rgba(255, 255, 255, 0.035);
  --border: rgba(57, 213, 21, 0.16);
  --border-soft: rgba(255, 255, 255, 0.08);
  --green: #39d515;
  --green-soft: rgba(57, 213, 21, 0.12);
  --text: #ffffff;
  --muted: #b8c7b8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42), 0 0 70px rgba(57, 213, 21, 0.06);
  --radius: 26px;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(57, 213, 21, 0.14), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(57, 213, 21, 0.08), transparent 30%),
    var(--bg);
  overflow-x: hidden;
}

body::before,
.background-grid {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(57, 213, 21, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 213, 21, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.background-grid {
  z-index: 0;
}

a {
  color: inherit;
}

/* =========================
   INDEX / LANDING
========================= */

.hero {
  position: relative;
  z-index: 1;

  min-height: 100vh;

  display: flex;
  flex-direction: column; /* isso deixa logo em cima e card embaixo */

  align-items: center;
  justify-content: center;

  gap: 24px;

  padding: 40px 20px;
}

.hero-card {
  width: min(1080px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-left {
  width: 100%;
}

.home-hero {
  width: 100%;
  display: flex;
  justify-content: center;
}

.home-badge-logo {
  width: min(380px, 90vw);
  height: auto;
}

.home-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

h1 {
  max-width: 760px;
  margin: 0 auto 16px;
  text-align: center;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -2.5px;
}

.highlight {
  color: var(--green);
}

.description {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.button {
  position: relative;
  min-height: 176px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(57, 213, 21, 0.13), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.button:hover {
  transform: translateY(-4px);
  border-color: rgba(57, 213, 21, 0.34);
  box-shadow: 0 0 30px rgba(57, 213, 21, 0.10);
}

.button:hover::before {
  opacity: 1;
}

.button-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.button-tag {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.button-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(57, 213, 21, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.button-title {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.button-desc {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* =========================
   LOGIN / CHANGE PASSWORD
   usa o HTML atual: home-shell, home-card, create-box, form-section
========================= */

.home-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 20px;
}

.home-shell > .home-hero {
  margin-bottom: 0;
}

.home-shell > .home-card {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.home-card h1 {
  max-width: 100%;
  margin: 0 0 14px;
  text-align: center;
  font-size: clamp(42px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -2px;
}

.home-card p {
  color: var(--muted);
  line-height: 1.65;
  text-align: center;
  font-size: 15px;
}

.create-box,
.form-section {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
}

.create-box label,
.form-section label {
  color: #e8ffe8;
  font-size: 14px;
  font-weight: 800;
}

.create-box input,
.form-section input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  font-size: 15px;
}

.create-box input:focus,
.form-section input:focus {
  border-color: rgba(57, 213, 21, 0.75);
  box-shadow: 0 0 0 4px rgba(57, 213, 21, 0.12);
}

.create-row {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

button,
.create-row button,
.form-section button {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 13px 14px;
  background: var(--green);
  color: #071007;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

button:hover,
.create-row button:hover,
.form-section button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

#loginMessage,
#passwordMessage {
  min-height: 20px;
  margin-top: 4px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   FOOTER
========================= */

.home-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 20px 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.34);
  font-size: 13px;
}

.home-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-footer a:hover {
  color: #fff;
}

.home-shell #footer .home-footer {
  padding: 6px 20px 0;
}

/* =========================
   RESPONSIVO
========================= */

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .buttons {
    grid-template-columns: 1fr;
  }

  .button {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .hero {
    padding: 16px 12px 12px;
  }

  .hero-card,
  .home-shell > .home-card {
    padding: 20px;
    border-radius: 22px;
  }

  .home-badge-logo {
    width: min(260px, 82vw);
  }

  h1,
  .home-card h1 {
    letter-spacing: -1.6px;
  }

  .description {
    margin-bottom: 26px;
    font-size: 15px;
  }

  .button {
    padding: 20px;
  }

  .home-shell {
    padding: 24px 14px;
  }
}

/* =========================
   ADMIN / EDITOR DE NOTÍCIAS
========================= */
.news-admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.news-admin-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.eyebrow,
.section-title span,
.field span,
.links-heading span,
.news-status-card span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-admin-shell h1,
.news-admin-shell h2,
.news-admin-shell h3,
.news-admin-shell p {
  margin-top: 0;
}

.news-admin-shell h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 0.95;
}

.news-admin-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.news-status-card,
.news-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.news-status-card {
  min-width: 220px;
  padding: 22px;
}

.news-status-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.news-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 22px;
}

.news-panel {
  padding: 24px;
}

.section-title h2 {
  margin: 5px 0 20px;
  font-size: 26px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.news-admin-shell input,
.news-admin-shell textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

.news-admin-shell input:focus,
.news-admin-shell textarea:focus {
  border-color: rgba(57, 213, 21, 0.7);
}

.links-box {
  margin: 22px 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.links-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.links-heading small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.links-list {
  display: grid;
  gap: 10px;
}

.link-row {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr auto;
  gap: 8px;
  align-items: center;
}

.remove-link {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.news-admin-shell button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 900;
}

.primary-btn {
  background: var(--green);
  color: #061006;
}

.secondary-btn {
  background: rgba(57, 213, 21, 0.12);
  color: var(--text);
  border: 1px solid rgba(57, 213, 21, 0.35);
}

.ghost-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.dynamic-html-preview {
  min-height: 280px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.news-card-dynamic {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(57, 213, 21, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(57, 213, 21, 0.25);
}

.news-card-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.news-card-body {
  padding: 20px;
}

.news-card-tag {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(57, 213, 21, 0.14);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.news-card-body h3 {
  margin-bottom: 10px;
  font-size: 24px;
}

.news-card-body p {
  color: var(--muted);
  line-height: 1.6;
}

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

.news-card-actions a {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--green);
  color: #061006;
  text-decoration: none;
  font-weight: 900;
}

.html-output {
  margin-top: 18px;
}

.html-output summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 900;
  margin-bottom: 10px;
}

.html-output textarea {
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

@media (max-width: 900px) {
  .news-admin-hero {
    display: grid;
  }

  .news-grid-layout {
    grid-template-columns: 1fr;
  }

  .link-row {
    grid-template-columns: 1fr;
  }

  .remove-link {
    width: 100%;
  }
}

.news-admin-shell .actions button,
.news-admin-shell .links-heading button {
  width: auto;
}
