:root {
  --bg: #070b14;
  --surface: rgba(15, 23, 42, 0.78);
  --surface-solid: #0f172a;
  --border: rgba(148, 163, 184, 0.16);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #6366f1;
  --accent: #06b6d4;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
  z-index: -1;
  pointer-events: none;
}
.orb-1 { width: 520px; height: 520px; background: #6366f1; top: -180px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: #06b6d4; bottom: -160px; right: -100px; }

.container { max-width: 1220px; margin: 0 auto; padding: 0 22px; }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-badge {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.brand-tag {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: rgba(99, 102, 241, 0.2); color: #a5b4fc; font-weight: 600;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.pill-link {
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: #e2e8f0 !important;
}

/* Hero */
.hero { padding: 56px 0 36px; text-align: center; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: rgba(6, 182, 212, 0.14); border: 1px solid rgba(6, 182, 212, 0.35);
  color: #67e8f9; font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.18; margin: 0 0 16px; letter-spacing: -1.2px; font-weight: 800; }
.gradient-text { background: linear-gradient(90deg, #818cf8, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 16px; }

/* Main Builder Grid */
.builder-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 56px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 20px;
  backdrop-filter: blur(14px);
}
.card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.step-num {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
  background: rgba(99, 102, 241, 0.18); color: #a5b4fc;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.card-header h2 { margin: 0 0 4px; font-size: 18px; }
.card-header p { margin: 0; font-size: 13px; color: var(--muted); }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-size: 13px; font-weight: 600; color: #cbd5e1; margin-bottom: 6px; }
.req { color: #38bdf8; }

input[type="text"], input[type="url"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 11px;
  background: rgba(2, 6, 23, 0.65); border: 1px solid var(--border);
  color: #f8fafc; font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: #818cf8; }

.color-picker-wrap { display: flex; gap: 8px; align-items: center; }
input[type="color"] { width: 46px; height: 42px; border: none; border-radius: 10px; background: transparent; cursor: pointer; padding: 0; }
.color-swatches { display: flex; gap: 10px; margin-top: 6px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); cursor: pointer; transition: transform 0.15s; }
.swatch:hover { transform: scale(1.15); }

/* Dual Image Mode Tabs */
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; background: rgba(2,6,23,0.6); padding: 6px; border-radius: 13px; }
.mode-tab {
  padding: 11px; border: none; border-radius: 9px; background: transparent;
  color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.2s;
}
.mode-tab.active { background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; box-shadow: 0 6px 20px rgba(99,102,241,0.35); }
.mode-pane { display: none; }
.mode-pane.active { display: block; }

.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.upload-slot {
  border: 1.5px dashed rgba(148, 163, 184, 0.3); border-radius: 14px;
  padding: 18px 12px; text-align: center; cursor: pointer; transition: all 0.2s;
  background: rgba(2, 6, 23, 0.4); display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.upload-slot:hover { border-color: #818cf8; background: rgba(99, 102, 241, 0.08); }
.slot-preview {
  width: 64px; height: 64px; border-radius: 14px; background: rgba(255,255,255,0.06);
  display: grid; place-items: center; font-size: 26px; overflow: hidden;
}
.slot-preview img { width: 100%; height: 100%; object-fit: cover; }
.slot-title { font-size: 13px; font-weight: 700; color: #f1f5f9; }
.slot-sub { font-size: 11px; color: var(--muted); }

/* AI Mode */
.ai-notice {
  font-size: 12px; color: #67e8f9; background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.25); padding: 10px 12px; border-radius: 10px; margin-bottom: 14px;
}
.preset-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.04); color: #cbd5e1; font-size: 12px; cursor: pointer;
}
.chip:hover { border-color: #818cf8; color: #fff; }
.ai-actions { display: flex; gap: 10px; }
.ai-history { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.history-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.history-list { display: flex; gap: 10px; flex-wrap: wrap; }
.history-thumb {
  width: 62px; height: 62px; border-radius: 12px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; transition: transform 0.15s;
}
.history-thumb.selected { border-color: #22d3ee; transform: scale(1.06); }
.history-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Nav Builder */
.nav-builder-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.nav-item-row { display: grid; grid-template-columns: 0.9fr 0.7fr 1.6fr 36px; gap: 8px; align-items: center; }
.btn-del { background: rgba(239,68,68,0.15); color: #f87171; border: none; border-radius: 8px; height: 38px; cursor: pointer; font-weight: 700; }

/* Buttons */
.btn-primary-xl {
  width: 100%; padding: 17px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff; font-size: 17px; font-weight: 800; cursor: pointer;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35); transition: transform 0.15s, opacity 0.2s;
}
.btn-primary-xl:hover { transform: translateY(-2px); }
.btn-primary-xl:disabled { opacity: 0.6; cursor: wait; }

.btn-primary {
  display: inline-block; padding: 12px 20px; border-radius: 11px; text-decoration: none;
  background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; font-weight: 700; font-size: 14px; border: none; cursor: pointer;
}
.btn-secondary {
  padding: 11px 18px; border-radius: 11px; border: none; text-decoration: none;
  background: rgba(99, 102, 241, 0.22); color: #c7d2fe; font-weight: 700; font-size: 14px; cursor: pointer;
}
.btn-secondary:hover { background: rgba(99, 102, 241, 0.35); color: #fff; }
.btn-outline {
  padding: 11px 16px; border-radius: 11px; border: 1px solid var(--border);
  background: transparent; color: #e2e8f0; font-weight: 600; font-size: 13px; cursor: pointer;
}
.btn-ghost {
  padding: 8px 14px; border-radius: 9px; border: 1px dashed var(--border);
  background: transparent; color: #94a3b8; font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { color: #fff; border-color: #818cf8; }

.error-box {
  margin-top: 12px; padding: 12px 16px; border-radius: 11px;
  background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); color: #fca5a5; font-size: 13px;
}

/* Sticky Phone Mockup */
.preview-sticky { position: sticky; top: 88px; display: flex; flex-direction: column; align-items: center; }
.preview-tabs { display: flex; gap: 6px; margin-bottom: 16px; background: var(--surface); padding: 5px; border-radius: 12px; border: 1px solid var(--border); }
.p-tab { padding: 7px 11px; border: none; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.p-tab.active { background: rgba(99,102,241,0.28); color: #fff; }

.phone-frame {
  width: 300px; height: 590px; border-radius: 42px;
  background: #020617; border: 8px solid #1e293b;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.phone-notch { width: 110px; height: 22px; background: #020617; border-radius: 0 0 14px 14px; position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 5; }
.phone-status { display: flex; justify-content: space-between; padding: 8px 18px 4px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.25); z-index: 4; }

.phone-screen { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.phone-screen.active { display: flex; }

.app-topbar { padding: 12px 16px; background: var(--primary); color: #fff; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; }
.mock-url { font-size: 10px; opacity: 0.85; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 999px; }
.app-webview-area { flex: 1; background: #f8fafc; display: grid; place-items: center; padding: 20px; }
.webview-card { text-align: center; background: #fff; padding: 26px 18px; border-radius: 20px; width: 100%; box-shadow: 0 10px 30px rgba(15,23,42,0.08); }
.wv-logo { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 12px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 800; overflow: hidden; }
.wv-logo img { width: 100%; height: 100%; object-fit: cover; }
.webview-card h4 { margin: 0 0 4px; color: #0f172a; font-size: 16px; }
.webview-card p { margin: 0 0 12px; color: #64748b; font-size: 11px; word-break: break-all; }
.wv-pill { display: inline-block; font-size: 10px; background: #ecfdf5; color: #059669; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.app-bottombar { display: flex; justify-content: space-around; padding: 10px 6px 14px; background: #ffffff; border-top: 1px solid #e2e8f0; color: #475569; }
.bnav-item { display: flex; flex-direction: column; align-items: center; font-size: 10px; font-weight: 600; gap: 2px; }
.bnav-ico { font-size: 16px; }

/* Home Screen Preview */
.home-screen { background: linear-gradient(160deg, #1e1b4b, #0f172a); padding: 36px 20px; align-items: center; }
.home-clock { font-size: 46px; font-weight: 200; color: #fff; margin-bottom: 36px; }
.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; width: 100%; }
.dummy-app { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; color: #e2e8f0; text-align: center; }
.d-ico { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,0.12); display: grid; place-items: center; font-size: 22px; overflow: hidden; }
.highlight-app .d-ico { background: var(--primary); box-shadow: 0 8px 20px rgba(99,102,241,0.5); font-weight: 800; color: #fff; }
.highlight-app .d-ico img { width: 100%; height: 100%; object-fit: cover; }

/* Splash Screen Preview */
.splash-screen { background: var(--primary); align-items: center; justify-content: center; gap: 16px; background-size: cover; background-position: center; }
.splash-logo { width: 96px; height: 96px; border-radius: 24px; background: rgba(255,255,255,0.2); color: #fff; display: grid; place-items: center; font-size: 42px; font-weight: 800; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,0.25); }
.splash-logo img { width: 100%; height: 100%; object-fit: cover; }
.splash-title { color: #fff; font-size: 20px; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.splash-loader { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Banner Screen Preview */
.banner-screen { background: #fff; padding: 18px; gap: 14px; justify-content: center; }
.store-banner-card { width: 100%; height: 136px; border-radius: 14px; background: var(--primary); display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; padding: 14px; background-size: cover; background-position: center; }
.banner-icon { width: 54px; height: 54px; border-radius: 14px; background: rgba(255,255,255,0.2); display: grid; place-items: center; font-size: 24px; font-weight: 800; overflow: hidden; flex-shrink: 0; }
.banner-icon img { width: 100%; height: 100%; object-fit: cover; }
.banner-text { display: flex; flex-direction: column; }
.banner-text strong { font-size: 16px; }
.banner-text span { font-size: 11px; opacity: 0.9; }
.store-install-btn { display: block; text-align: center; background: #01875f; color: #fff; padding: 9px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.store-hint { font-size: 11px; color: #64748b; text-align: center; }
.preview-caption { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* Result Dashboard */
.result-section { margin-bottom: 64px; }
.result-card {
  background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(15,23,42,0.8));
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 22px; padding: 30px;
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.14);
}
.result-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.success-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(16,185,129,0.2); color: #34d399; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.result-top h2 { margin: 0 0 4px; font-size: 22px; }
.expire-timer { margin: 0; font-size: 13px; color: #fbbf24; font-weight: 600; }
.download-btns { display: flex; gap: 10px; }

.result-grid { display: grid; grid-template-columns: 0.9fr 1.25fr 0.95fr; gap: 20px; }
.res-box { background: rgba(2, 6, 23, 0.55); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.res-box h3 { margin: 0 0 14px; font-size: 15px; }
.qr-card { text-align: center; }
.qr-svg-wrap { background: #fff; padding: 14px; border-radius: 14px; display: inline-block; margin-bottom: 10px; }
.qr-svg-wrap svg { width: 170px; height: 170px; display: block; }
.res-hint { font-size: 12px; color: var(--muted); margin: 0; }

.copy-item { margin-bottom: 14px; }
.copy-row { display: flex; gap: 6px; }
.btn-copy, .btn-open {
  padding: 0 12px; border-radius: 9px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.08); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
}
.push-msg { margin-top: 10px; font-size: 12px; color: #34d399; background: rgba(16,185,129,0.12); padding: 10px; border-radius: 9px; }

/* Features */
.features-section { padding: 24px 0 64px; }
.sec-title { text-align: center; font-size: 28px; margin-bottom: 28px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.feat-ico { font-size: 28px; margin-bottom: 10px; }
.feat-card h3 { margin: 0 0 8px; font-size: 16px; }
.feat-card p { margin: 0; font-size: 13px; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer a { color: #818cf8; text-decoration: none; }

@media (max-width: 980px) {
  .builder-grid, .result-grid, .features-grid { grid-template-columns: 1fr; }
  .preview-sticky { position: static; }
  .upload-grid { grid-template-columns: 1fr; }
}
