/* ============================================================
   CachePlex — Favicon Generator Styles
   ============================================================ */

:root {
  --primary:      #2563eb;
  --accent:       #7c3aed;
  --dark:         #0f172a;
  --gray-900:     #1e293b;
  --gray-700:     #334155;
  --gray-500:     #64748b;
  --gray-300:     #cbd5e1;
  --gray-100:     #f1f5f9;
  --gray-50:      #f8fafc;
  --white:        #ffffff;
  --radius:       12px;
  --shadow:       0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--gray-900); background: var(--white); -webkit-font-smoothing: antialiased; }

/* ── Navbar ── */
.navbar { border-bottom: 1px solid rgba(0,0,0,.06); }
.brand-icon {
  width: 42px; height: 42px;
  background: linear-gradient(145deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,99,235,.35), inset 0 1px 0 rgba(255,255,255,.18);
  position: relative; overflow: hidden;
}
.brand-icon::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, transparent 100%);
  border-radius: 12px 12px 0 0;
}
.brand-icon-cp { font-weight: 900; font-size: .82rem; letter-spacing: .08em; text-shadow: 0 1px 3px rgba(0,0,0,.3); position: relative; z-index: 1; }
.brand-label { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.brand-text { font-weight: 800; font-size: 1.15rem; color: var(--dark); line-height: 1; }
.brand-tagline { font-size: .58rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-link { font-weight: 500; color: var(--gray-700) !important; font-size: .92rem; }
.nav-link:hover, .nav-link.active { color: var(--accent) !important; }

/* ── Hero ── */
.fav-hero {
  background: linear-gradient(160deg, #0f172a 0%, #1a0533 55%, #0f172a 100%);
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}
.fav-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(124,58,237,.25) 0%, transparent 70%);
}
.fav-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(124,58,237,.18);
  border: 1px solid rgba(124,58,237,.35);
  color: #c4b5fd;
  padding: 6px 16px; border-radius: 100px;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  margin-bottom: 20px;
  position: relative;
}
.fav-hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900; color: #fff;
  line-height: 1.1; margin-bottom: 16px;
  position: relative;
}
.fav-gradient-text {
  background: linear-gradient(90deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.fav-hero-sub {
  font-size: 1.1rem; color: #94a3b8; max-width: 560px;
  margin: 0 auto; line-height: 1.7; position: relative;
}
.fav-hero-sub code {
  background: rgba(255,255,255,.1); padding: 1px 7px; border-radius: 5px;
  color: #c4b5fd; font-family: monospace; font-size: .9em;
}

/* ── Tool Section ── */
.fav-tool-section { padding: 48px 0 60px; background: var(--gray-50); }

.fav-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 2px 32px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);
  overflow: hidden;
}

/* Tabs */
.fav-tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--gray-100);
  background: var(--gray-50);
  padding: 0 24px;
}
.fav-tab {
  display: flex; align-items: center;
  padding: 16px 24px;
  font-weight: 600; font-size: .9rem;
  color: var(--gray-500);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.fav-tab:hover { color: var(--accent); }
.fav-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Card body 2-col layout */
.fav-card-body { min-height: 520px; }
.fav-controls-col {
  border-right: 1px solid var(--gray-100);
  display: flex; flex-direction: column;
}
.fav-preview-col {
  background: var(--gray-50);
  display: flex; align-items: stretch;
}
.fav-preview-col .fav-preview-panel {
  border-radius: 0; background: transparent;
  flex: 1; padding: 28px 24px;
}

/* Tab panes */
.fav-tab-pane { display: none; padding: 24px 28px; flex: 1; }
.fav-tab-pane.active { display: block; }

@media (max-width: 991px) {
  .fav-controls-col { border-right: none; border-bottom: 1px solid var(--gray-100); }
  .fav-preview-col { background: var(--gray-50); }
  .fav-preview-col .fav-preview-panel { border-radius: 0; }
}

/* ── Form elements ── */
.fav-label {
  display: block; font-weight: 600; font-size: .85rem;
  color: var(--gray-700); margin-bottom: 8px;
}
.fav-hint { font-weight: 400; color: var(--gray-500); font-size: .8rem; }
.fav-field { margin-bottom: 20px; }

.fav-input {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--gray-300); border-radius: var(--radius);
  font-size: 1.1rem; font-weight: 700; font-family: inherit;
  transition: border .2s; outline: none; color: var(--dark);
  letter-spacing: .06em;
}
.fav-input:focus { border-color: var(--accent); }

