:root {
  --bg: #09090b;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #6366f1;
  --card-border: rgba(148, 163, 184, 0.14);
}

/* Base background */
body {
  min-height: 100vh;
  color: var(--text);

  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.28), transparent 32%),
    radial-gradient(circle at 92% 0%, rgba(190, 24, 93, 0.22), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(132, 204, 22, 0.14), transparent 38%),
    var(--bg);

  background-attachment: fixed;
}

/* Header */
header {
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.16), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(190, 24, 93, 0.14), transparent 34%),
    rgba(9, 9, 11, 0.78);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid rgba(63, 63, 70, 0.65);
}

/* Universal glass card */
.theme-glass-card,
.theme-card,
.sidebar-card {
  background:
    linear-gradient(
      135deg,
      rgba(30, 41, 59, 0.72),
      rgba(24, 24, 27, 0.82)
    );

  border: 1px solid var(--card-border);
  border-radius: 24px;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.theme-glass-card:hover,
.theme-card:hover {
  border-color: rgba(129, 140, 248, 0.45);
}

/* Sidebar wrapper */
.theme-sidebar-box {
  padding: 28px;
}

/* Sidebar titles */
.theme-sidebar-title {
  margin: 0 0 22px 4px;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

/* Categories */
.theme-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.theme-category-link,
.theme-category-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;

  border: 0;
  border-radius: 14px;
  padding: 12px 14px;

  background: transparent;
  color: #d4d4d8;

  text-decoration: none;
  font: inherit;
  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.theme-category-link:hover,
.theme-category-button:hover {
  background: rgba(39, 39, 42, 0.9);
  color: #fff;
}

.theme-category-sub {
  display: none;
  margin: 8px 0 10px 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(63, 63, 70, 0.7);
}

.theme-category-list li.open > .theme-category-sub {
  display: block;
}

.theme-category-arrow {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.theme-category-list li.open > .theme-category-button .theme-category-arrow {
  transform: rotate(90deg);
}

/* Tags */
.theme-tags-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.theme-tag {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 42px;
  border-radius: 14px;

  background: rgba(39, 39, 42, 0.9);
  color: #f4f4f5;

  text-decoration: none;
  font-size: 15px;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.theme-tag:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Ads */
.theme-ad-box {
  height: 300px;
  border-radius: 20px;

  background: rgba(39, 39, 42, 0.9);

  display: flex;
  align-items: center;
  justify-content: center;

  color: #8b8b9a;
  font-size: 18px;
}

/* Links */
.theme-link {
  color: #d4d4d8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.theme-link:hover {
  color: #fff;
}

/* Code blocks */
pre {
  margin: 24px 0;
  padding: 20px;
  overflow-x: auto;

  background: rgba(17, 24, 39, 0.92);
  border: 1px solid rgba(63, 63, 70, 0.85);
  border-radius: 20px;

  color: #e4e4e7;

  font-size: 14px;
  line-height: 1.7;
}

pre code {
  background: transparent;
  padding: 0;
  border: 0;

  color: inherit;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
}

code {
  padding: 2px 6px;

  background: #27272a;
  border-radius: 6px;

  color: #c4b5fd;

  font-size: 13px;
}

/* Mobile */
@media (max-width: 1024px) {
  .theme-sidebar-box {
    padding: 22px;
  }

  .theme-tags-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}