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

:root {
  --brand: #6c3fc5;
  --brand-light: #9b72e8;
  --brand-dark: #4a2a8a;
  --accent: #f0a500;
  --bg: #0f0f13;
  --surface: #1a1a24;
  --surface2: #242433;
  --border: #2e2e45;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--brand-light); text-decoration: none; }
a:hover { color: var(--accent); }

/* === Nav === */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(15,15,19,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.3rem; font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: .5rem;
}
.nav-logo span { color: var(--brand-light); }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600; font-size: .9rem;
  cursor: pointer; border: none;
  transition: all .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-light); color: #fff; }
.btn-accent { background: var(--accent); color: #111; }
.btn-accent:hover { background: #ffc233; color: #111; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--brand-light); color: var(--brand-light); }
.btn-sm { padding: .4rem .9rem; font-size: .85rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1.05rem; border-radius: 10px; }

/* === Hero === */
.hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 5rem 2rem 4rem;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(108,63,197,.25), transparent);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .9rem;
  background: rgba(108,63,197,.2);
  border: 1px solid rgba(108,63,197,.4);
  border-radius: 99px;
  font-size: .8rem; color: var(--brand-light);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800; line-height: 1.15;
  max-width: 800px;
}
.hero h1 em { font-style: normal; color: var(--brand-light); }

.hero p {
  margin-top: 1rem;
  font-size: 1.1rem; color: var(--text-muted);
  max-width: 560px;
}

.hero-cta { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; justify-content: center; }

/* === Card Previews === */
.card-previews {
  display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap;
  margin-top: 3rem;
}

.card-preview {
  width: 160px; height: 224px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  transition: transform .2s;
  flex-shrink: 0;
}
.card-preview:hover { transform: translateY(-6px) rotate(-2deg); }
.card-preview:nth-child(2) { transform: translateY(10px); }
.card-preview:nth-child(2):hover { transform: translateY(4px) rotate(2deg); }

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

/* === Section === */
section { padding: 4rem 2rem; }
.section-label {
  font-size: .8rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand-light);
  margin-bottom: .5rem;
}
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; }

/* === Tools Grid === */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  max-width: 1100px; margin-left: auto; margin-right: auto;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all .2s;
  display: flex; flex-direction: column; gap: 1rem;
}
.tool-card:hover {
  border-color: var(--brand-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(108,63,197,.2);
}

.tool-icon {
  width: 48px; height: 48px;
  background: rgba(108,63,197,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

.tool-card h3 { font-size: 1.1rem; font-weight: 700; }
.tool-card p { color: var(--text-muted); font-size: .9rem; flex: 1; }

/* === Steps === */
.steps {
  display: flex; gap: 2rem; flex-wrap: wrap;
  max-width: 900px; margin: 2.5rem auto 0;
}
.step { flex: 1; min-width: 200px; }
.step-num {
  width: 36px; height: 36px;
  background: var(--brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  margin-bottom: .75rem;
}
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: .3rem; }
.step p { color: var(--text-muted); font-size: .9rem; }

/* === Pricing === */
.pricing-grid {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  justify-content: center;
  margin-top: 2.5rem;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 300px;
  display: flex; flex-direction: column; gap: 1rem;
}
.pricing-card.featured {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--surface), rgba(108,63,197,.15));
}
.pricing-card .price {
  font-size: 2.5rem; font-weight: 800;
}
.pricing-card .price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.pricing-features li { font-size: .9rem; color: var(--text-muted); }
.pricing-features li::before { content: "✓ "; color: #4ade80; }
.pricing-features li.no::before { content: "✗ "; color: var(--text-muted); }
.pricing-features li.no { opacity: .5; }

/* === Ad slots === */
.ad-slot {
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .75rem;
  min-height: 90px;
  margin: 1rem auto;
}
.ad-slot-banner { max-width: 728px; }
.ad-slot-rect { width: 300px; height: 250px; }

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--text); }

/* === Creator Layout === */
.creator-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  min-height: calc(100vh - 65px);
}

.creator-panel {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}

.creator-canvas-area {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 2rem;
  gap: 1.5rem;
  background: var(--bg);
}

.canvas-wrapper {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.canvas-wrapper canvas { display: block; border-radius: 8px; }

.panel-section h4 {
  font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: .75rem;
}

.form-group { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .75rem; }
.form-group label { font-size: .85rem; color: var(--text-muted); }

input[type=text], input[type=number], textarea, select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .45rem .75rem;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  width: 100%;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-light);
}
textarea { resize: vertical; min-height: 60px; }

.color-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem;
}
.color-swatch {
  height: 30px; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
}
.color-swatch.active, .color-swatch:hover { border-color: #fff; transform: scale(1.1); }

.upload-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem;
  background: var(--surface2);
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  cursor: pointer; color: var(--text-muted);
  font-size: .9rem;
  transition: all .15s;
  width: 100%;
}
.upload-btn:hover { border-color: var(--brand-light); color: var(--brand-light); }

.action-bar {
  display: flex; gap: .75rem; flex-wrap: wrap;
}

.premium-banner {
  background: linear-gradient(135deg, rgba(108,63,197,.2), rgba(240,165,0,.1));
  border: 1px solid rgba(108,63,197,.4);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  font-size: .85rem;
}
.premium-banner strong { display: block; margin-bottom: .4rem; color: var(--accent); }

input[type=range] {
  -webkit-appearance: none;
  width: 100%; height: 4px;
  background: var(--border);
  border-radius: 4px;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--brand-light);
  cursor: pointer;
}

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tab-btn {
  padding: .5rem 1rem;
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: .9rem; font-family: inherit;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--brand-light); }

@media (max-width: 768px) {
  .creator-layout { grid-template-columns: 1fr; }
  .creator-panel { border-right: none; border-bottom: 1px solid var(--border); max-height: 50vh; }
  nav { padding: 1rem; }
  .nav-links { gap: 1rem; }
}
