/* ============================================================
   PortfolioForge - Main Stylesheet
   Premium SaaS UI Design
   ============================================================ */

/* === CSS Variables === */
:root {
  --primary: #667eea;
  --primary-dark: #5a6fd8;
  --secondary: #764ba2;
  --accent: #f093fb;
  --bg-dark: #0a0a14;
  --bg-card: #12121e;
  --bg-card2: #1a1a2e;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(102,126,234,0.4);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-alt: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-green: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(102,126,234,0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* === Typography === */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }

img { max-width: 100%; height: auto; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  background: rgba(10,10,20,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(10,10,20,0.95);
  box-shadow: var(--shadow-md);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow);
}

.logo span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover { color: var(--text-primary); background: var(--border); }

.nav-cta {
  background: var(--gradient) !important;
  color: white !important;
  padding: 10px 24px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(102,126,234,0.5) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.hamburger span { width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }
.hamburger:hover { background: var(--border); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(102,126,234,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(118,75,162,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(240,147,251,0.08) 0%, transparent 60%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(102,126,234,0.12);
  border: 1px solid rgba(102,126,234,0.25);
  border-radius: 50px;
  padding: 6px 16px 6px 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease both;
}

.hero-badge-dot {
  width: 20px; height: 20px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero h1 .highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient);
  color: white;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 32px rgba(102,126,234,0.4), 0 0 0 0 rgba(102,126,234,0.3);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(102,126,234,0.5), 0 0 0 4px rgba(102,126,234,0.15);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text-primary);
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(102,126,234,0.06);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 56px;
  animation: fadeInUp 0.7s ease 0.4s both;
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section { padding: 100px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  background: rgba(102,126,234,0.1);
  border: 1px solid rgba(102,126,234,0.2);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   TEMPLATES GRID
   ============================================================ */
.templates-section { background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%); }

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.template-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
}

.template-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.template-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(102,126,234,0.3), var(--shadow-lg);
}

.template-preview {
  width: 100%;
  aspect-ratio: 16/10;
  background: #0a0a1a;
  position: relative;
  overflow: hidden;
}

.template-preview img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.template-card:hover .template-preview img { transform: scale(1.05); }

.template-preview-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

.template-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-popular { background: rgba(240,147,251,0.2); color: #f093fb; border: 1px solid rgba(240,147,251,0.3); }
.badge-new { background: rgba(74,222,128,0.2); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.badge-dark { background: rgba(148,163,184,0.15); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }

.template-info { padding: 20px; }
.template-name { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.template-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }

.template-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.template-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.template-select-indicator {
  position: absolute;
  top: 12px; left: 12px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  opacity: 0;
  transform: scale(0.5);
  transition: var(--transition);
}

.template-card.selected .template-select-indicator { opacity: 1; transform: scale(1); }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section { background: var(--bg-dark); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  z-index: 0;
}

.step-item {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-num {
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  transition: var(--transition);
  position: relative;
}

.step-item:hover .step-num {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.step-num::before {
  content: attr(data-step);
  position: absolute;
  top: -10px; right: -10px;
  width: 24px; height: 24px;
  background: var(--gradient);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: white;
}

.step-item h3 { font-size: 1rem; margin-bottom: 8px; }
.step-item p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}

.feature-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.feature-card:hover::before { opacity: 0.04; }

.feature-card > * { position: relative; z-index: 1; }

.feature-icon {
  width: 52px; height: 52px;
  background: rgba(102,126,234,0.12);
  border: 1px solid rgba(102,126,234,0.2);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
  transition: var(--transition);
}

.feature-card:hover .feature-icon { background: rgba(102,126,234,0.2); transform: scale(1.1); }

.feature-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.feature-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-section {
  padding: 80px 24px;
  text-align: center;
}

.cta-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 80px 40px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 300px;
  background: radial-gradient(ellipse, rgba(102,126,234,0.2), transparent 70%);
  pointer-events: none;
}

.cta-card h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); margin-bottom: 16px; }
.cta-card p { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 36px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-card .btn-primary { font-size: 1.1rem; padding: 18px 40px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

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

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.875rem; color: var(--text-secondary); }
.footer-col ul li a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: white; }

/* ============================================================
   CREATE PAGE (FORM)
   ============================================================ */
.create-page { padding: 100px 24px 60px; min-height: 100vh; }
.create-inner { max-width: 860px; margin: 0 auto; }

.create-header { text-align: center; margin-bottom: 48px; }
.create-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 12px; }
.create-header p { color: var(--text-secondary); font-size: 1rem; }

.progress-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px;
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.progress-step.active {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.progress-step.done { color: var(--primary); }

/* Form Styles */
.form-section {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  margin-bottom: 20px;
  display: none;
}

.form-section.active { display: block; animation: fadeInUp 0.4s ease; }

.form-section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.1rem; margin-bottom: 28px;
}

