/* ============================================================
   Bucket Prompt – Home Page CSS
   Optimized: custom properties, no redundant rules, mobile-first
   ============================================================ */

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --bg: #0b0b10;
  --bg-card: #13131e;
  --bg-card-h: #1c1c2c;
  --accent: #f5c419;
  --accent-h: #e6b610;
  --text: #f0f0ff;
  --muted: #8888aa;
  --white: #fff;
  --border: rgba(255, 255, 255, .07);
  --r: 14px;
  --r-sm: 8px;
  --max: 1280px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html,
body {
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  font-family: inherit;
}

ul {
  list-style: none;
}

/* ── Layout ───────────────────────────────────────────────── */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 600;
  border: none;
  transition: background .18s, color .18s, border-color .18s, opacity .18s;
  white-space: nowrap;
}

.btn-accent {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-accent:hover {
  background: var(--accent-h);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .05);
}

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

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

.btn-sm {
  padding: 7px 14px;
  font-size: .8125rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ── Badge ────────────────────────────────────────────────── */
.badge-pro {
  background: linear-gradient(135deg, #f5c419, #d49500);
  color: #0a0a0a;
  font-size: .65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .04em;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 16, .85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 800;
}

.logo-star {
  color: var(--accent);
}

.h-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.h-nav a {
  font-size: .875rem;
  color: var(--muted);
  transition: color .15s;
}

.h-nav a:hover,
.h-nav a.active {
  color: var(--text);
}

.h-nav a.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.h-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ── Account dropdown ────────────────────────────────────── */
.acct-menu {
  display: inline-flex;
  align-items: center;
}

.acct-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  color: var(--text);
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}

.acct-btn:hover {
  border-color: rgba(255, 255, 255, .25);
  background: var(--bg-card-h);
}

.acct-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(245, 196, 25, .18);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acct-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropdown panel — rendered outside header to avoid stacking-ctx clip */
.acct-dropdown {
  position: fixed;
  /* avoids backdrop-filter clip   */
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r);
  width: 232px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .65);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
  overflow: hidden;
}

.acct-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* Info header */
.acct-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
}

.acct-info-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(245, 196, 25, .18);
  color: var(--accent);
  font-size: .875rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acct-info-text {
  min-width: 0;
}

.acct-info-name {
  font-size: .875rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acct-info-status {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Menu items */
.acct-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  width: 100%;
  font-size: .84rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background .12s;
  box-sizing: border-box;
}

.acct-item:hover {
  background: rgba(255, 255, 255, .06);
}

.acct-item-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  opacity: .75;
}

.acct-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

.acct-item-danger {
  color: #e05a5a;
}

.acct-item-danger:hover {
  background: rgba(224, 90, 90, .1);
}

/* ── Views badge (header) ─────────────────────────────────── */
.views-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 196, 25, .12);
  border: 1px solid rgba(245, 196, 25, .28);
  color: var(--accent);
  font-size: .775rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 20px;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
  text-decoration: none;
}

.views-badge:hover {
  background: rgba(245, 196, 25, .2);
  border-color: rgba(245, 196, 25, .5);
}

.views-badge-empty {
  background: rgba(224, 90, 90, .09);
  border-color: rgba(224, 90, 90, .25);
  color: #e05a5a;
}

.views-badge-empty:hover {
  background: rgba(224, 90, 90, .16);
  border-color: rgba(224, 90, 90, .45);
}

.crown-icon {
  flex-shrink: 0;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 90px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* ── Top subtle top-center glow ── */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% -5%, rgba(245, 196, 25, .05) 0%, transparent 65%);
  z-index: 0;
}

