/* visualizer-templates.css */
/* Depends on: /css/black.css + /css/visualizers.css */

/* ── Page header ── */
.templates-hero {
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
  padding-bottom: 3rem;
}

/* ── Filter bar ── */
.filter-bar { background: var(--bg); }

.btn-filter {
  background: transparent;
  border: 1px solid var(--ring);
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 2px;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-filter:hover  { color: var(--fg); border-color: rgba(255,255,255,.15); }
.btn-filter.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }

.template-count { font-family: 'DM Mono', monospace; font-size: .75rem; }

/* ── Template card ── */
.template-card {
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .25s, transform .2s;
  position: relative;
}
.template-card:hover { border-color: rgba(201,168,76,.35); transform: translateY(-3px); }

.template-card--featured {
  border-color: var(--gold) !important;
  background: linear-gradient(160deg, rgba(201,168,76,.07) 0%, transparent 55%) !important;
}

.template-badge {
  position: absolute;
  top: 0;
  right: 24px;
  background: var(--gold);
  color: #000;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  z-index: 2;
}

/* ── Preview thumbnail ── */
.template-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050505;
  overflow: hidden;
  cursor: pointer;
}

.preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  transition: background .25s;
}
.template-preview:hover .preview-overlay { background: rgba(0,0,0,.2); }

.btn-preview-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-preview-play:hover { background: var(--gold-dim); transform: scale(1.08); }

/* Running state — hide overlay once animation starts */
.template-preview.running .preview-overlay { opacity: 0; pointer-events: none; }

/* ── Card body ── */
.template-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.template-price {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}

.tag {
  display: inline-block;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--ring);
  border-radius: 999px;
  padding: .2rem .6rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 2px;
}

/* ── Filter hide ── */
.template-item { transition: opacity .25s, transform .25s; }
.template-item.hidden {
  display: none;
}

/* ── Bundle section ── */
.bundle-section { position: relative; overflow: hidden; }

.bundle-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(201,168,76,.06) 0%, transparent 70%);
  pointer-events: none;
}

.bundle-features li {
  padding: .35rem 0;
  font-size: .9rem;
  color: var(--muted);
}

.bundle-price-box {
  min-width: 260px;
  border-color: var(--gold) !important;
  background: linear-gradient(160deg, rgba(201,168,76,.07) 0%, transparent 60%) !important;
}

.bundle-price {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--fg);
}
.bundle-price sup {
  font-size: 1.6rem;
  vertical-align: top;
  margin-top: .6rem;
  display: inline-block;
  color: var(--gold);
}

/* ── Modal ── */
#demoModal .modal-content { background: #0a0a0a; }
#demoModal .ratio-box { border-radius: 4px; overflow: hidden; }
.border-gold { border-color: var(--gold) !important; }

/* ── Toast ── */
#buyToast { min-width: 320px; }
