/* =====================================================
   ToolBox Pro - Main Stylesheet
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables (Design Tokens) ─────────────────── */
:root {
  /* Brand */
  --primary: #6C63FF;
  --primary-dark: #5A52E0;
  --primary-light: #8B85FF;
  --accent: #FF6584;
  --accent-dark: #E05070;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Light Mode Surface */
  --bg: #F8F9FF;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-hover: #F0F0FF;
  --border: #E5E7F0;
  --border-focus: #6C63FF;
  --shadow: 0 4px 24px rgba(108,99,255,0.08);
  --shadow-hover: 0 8px 40px rgba(108,99,255,0.18);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);

  /* Text */
  --text: #1A1B2E;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --text-inverse: #FFFFFF;

  /* Navbar */
  --nav-bg: rgba(255,255,255,0.85);
  --nav-border: rgba(108,99,255,0.12);

  /* Misc */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  --bg: #0D0E1A;
  --bg-secondary: #13141F;
  --bg-card: #1A1B2E;
  --bg-hover: #22233A;
  --border: #2A2B3D;
  --border-focus: #6C63FF;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 40px rgba(108,99,255,0.25);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.3);
  --text: #F0F0FF;
  --text-secondary: #A0A8C0;
  --text-muted: #6B7280;
  --text-inverse: #0D0E1A;
  --nav-bg: rgba(13,14,26,0.9);
  --nav-border: rgba(108,99,255,0.2);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.35s ease, color 0.35s ease;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
ul { list-style: none; }

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ── Typography ─────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
p { color: var(--text-secondary); }

/* ── Utility Classes ────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.5rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer; border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(108,99,255,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108,99,255,0.5);
}
.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}
.btn-ghost {
  color: var(--text-secondary);
  background: var(--bg-hover);
}
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; transform: translateY(-1px); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; border-radius: var(--radius); }
.btn-icon { padding: 0.6rem; width: 2.5rem; height: 2.5rem; justify-content: center; border-radius: var(--radius-sm); }

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.1); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 1.5rem;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.4rem; font-weight: 800; color: var(--text);
  flex-shrink: 0;
}
.nav-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  flex: 1; justify-content: center;
}
.nav-links a {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
  background: var(--bg-hover);
}
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: var(--transition);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); transform: rotate(20deg); }

/* Mobile menu */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 0.5rem;
  width: 40px; height: 40px; justify-content: center; align-items: center;
  border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border);
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px; transition: var(--transition);
}
.nav-mobile {
  display: none; flex-direction: column; gap: 0.5rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--nav-bg);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-weight: 500;
  transition: var(--transition);
}
.nav-mobile a:hover { color: var(--primary); background: var(--bg-hover); }

/* ── Hero Section ───────────────────────────────────── */
.hero {
  padding: 8rem 0 5rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, rgba(108,99,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem; border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(255,101,132,0.12));
  border: 1px solid rgba(108,99,255,0.25);
  font-size: 0.8rem; font-weight: 600; color: var(--primary);
  margin-bottom: 1.5rem;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero p {
  font-size: 1.15rem; max-width: 600px; margin: 0 auto 2.5rem;
  line-height: 1.75;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3.5rem; }
.hero-stats {
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat strong {
  display: block; font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-stat span { font-size: 0.85rem; color: var(--text-muted); }

/* ── Search Bar ─────────────────────────────────────── */
.search-wrap {
  max-width: 600px; margin: 0 auto 2rem;
  position: relative;
}
.search-input {
  width: 100%; padding: 1rem 1.25rem 1rem 3.25rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(108,99,255,0.12); }
.search-input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1.1rem; pointer-events: none;
}
.search-clear {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1rem; cursor: pointer;
  transition: var(--transition); display: none;
}
.search-clear:hover { color: var(--danger); }

/* ── Section ─────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary);
  background: rgba(108,99,255,0.1);
  padding: 0.3rem 0.9rem; border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}
.section-header h2 { margin-bottom: 0.75rem; }

/* ── Category Tabs ──────────────────────────────────── */
.category-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
  margin-bottom: 2.5rem;
}
.cat-tab {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem; font-weight: 500;
  transition: var(--transition); cursor: pointer;
}
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 15px rgba(108,99,255,0.3);
}

/* ── Tool Cards Grid ────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}
.tool-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.8rem;
  text-decoration: none; color: inherit;
}
.tool-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0; transition: var(--transition);
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}
.tool-card:hover::before { opacity: 1; }
.tool-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.tool-card h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.tool-card p { font-size: 0.825rem; line-height: 1.55; margin: 0; color: var(--text-secondary); }
.tool-badge {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem; border-radius: var(--radius-full);
  text-transform: uppercase;
}
.badge-hot { background: rgba(239,68,68,0.12); color: var(--danger); }
.badge-new { background: rgba(16,185,129,0.12); color: var(--success); }
.badge-pro { background: rgba(108,99,255,0.12); color: var(--primary); }

/* ── Tool Page Layout ───────────────────────────────── */
.tool-page { padding-top: 90px; min-height: 100vh; }
.tool-header {
  background: linear-gradient(135deg, rgba(108,99,255,0.08), rgba(255,101,132,0.04));
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}
.tool-header h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.5rem; }
.tool-header p { font-size: 0.95rem; }

.tool-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2rem 0 4rem;
}