/* ── Decorative giant arcs ── */
.hero-arc {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  border: 1px solid rgba(245, 196, 25, 0.4);
  box-shadow: 0 0 50px rgba(245, 196, 25, 0.1), inset 0 0 50px rgba(245, 196, 25, 0.1);
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.hero-arc-left {
  width: 900px;
  height: 900px;
  left: -400px;
  top: 50%;
  transform: translateY(-50%);
}

.hero-arc-right {
  width: 1000px;
  height: 1000px;
  right: -450px;
  top: 40%;
  transform: translateY(-50%);
}

/* ── Sparkle particles ── */
.hero-spark {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  border-radius: 50%;
  animation: sparkFloat 3s ease-in-out infinite alternate;
}

.hero-spark::before {
  content: '✦';
  font-size: inherit;
  color: var(--accent);
  opacity: .65;
}

@keyframes sparkFloat {
  from {
    transform: translateY(0) rotate(0deg);
    opacity: .5;
  }

  to {
    transform: translateY(-9px) rotate(20deg);
    opacity: 1;
  }
}

.hero-spark.s1 {
  top: 18%;
  left: 8%;
  font-size: 1.6rem;
  animation-delay: 0s;
  animation-duration: 3.2s;
}

.hero-spark.s2 {
  top: 55%;
  left: 5%;
  font-size: 1.45rem;
  animation-delay: .7s;
  animation-duration: 4s;
}

.hero-spark.s3 {
  top: 28%;
  right: 9%;
  font-size: 1.5rem;
  animation-delay: 1.2s;
  animation-duration: 3.6s;
}

.hero-spark.s4 {
  top: 65%;
  right: 7%;
  font-size: 1.65rem;
  animation-delay: .3s;
  animation-duration: 2.8s;
}

.hero-spark.s5 {
  top: 12%;
  left: 42%;
  font-size: 1.4rem;
  animation-delay: 1.8s;
  animation-duration: 4.2s;
}

.hero-spark.s6 {
  top: 80%;
  left: 20%;
  font-size: 1.5rem;
  animation-delay: .5s;
  animation-duration: 3.8s;
}

.hero-spark.s7 {
  top: 75%;
  right: 22%;
  font-size: 1.4rem;
  animation-delay: 1.4s;
  animation-duration: 3.4s;
}

/* ── Hero inner content (above stage) ── */
.hero-inner {
  position: relative;
  z-index: 3;
}

/* ── Badge ── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid rgba(245, 196, 25, .30);
  color: var(--accent);
  font-size: .85rem;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 30px;
  margin-bottom: 36px;
  letter-spacing: .02em;
}

.hero-badge-star {
  color: var(--accent);
  font-size: 1rem;
}

/* ── Headline ── */
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 24px;
  color: #fff;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
  display: block;
}

/* ── Sub-text ── */
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 44px;
  line-height: 1.7;
}

/* ── CTA row ── */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.hand-arrow {
  position: absolute;
  right: 100%;
  margin-right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: auto;
  overflow: visible;
}

.hero-actions .btn-accent {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: 12px;
  font-weight: 700;
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 24px rgba(245, 196, 25, .28);
  transition: box-shadow .2s, background .2s, transform .15s;
}

.hero-actions .btn-accent:hover {
  box-shadow: 0 6px 32px rgba(245, 196, 25, .45);
  transform: translateY(-2px);
}

.hero-actions .btn-outline {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── Search + filters ─────────────────────────────────────── */
.filters {
  padding-bottom: 12px;
}

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0 14px;
  gap: 10px;
  transition: border-color .2s;
}

.search-field:focus-within {
  border-color: rgba(245, 196, 25, .4);
}

.search-field svg {
  color: var(--muted);
  flex-shrink: 0;
}

.search-field input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: .875rem;
  padding: 11px 0;
}

.search-field input::placeholder {
  color: var(--muted);
}

.sel-wrap {
  position: relative;
}

.sel-wrap select {
  appearance: none;
  padding: 11px 36px 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: .875rem;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}

.sel-wrap select:focus {
  border-color: rgba(245, 196, 25, .4);
}

.sel-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: .75rem;
}

/* ── Category tabs ────────────────────────────────────────── */
.cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.cat-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: .8125rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all .15s;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
}

.cat-tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .2);
}

.cat-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
  font-weight: 700;
}

/* ── Template grid ────────────────────────────────────────── */
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.card {
  display: block;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    cursor: pointer;
    transition: transform .22s, box-shadow .22s, border-color .22s;
    position: relative;
    height: 420px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  border-color: rgba(255, 255, 255, .14);
}

.card-locked {
  opacity: .8;
}

.card-img {
  position: relative;
  width: 100%;
  padding-top: 110%;
  overflow: hidden;
}

.card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .35s;
}

.card:hover .card-img img {
  transform: scale(1.06);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity .2s;
}

.card:hover .card-overlay {
  opacity: 1;
}

.overlay-label {
  font-size: .8rem;
  font-weight: 600;
}

.lock-icon {
  font-size: 1.5rem;
}

.pro-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #f5c419, #c98a00);
  color: #0a0a0a;
  font-size: .65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: .04em;
}

.card-body {
  display: grid;
  padding: 15px 25px;
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(0deg, black 25%, transparent 95%);
  height: 70%;
  align-items: end;
  white-space: wrap;
}

