:root {
  --bg: #120e1c;
  --surface: rgba(28, 22, 42, 0.72);
  --surface-2: rgba(40, 32, 58, 0.88);
  --text: #faf7ff;
  --text-muted: #c4bdd2;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button { font-family: inherit; color: inherit; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  background-color: #07090f;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    radial-gradient(ellipse 55% 40% at 50% -8%, rgba(45, 212, 191, 0.16), transparent 58%),
    radial-gradient(ellipse 40% 32% at 0% 18%, rgba(244, 114, 182, 0.16), transparent 52%),
    radial-gradient(ellipse 42% 34% at 100% 0%, rgba(99, 102, 241, 0.22), transparent 50%);
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
  background-attachment: fixed;
}
body.modal-open { overflow: hidden; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 360' preserveAspectRatio='none'><path d='M0 180 C 240 80 420 280 720 170 C 1020 60 1200 260 1440 150' fill='none' stroke='%232dd4bf' stroke-width='1.6' opacity='0.55'/><path d='M0 230 C 280 140 560 300 860 200 C 1120 120 1280 250 1440 210' fill='none' stroke='%23818cf8' stroke-width='1.3' opacity='0.45'/></svg>");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 460px;
  opacity: 0.85;
}
body > * { position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18, 12, 32, 0.62);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: 24px;
}
.logo { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.logo span { color: #a1a1aa; font-weight: 500; }
nav { display: flex; gap: 28px; }
nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.92rem; }
nav a:hover, nav a.active { color: var(--text); }
.search-box input {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 8px 14px; border-radius: 8px; width: 240px;
  font-size: 0.9rem;
}
.search-box input:focus { outline: none; border-color: #52525b; }

.hero {
  padding: 88px 0 72px;
  text-align: center;
  border-bottom: 1px solid transparent;
  background: transparent;
}
.hero-badge {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 3.1rem; font-weight: 700; letter-spacing: -0.035em;
  line-height: 1.1; margin-bottom: 16px;
}
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; }
.btn-primary, .btn-secondary {
  display: inline-block; padding: 10px 20px; border-radius: 8px;
  font-weight: 600; text-decoration: none; font-size: 0.95rem;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface); }
.hero-stats { display: flex; justify-content: center; gap: 56px; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 1.6rem; font-weight: 700; }
.hero-stats span { color: var(--text-muted); font-size: 0.82rem; }

