/* ─── Design Tokens ──────────────────────────────────────────────────────────── */

:root {
  /* Base palette */
  --color-bg: #08080c;
  --color-surface: #131318;
  --color-surface-hover: #1e1e26;
  --color-border: #1e1e28;
  --color-border-hover: #2e2e3a;

  /* Text */
  --color-text: #eeeef0;
  --color-text-secondary: #9d9daa;
  --color-text-muted: #6b6b7a;
  --color-text-dim: #4a4a58;

  /* Content type colors */
  --color-article: #818cf8;
  --color-gallery: #34d399;
  --color-audio: #fbbf24;
  --color-video: #f87171;

  /* Content type glow (for hover effects) */
  --glow-article: rgba(129, 140, 248, 0.12);
  --glow-gallery: rgba(52, 211, 153, 0.12);
  --glow-audio: rgba(251, 191, 36, 0.12);
  --glow-video: rgba(248, 113, 113, 0.12);

  /* Shared */
  --max-width: 1200px;
  --sidebar-width: 240px;
  --nav-height: 64px;

  /* Typography */
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Admin (unchanged for admin pages) */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-muted: #666;
}

/* Admin theme — restore light colors for admin/login pages */
.admin-theme {
  --color-bg: #fafafa;
  --color-text: #1a1a1a;
  --color-border: #e0e0e0;
  --color-muted: #666;
  background: var(--color-bg);
  color: var(--color-text);
}

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

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

::selection {
  background: rgba(129, 140, 248, 0.3);
  color: #fff;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* ─── Layout ─────────────────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ─── Navigation ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 12, 0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.site-logo:hover {
  color: var(--color-text);
  text-decoration: none;
}

.logo-dot {
  color: var(--color-article);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  margin: 4px 0;
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(8, 8, 12, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .site-nav a {
    padding: 0.6rem 0.75rem;
    width: 100%;
  }

  .site-nav.open {
    display: flex;
  }
}

/* Main */

.site-main {
  flex: 1;
  padding: 2rem 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.footer-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: var(--color-text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}

.footer-nav a:hover {
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.footer-copy {
  color: var(--color-text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  opacity: 0.6;
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero {
  position: relative;
  min-height: calc(55vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: -2rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Ambient glow orbs */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.12) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: orbFloat 20s ease-in-out infinite;
}

.hero::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.08) 0%, transparent 70%);
  bottom: -80px;
  right: -60px;
  animation: orbFloat 25s ease-in-out infinite reverse;
}

/* Noise texture overlay */
.hero > * {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--color-text);
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
  max-width: 420px;
  line-height: 1.7;
  font-weight: 400;
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.12s;
}

.hero-accent {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.24s;
}

.hero-accent a {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s, background 0.3s, transform 0.2s;
  text-decoration: none;
}

.hero-accent a:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.hero-accent .accent-article {
  color: var(--color-article);
}
.hero-accent .accent-article:hover {
  border-color: rgba(129, 140, 248, 0.3);
  background: rgba(129, 140, 248, 0.08);
}

.hero-accent .accent-gallery {
  color: var(--color-gallery);
}
.hero-accent .accent-gallery:hover {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.08);
}

.hero-accent .accent-audio {
  color: var(--color-audio);
}
.hero-accent .accent-audio:hover {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
}

