@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@200;300;400;500;600&display=swap');

:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #cc3757;
  --primary-hover: #b12f4a;
  --primary-2: #ff8a3d;
  --accent: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --btn-shadow: 0 4px 14px 0 rgba(204, 55, 87, 0.39);

  --radius: 16px;
  --container: 1120px;
  --header-h: 80px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(#f1f5f9 1px, transparent 1px);
  background-size: 32px 32px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: #1e293b;
  margin-top: 0;
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

a:not(.btn):hover {
  color: var(--primary);
}

.small {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  height: var(--header-h);
  overflow: hidden;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: transform 0.3s ease;
}

.brand svg {
  height: 32px;
  width: auto;
  color: var(--primary);
}

.header .brand:hover {
  animation: logoHop 0.6s ease;
}

.nav {
  display: none;
  align-items: center;
  gap: 32px;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav a {
  font-weight: 500;
  color: var(--muted);
  font-size: 15px;
}

.nav a:hover {
  color: var(--primary);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9999px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-size: 15px;
  cursor: pointer;
}

.btn-primary {
  background: #cc3757;
  color: #fff;
  border-color: #cc3757;
  box-shadow: 0 4px 14px rgba(204, 55, 87, 0.35);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: #b12f4a;
  box-shadow: 0 6px 20px rgba(204, 55, 87, 0.4);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #fee2e2;
  color: #ef4444;
  font-weight: 700;
  font-size: 12px;
  margin-left: 8px;
}

/* Hero */
.hero {
  padding: 96px 0 64px;
  text-align: center;
  position: relative;
  overflow: visible;
  z-index: 0;
  width: 100%;
  background: #ffffff;
}

.hero h1 {
  margin: 0 auto;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 900px;
  font-weight: 300;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 72px;
  }
}

 .emph {
  color: var(--primary);
}

.hero p {
  margin: 24px auto 40px;
  max-width: 680px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-icons {
  margin: 40px auto 0;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-inner {
  position: relative;
}

.hero::before,
.hero::after {
  content: none;
}

.icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 70px 0;
}

.section h2 {
  margin: 0 0 20px;
  font-size: 40px;
  letter-spacing: -0.03em;
  text-align: center;
  font-weight: 400;
}

.section p.lead {
  color: var(--muted);
  max-width: 100%;
  margin: 0 auto;
  text-align: left;
  font-size: 18px;
  line-height: 1.6;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 48px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card .logo-box {
  flex-shrink: 0;
  height: 72px;
  width: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.card .logo-box svg {
  width: 40px;
  height: 40px;
}

.card-content {
  flex: 1;
}

.card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.card-features {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  flex-wrap: wrap;
}

.card-cta {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
}

@media (max-width: 991px), (hover: none) and (pointer: coarse) {
  .card {
    flex-direction: column;
    padding: 24px;
  }

  .card .logo-box {
    width: 64px;
    height: 64px;
  }

  .card-cta {
    flex-wrap: wrap;
  }

  .screenshots {
    flex-wrap: wrap;
  }
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 48px;
}

@media (min-width: 980px) {
  .pricing {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .pricing {
    grid-template-columns: repeat(4, 1fr);
  }
}

.price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.price-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.price-card.popular {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
}

.popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-sans);
}

.price {
  font-size: 48px;
  font-weight: 600;
  margin: 16px 0;
  color: #1e293b;
  letter-spacing: -0.03em;
}

.price span {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

.spec-box {
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.plan-features {
  margin: 24px 0 32px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

.feature-item {
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}

/* Pricing (horizontal) */
.pricing-simple {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pricing-row {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 75%;
  margin: 0 auto;
}

.pricing-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pricing-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.pricing-check {
  margin-top: 8px;
  font-size: 13px;
  font-weight: bold;
  /* color: var(--muted); */
}

.credit-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500 !important;
  background: var(--success);
  color: #fff;
}

.pricing-simple .spec-box {
  margin-bottom: 8px;
}

.pricing-simple .spec-box:last-of-type {
  margin-bottom: 0;
}

.pricing-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: right;
}

.pricing-action .btn {
  padding: 8px 16px;
  font-size: 14px;
}

.price-compact {
  font-size: 28px;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.price-compact span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}

@media (max-width: 720px) {
  .pricing-row {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .pricing-action {
    width: 100%;
    align-items: flex-start;
    text-align: left;
  }
}

/* FAQ */
.faq {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-btn {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 18px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1e293b;
  font-family: var(--font-heading);
}

.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.faq-icon svg {
  width: 16px;
  height: 16px;
}

.faq-btn.open .faq-icon {
  transform: rotate(180deg);
  background: #fff;
  border-color: #dbe3ee;
}

.faq-btn:hover {
  background: #f8fafc;
}

.faq-content {
  display: none;
  padding: 12px 24px 24px;
  color: var(--muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
}

.faq-content.active {
  display: block;
}

/* Footer */
footer {
  background: #0f172a;
  color: #fff;
  border-top: none;
  margin-top: 72px;
  padding-bottom: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding: 48px 24px 24px;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-col a {
  display: block;
  color: #94a3b8;
  margin: 12px 0;
  font-size: 15px;
}

.footer-col a:hover {
  color: #fff;
}

.footer-col strong {
  display: block;
  margin-bottom: 16px;
  color: #fff;
  font-family: var(--font-heading);
}

.footer-col .brand {
  color: #fff;
}

.footer-col .brand img {
  filter: brightness(0) invert(1);
}

.footer-col .small {
  color: #64748b;
}

section {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 24px 24px;
}

.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-box {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .brand {
  justify-content: center;
  margin-bottom: 16px;
  font-size: 32px;
}

.auth-header h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  color: var(--text);
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 91, 91, 0.1);
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Legal Pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.legal-content h1 {
  font-size: 40px;
  margin-bottom: 16px;
}

.legal-content h2 {
  font-size: 24px;
  margin: 48px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  font-size: 18px;
  margin: 32px 0 12px;
}

.legal-content p,
.legal-content li {
  color: #334155;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 24px;
  margin-bottom: 24px;
}

.legal-content .lead {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 48px;
}

/* Filter Box */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 32px auto 48px;
  max-width: fit-content;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.filter-btn {
  padding: 12px 24px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn .filter-icon {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.filter-btn:hover {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.filter-btn:hover .filter-icon {
  transform: none;
}

.filter-btn.active {
  background: var(--text);
  color: #fff;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
}

.filter-btn.active .filter-icon {
  animation: bounce 0.5s ease infinite alternate;
}

@keyframes logoHop {
  0% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-3px);
  }

  60% {
    transform: translateY(-6px);
  }

  80% {
    transform: translateY(-2px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-2px);
  }
}

/* Animation for cards */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.card.animate-in {
  animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.card.hidden {
  display: none;
}

/* Screenshots */
.screenshots {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.screenshot-thumb-box {
  width: 60px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  position: relative;
}

.screenshot-thumb-box:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.screenshot-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  width: 100%;
  max-width: 1000px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 48px;
}

.lightbox-media-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  background: #000;
  min-height: 200px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox-iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: none;
}

.lightbox-caption {
  color: #e2e8f0;
  margin-top: 20px;
  font-family: var(--font-heading);
  font-size: 20px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 20;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1001;
  /* Above content */
  line-height: 1;
  padding-bottom: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-nav.prev {
  left: 24px;
}

.lightbox-nav.next {
  right: 24px;
}

.lightbox-close:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .lightbox-content {
    padding: 0;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.5);
    /* darker for mobile visibility */
  }

  .lightbox-nav.prev {
    left: 12px;
  }

  .lightbox-nav.next {
    right: 12px;
  }

  .lightbox-close {
    right: 12px;
    top: -48px;
  }
}

/* Template detail page */
.template-page {
  background: #f8fafc;
  background-image: radial-gradient(#f1f5f9 1px, transparent 1px),
    radial-gradient(#fee2e2 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px;
  background-position: 0 0, 12px 12px;
  --template-accent: var(--primary);
  --template-accent-dark: var(--primary-hover);
  --template-accent-soft: rgba(255, 91, 91, 0.12);
}

.template-page .header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.template-hero {
  padding: 120px 0 88px;
  background: linear-gradient(135deg, #ffffff 0%, #fff1f2 45%, #ffe4e6 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.template-hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(204, 55, 87, 0.22), transparent 70%);
  top: -180px;
  right: -120px;
  opacity: 0.9;
}

.template-hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at 70% 30%, rgba(255, 91, 91, 0.18), transparent 70%);
  bottom: -260px;
  left: -200px;
  opacity: 0.7;
}

.template-hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 980px) {
  .template-hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.template-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--template-accent);
  font-weight: 700;
  margin-bottom: 12px;
}

.template-hero h1 {
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 520px;
}

@media (min-width: 768px) {
  .template-hero h1 {
    font-size: 60px;
  }
}

.template-lead {
  color: #475569;
  font-size: 18px;
  max-width: 540px;
}

.template-cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 28px 0 20px;
  flex-wrap: wrap;
}

.template-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.template-pill {
  border: 1px solid var(--template-accent);
  color: var(--template-accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  background: #fff;
}

.template-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 14px;
  align-items: center;
}

.template-links a {
  color: #0f172a;
  font-weight: 600;
}

.template-hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.template-hero-card-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.template-hero-card-header img {
  width: 56px;
  height: 56px;
}

.template-hero-card-header h2 {
  font-size: 24px;
  margin: 0;
}

.template-hero-card-header p {
  margin: 4px 0 0;
  color: #64748b;
}

.template-hero-media {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: #0f172a;
}

.template-hero-media img {
  width: 100%;
  display: block;
}

.template-specs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 14px;
}

.template-specs strong {
  color: #0f172a;
}

.template-section {
  padding: 88px 0;
}

.template-section-heading {
  max-width: 720px;
  margin-bottom: 40px;
}

.template-section-title {
  font-size: 36px;
  margin: 0 0 12px;
  text-align: left;
}

.template-section-lead {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

.template-two-col {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .template-two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.template-info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.template-info-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.template-stack {
  display: grid;
  gap: 24px;
}

.template-list,
.template-steps {
  padding-left: 20px;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}

.template-screenshot-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .template-screenshot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.template-figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.template-figure img {
  width: 100%;
  display: block;
}

.template-figure figcaption {
  padding: 16px 20px;
  font-weight: 600;
  color: #0f172a;
}

.template-screenshot-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  max-width: 840px;
  margin: 0 auto;
}

.template-screenshot-panel .screenshots {
  justify-content: flex-start;
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.template-video {
  margin-top: 32px;
  display: grid;
  gap: 24px;
}

@media (min-width: 980px) {
  .template-video {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
  }
}

.template-video-frame {
  background: #0f172a;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.15);
  box-shadow: var(--shadow-lg);
}

.template-video-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  aspect-ratio: 16 / 9;
  display: block;
}

.template-props-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 980px) {
  .template-props-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.template-info-wide {
  grid-column: 1 / -1;
}

.template-props {
  display: grid;
  gap: 12px;
  margin: 0;
}

.template-props div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}

.template-props dt {
  font-weight: 600;
  color: #0f172a;
}

.template-props dd {
  margin: 0;
  color: #475569;
  text-align: right;
}

.template-subtitle {
  margin-top: 20px;
  margin-bottom: 12px;
}

.template-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-tag-list span {
  background: var(--template-accent-soft);
  color: var(--template-accent);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
}

.template-env {
  display: grid;
  gap: 12px;
  font-size: 14px;
  color: #475569;
}

.template-env div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
}

.template-env strong {
  color: #0f172a;
}

.template-code-block {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  color: #e2e8f0;
}

.template-code-header {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 13px;
  color: #cbd5f5;
}

.template-code-block pre {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
}

.template-cta {
  padding: 64px 0 80px;
  background: linear-gradient(135deg, rgba(204, 55, 87, 0.12), rgba(255, 255, 255, 0.85));
  border-top: 1px solid var(--border);
}

.template-cta-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.template-cta-inner h2 {
  margin: 0 0 8px;
}

.template-page .template-stack,
.template-page .template-props-grid {
  max-width: 840px;
  margin: 0 auto;
}

.template-page .template-props-grid {
  grid-template-columns: 1fr;
}

.template-page .template-section-heading {
  margin-left: auto;
  margin-right: auto;
}

.template-page footer {
  margin-top: 0;
}

.template-page .footer-inner {
  padding-top: 32px;
  padding-bottom: 40px;
}

.template-page .footer-col .brand {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .template-hero {
    padding: 112px 0 72px;
  }

  .template-hero-card {
    order: -1;
  }

  .template-props div {
    flex-direction: column;
    align-items: flex-start;
  }

  .template-props dd {
    text-align: left;
  }
}

/* Marketplace page */
.marketplace-hero {
  padding: 105px 0 62px;
  background: linear-gradient(135deg, rgba(204, 55, 87, 0.08), rgba(255, 255, 255, 0.9));
}

.marketplace-hero-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .marketplace-hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

.marketplace-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.marketplace-title-info {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.marketplace-logo {
  width: 64px;
  height: 64px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  align-self: flex-start;
}

.marketplace-tagline {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: 18px;
}

.marketplace-official {
  display: inline-flex;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}

.marketplace-hero-cta {
  margin: 16px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 6px;
}

.marketplace-links {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.marketplace-links a {
  font-weight: 600;
}

.marketplace-divider {
  color: var(--border);
}

.marketplace-meta {
  display: grid;
  gap: 16px;
}

.marketplace-meta strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #334155;
  margin-bottom: 8px;
}

.marketplace-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marketplace-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(204, 55, 87, 0.12);
  color: var(--primary);
}

.marketplace-cats p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.marketplace-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.marketplace-card-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.marketplace-card-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 6px;
  margin-bottom: 16px;
}

.marketplace-card-stats {
  margin-top: 8px;
  display: grid;
  gap: 8px;
  width: 100%;
}

.marketplace-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 13px;
  color: var(--muted);
}

.marketplace-stat strong {
  color: #1e293b;
  font-weight: 700;
}

.marketplace-card-block {
  margin-top: 12px;
}

.marketplace-preview-media img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  display: block;
}

.marketplace-reqs {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.marketplace-reqs .spec-box {
  margin-bottom: 0;
}

.marketplace-tech-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

@media (min-width: 900px) {
  .marketplace-tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.marketplace-section h2 {
  text-align: left;
}

.marketplace-section .marketplace-lead {
  text-align: left;
  margin: 0;
  max-width: 720px;
}

.marketplace-screenshots .screenshots {
  border-top: none;
  padding-top: 0;
  flex-wrap: wrap;
  gap: 16px;
}

.marketplace-screenshots .screenshot-thumb-box {
  width: 240px;
  height: 160px;
  border-radius: 16px;
}

.marketplace-two-col {
  display: grid;
  gap: 24px;
}

.marketplace-about-grid {
  display: grid;
  gap: 24px;
  align-items: start;
}

@media (min-width: 900px) {
  .marketplace-about-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

@media (min-width: 900px) {
  .marketplace-two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.marketplace-info h3 {
  margin: 16px 0 8px;
}

.marketplace-list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.install-tabs {
  margin-top: 20px;
}

.tab-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tab-btn {
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.tab-panel {
  display: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  color: var(--text);
}

.tab-panel.active {
  display: block;
}

.tab-panel pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
}

.tab-panel code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.marketplace-steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.marketplace-table-wrap {
  overflow-x: auto;
}

.marketplace-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.marketplace-table th,
.marketplace-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.marketplace-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

@media (max-width: 720px) {
  .marketplace-hero {
    padding: 112px 0 64px;
  }

  .marketplace-screenshots .screenshot-thumb-box {
    width: 100%;
    height: 200px;
  }
}