.trust { padding: 32px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-grid strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.trust-grid span { color: var(--text-muted); font-size: 0.82rem; }

.start-sizes { padding: 64px 0; border-bottom: 1px solid var(--border); }
.size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.size-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s;
}
.size-card:hover { border-color: #3f3f46; }
.size-card strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.size-card span { color: var(--text-muted); font-size: 0.8rem; }

.categories, .templates { padding: 72px 0; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.section-header h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.section-header p { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.category-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.category-card:hover { border-color: #3f3f46; }
.category-card h3 { font-size: 0.92rem; font-weight: 600; margin-bottom: 2px; }
.category-card span { color: var(--text-muted); font-size: 0.78rem; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.82rem; font-weight: 500;
}
.filter-btn.active, .filter-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.template-card {
  display: block;
  text-decoration: none;
  background: rgba(14, 16, 24, 0.78);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.2s, transform 0.2s;
  text-align: left;
  width: 100%;
  color: inherit;
  padding: 0;
  cursor: pointer;
}
.template-card:hover { border-color: rgba(45, 212, 191, 0.55); transform: translateY(-3px); }
.template-preview {
  height: 180px;
  background-size: cover;
  background-position: center;
}
.template-info { padding: 14px 16px 16px; }
.template-info h3 { font-size: 0.92rem; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.template-info p { color: var(--text-muted); font-size: 0.78rem; margin-bottom: 10px; }
.template-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: var(--text-muted); }
.btn {
  background: var(--text); color: var(--bg); border: none;
  padding: 6px 11px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 0.78rem;
}
.btn:hover { opacity: 0.9; }

.pagination {
  display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap;
}
.page-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  padding: 7px 12px; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
}
.page-btn.active, .page-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

.cta {
  padding: 72px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.cta h2 { font-size: 1.6rem; margin-bottom: 8px; }
.cta p { color: var(--text-muted); max-width: 480px; margin: 0 auto 20px; }

footer { border-top: 1px solid var(--border); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-grid strong { display: block; font-size: 0.85rem; margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--text); }
.footer-grid p { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; max-width: 280px; }
.footer-bottom {
  display: flex; justify-content: space-between;
  padding-top: 20px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.8rem;
}

.page-content { padding: 80px 0 100px; max-width: 760px; margin: 0 auto; }
.page-content h1 { font-size: 2.2rem; margin-bottom: 12px; letter-spacing: -0.02em; }
.page-content h2 { font-size: 1.35rem; margin: 32px 0 10px; }
.page-content p, .page-content li { color: var(--text-muted); margin-bottom: 12px; }
.page-content ul { padding-left: 18px; margin-bottom: 16px; }

@media (max-width: 768px) {
  .hero h1 { font-size: 2.1rem; }
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .header .container { flex-wrap: wrap; height: auto; padding: 12px 24px; }
  nav { display: none; }
  .search-box input { width: 100%; }
  .hero-stats { gap: 24px; }
  .modal-sheet { width: calc(100% - 16px); }
  .modal-grid, .spec-row, .related-row { grid-template-columns: 1fr 1fr; }
}

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.modal-back[hidden] { display: none; }
.modal-sheet {
  width: min(1040px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: linear-gradient(180deg, rgba(18, 20, 32, 0.96), rgba(10, 12, 20, 0.96));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.55), 0 0 0 1px rgba(45,212,191,0.08);
  padding: 22px 22px 18px;
  position: relative;
}
.modal-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 18px;
  z-index: 2;
}
.modal-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: start; }
.preview-well {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(45,212,191,0.22), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(129,140,248,0.28), transparent 50%),
    rgba(255,255,255,0.03);
  border-radius: 22px;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.preview-frame {
  width: min(100%, 460px);
  aspect-ratio: 1;
  border-radius: 16px;
  background: #12141c center/cover no-repeat;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.modal-copy h1, .modal-copy h2 { font-size: 1.85rem; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 8px; padding-right: 36px; }
.modal-kicker { color: var(--text-muted); margin-bottom: 16px; font-size: 0.92rem; }
.pill {
  display: inline-block;
  background: rgba(45, 212, 191, 0.14);
  color: #99f6e4;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 650;
  margin-bottom: 12px;
}
.spec-row { display: grid; grid-template-columns: 1.4fr 0.5fr 0.8fr; gap: 12px; margin-bottom: 14px; }
.spec-row span { display: block; color: #8b93a7; font-size: 0.68rem; letter-spacing: 0.07em; margin-bottom: 3px; }
.spec-row strong { font-size: 0.88rem; }
.modal-stats { display: flex; gap: 22px; padding: 12px 0; margin-bottom: 12px; border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); }
.modal-stats strong { display: block; font-size: 1.05rem; }
.modal-stats span { color: #8b93a7; font-size: 0.74rem; }
.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.modal-tags span { border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); border-radius: 999px; padding: 5px 10px; font-size: 0.78rem; color: #c9cdd8; }
.modal-actions { display: flex; gap: 10px; margin-bottom: 16px; }
.modal-actions .btn-primary { flex: 1; text-align: center; background: linear-gradient(90deg, #14b8a6, #6366f1); color: #fff; border-radius: 12px; padding: 12px 16px; }
.modal-note h2, .modal-note h3 { font-size: 0.92rem; margin: 14px 0 6px; }
.modal-note p, .modal-note li { color: var(--text-muted); font-size: 0.88rem; }
.modal-related { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.modal-related h2, .modal-related h3 { font-size: 1rem; margin-bottom: 12px; }
.template-card h2 { font-size: 0.95rem; font-weight: 600; margin: 0; }
.related-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.related-row a, .related-row button { display: block; background: transparent; border: 0; color: inherit; text-align: left; padding: 0; cursor: pointer; text-decoration: none; }
.seo-cats { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 22px 0 8px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.08); }
.seo-cats a { color: #a1a1aa; font-size: 0.82rem; }
.seo-cats a:hover { color: #99f6e4; }
.page-wrap { padding: 28px 0 72px; }
.crumbs { font-size: 0.84rem; color: #8b93a7; margin-bottom: 16px; }
.crumbs a { color: #99f6e4; text-decoration: none; }
.page-sheet { width: 100%; background: linear-gradient(180deg, rgba(18, 20, 32, 0.96), rgba(10, 12, 20, 0.96)); border: 1px solid rgba(255,255,255,0.1); border-radius: 28px; padding: 22px; }
.list-head { margin-bottom: 18px; }
.list-head h1 { font-size: 2rem; letter-spacing: -0.03em; margin: 0 0 8px; }
.list-head p { color: var(--text-muted); max-width: 720px; }
.pager { display: flex; gap: 14px; margin-top: 22px; }
.pager a { color: #99f6e4; }
.related-row .shot { height: 110px; border-radius: 12px; background: #151822 center/cover no-repeat; margin-bottom: 6px; }
.related-row strong { display: block; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-row em { font-style: normal; color: #8b93a7; font-size: 0.72rem; }