:root {
  --bg: #0b0b10;
  --surface: #16161e;
  --surface-2: #1f1f29;
  --text: #f4f4f8;
  --text-muted: #9696a6;
  --accent: #ff3860;
  --accent-2: #ffc93f;
  --accent-grad: linear-gradient(135deg, #ff3860 0%, #ff7a3d 100%);
  --border: #2a2a36;
  --radius: 16px;
  --shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(circle at 20% 0%, rgba(255,56,96,0.08), transparent 40%),
                     radial-gradient(circle at 80% 10%, rgba(255,201,63,0.06), transparent 35%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo { font-family: "Poppins", "Inter", sans-serif; }

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  background: #000;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.topbar-inner { padding: 7px 20px; }

header.site-header {
  background: rgba(11,11,16,0.85);
  backdrop-filter: blur(14px);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

header.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.logo span {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo small {
  font-family: "Inter", sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
}

nav.categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav.categories a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 7px 14px;
  border-radius: 20px;
  transition: all 0.15s ease;
}

nav.categories a:hover { background: var(--surface-2); color: var(--text); }

form.search-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

form.search-form input {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  background: var(--surface-2);
  color: var(--text);
  min-width: 160px;
}

form.search-form input::placeholder { color: var(--text-muted); }

form.search-form button {
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-grad);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

main { padding: 30px 0 60px; min-height: 60vh; }

.page-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title::before {
  content: "";
  width: 6px;
  height: 26px;
  background: var(--accent-grad);
  border-radius: 3px;
  display: inline-block;
}

/* Hero destaque */
.hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 36px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(5,5,8,0.95) 95%);
}

.hero .hero-body {
  position: relative;
  z-index: 1;
  padding: 36px;
  max-width: 720px;
}

.hero .category-tag { margin-bottom: 14px; }

.hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.15;
}

.hero p { color: #d8d8e2; font-size: 1.05rem; margin: 0 0 12px; max-width: 580px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 40px 0 18px;
}

.trending-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 10px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.post-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

.post-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }

.post-card .thumb-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); }

.post-card .thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-card:hover .thumb { transform: scale(1.06); }

.hot-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 10px rgba(255,56,96,0.4);
}

.play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: rgba(0,0,0,0.25);
}

.post-card:hover .play-badge { opacity: 1; }

.play-badge svg { width: 46px; height: 46px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }

.post-card .body { padding: 16px 18px; }

.post-card .category-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #15151c;
  background: var(--accent-2);
  padding: 3px 11px;
  border-radius: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.post-card h2 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
}

.post-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.meta { color: var(--text-muted); font-size: 0.78rem; margin-top: 12px; display: flex; gap: 6px; align-items: center; }

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.pagination a, .pagination span {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.post-detail { max-width: 760px; margin: 0 auto; }
.post-detail h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; margin: 14px 0 10px; line-height: 1.25; }
.post-detail .meta { margin-bottom: 0; }

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
  background: #000;
}

.video-wrap iframe {
  width: 100%; height: 100%; border: 0;
}

.post-content { font-size: 1.05rem; }
.post-content img { max-width: 100%; border-radius: var(--radius); }

.related-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.comments { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 24px; }

.comment {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
}

.comment .author { font-weight: 700; color: var(--accent-2); }

.comment-form { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; max-width: 500px; }

.comment-form input, .comment-form textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
}

.btn.secondary { background: var(--surface-2); }
.btn.danger { background: #b23b4d; }

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  background: var(--surface);
}

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  background: #223a2a;
  color: #8fe3ac;
}

.alert.error { background: #3a2222; color: #f3a0a0; }

/* Admin */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px;
  flex-shrink: 0;
}
.admin-sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-weight: 600;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--surface-2); color: var(--text); }
.admin-content { flex: 1; padding: 30px; }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td {
  text-align: left; padding: 10px; border-bottom: 1px solid var(--border);
}
table.admin-table th { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; }

.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea, .form-group select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
}
.form-group textarea { min-height: 220px; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

.login-box {
  max-width: 360px;
  margin: 80px auto;
  background: var(--surface);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; }
.badge.pending { background: #3a3220; color: var(--accent-2); }
.badge.approved { background: #223a2a; color: #8fe3ac; }

@media (max-width: 720px) {
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; }
}
