/* =============================================
   CSSFORGE — STYLES
   ============================================= */

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

:root {
  --bg: #0d0d14;
  --bg-2: #13131e;
  --bg-3: #1a1a28;
  --card: #181825;
  --border: rgba(255,255,255,0.07);
  --border-2: rgba(255,255,255,0.13);
  --accent: #6c63ff;
  --accent-2: #38d9d9;
  --accent-warm: #ff6b6b;
  --text: #e8e8f2;
  --text-muted: #7878a0;
  --text-dim: #4a4a6a;
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Syne', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 15px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,20,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; }
.logo-icon { color: var(--accent); font-size: 1.4rem; }
.logo-text strong { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 2rem; }
.header-nav a { font-size: 0.85rem; color: var(--text-muted); transition: color var(--transition); }
.header-nav a:hover { color: var(--text); }
.header-nav a.btn-nav {
  background: var(--accent); color: #fff !important;
  padding: 6px 16px; border-radius: 20px;
  font-size: 0.8rem; font-weight: 600;
  transition: all var(--transition);
}
.header-nav a.btn-nav:hover { 
  background: #7c75ff; 
  color: #fff !important;
  transform: translateY(-1px); 
}

/* ── HERO ── */
.hero {
  max-width: 1200px; margin: 0 auto;
  padding: 5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(56,217,217,0.1);
  border: 1px solid rgba(56,217,217,0.25);
  padding: 5px 12px; border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { font-size: 1rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 440px; }
.btn-hero {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: 0.8rem 2rem; border-radius: 50px;
  font-size: 0.9rem; font-weight: 700;
  transition: all var(--transition);
  box-shadow: 0 0 0 0 rgba(108,99,255,0.4);
}
.btn-hero:hover {
  background: #7c75ff;
  box-shadow: 0 0 0 8px rgba(108,99,255,0.15);
  transform: translateY(-2px);
}
.hero-preview {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  min-height: 220px;
}
.preview-card {
  background: linear-gradient(135deg, #6c63ff, #38d9d9);
  padding: 1.5rem 3rem;
  border-radius: 14px;
  font-size: 1rem; font-weight: 700; color: #fff;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 8px 30px rgba(108,99,255,0.3);
}
.preview-card:hover { transform: scale(1.08) translateY(-4px); box-shadow: 0 20px 50px rgba(108,99,255,0.4); }

/* ── TABS ── */
#generators { max-width: 1200px; margin: 0 auto; padding: 0 2rem 6rem; }

.tabs-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 2rem;
}
.tab {
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}
.tab:hover { color: var(--text); background: var(--bg-3); }
.tab.active { background: var(--accent); color: #fff; }
.pro-tab { opacity: 0.7; }
.pro-badge {
  display: inline-block;
  font-size: 0.6rem; font-weight: 700;
  background: linear-gradient(90deg, #f5a623, #ff6b6b);
  color: #fff; padding: 1px 5px; border-radius: 4px;
  vertical-align: middle; margin-left: 4px;
}

/* ── WORKSPACE ── */
.workspace { position: relative; }

.generator { display: none; gap: 2rem; }
.generator.active { display: grid; grid-template-columns: 340px 1fr; }

/* ── CONTROLS ── */
.controls {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: fit-content;
  position: sticky; top: 80px;
}
.controls h2 {
  font-size: 1rem; font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.control-group { margin-bottom: 1.25rem; }
.control-group label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.val {
  font-family: var(--mono);
  font-size: 0.72rem; color: var(--accent);
  background: rgba(108,99,255,0.12);
  padding: 2px 6px; border-radius: 4px;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%; height: 4px;
  background: var(--bg-3);
  border-radius: 2px; outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
  transition: transform var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

input[type="color"] {
  width: 36px; height: 36px;
  border: 2px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: none; cursor: pointer;
  padding: 2px;
}

input[type="text"], input[type="number"], select {
  width: 100%; padding: 8px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}
input[type="text"]:focus, input[type="number"]:focus, select:focus { border-color: var(--accent); }
select option { background: var(--bg-3); }

.color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.color-hex { width: 90px !important; font-family: var(--mono); font-size: 0.78rem !important; }

.row-3 { display: grid; grid-template-columns: 60px 1fr 36px; gap: 6px; align-items: center; }
input[type="number"] { width: 100%; }

.toggle-row {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 0.82rem !important;
  color: var(--text-muted);
  text-transform: none !important; letter-spacing: 0 !important;
}
input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent); cursor: pointer;
}

.hidden { display: none !important; }

.replay-btn {
  width: 100%; padding: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.85rem; font-weight: 600;
  transition: all var(--transition);
  margin-top: 0.5rem;
}
.replay-btn:hover { background: var(--accent); border-color: var(--accent); }

/* ── PREVIEW ZONE ── */
.preview-zone { display: flex; flex-direction: column; gap: 1.5rem; }

.preview-stage {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.preview-stage.dark { background: #1a1a2e; }
.preview-stage::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Preview elements */
.gen-btn {
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative; z-index: 1;
}
.grad-preview-box {
  width: 200px; height: 200px;
  border-radius: 14px;
  position: relative; z-index: 1;
}
.shadow-box {
  width: 140px; height: 140px;
  border-radius: 12px;
  position: relative; z-index: 1;
  background: #fff;
}
.border-box {
  width: 160px; height: 120px;
  position: relative; z-index: 1;
  background: #f0f0ff;
}
.anim-box {
  width: 100px; height: 100px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.85rem;
  position: relative; z-index: 1;
}

/* ── CODE BLOCK ── */
.code-block {
  background: #0a0a12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.code-header span { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.copy-btn {
  font-size: 0.75rem; font-weight: 700;
  color: var(--accent);
  padding: 4px 12px;
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 20px;
  transition: all var(--transition);
}
.copy-btn:hover { background: var(--accent); color: #fff; }
.copy-btn.copied { background: #22c55e; border-color: #22c55e; color: #fff; }

pre {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
  color: #c8c8ff;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 120px;
  max-height: 320px;
  overflow-y: auto;
}

/* ── PRO GATE ── */
.pro-gate {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center;
  min-height: 400px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.pro-gate::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(108,99,255,0.08) 0%, transparent 70%);
}
.pro-gate-inner {
  text-align: center; max-width: 400px;
  position: relative; z-index: 1;
  padding: 2rem;
}
.pro-gate-icon { font-size: 2.5rem; display: block; margin-bottom: 1rem; color: var(--accent); }
.pro-gate-inner h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.pro-gate-inner p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.btn-pro-gate {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: 0.75rem 2rem; border-radius: 50px;
  font-weight: 700; font-size: 0.9rem;
  transition: all var(--transition);
}
.btn-pro-gate:hover { background: #7c75ff; transform: translateY(-2px); }

/* ── GLASSMORPHISM ── */
.gl-scene-bg {
  width: 100%;
  min-height: 280px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #6c63ff 0%, #38d9d9 100%);
  transition: background 0.4s ease;
}

/* Scene blobs */
.gl-scene-bg::before,
.gl-scene-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.7;
}
.gl-scene-bg::before {
  width: 180px; height: 180px;
  background: rgba(255,100,100,0.6);
  top: -40px; right: -40px;
}
.gl-scene-bg::after {
  width: 140px; height: 140px;
  background: rgba(50,200,255,0.5);
  bottom: -30px; left: -30px;
}

.gl-card {
  position: relative; z-index: 1;
  width: 240px;
  padding: 2rem 1.75rem;
  border-radius: 16px;
  /* Dynamic styles applied via JS */
  transition: all 0.3s ease;
}

.gl-card-inner { display: flex; flex-direction: column; gap: 0.75rem; }

.gl-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.gl-title {
  font-size: 1.1rem; font-weight: 700;
  color: #fff;
}
.gl-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}
.gl-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 0.25rem;
}
.gl-tags span {
  font-size: 0.7rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.3);
}

/* Scene presets */
.gl-scene-bg.scene-purple { background: linear-gradient(135deg, #6c63ff 0%, #a855f7 100%); }
.gl-scene-bg.scene-sunset { background: linear-gradient(135deg, #f97316 0%, #ec4899 60%, #8b5cf6 100%); }
.gl-scene-bg.scene-ocean  { background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #10b981 100%); }
.gl-scene-bg.scene-forest { background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #166534 100%); }
.gl-scene-bg.scene-neon   { background: linear-gradient(135deg, #0d0d14 0%, #1a0533 100%); }
.gl-scene-bg.scene-neon::before { background: rgba(108,99,255,0.8); }
.gl-scene-bg.scene-neon::after  { background: rgba(56,217,217,0.6); }

/* ── NEUMORPHISM ── */
#nm-stage {
  transition: background 0.3s ease;
}

.nm-element {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative; z-index: 1;
  /* Dynamic styles via JS */
}

.nm-label {
  font-weight: 700;
  font-size: 0.9rem;
  /* color via JS */
}

/* Input type preview */
.nm-element.nm-type-input {
  width: 220px; height: 50px;
  border-radius: 10px;
  padding: 0 1rem;
  justify-content: flex-start;
}
.nm-element.nm-type-input::after {
  content: 'Type something...';
  font-size: 0.82rem;
  opacity: 0.5;
}
.nm-element.nm-type-input .nm-label { display: none; }

/* Circle type */
.nm-element.nm-type-circle {
  width: 120px; height: 120px;
  border-radius: 50%;
}

/* Button type */
.nm-element.nm-type-button {
  width: 160px; height: 50px;
  cursor: pointer;
  border-radius: 10px;
}


/* ── PRICING ── */
.pricing {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6rem 2rem;
}
.pricing-inner { max-width: 1000px; margin: 0 auto; }
.section-tag {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem;
}
.pricing h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 3rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  position: relative;
  transition: all var(--transition);
}
.pricing-card:hover { border-color: var(--border-2); transform: translateY(-4px); }
.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(108,99,255,0.08) 0%, var(--card) 100%);
}
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  padding: 4px 14px; border-radius: 20px;
  white-space: nowrap;
}
.plan-name { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.75rem; }
.plan-price { font-size: 2.2rem; font-weight: 800; margin-bottom: 1.5rem; }
.plan-price span { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }

.plan-features { margin-bottom: 2rem; }
.plan-features li { font-size: 0.82rem; color: var(--text-muted); padding: 6px 0; border-bottom: 1px solid var(--border); }
.plan-features li:last-child { border-bottom: none; }
.plan-features li.off { color: var(--text-dim); }

.btn-plan {
  display: block; text-align: center;
  padding: 10px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 700;
  border: 1px solid var(--border-2);
  color: var(--text);
  transition: all var(--transition);
}
.btn-plan:hover { border-color: var(--accent); color: var(--accent); }
.btn-plan.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-plan.primary:hover { background: #7c75ff; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: #22c55e; color: #fff;
  padding: 12px 20px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 700;
  transform: translateY(80px); opacity: 0;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 9999; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── FOOTER ── */
.site-footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
}
.site-footer .footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.site-footer p { font-size: 0.8rem; color: var(--text-muted); }

/* ── COMING SOON BADGE ── */
.coming {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(245,166,35,0.12);
  color: #f5a623;
  border: 1px solid rgba(245,166,35,0.25);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-preview { display: none; }
  .generator.active { grid-template-columns: 1fr; }
  .controls { position: static; }
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tabs-bar { gap: 4px; }
  .tab { padding: 7px 12px; font-size: 0.75rem; }
  .header-nav a:not(.btn-nav) { display: none; }
}
