@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --bg: #0a0a12;
  --surface: #111120;
  --card: #181826;
  --card-hover: #1f1f30;
  --border: #252538;
  --border-hover: #363654;
  --text: #e2e8f0;
  --muted: #8892a4;
  --subtle: #4a5568;
  --primary: #a855f7;
  --primary-dim: rgba(168,85,247,0.15);
  --cyan: #06b6d4;
  --cyan-dim: rgba(6,182,212,0.15);
  --pink: #ec4899;
  --pink-dim: rgba(236,72,153,0.15);
  --emerald: #10b981;
  --emerald-dim: rgba(16,185,129,0.15);
  --amber: #f59e0b;
  --amber-dim: rgba(245,158,11,0.15);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.15);
  --indigo: #6366f1;
  --fuchsia: #d946ef;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --nav-height: 64px;
  --gradient: linear-gradient(135deg, #a855f7, #06b6d4, #ec4899);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #f1f5f9;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --primary-dim: rgba(168,85,247,0.08);
  --cyan-dim: rgba(6,182,212,0.08);
  --pink-dim: rgba(236,72,153,0.08);
  --emerald-dim: rgba(16,185,129,0.08);
  --amber-dim: rgba(245,158,11,0.08);
  --red-dim: rgba(239,68,68,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: inherit; text-decoration: none; }

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

button { cursor: pointer; font-family: inherit; border: none; }

input, textarea, select {
  font-family: inherit;
  outline: none;
}

/* ===== UTILITIES ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.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;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10,10,18,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

[data-theme="light"] .navbar {
  background: rgba(248,250,252,0.85);
}

.navbar .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
  display: block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--primary-dim);
}

.nav-link.active { color: var(--primary); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.theme-btn:hover { background: var(--surface); color: var(--text); border-color: var(--border-hover); }

.menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.menu-btn:hover { background: var(--surface); color: var(--text); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 12px;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav.open { display: flex; }

.mobile-nav .nav-link { font-size: 0.95rem; padding: 10px 14px; }

/* ===== FOOTER ===== */
.footer {
  background: #0c0c0f;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 60px 0 0;
  margin-top: auto;
}

[data-theme="light"] .footer {
  background: #111118;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0;
}

.footer-logo { font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; }
.footer-tagline { color: #888; font-size: 0.88rem; line-height: 1.7; margin-bottom: 20px; }

/* Contact block */
.footer-contact-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e5e5e5;
  margin-bottom: 10px;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #777;
  font-size: 0.82rem;
  padding: 4px 0;
  transition: color 0.2s;
  word-break: break-all;
}

.footer-contact-link:hover { color: #e5e5e5; }
.footer-contact-link svg { flex-shrink: 0; opacity: 0.7; }

/* Column styles */
.footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #555;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  color: #777;
  font-size: 0.88rem;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: #e5e5e5; }

/* Social links */
.footer-social-link {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: #777 !important;
  font-size: 0.88rem;
  padding: 5px 0 !important;
  transition: color 0.2s !important;
}

.footer-social-link:hover { color: #e5e5e5 !important; }

.footer-social-link svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.footer-social-link:hover svg { opacity: 1; }

/* Bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  border-top: none;
}

.footer-bottom p { color: #444; font-size: 0.8rem; text-align: center; }
.footer-bottom strong { color: #666; }

/* ===== HERO ===== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-glow-1 {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(168,85,247,0.18) 0%, transparent 70%);
}

.hero-glow-2 {
  position: absolute;
  top: 40px;
  left: 20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(236,72,153,0.1) 0%, transparent 70%);
}

.hero-glow-3 {
  position: absolute;
  top: 20px;
  right: 20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-sub strong { color: var(--text); }

.search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 44px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.search-input::placeholder { color: var(--muted); }

/* ===== TOOL CARDS GRID ===== */
.tools-section { padding: 0 0 80px; }

.section-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 20px;
}

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

.tool-card {
  display: block;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); background: var(--card-hover); }
.tool-card:hover::before { opacity: 1; }

.tool-card-inner { display: flex; align-items: flex-start; gap: 16px; }

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.tool-card:hover .tool-icon { transform: scale(1.1); }

.tool-info { flex: 1; min-width: 0; }

.tool-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--surface);
  color: var(--muted);
}

.tool-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.tool-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-card:hover .tool-arrow { opacity: 1; transform: translateX(2px); }