.hero-accent .accent-video {
  color: var(--color-video);
}
.hero-accent .accent-video:hover {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 3.5rem 1.5rem;
  }

  .hero::before {
    width: 300px;
    height: 300px;
  }

  .hero::after {
    width: 250px;
    height: 250px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-accent {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ─── Featured Card ──────────────────────────────────────────────────────────── */

.featured-section {
  margin-top: 3.5rem;
}

.featured-card {
  display: flex;
  align-items: stretch;
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(129, 140, 248, 0.03) 100%);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
  border-color: rgba(129, 140, 248, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(129, 140, 248, 0.05);
  text-decoration: none;
  color: inherit;
}

.featured-card-body {
  flex: 1;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.featured-card-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1.35;
}

.featured-card-summary {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card-date {
  color: var(--color-text-dim);
  font-size: 0.78rem;
  margin-top: auto;
  letter-spacing: 0.02em;
}

.featured-card-cover {
  width: 340px;
  flex-shrink: 0;
  overflow: hidden;
}

.featured-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-card:hover .featured-card-cover img {
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .featured-card {
    flex-direction: column-reverse;
  }

  .featured-card-cover {
    width: 100%;
    height: 200px;
  }

  .featured-card-body {
    padding: 1.5rem;
  }

  .featured-card-title {
    font-size: 1.35rem;
  }
}

/* ─── Feed / Sections ────────────────────────────────────────────────────────── */

.feed-section {
  margin-top: 4rem;
}

.section-heading {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--color-border), transparent);
}

/* ─── Content Grid ───────────────────────────────────────────────────────────── */

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (min-width: 769px) and (max-width: 1024px) {
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Type Labels ────────────────────────────────────────────────────────────── */

.type-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.type-article { color: var(--color-article); }
.type-image { color: var(--color-gallery); }
.type-audio { color: var(--color-audio); }
.type-video { color: var(--color-video); }

/* ─── Visual Card (Gallery, Video) ───────────────────────────────────────────── */

.card-visual {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card-visual:hover {
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}

/* Content-type-aware glow on hover */
.card-visual:has(.type-image):hover {
  border-color: rgba(52, 211, 153, 0.2);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(52, 211, 153, 0.06);
}

.card-visual:has(.type-video):hover {
  border-color: rgba(248, 113, 113, 0.2);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(248, 113, 113, 0.06);
}

.card-visual-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-visual-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-visual:hover .card-visual-cover img {
  transform: scale(1.04);
}

.card-visual-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 0.85rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card-visual-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.card-visual-footer {
  padding: 0.55rem 1rem;
}

.card-visual-footer time {
  font-size: 0.72rem;
  color: var(--color-text-dim);
  letter-spacing: 0.02em;
}

/* ─── Cover Card (Article/Audio with cover image) ──────────────────────────── */

.card-cover {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card-cover:hover {
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}

.card-cover:has(.type-article):hover {
  border-color: rgba(129, 140, 248, 0.2);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(129, 140, 248, 0.06);
}

.card-cover:has(.type-audio):hover {
  border-color: rgba(251, 191, 36, 0.2);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 191, 36, 0.06);
}

.card-cover-image {
  height: 140px;
  overflow: hidden;
}

.card-cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-cover:hover .card-cover-image img {
  transform: scale(1.04);
}

.card-cover-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.15rem 1.15rem;
}

.card-cover-body .card-text-summary {
  -webkit-line-clamp: 2;
}

/* ─── Text Card (Article, Audio) ─────────────────────────────────────────────── */

.card-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.35rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card-text:hover {
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}

/* Content-type-aware glow on hover */
.card-text:has(.type-article):hover {
  border-color: rgba(129, 140, 248, 0.2);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(129, 140, 248, 0.06);
}

.card-text:has(.type-audio):hover {
  border-color: rgba(251, 191, 36, 0.2);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 191, 36, 0.06);
}

.card-text-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-text-header time {
  font-size: 0.72rem;
  color: var(--color-text-dim);
  letter-spacing: 0.02em;
}

.card-text-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.card-text-summary {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.audio-icon {
  margin-right: 0.25rem;
  font-size: 0.6em;
}

/* ─── Page Headers ───────────────────────────────────────────────────────────── */

.page-header {
  margin-bottom: 2rem;
}

.page-header-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-header-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.5rem;
  border-radius: 2px;
}

.page-header-title.type-article::before { background: var(--color-article); }
.page-header-title.type-image::before { background: var(--color-gallery); }
.page-header-title.type-audio::before { background: var(--color-audio); }
.page-header-title.type-video::before { background: var(--color-video); }

/* ─── Article Detail ─────────────────────────────────────────────────────────── */

.article-detail {
  max-width: 720px;
  margin: 0 auto;
}

.article-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-text-dim);
  font-size: 0.875rem;
}

.article-body {
  max-width: 720px;
  line-height: 1.8;
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.article-body h1 { font-size: 2rem; }
.article-body h2 { font-size: 1.5rem; }
.article-body h3 { font-size: 1.25rem; }

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body blockquote {
  border-left: 4px solid var(--color-border);
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  background: var(--color-surface);
  border-radius: 0 8px 8px 0;
  color: var(--color-text-muted);
}

.article-body pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: #d4d4d4;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.article-body code {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.875em;
  background: var(--color-surface);
  padding: 0.15em 0.35em;
  border-radius: 4px;
  color: var(--color-text);
}

.article-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.article-body img {
  border-radius: 8px;
  margin: 1.25rem 0;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.article-body th,
.article-body td {
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.article-body th {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text);
}

.article-body a {
  color: var(--color-article);
}

.article-body a:hover {
  color: #818cf8;
}

/* ─── Media Detail Pages ─────────────────────────────────────────────────────── */

.media-detail {
  max-width: 960px;
  margin: 0 auto;
}

.media-detail-header {
  margin-bottom: 1.5rem;
}

.media-detail-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.media-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-dim);
  font-size: 0.875rem;
}

.media-detail-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.media-detail-description {
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 1rem;
  max-width: 720px;
}

.audio-player {
  margin: 1.5rem 0;
}

.audio-player audio {
  width: 100%;
  border-radius: 8px;
  outline: none;
}

.video-player {
  margin-bottom: 1.5rem;
}

.video-player video {
  width: 100%;
  border-radius: 12px;
  outline: none;
  background: #000;
}

.audio-cover-image {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

/* ─── Audio / Video Players ──────────────────────────────────────────────────── */

audio,
video {
  width: 100%;
  border-radius: 4px;
  outline: none;
}

/* ─── Tags ───────────────────────────────────────────────────────────────────── */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
  border: none;
  border-radius: 12px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.15s;
}