.form-section-icon {
  width: 40px; height: 40px;
  background: rgba(102,126,234,0.12);
  border: 1px solid rgba(102,126,234,0.2);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group.full { grid-column: 1 / -1; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.required::after { content: ' *'; color: #f87171; }

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
textarea,
select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  background: rgba(102,126,234,0.05);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

textarea { resize: vertical; min-height: 110px; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

select option { background: #1a1a2e; color: var(--text-primary); }

/* Skills Tags Input */
.tags-input-wrap {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  min-height: 52px;
  cursor: text;
  transition: var(--transition);
}

.tags-input-wrap.focused {
  border-color: var(--primary);
  background: rgba(102,126,234,0.05);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}

.tag-item {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(102,126,234,0.15);
  border: 1px solid rgba(102,126,234,0.25);
  color: #93c5fd;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}

.tag-remove {
  cursor: pointer; width: 14px; height: 14px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  transition: var(--transition);
}
.tag-remove:hover { background: rgba(248,113,113,0.3); color: #f87171; }

.tags-input {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  flex: 1;
  min-width: 120px;
  padding: 4px 8px !important;
  font-size: 0.9rem;
  box-shadow: none !important;
}

/* Dynamic Sections (Experience, Projects) */
.dynamic-section { margin-bottom: 12px; }
.dynamic-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
}

.dynamic-item-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

.dynamic-item-title { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }

.remove-item {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.2);
  color: #f87171;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.remove-item:hover { background: rgba(248,113,113,0.2); }

.add-item-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(102,126,234,0.08);
  border: 1px dashed rgba(102,126,234,0.3);
  color: var(--primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  width: 100%;
  justify-content: center;
}
.add-item-btn:hover { background: rgba(102,126,234,0.15); border-style: solid; }

/* Image Upload */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.image-upload-area:hover, .image-upload-area.dragover {
  border-color: var(--primary);
  background: rgba(102,126,234,0.05);
}

.image-upload-area input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
  padding: 0;
}

.upload-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.6; }
.upload-text { font-size: 0.9rem; color: var(--text-secondary); }
.upload-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.upload-preview { max-width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto; display: none; border: 3px solid var(--primary); }

/* Form Navigation */
.form-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.btn-nav {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-nav-back {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-nav-back:hover { border-color: var(--primary); color: var(--primary); }

.btn-nav-next {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(102,126,234,0.35);
  margin-left: auto;
}
.btn-nav-next:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(102,126,234,0.45); }

.btn-generate {
  background: linear-gradient(135deg, #f093fb, #f5576c, #667eea);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  color: white;
  box-shadow: 0 4px 20px rgba(240,147,251,0.4);
  margin-left: auto;
  font-size: 1rem;
}
.btn-generate:hover { box-shadow: 0 8px 32px rgba(240,147,251,0.5); transform: translateY(-2px); }

/* Template Selection in Form */
.template-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.template-radio-item {
  position: relative;
  cursor: pointer;
}

.template-radio-item input[type="radio"] { display: none; }

.template-radio-label {
  display: block;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.template-radio-item input:checked + .template-radio-label {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(102,126,234,0.2);
}

.template-radio-label .preview-img {
  width: 100%; aspect-ratio: 4/3;
  background: #0a0a1a;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  overflow: hidden;
}

.template-radio-label .preview-img img { width: 100%; height: 100%; object-fit: cover; }

.template-radio-label .preview-name {
  padding: 8px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
}

.template-radio-item input:checked + .template-radio-label .preview-name {
  color: var(--primary);
}

/* Color Picker */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.color-swatch.selected, .color-swatch:hover { border-color: white; transform: scale(1.1); }

/* ============================================================
   SUCCESS PAGE
   ============================================================ */
.success-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 100px 24px; }

.success-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  max-width: 620px;
  width: 100%;
  text-align: center;
}

.success-icon {
  width: 100px; height: 100px;
  background: linear-gradient(135deg, rgba(74,222,128,0.15), rgba(34,197,94,0.15));
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 50%;
  margin: 0 auto 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  animation: bounceIn 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.success-card h1 { font-size: 2rem; margin-bottom: 12px; }
.success-card p { color: var(--text-secondary); margin-bottom: 32px; }

.url-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
  text-align: left;
}

.url-box .url-text {
  flex: 1; font-size: 0.9rem; color: var(--primary);
  word-break: break-all; font-family: 'Courier New', monospace;
}

.copy-btn {
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.copy-btn:hover { opacity: 0.85; }
.copy-btn.copied { background: linear-gradient(135deg, #4ade80, #22c55e); }

.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   PORTFOLIO LOADING
   ============================================================ */
.generating-overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,20,0.95);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
  backdrop-filter: blur(10px);
}

.generating-spinner {
  width: 80px; height: 80px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.generating-text { font-size: 1.1rem; color: var(--text-secondary); animation: pulse 1.5s ease infinite; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  80% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .template-select-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 70px; left: 0; right: 0; background: rgba(10,10,20,0.98); backdrop-filter: blur(20px); flex-direction: column; padding: 20px 24px; border-bottom: 1px solid var(--border); gap: 4px; }
  .nav-links.open { display: flex; animation: fadeInDown 0.3s ease; }
  .hamburger { display: flex; }
  .steps-grid::before { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .template-select-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .progress-step span { display: none; }
  .success-card { padding: 40px 24px; }
  .hero-stats { gap: 20px; }
  .stat-divider { display: none; }
  .section { padding: 60px 16px; }
}

@media (max-width: 480px) {
  .template-select-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; width: 100%; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .form-section { padding: 24px 18px; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-gradient { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-auto { margin-top: auto; }
.d-none { display: none; }
.d-flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }

/* Glow lines decorative */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: 0 auto;
  max-width: 200px;
}

/* Notification toast */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 0.875rem;
  z-index: 99999;
  animation: fadeInUp 0.3s ease;
  box-shadow: var(--shadow-lg);
  max-width: 320px;
  display: flex; align-items: center; gap: 10px;
}
.toast.success { border-color: rgba(74,222,128,0.3); }
.toast.error { border-color: rgba(248,113,113,0.3); }
