/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #F8F9FF;
  color: #1E1E2E;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== LAYOUT ===== */
.container {

  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #E8EAFF;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(99,102,241,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #1E1E2E;
}
.header-nav {
  display: flex;
  gap: 32px;
}
.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
  transition: color 0.2s;
}
.header-nav a:hover { color: #6366F1; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #EEF2FF 0%, #F0F9FF 50%, #FAF5FF 100%);
  padding: 72px 0 56px;
  text-align: center;
  border-bottom: 1px solid #E8EAFF;
}
.hero-badge {
  display: inline-block;
  background: #EEF2FF;
  color: #6366F1;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid #C7D2FE;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: #1E1E2E;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 18px;
  color: #6B7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== MAIN TOOL AREA ===== */
.main-tool {
  padding: 48px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ===== CARDS ===== */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 40px;
  box-shadow: 0 2px 20px rgba(99,102,241,0.07), 0 0 0 1px rgba(99,102,241,0.05);
  position: relative;
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  margin-bottom: 12px;
}
.card h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1E1E2E;
  margin-bottom: 6px;
}
.step-desc {
  font-size: 14px;
  color: #9CA3AF;
  margin-bottom: 28px;
}

/* ===== DROPZONE ===== */
.dropzone {
  border: 2px dashed #C7D2FE;
  border-radius: 16px;
  padding: 52px 24px;
  text-align: center;
  background: #FAFBFF;
  transition: all 0.25s ease;
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
  border-color: #6366F1;
  background: #EEF2FF;
}
.dropzone-icon { margin-bottom: 16px; display: flex; justify-content: center; }
.dropzone-title {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}
.file-label {
  color: #6366F1;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dropzone-hint { font-size: 13px; color: #9CA3AF; }

/* ===== UPLOADED PREVIEW ===== */
.uploaded-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: #F9FAFB;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  margin-bottom: 20px;
}
.uploaded-thumb-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}
.uploaded-thumb-wrap img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  background: repeating-conic-gradient(#E5E7EB 0% 25%, #fff 0% 50%) 0 0 / 12px 12px;
}
.remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: #EF4444;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.remove-btn:hover { background: #DC2626; }
.uploaded-meta { display: flex; flex-direction: column; gap: 4px; }
.file-name { font-size: 14px; font-weight: 600; color: #1E1E2E; }
.file-size { font-size: 12px; color: #9CA3AF; }

/* ===== CONTROLS ===== */
.padding-control, .bg-control {
  margin-bottom: 20px;
}
.padding-control label, .bg-control label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}
input[type="range"] {
  width: 100%;
  height: 6px;
  accent-color: #6366F1;
  cursor: pointer;
}
.bg-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bg-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid #E5E7EB;
  font-size: 12px;
  color: #6B7280;
  transition: all 0.2s;
}
.bg-opt:hover { border-color: #6366F1; }
.bg-opt.active { border-color: #6366F1; background: #EEF2FF; color: #6366F1; font-weight: 600; }
.bg-opt span:first-child {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}
.checkered {
  background: repeating-conic-gradient(#CBD5E1 0% 25%, #fff 0% 50%) 0 0 / 12px 12px;
}
.bg-opt input[type="color"] {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,102,241,0.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: #F3F4F6;
  color: #374151;
  border: 1px solid #E5E7EB;
}
.btn-secondary:hover { background: #E5E7EB; }
.btn-generate { margin-top: 8px; }

/* ===== PREVIEW TABS ===== */
.preview-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  background: #F3F4F6;
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
}
.tab-btn {
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  transition: all 0.2s;
}
.tab-btn.active {
  background: #fff;
  color: #6366F1;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== BROWSER MOCKUP ===== */
.browser-mockup {
  background: #F9FAFB;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  max-width: 600px;
}
.browser-chrome {
  background: #E5E7EB;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.browser-dots { display: flex; gap: 5px; }
.browser-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #9CA3AF;
}
.browser-urlbar {
  flex: 1;
  background: #fff;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab-icon { width: 16px; height: 16px; object-fit: contain; border-radius: 2px; }
.browser-body { background: #fff; }
.tab-row {
  display: flex;
  gap: 2px;
  padding: 8px 8px 0;
  background: #E5E7EB;
}
.browser-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px 8px 0 0;
  font-size: 12px;
  color: #6B7280;
  background: #D1D5DB;
}
.active-tab {
  background: #fff;
  color: #1E1E2E;
  font-weight: 500;
}

/* ===== GOOGLE MOCKUP ===== */
.google-mockup {
  max-width: 600px;
  padding: 24px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
}
.google-site-info { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.google-favicon { width: 18px; height: 18px; border-radius: 3px; }
.google-domain { font-size: 13px; color: #202124; }
.google-arrow { color: #9CA3AF; font-size: 12px; margin-left: 2px; }
.google-title { font-size: 20px; color: #1A0DAB; font-weight: 400; margin-bottom: 4px; cursor: pointer; }
.google-title:hover { text-decoration: underline; }
.google-desc { font-size: 14px; color: #4D5156; line-height: 1.58; }

/* ===== MOBILE MOCKUP ===== */
.mobile-mockup { display: flex; justify-content: center; padding: 20px; }
.phone-frame {
  width: 220px;
  background: #1E1E2E;
  border-radius: 36px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.phone-screen {
  background: linear-gradient(160deg, #0F172A, #1E293B);
  border-radius: 24px;
  padding: 20px 16px;
  min-height: 200px;
}
.home-screen-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.app-icon-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.app-icon-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: repeating-conic-gradient(#374151 0% 25%, #1F2937 0% 50%) 0 0 / 12px 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.app-icon-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.app-label { font-size: 9px; color: rgba(255,255,255,0.7); text-align: center; }
.highlight .app-icon-img {
  box-shadow: 0 0 0 3px rgba(99,102,241,0.8), 0 4px 16px rgba(99,102,241,0.4);
}

/* ===== SIZES GRID ===== */
.sizes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.size-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: #F9FAFB;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  min-width: 90px;
}
.size-item canvas { border-radius: 4px; background: repeating-conic-gradient(#E5E7EB 0% 25%, #fff 0% 50%) 0 0 / 8px 8px; }
.size-label { font-size: 11px; color: #9CA3AF; font-weight: 600; }

/* ===== DOWNLOAD CARD ===== */
.download-actions { margin-bottom: 28px; }
.download-singles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.btn-single-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: #F3F4F6;
  color: #374151;
  border: 1px solid #E5E7EB;
  transition: all 0.15s;
}
.btn-single-dl:hover { background: #EEF2FF; color: #6366F1; border-color: #C7D2FE; }

/* ===== HTML CODE BLOCK ===== */
.html-code-block {
  background: #1E1E2E;
  border-radius: 14px;
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  font-weight: 500;
}
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(99,102,241,0.2);
  color: #A5B4FC;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-copy:hover { background: rgba(99,102,241,0.35); color: #fff; }
.btn-copy.copied { background: rgba(34,197,94,0.2); color: #86EFAC; }
.code-block {
  padding: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: #A5B4FC;
  overflow-x: auto;
  white-space: pre;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ===== SECTIONS ===== */
.section-title {
  font-size: 32px;
  font-weight: 800;
  color: #1E1E2E;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  background: #fff;
  padding: 80px 0;
  border-top: 1px solid #E8EAFF;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.step-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: 16px;
  background: #FAFBFF;
  border: 1px solid #E8EAFF;
  transition: all 0.2s;
}
.step-card:hover {
  border-color: #C7D2FE;
  box-shadow: 0 4px 20px rgba(99,102,241,0.1);
  transform: translateY(-3px);
}
.step-num {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step-card h3 { font-size: 16px; font-weight: 700; color: #1E1E2E; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: #6B7280; line-height: 1.6; }

/* ===== TIPS ===== */
.tips-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #F8F9FF 0%, #F0F9FF 100%);
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.tip-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  border: 1px solid #E8EAFF;
  transition: all 0.2s;
}
.tip-card:hover {
  border-color: #C7D2FE;
  box-shadow: 0 4px 20px rgba(99,102,241,0.08);
}
.tip-icon {
  font-size: 22px;
  color: #6366F1;
  margin-bottom: 12px;
}
.tip-card h3 { font-size: 16px; font-weight: 700; color: #1E1E2E; margin-bottom: 8px; }
.tip-card p { font-size: 14px; color: #6B7280; line-height: 1.65; }

/* ===== FAQ ===== */
.faq-section {
  padding: 80px 0;
  background: #fff;
  border-top: 1px solid #E8EAFF;
}
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #FAFBFF;
  border: 1px solid #E8EAFF;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: #C7D2FE; }
.faq-item summary {
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  color: #1E1E2E;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.faq-item summary::after {
  content: '＋';
  font-size: 18px;
  color: #6366F1;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '－'; }
.faq-item p {
  padding: 0 22px 18px;
  font-size: 14px;
  color: #6B7280;
  line-height: 1.7;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #1E1E2E;
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.footer-copy { font-size: 13px; color: #6B7280; }

/* ===== LOADING ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,30,46,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px 56px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.spinner {
  width: 48px; height: 48px;
  border: 4px solid #E8EAFF;
  border-top-color: #6366F1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
.loading-box p { font-size: 15px; font-weight: 500; color: #374151; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .card { padding: 24px 20px; }
  .header-nav { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero-desc { font-size: 16px; }
  .preview-tabs { flex-wrap: wrap; }
  .tab-btn { padding: 7px 12px; font-size: 12px; }
  .home-screen-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