/* ===== ABOUT SECTION ===== */
.about-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--primary-dim) 0%, transparent 70%);
  border-radius: 50%;
}

.about-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}

.about-content { flex: 1; }

.about-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 8px;
}

.about-name {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.about-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 480px;
}

/* ===== TOOL PAGE LAYOUT ===== */
.tool-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
  transition: color 0.2s;
  padding: 6px 0;
}

.back-link:hover { color: var(--text); }

.tool-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 36px;
}

.tool-header-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.tool-header-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.tool-header-desc { color: var(--muted); font-size: 0.95rem; }

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ===== PANELS / CARDS ===== */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

/* ===== FORM ELEMENTS ===== */
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.form-input::placeholder { color: var(--subtle); }

.form-textarea {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  resize: vertical;
  min-height: 200px;
  line-height: 1.6;
  transition: all 0.2s;
}

.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.form-textarea::placeholder { color: var(--subtle); }

.range-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.range-label { font-size: 0.9rem; font-weight: 600; }

.range-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
}

.range-input {
  width: 100%;
  accent-color: var(--primary);
  height: 6px;
  cursor: pointer;
}

.range-hints { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

/* ===== TOGGLE / SEGMENTED ===== */
.segmented {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.seg-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ===== CHECKBOX TOGGLES ===== */
.toggle-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}

.toggle-item input { display: none; }

.toggle-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  font-size: 0.7rem;
  color: white;
}

.toggle-item.checked { border-color: var(--primary); color: var(--text); }
.toggle-item.checked .toggle-check { background: var(--primary); border-color: var(--primary); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 16px rgba(168,85,247,0.3);
}