/* ── Drop Zone ──────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 3rem 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(108,99,255,0.04);
}
.drop-zone.dragover { background: rgba(108,99,255,0.08); }
.drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-icon { font-size: 3rem; margin-bottom: 1rem; }
.drop-zone h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.drop-zone p { font-size: 0.85rem; }
.drop-zone .file-types {
  display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center;
  margin-top: 1rem;
}
.file-type-tag {
  padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
  background: var(--bg-hover); border: 1px solid var(--border);
  font-size: 0.75rem; font-weight: 600; color: var(--text-secondary);
}

/* ── Progress ───────────────────────────────────────── */
.progress-wrap { margin: 1rem 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.4rem; }
.progress-bar {
  height: 8px; background: var(--border); border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s ease;
  width: 0%;
}

/* ── Form Controls ──────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.form-input, .form-select, .form-textarea {
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.9rem;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}
.form-textarea { resize: vertical; min-height: 140px; font-family: var(--font-mono); font-size: 0.85rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }

/* Slider */
.form-range {
  width: 100%; height: 6px; appearance: none;
  background: var(--border); border-radius: var(--radius-full);
  outline: none; cursor: pointer;
}
.form-range::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--primary);
  box-shadow: 0 2px 8px rgba(108,99,255,0.4);
  transition: var(--transition);
}
.form-range::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.toggle {
  position: relative; width: 46px; height: 26px;
  background: var(--border); border-radius: var(--radius-full);
  transition: var(--transition);
  flex-shrink: 0;
}
.toggle::after {
  content: ''; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
input[type="checkbox"]:checked + .toggle { background: var(--primary); }
input[type="checkbox"]:checked + .toggle::after { left: calc(100% - 23px); }
input[type="checkbox"] { display: none; }
.toggle-label { font-size: 0.9rem; font-weight: 500; }

/* ── Code Editor Area ───────────────────────────────── */
.code-area {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  resize: vertical;
  min-height: 200px;
  width: 100%;
  line-height: 1.7;
  tab-size: 2;
  transition: var(--transition);
}
.code-area:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
.editor-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-hover);
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
}
.editor-actions { display: flex; gap: 0.4rem; }

/* ── Output Panel ───────────────────────────────────── */
.output-panel {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.output-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
}
.output-title { font-size: 0.9rem; font-weight: 600; }
.output-body { padding: 1.25rem; }

/* ── File List ──────────────────────────────────────── */
.file-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.file-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.file-item:hover { border-color: var(--primary); }
.file-item-icon { font-size: 1.5rem; flex-shrink: 0; }
.file-item-info { flex: 1; min-width: 0; }
.file-item-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item-size { font-size: 0.75rem; color: var(--text-muted); }
.file-item-actions { display: flex; gap: 0.4rem; }

/* ── Toast ──────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  z-index: 9999; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.875rem; font-weight: 500;
  pointer-events: all; min-width: 260px; max-width: 380px;
  animation: toastIn 0.35s cubic-bezier(0.4,0,0.2,1);
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  to { transform: translateX(110%); opacity: 0; }
}
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-info    { border-left: 4px solid var(--info); }
.toast-warning { border-left: 4px solid var(--warning); }

/* ── Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.modal-header h3 { font-size: 1.2rem; }
.modal-close { font-size: 1.2rem; cursor: pointer; color: var(--text-secondary); transition: var(--transition); }
.modal-close:hover { color: var(--danger); transform: rotate(90deg); }

/* ── Info Cards ─────────────────────────────────────── */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.info-card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem;
  transition: var(--transition);
}
.info-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.info-card .icon { font-size: 2rem; }
.info-card h4 { font-size: 0.95rem; font-weight: 650; }
.info-card p { font-size: 0.82rem; }

/* ── Footer ─────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p { font-size: 0.875rem; margin-top: 0.75rem; max-width: 300px; line-height: 1.7; }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; }
.footer-col a {
  display: block; font-size: 0.85rem; color: var(--text-secondary);
  margin-bottom: 0.6rem; transition: var(--transition);
}
.footer-col a:hover { color: var(--primary); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { font-size: 0.82rem; color: var(--text-muted); transition: var(--transition); }
.footer-legal a:hover { color: var(--primary); }

/* ── Color Swatch ───────────────────────────────────── */
.color-swatch {
  width: 100%; height: 200px; border-radius: var(--radius);
  border: 2px solid var(--border); cursor: crosshair;
  transition: var(--transition);
}
.color-value {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 0.875rem;
}
.color-preview {
  width: 24px; height: 24px; border-radius: 6px;
  border: 2px solid var(--border); flex-shrink: 0;
}

/* ── Password Strength ──────────────────────────────── */
.strength-bar { display: flex; gap: 4px; margin-top: 0.5rem; }
.strength-segment { height: 4px; flex: 1; border-radius: 2px; transition: var(--transition); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .tool-workspace {
    padding: 1rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  h1 {
    font-size: 2rem;
  }

  p {
    font-size: 0.9rem;
  }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .modal { padding: 1.25rem; }
}

/* ── Animations ─────────────────────────────────────── */
.fade-in {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Breadcrumb ─────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--text-muted);
  padding: 0.5rem 0;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-muted); }

/* ── Tab Panels ─────────────────────────────────────── */
.tab-list {
  display: flex; gap: 0; border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}
.tab-btn {
  padding: 0.65rem 1.25rem; font-size: 0.875rem; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: var(--transition);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.25s ease; }

/* Touch Interaction Optimization */
button, input, textarea {
  touch-action: manipulation;
  padding: 0.75rem;
}

/* Increase tap target size */
.btn {
  min-height: 48px;
  min-width: 48px;
}

/* Ensure links are easily tappable */
a {
  padding: 0.5rem;
}