.card-title {
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tags {
  font-size: .75rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  margin-bottom: 10px;
}

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

.card-cat {
  font-size: .6rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1px solid var(--accent);
  border-radius: 30px;
  padding: 5px 15px;
}

.card-views {
  font-size: .8rem;
  color: var(--muted);
}

/* ── Load more ────────────────────────────────────────────── */
.load-more-wrap {
  text-align: center;
  padding: 40px 0 60px;
}

.btn-load {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 28px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}

.btn-load:hover {
  border-color: rgba(255, 255, 255, .2);
  background: var(--bg-card-h);
}

/* ── Empty state ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--muted);
}

.empty-state h3 {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 6px;
}

/* ── Section shared ───────────────────────────────────────── */
.section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 48px;
}

/* ── How it works ─────────────────────────────────────────── */
.hiw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.hiw-arrow {
  color: var(--muted);
  font-size: 1.375rem;
}

.hiw-step {
  background: var(--bg-card);
  border: 1px solid rgb(245 196 27);
  border-radius: var(--r);
  padding: 28px 20px;
  text-align: center;
  height: 100%;
}

.hiw-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(245, 196, 25, .1);
  border: 1px solid rgba(245, 196, 25, .2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
}

.hiw-icon svg {
  color: #f5c419;
}

.hiw-num {
  font-size: .72rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.hiw-step-title {
  font-size: .9375rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #f5c419;
}

.hiw-desc {
  font-size: .8rem;
  color: var(--white);
  line-height: 1.65;
}

/* ── Testimonials ─────────────────────────────────────────── */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.testi-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 6px;
  flex-grow: 1;
}

.testi-quote {
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  font-family: Georgia, serif;
  margin-top: -8px;
}

.testi-text {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.testi-footer {
  margin-top: auto;
}

.testi-stars {
  color: var(--accent);
  letter-spacing: 2px;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testi-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(245, 196, 25, .15);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.testi-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testi-name {
  font-size: .9rem;
  font-weight: 700;
}

.testi-role {
  font-size: .8rem;
  color: var(--muted);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.6fr;
  gap: 40px;
  margin-bottom: 48px;
  min-width: 0;
}

.footer-top>* {
  min-width: 0;
}

.footer-brand p {
  font-size: .84rem;
  color: var(--muted);
  max-width: 210px;
  margin-top: 12px;
  line-height: 1.65;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  color: var(--muted);
  transition: all .15s;
}

.footer-social a:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .2);
}

.footer-col h4 {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-size: .84rem;
  color: var(--muted);
  transition: color .15s;
}

.footer-col ul a:hover {
  color: var(--text);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.newsletter-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: .84rem;
  outline: none;
  transition: border-color .2s;
}

.newsletter-input:focus {
  border-color: rgba(245, 196, 25, .4);
}

.newsletter-input::placeholder {
  color: var(--muted);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--muted);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer-bottom-links a {
  color: var(--muted);
  font-size: .78rem;
  transition: color .15s;
}

.footer-bottom-links a:hover {
  color: var(--text);
}

/* ── Modals ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, .1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  color: var(--text);
  z-index: 1;
  transition: background .15s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, .2);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px 0 0 20px;
  display: block;
}

.modal-content {
  padding: 32px;
}

.modal-badge {
  display: inline-block;
  background: rgba(245, 196, 25, .12);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.modal-heading {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.modal-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.modal-prompt-box {
  background: #0d0d18;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px;
  margin-bottom: 18px;
}

.modal-prompt-box p {
  font-size: .875rem;
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-tag {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .7rem;
  padding: 3px 10px;
  border-radius: 20px;
}

.copy-feedback {
  font-size: .8rem;
  color: #4caf7d;
}

.modal-sm .modal {
  max-width: 400px;
}

.upgrade-body {
  padding: 48px 36px;
  text-align: center;
}

.upgrade-icon {
  font-size: 3rem;
  margin-bottom: 14px;
}

.upgrade-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.upgrade-body p {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 28px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .template-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hiw-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hiw-arrow {
    display: none;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testi-grid {
    grid-template-columns: 1fr;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-img-wrap img {
    border-radius: 20px 20px 0 0;
    max-height: 240px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .h-nav {
    display: none;
  }
  .wrap {padding: 10px;}
  .logo{grid-gap: 4px; font-size: 0.8rem;}
  .acct-btn{padding: 6px;}
  .hero {
    padding: 15px 0 30px;}
    .hero-actions .btn-accent, .hero-actions .btn-outline {padding: 10px 15px;
    font-size: 0.8rem;}
    .section {
    padding: 80px 0 40px;}
    .site-footer{padding: 40px 0 28px;}
}

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

  .search-row {
    flex-wrap: wrap;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .hero-actions {
    flex-direction: column;
  }
}