:root {
  --bg-base: #06090f;
  --border: rgba(255, 255, 255, 0.07);
  --text-primary: #f1f5f9;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --primary: #0ea5e9;
  --primary-deep: #2563eb;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
}

.btn-primary,
.btn-ghost,
.btn-diagnosis {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  transition: opacity 0.2s, transform 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-weight: 600;
  padding: 9px 20px;
  font-size: 14px;
  box-shadow: 0 0 30px rgba(14, 165, 233, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  font-weight: 500;
  padding: 9px 20px;
  font-size: 14px;
  border: 1px solid var(--border);
}

.btn-ghost:hover { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.2); }

.btn-diagnosis {
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 52%, #fb923c 100%);
  color: #1a1208;
  font-weight: 700;
  padding: 9px 18px;
  font-size: 14px;
}

#navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 1000;
  background: rgba(6, 9, 15, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text-primary);
}

.nav-media-link {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
}

.nav-media-badge {
  position: relative;
  top: -9px;
  margin-left: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  color: #1a1208;
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 52%, #fb923c 100%);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.5);
  white-space: nowrap;
  transform: rotate(-4deg);
}

.nav-cta-desktop {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.mobile-menu-btn:hover,
.mobile-menu-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  visibility: hidden;
}

.mobile-menu.is-open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 15, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-menu.is-open .mobile-menu-backdrop {
  opacity: 1;
}

.mobile-menu-panel {
  position: absolute;
  top: 88px;
  left: 20px;
  right: 20px;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(13, 19, 34, 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu.is-open .mobile-menu-panel {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-links a {
  display: block;
  padding: 14px 12px;
  border-radius: 10px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.mobile-menu-links a:hover,
.mobile-menu-links a:active,
.mobile-menu-links a.is-active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.mobile-menu-cta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-menu-cta .btn-ghost,
.mobile-menu-cta .btn-primary,
.mobile-menu-cta .btn-diagnosis {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.media-page {
  position: relative;
  z-index: 1;
  padding: 120px 24px 48px;
}

.media-page-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.media-hero {
  margin-bottom: 20px;
}

.media-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
}

.media-hero p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 760px;
}

.media-panel {
  background: #ffffff;
  color: #1f2937;
  border-radius: 12px;
  padding: 18px 20px 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.media-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.media-filter-row:last-child {
  border-bottom: 0;
}

.media-filter-label {
  width: 72px;
  flex-shrink: 0;
  padding-top: 4px;
  color: #666;
  font-size: 13px;
}

.media-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  flex: 1;
}

.media-filter-tag {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-weight: 500;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.media-filter-tag:hover {
  color: #0f172a;
  background: rgba(14, 165, 233, 0.08);
}

.media-filter-tag.is-active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.28);
}

.media-filter-tag.is-active:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.34);
}

.media-type-row {
  align-items: center;
}

.media-type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}

.media-type-btn {
  border: 0;
  background: rgba(148, 163, 184, 0.14);
  color: #475569;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.media-type-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  color: #1a1208;
  background: rgba(253, 230, 138, 0.35);
}

.media-type-btn.is-active {
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 52%, #fb923c 100%);
  color: #1a1208;
  font-weight: 700;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.42);
}

.media-type-btn.is-active:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 0 36px rgba(251, 146, 60, 0.55);
}

.media-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0 10px;
  color: var(--text-dim);
  font-size: 13px;
}

.media-table-wrap {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.media-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.media-table thead {
  background: rgba(255, 255, 255, 0.04);
}

.media-table th,
.media-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.media-table th {
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
}

.media-table td {
  color: var(--text-primary);
  line-height: 1.6;
}

.media-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.media-table a {
  color: #7dd3fc;
  text-decoration: none;
}

.media-table a:hover {
  text-decoration: underline;
}

.media-note {
  max-width: 280px;
  color: var(--text-dim);
}

.media-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.media-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  cursor: pointer;
}

.media-page-btn:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
}

.media-page-btn.is-active {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-color: transparent;
  color: #fff;
}

.media-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.site-footer {
  padding: 56px 24px 28px;
  background: #040710;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.site-footer h4 {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-dim);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 10px;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}

.site-footer a:hover {
  color: #94a3b8;
}

.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 960px) {
  #navbar {
    top: 10px;
    width: calc(100% - 24px);
  }

  .nav-inner {
    padding: 12px 16px;
  }

  .nav-logo {
    font-size: 18px;
  }

  .nav-links,
  .nav-cta-desktop {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .site-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .media-table-wrap {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .media-filter-row {
    flex-direction: column;
  }

  .media-filter-label {
    width: auto;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
  }
}