.btn-primary:hover { opacity: 0.9; box-shadow: 0 6px 20px rgba(168,85,247,0.4); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover { background: var(--surface); border-color: var(--border-hover); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover { background: var(--surface); color: var(--text); }

.btn-full { width: 100%; }

.btn-purple { background: linear-gradient(135deg, #a855f7, #7c3aed); box-shadow: 0 4px 16px rgba(168,85,247,0.3); color: white; }
.btn-cyan { background: linear-gradient(135deg, #06b6d4, #0284c7); box-shadow: 0 4px 16px rgba(6,182,212,0.3); color: white; }
.btn-pink { background: linear-gradient(135deg, #ec4899, #db2777); box-shadow: 0 4px 16px rgba(236,72,153,0.3); color: white; }
.btn-emerald { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 16px rgba(16,185,129,0.3); color: white; }
.btn-amber { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 16px rgba(245,158,11,0.3); color: white; }
.btn-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 4px 16px rgba(99,102,241,0.3); color: white; }
.btn-fuchsia { background: linear-gradient(135deg, #d946ef, #a21caf); box-shadow: 0 4px 16px rgba(217,70,239,0.3); color: white; }
.btn-purple:hover, .btn-cyan:hover, .btn-pink:hover, .btn-emerald:hover, .btn-amber:hover, .btn-indigo:hover, .btn-fuchsia:hover { opacity: 0.9; }

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }

/* ===== PASSWORD OUTPUT ===== */
.password-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  word-break: break-all;
  line-height: 1.6;
  min-height: 80px;
  color: var(--text);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.password-text { flex: 1; }

.copy-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover { background: var(--card-hover); color: var(--text); }

/* ===== STRENGTH METER ===== */
.strength-bar-wrap { margin-top: 14px; }
.strength-labels { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.82rem; }
.strength-label-text { color: var(--muted); }
.strength-value { font-weight: 700; }
.strength-track { height: 8px; background: var(--surface); border-radius: 100px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 100px; transition: all 0.4s; width: 0%; }

/* ===== QR CODE ===== */
.qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

#qrcode-display {
  padding: 16px;
  background: white;
  border-radius: 12px;
  display: inline-block;
}

#qrcode-display img, #qrcode-display canvas { display: block; }

.qr-empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
}

.qr-empty-icon { font-size: 3.5rem; margin-bottom: 12px; opacity: 0.3; }

/* ===== COLOR PALETTE ===== */
.palette-swatches {
  display: flex;
  gap: 10px;
  height: 260px;
  margin-bottom: 16px;
}

.swatch {
  flex: 1;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  overflow: hidden;
}

.swatch:hover { transform: scale(1.03); }

.swatch-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.swatch-hex {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.swatch-lock-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 8px;
  padding: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}

.swatch-lock-btn:hover { background: rgba(255,255,255,0.35); }

.swatch-details {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.swatch-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.swatch-detail-preview {
  width: 100%;
  height: 36px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.swatch-detail-hex { font-family: monospace; font-size: 0.75rem; font-weight: 700; color: var(--text); }
.swatch-detail-sub { font-size: 0.68rem; color: var(--muted); margin-top: 2px; }

/* ===== BMI ===== */
.bmi-result-number {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 8px 0 4px;
}

.bmi-category { font-size: 1.3rem; font-weight: 700; }

.bmi-scale-track {
  height: 20px;
  border-radius: 100px;
  background: linear-gradient(to right, #06b6d4 25%, #10b981 25% 50%, #f59e0b 50% 75%, #ef4444 75%);
  position: relative;
  margin: 20px 0 6px;
}

.bmi-scale-pointer {
  position: absolute;
  width: 14px;
  height: 28px;
  background: white;
  border-radius: 4px;
  top: -4px;
  border: 2px solid rgba(0,0,0,0.2);
  transition: left 0.5s ease;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.bmi-scale-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); }

.bmi-categories { display: flex; flex-direction: column; gap: 8px; }
.bmi-cat-item { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.bmi-cat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.bmi-cat-range { margin-left: auto; color: var(--muted); font-size: 0.82rem; }

/* ===== AGE ===== */
.age-result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }

.age-stat {
  text-align: center;
  padding: 20px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.age-num { font-size: 2.8rem; font-weight: 900; letter-spacing: -0.03em; }
.age-lbl { font-size: 0.72rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); margin-top: 2px; }

.fun-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fun-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.fun-stat-num { font-size: 1.6rem; font-weight: 900; color: var(--amber); }
.fun-stat-lbl { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

.birthday-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.birthday-icon { font-size: 2rem; }
.birthday-days { font-size: 1.8rem; font-weight: 900; color: var(--amber); }
.birthday-lbl { font-size: 0.82rem; color: var(--muted); }

/* ===== MEME ===== */
.meme-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.meme-title { font-weight: 700; font-size: 1rem; color: var(--text); line-height: 1.4; }

.meme-img {
  max-width: 100%;
  max-height: 420px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.meme-placeholder { color: var(--muted); font-size: 0.9rem; }
.meme-placeholder-icon { font-size: 3.5rem; opacity: 0.2; margin-bottom: 8px; }

/* ===== TEXT TOOLS ===== */
.stats-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

.stat-chip {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  min-width: 80px;
}
.stat-chip-num { font-size: 1.6rem; font-weight: 900; }
.stat-chip-lbl { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--muted); margin-top: 2px; }

.transform-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.transform-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.transform-btn:hover { background: var(--card-hover); border-color: var(--primary); color: var(--primary); }
.transform-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.text-actions { display: flex; gap: 10px; margin-top: 12px; }

/* ===== EMPTY/LOADING STATES ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}
.empty-icon { font-size: 3rem; opacity: 0.2; }
.empty-label { font-size: 0.9rem; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 320px;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--emerald); }
.toast.error { border-color: var(--red); }

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

.fade-in { animation: fadeInUp 0.4s ease forwards; }

/* Stagger for grid */
.tools-grid .tool-card:nth-child(1) { animation: fadeInUp 0.4s 0.05s both; }
.tools-grid .tool-card:nth-child(2) { animation: fadeInUp 0.4s 0.1s both; }
.tools-grid .tool-card:nth-child(3) { animation: fadeInUp 0.4s 0.15s both; }
.tools-grid .tool-card:nth-child(4) { animation: fadeInUp 0.4s 0.2s both; }
.tools-grid .tool-card:nth-child(5) { animation: fadeInUp 0.4s 0.25s both; }
.tools-grid .tool-card:nth-child(6) { animation: fadeInUp 0.4s 0.3s both; }
.tools-grid .tool-card:nth-child(7) { animation: fadeInUp 0.4s 0.35s both; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .hero { padding: 50px 0 40px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .palette-swatches { flex-direction: column; height: auto; }
  .swatch { min-height: 80px; }
  .swatch-details { grid-template-columns: repeat(3, 1fr); }
  .age-result-grid { grid-template-columns: repeat(3, 1fr); }
  .fun-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > .footer-brand { grid-column: 1 / -1; }
  .about-card { flex-direction: column; padding: 32px; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .age-num { font-size: 2rem; }
  .age-result-grid { grid-template-columns: repeat(3, 1fr); }
  .panel { padding: 16px; }
}
