@font-face {
  font-family: "Inter";
  src: url("/ct/fonts/Inter-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #070d12;
  --bg-card: rgba(14, 23, 34, 0.7);
  --ink: #e8f1f5;
  --ink-dim: #93a7b4;
  --ink-faint: #64798a;
  --teal: #3fbfad;
  --teal-light: #5eead4;
  --violet: #7c8cf8;
  --amber: #f0b64a;
  --edge: rgba(255, 255, 255, 0.08);
  --edge-lit: rgba(63, 191, 173, 0.4);
  --r-lg: 16px;
  --r-md: 10px;
  --r-sm: 6px;
}
:root[data-theme="light"] {
  --bg: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --ink: #0f172a;
  --ink-dim: #475569;
  --ink-faint: #94a3b8;
  --edge: rgba(0, 0, 0, 0.08);
  --edge-lit: rgba(14, 124, 123, 0.4);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  font: 15px/1.7 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  transition: background .2s, color .2s;
}
a { color: var(--teal); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal-light); }
.aurora {
  position: fixed;
  top: 0; left: 0; right: 0; height: 350px;
  background: radial-gradient(ellipse 60% 50% at 50% -20%, rgba(63, 191, 173, 0.15), transparent 70%),
              radial-gradient(ellipse 40% 40% at 80% -10%, rgba(124, 140, 248, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--edge);
}
/* Topbar */
header.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--edge);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(7, 13, 18, 0.85);
}
:root[data-theme="light"] header.topbar {
  background: rgba(248, 250, 252, 0.85);
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand svg { width: 34px; height: 34px; }
.brand-text strong { display: block; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em; }
.brand-text span { font-size: 0.75rem; color: var(--ink-dim); }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.iconbtn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--edge);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.iconbtn:hover { background: rgba(63, 191, 173, 0.15); border-color: var(--teal); }
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
  display: none;
}
.iconbtn-dot.is-active {
  display: block;
}
.btn {
  background: var(--teal);
  color: #070d12;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all .2s;
}
.btn.ghost {
  background: rgba(255,255,255,0.05);
  color: var(--ink);
  border: 1px solid var(--edge);
}
.btn.ghost:hover {
  background: rgba(63, 191, 173, 0.15);
  border-color: var(--teal);
}
.btn-ico { width: 16px; height: 16px; }

/* Search Backdrop */
.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s cubic-bezier(.16, 1, .3, 1);
}
.search-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Search Panel */
.search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(7, 13, 18, 0.95);
  border-bottom: 1px solid var(--edge-lit);
  padding: 1rem 1.5rem;
  backdrop-filter: blur(16px);
  z-index: 99;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .22s cubic-bezier(.16, 1, .3, 1),
              transform .22s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.search-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
:root[data-theme="light"] .search-panel {
  background: rgba(248, 250, 252, 0.95);
}
.search-wrap {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 14px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--teal, #3fbfad);
  pointer-events: none;
  z-index: 2;
}
.search-wrap input {
  width: 100%;
  padding-block: 0.75rem;
  padding-left: 44px;
  padding-right: 44px;
  border-radius: var(--r-md);
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
  direction: ltr;
  text-align: left;
  transition: border-color .2s, box-shadow .2s;
}
.search-wrap input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(63, 191, 173, 0.2);
}
.search-wrap input::-webkit-search-cancel-button,
.search-wrap input::-webkit-search-decoration,
.search-wrap input::-webkit-search-results-button,
.search-wrap input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}
.search-close {
  position: absolute;
  right: 14px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  z-index: 2;
  transition: color .18s, background .18s;
}
.search-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  position: relative;
  z-index: 1;
}
.hero {
  border-radius: var(--r-lg);
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.hero h1 {
  font-size: 1.85rem;
  line-height: 1.3;
  margin: 0 0 0.85rem;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 1.05rem;
  color: var(--ink-dim);
  max-width: 840px;
  margin: 0;
  line-height: 1.7;
}
/* Chips */
.cat-bar {
  margin-bottom: 1.5rem;
}
.subcat-chips {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.subcat-chips .chip {
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--edge);
  color: var(--ink-dim);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all .2s;
}
.chip:hover {
  background: rgba(255,255,255,0.08);
  color: var(--ink);
}
.chip.active {
  background: var(--teal);
  color: #070d12;
  border-color: var(--teal);
}
.chip .badge {
  background: rgba(0,0,0,0.25);
  color: inherit;
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}
.chip.active .badge {
  background: rgba(0,0,0,0.3);
  color: #fff;
}
/* Resultbar */
.resultbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--edge);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-dim);
}
.per-page-ctrl {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.per-page-label {
  font-size: 0.88rem;
  color: var(--ink-dim);
  font-weight: 500;
}
.per-page-chips {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.per-page-chips .chip-perpage {
  font-size: 0.82rem;
  padding: 0.25rem 0.65rem;
  min-width: 38px;
  height: 28px;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--edge);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all .15s ease;
}
.per-page-chips .chip-perpage:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--teal);
  color: var(--ink);
}
.per-page-chips .chip-perpage[aria-pressed="true"] {
  background: rgba(63, 191, 173, 0.2);
  border-color: var(--teal);
  color: #5eead4;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(63, 191, 173, 0.25);
}
/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card-link {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--edge);
  background: var(--bg-card);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.card-link:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.card-slices {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(7, 13, 18, 0.85);
  color: var(--teal-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.card-content {
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-subcat {
  font-size: 0.75rem;
  color: var(--teal);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--ink-dim);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pager */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.page-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--edge);
  color: var(--ink);
  min-width: 38px;
  height: 38px;
  padding: 0 0.75rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.page-btn:hover { background: rgba(63, 191, 173, 0.15); border-color: var(--teal); }
.page-btn.active { background: var(--teal); color: #070d12; border-color: var(--teal); }

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-dim);
  font-size: 1.1rem;
}
footer.site-foot {
  border-top: 1px solid var(--edge);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
}
