:root {
  --bg: #050509;
  --bg-elevated: #11111a;
  --bg-elevated-soft: #181821;
  --accent: #46b4ff;
  --accent-soft: #203647;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #1f2933;
  --card-radius: 18px;
  --shadow-soft: 0 18px 45px rgba(0,0,0,0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1b2335 0, #050509 55%);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(5,5,9,0.9), rgba(5,5,9,0.6));
  border-bottom: 1px solid var(--border);
}

.navbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(70,180,255,0.8);
}

.nav-links {
  display: flex;
  gap: 0.9rem;
  font-size: 0.85rem;
}

.nav-links a {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-links a.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

main {
  max-width: 1100px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1.1fr);
  gap: 1.5rem;
}

.card {
  background: radial-gradient(circle at top left, #232334 0, var(--bg-elevated) 55%);
  border-radius: var(--card-radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.03);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
}

.page-subtitle {
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.video-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  margin-bottom: 1rem;
  aspect-ratio: 16 / 9;
}

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

.description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  white-space: pre-wrap;
}

.hidden-thumbnail {
  display: none;
}

.related-section {
  margin-top: 1.2rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.related-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
}

.related-card {
  background: var(--bg-elevated-soft);
  border-radius: 12px;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.related-thumb {
  width: 100%;
  border-radius: 9px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.04);
}

.related-title-text {
  font-size: 0.82rem;
  color: var(--text);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-block-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.sidebar-list a {
  color: var(--text-muted);
  text-decoration: none;
}

.sidebar-list a:hover {
  color: var(--accent);
}

.grid-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.post-card {
  background: var(--bg-elevated-soft);
  border-radius: 16px;
  padding: 0.6rem;
  border: 1px solid rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.post-thumb {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.05);
}

.post-title {
  font-size: 0.95rem;
  font-weight: 550;
}

.post-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.post-description {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.page-link {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
}

.page-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-link.current {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

@media (max-width: 840px) {
  main {
    grid-template-columns: minmax(0, 1fr);
  }
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.sidebar-about-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.sidebar-ad-slot {
  min-height: 120px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.75rem;
}

/* Main content ad slot */
.ad-banner-main {
  margin: 1.2rem 0 0.8rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.2);
  background: rgba(15,23,42,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