/* Dropzone */
.fav-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center; cursor: pointer;
  transition: all .2s; background: var(--gray-50);
}
.fav-dropzone:hover, .fav-dropzone.drag-over {
  border-color: var(--accent); background: #f5f3ff;
}
.fav-drop-icon { font-size: 3rem; color: var(--accent); display: block; margin-bottom: 12px; }
.fav-drop-text { font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.fav-link { color: var(--accent); text-decoration: underline; cursor: pointer; }
.fav-drop-hint { font-size: .8rem; color: var(--gray-500); }
.fav-tip { font-size: .82rem; color: var(--gray-500); background: var(--gray-50); padding: 10px 14px; border-radius: 8px; }

/* Font grid */
.fav-font-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.fav-font-btn {
  border: 2px solid var(--gray-300); border-radius: 10px;
  padding: 12px 8px; text-align: center; cursor: pointer;
  transition: all .15s; background: #fff;
}
.fav-font-btn:hover { border-color: var(--accent); }
.fav-font-btn.active { border-color: var(--accent); background: #f5f3ff; }
.fav-font-preview { font-size: 1.5rem; font-weight: 700; color: var(--dark); line-height: 1; }
.fav-font-name { font-size: .68rem; color: var(--gray-500); margin-top: 4px; font-family: Inter, sans-serif !important; }

/* Color pickers */
.fav-color-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fav-color-swatch {
  width: 40px; height: 40px; border-radius: 8px;
  border: 2px solid var(--gray-300); cursor: pointer; padding: 0;
}
.fav-hex-input {
  flex: 1; padding: 8px 12px; border: 2px solid var(--gray-300);
  border-radius: 8px; font-size: .85rem; font-family: monospace;
  font-weight: 600; color: var(--dark); outline: none;
  transition: border .2s;
}
.fav-hex-input:focus { border-color: var(--accent); }
.fav-color-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.fav-preset {
  width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.fav-preset:hover { transform: scale(1.2); }

/* Shape row */
.fav-shape-row { display: flex; gap: 10px; }
.fav-shape-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 16px; border: 2px solid var(--gray-300); border-radius: 10px;
  cursor: pointer; background: #fff; font-size: .75rem; font-weight: 600;
  color: var(--gray-600); transition: all .15s;
}
.fav-shape-btn svg { color: var(--gray-400); }
.fav-shape-btn:hover, .fav-shape-btn.active {
  border-color: var(--accent); background: #f5f3ff; color: var(--accent);
}
.fav-shape-btn.active svg { color: var(--accent); }

/* Emoji input */
.fav-emoji-input-wrap { position: relative; }
.fav-emoji-input {
  width: 100%; padding: 16px 20px;
  font-size: 3rem; text-align: center;
  border: 2px solid var(--gray-300); border-radius: var(--radius);
  outline: none; transition: border .2s; background: var(--gray-50);
  line-height: 1.2;
}
.fav-emoji-input:focus { border-color: var(--accent); }

.fav-emoji-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px;
}
.fav-emoji-pick {
  font-size: 1.6rem; padding: 6px; border-radius: 8px;
  border: 2px solid transparent; background: var(--gray-50);
  cursor: pointer; transition: all .15s; line-height: 1;
}
.fav-emoji-pick:hover { background: #ede9fe; border-color: var(--accent); transform: scale(1.1); }

/* ── Preview Panel ── */
.fav-preview-panel {
  background: var(--gray-50);
  border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.fav-preview-label {
  font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gray-500);
}
.fav-preview-main {
  display: flex; justify-content: center; align-items: center;
  background: repeating-conic-gradient(#e2e8f0 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
  border-radius: 12px; padding: 20px; min-height: 160px;
}
.fav-canvas-preview {
  width: 128px; height: 128px;
  border-radius: 8px; box-shadow: var(--shadow);
  image-rendering: pixelated;
}

.fav-size-row {
  display: flex; gap: 12px; justify-content: center; align-items: flex-end;
  flex-wrap: wrap;
}
.fav-size-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: .7rem; color: var(--gray-500); font-weight: 600;
}
.fav-size-canvas {
  border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.15);
  background: repeating-conic-gradient(#e2e8f0 0% 25%, #fff 0% 50%) 0 0 / 8px 8px;
  image-rendering: pixelated;
}

/* Browser tab mockup */
.fav-browser-mock {
  background: #e2e8f0; border-radius: 8px; padding: 8px 10px;
}
.fav-browser-tab {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border-radius: 6px; padding: 5px 10px;
  max-width: 200px; box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.fav-tab-title { font-size: .75rem; color: var(--gray-700); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Download button */
.fav-download-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 100%; padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border: none; border-radius: 12px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: all .2s; box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
.fav-download-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,.4); }
.fav-download-btn:active { transform: translateY(0); }
.fav-dl-note { font-size: .7rem; opacity: .8; font-weight: 400; }

.fav-generating { display: flex; align-items: center; justify-content: center; font-size: .9rem; color: var(--gray-500); padding: 8px; }
.fav-error { color: #dc2626; font-size: .85rem; text-align: center; padding: 8px; background: #fef2f2; border-radius: 8px; }

/* ── Info Section ── */
.fav-info-section { padding: 80px 0; }

.fav-section-badge {
  display: inline-flex; align-items: center;
  background: #f5f3ff; color: var(--accent);
  padding: 5px 14px; border-radius: 100px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  margin-bottom: 12px;
}
.fav-section-title {
  font-size: 2rem; font-weight: 800; color: var(--dark);
  margin-bottom: 12px; line-height: 1.2;
}

/* Steps */
.fav-step-card {
  text-align: center; padding: 32px 24px;
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); border: 1px solid var(--gray-100);
  height: 100%;
}
.fav-step-num {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
  margin: 0 auto 16px;
}
.fav-step-icon { font-size: 2rem; margin-bottom: 12px; color: var(--accent); }
.fav-step-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; color: var(--dark); }
.fav-step-desc { font-size: .88rem; color: var(--gray-500); line-height: 1.6; }

/* Package box */
.fav-package-box {
  background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
  border-radius: 20px; padding: 48px;
  border: 1px solid rgba(124,58,237,.12);
}
.fav-file-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; background: #fff; border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.fav-file-icon { font-size: 1.2rem; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.fav-file-name { font-weight: 600; font-size: .85rem; color: var(--dark); }
.fav-file-note { font-size: .75rem; color: var(--gray-500); }

/* Code box */
.fav-code-box {
  background: #0f172a; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.fav-code-header {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.fav-code-dot { width: 12px; height: 12px; border-radius: 50%; }
.fav-code { padding: 20px; font-size: .8rem; line-height: 1.8; color: #94a3b8; overflow-x: auto; }
.fav-code code { color: #a78bfa; }

/* Footer */
.fav-footer {
  background: var(--gray-50); border-top: 1px solid var(--gray-100);
  padding: 48px 0 24px;
}
.footer-link { color: var(--gray-500); text-decoration: none; transition: color .15s; }
.footer-link:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
  .fav-tab { padding: 12px 14px; font-size: .82rem; }
  .fav-tab-pane { padding: 20px; }
  .fav-package-box { padding: 24px; }
  .fav-font-grid { grid-template-columns: repeat(2, 1fr); }
  .fav-emoji-grid { grid-template-columns: repeat(6, 1fr); }
}