.tag:hover {
  background: var(--color-border-hover);
  text-decoration: none;
}

/* ─── Pagination ─────────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
}

.pagination a:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
  color: var(--color-text);
  text-decoration: none;
}

.pagination .active {
  background: rgba(129, 140, 248, 0.1);
  color: var(--color-article);
  border-color: rgba(129, 140, 248, 0.2);
  font-weight: 600;
}

.pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Admin Layout ───────────────────────────────────────────────────────────── */

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-width);
  background: #1e293b;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
}

.admin-sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #334155;
}

.admin-sidebar-logo {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.admin-sidebar-logo:hover {
  color: #fff;
  text-decoration: none;
}

.admin-sidebar-nav {
  padding: 0.75rem 0;
  flex: 1;
}

.admin-nav-group {
  margin-bottom: 0.5rem;
}

.admin-nav-label {
  padding: 0.4rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #94a3b8;
  transition: background 0.15s, color 0.15s;
}

.admin-nav-link:hover {
  background: #334155;
  color: #f1f5f9;
  text-decoration: none;
}

.admin-nav-link.active {
  background: #334155;
  color: #fff;
  font-weight: 600;
}

.admin-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header-title {
  font-size: 1rem;
  font-weight: 600;
}

.admin-main {
  flex: 1;
  padding: 1.5rem;
}

/* ─── Admin Toolbar and Filters ──────────────────────────────────────────────── */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-chip {
  padding: 0.3rem 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ─── Stats Grid ─────────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Media Grid ─────────────────────────────────────────────────────────────── */

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

.media-grid-item {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.media-grid-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.media-grid-thumb {
  aspect-ratio: 1;
  background: #f5f5f5;
  overflow: hidden;
}

.media-grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-grid-info {
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.media-grid-name {
  font-weight: 500;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Forms ──────────────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.form-label.required::after {
  content: " *";
  color: #ef4444;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  line-height: 1.5;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-control:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.7;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 0.3rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: #f5f5f5;
  color: var(--color-text);
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

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

.btn-ghost:hover {
  background: #f0f0f0;
  color: var(--color-text);
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ─── Tables ─────────────────────────────────────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #f8f9fa;
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
}

td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: #f9fafb;
}

/* ─── Login Wrapper ──────────────────────────────────────────────────────────── */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 1.5rem;
}

.login-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--color-muted);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.6rem 0.875rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ─── Token Display ──────────────────────────────────────────────────────────── */

.token-display {
  background: #f8f9fa;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.6rem 0.875rem;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--color-text);
}

.token-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.token-row .token-display {
  flex: 1;
}

/* ─── Tags Admin ─────────────────────────────────────────────────────────────── */

.tags-admin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-admin-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0f4ff;
  border: 1px solid #c7d8fd;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}

.tag-admin-item .tag-count {
  background: #c7d8fd;
  color: var(--color-primary);
  border-radius: 10px;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-admin-item .tag-delete {
  color: #9ca3af;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s;
}

.tag-admin-item .tag-delete:hover {
  color: #ef4444;
}

/* ─── Quick Create Links ─────────────────────────────────────────────────────── */

.quick-create {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.quick-create-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem;
  background: #fff;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  color: var(--color-muted);
  font-size: 0.875rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
}

.quick-create-link:hover {
  background: #f0f4ff;
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

.quick-create-link .icon {
  font-size: 1.5rem;
}

/* ─── About Page ─────────────────────────────────────────────────────────────── */

.about-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.about-page h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  color: var(--color-text);
}

.about-page h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.about-page p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-size: 1.0625rem;
  margin-bottom: 1.25rem;
}

.about-intro {
  font-size: 1.25rem;
  color: var(--color-text);
}

.about-divider {
  border: none;
  border-top: 1px solid var(--color-surface);
  margin: 2.5rem 0;
}

.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-pillar h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.about-pillar p {
  margin-bottom: 0;
}

.about-cta {
  color: var(--color-text-muted);
  font-style: italic;
}

/* ─── Utility ────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: #dcfce7;
  color: #16a34a;
}

.badge-warning {
  background: #fef9c3;
  color: #ca8a04;
}

.badge-info {
  background: #dbeafe;
  color: #2563eb;
}

.badge-muted {
  background: #f3f4f6;
  color: var(--color-muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1.5rem 0;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Admin */
  .admin-sidebar {
    display: none;
  }

  .admin-content {
    margin-left: 0;
  }

  /* Public */
  .article-title {
    font-size: 1.75rem;
  }

  .featured-card-body {
    padding: 1.25rem;
  }

  .featured-card-title {
    font-size: 1.25rem;
  }

  .media-detail-title {
    font-size: 1.5rem;
  }

  .page-header-title {
    font-size: 1.5rem;
  }
}
