/* ============================================================
   ULTIMATE CALCULATOR HUB — style.css
   Aesthetic: Dark premium with electric accent gradients
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #18181f;
  --bg4: #1e1e28;
  --surface: #1a1a24;
  --surface2: #22222e;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #f0f0f8;
  --text2: #9898b0;
  --text3: #5a5a72;
  --accent: #6c63ff;
  --accent2: #a78bfa;
  --accent3: #38bdf8;
  --green: #22d3a0;
  --yellow: #fbbf24;
  --red: #f87171;
  --pink: #f472b6;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --max-w: 1280px;
  --gutter: 24px;
}

/* Light mode */
[data-theme="light"] {
  --bg: #f4f4f9;
  --bg2: #eeeef5;
  --bg3: #e8e8f0;
  --bg4: #dddde8;
  --surface: #ffffff;
  --surface2: #f0f0f8;
  --border: rgba(0,0,0,0.07);
  --border2: rgba(0,0,0,0.12);
  --text: #0e0e1a;
  --text2: #4a4a60;
  --text3: #9898b0;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 99px; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
p { color: var(--text2); }

/* ── LAYOUT ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  opacity: 0.4;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
#site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

[data-theme="light"] #site-header {
  background: rgba(244,244,249,0.88);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-logo .logo-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white; box-shadow: 0 0 16px rgba(108,99,255,0.4);
}

.nav-logo span { background: linear-gradient(135deg, var(--accent2), var(--accent3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-search {
  flex: 1; max-width: 400px;
  position: relative;
}

.nav-search input {
  width: 100%; padding: 9px 16px 9px 40px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; color: var(--text); font-family: var(--font-body); font-size: 0.875rem;
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}

.nav-search input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

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

.nav-search .search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text3); font-size: 14px; pointer-events: none;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.btn-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 15px; transition: all var(--transition);
}

.btn-icon:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }

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

.hero-glow {
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 500px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(108,99,255,0.18) 0%, rgba(56,189,248,0.08) 40%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 99px;
  background: rgba(108,99,255,0.12); border: 1px solid rgba(108,99,255,0.25);
  font-size: 0.8rem; font-weight: 500; color: var(--accent2); margin-bottom: 24px;
  animation: fadeInDown 0.6s ease both;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.04em; margin-bottom: 16px;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text2); max-width: 520px; margin: 0 auto 36px;
  animation: fadeInUp 0.7s ease 0.2s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-stats {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 32px;
  animation: fadeInUp 0.7s ease 0.35s both;
}

.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--text); }
.hero-stat span { font-size: 0.8rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; }

/* ============================================================
   CATEGORIES FILTER BAR
   ============================================================ */
.filter-bar {
  padding: 0 0 32px;
  position: sticky; top: 64px; z-index: 90;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.filter-scroll {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }

.filter-btn {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 18px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition);
}

.filter-btn:hover { background: var(--surface2); color: var(--text); }

.filter-btn.active {
  background: var(--accent); border-color: var(--accent); color: white;
  box-shadow: 0 0 20px rgba(108,99,255,0.35);
}

.filter-btn i { font-size: 13px; }

/* ============================================================
   TOOLS GRID
   ============================================================ */
.tools-section { padding: 48px 0; }
.tools-section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px;
}
.section-title {
  font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.section-title i { color: var(--accent); font-size: 1rem; }
.tool-count { font-size: 0.8rem; color: var(--text3); font-family: var(--font-body); font-weight: 400; }

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

/* ── TOOL CARD ── */
.tool-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  cursor: pointer; text-decoration: none; display: block;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: cardIn 0.4s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tool-card::before {
  content: '';
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at top left, rgba(108,99,255,0.12), transparent 60%);
  transition: opacity var(--transition);
}

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

.card-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 16px;
  position: relative; z-index: 1;
}

.cat-finance .card-icon { background: rgba(34,211,160,0.12); color: var(--green); }
.cat-work    .card-icon { background: rgba(251,191,36,0.12); color: var(--yellow); }
.cat-life    .card-icon { background: rgba(56,189,248,0.12); color: var(--accent3); }
.cat-creator .card-icon { background: rgba(244,114,182,0.12); color: var(--pink); }
.cat-gaming  .card-icon { background: rgba(167,139,250,0.12); color: var(--accent2); }
.cat-utils   .card-icon { background: rgba(108,99,255,0.12); color: var(--accent); }

.card-title {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  margin-bottom: 6px; color: var(--text); position: relative; z-index: 1;
}

.card-desc {
  font-size: 0.83rem; color: var(--text3); line-height: 1.5; position: relative; z-index: 1;
}

.card-badges {
  display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; position: relative; z-index: 1;
}

.badge {
  font-size: 0.7rem; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: 0.05em;
}

.badge-new { background: rgba(34,211,160,0.15); color: var(--green); }
.badge-popular { background: rgba(251,191,36,0.15); color: var(--yellow); }
.badge-free { background: rgba(108,99,255,0.12); color: var(--accent2); }

.card-arrow {
  position: absolute; right: 20px; bottom: 20px; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg4); display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text3);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.tool-card:hover .card-arrow { background: var(--accent); color: white; transform: translate(2px,-2px); }

/* hidden when filtered */
.tool-card.hidden { display: none !important; }

/* ============================================================
   POPULAR SECTION
   ============================================================ */
.popular-section { padding: 0 0 48px; }

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.popular-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; text-decoration: none;
  transition: all var(--transition);
}

.popular-card:hover { background: var(--surface2); border-color: var(--border2); transform: translateY(-2px); }

.popular-card .card-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 16px; margin: 0; flex-shrink: 0; }

.popular-card span { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.3; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand p { font-size: 0.875rem; max-width: 280px; }

.footer-col h4 {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--text3);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.875rem; color: var(--text2); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--accent2); }

.footer-seo {
  border-top: 1px solid var(--border); padding-top: 32px; margin-bottom: 32px;
}

.footer-seo h3 {
  font-size: 1rem; margin-bottom: 12px; color: var(--text);
}

.footer-seo p {
  font-size: 0.82rem; line-height: 1.8; color: var(--text3); max-width: 900px;
}

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: gap;
  font-size: 0.8rem; color: var(--text3); gap: 12px;
}

.footer-bottom a { color: var(--accent2); }

/* ============================================================
   AD PLACEHOLDERS
   ============================================================ */
.ad-banner {
  background: var(--bg3); border: 1px dashed var(--border2); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 0.8rem; letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ad-top { height: 90px; margin: 20px 0; }
.ad-sidebar { min-height: 250px; }

/* ============================================================
   TOOL PAGE LAYOUT
   ============================================================ */
.tool-page-header {
  padding: 48px 0 0;
}

.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--text3); margin-bottom: 20px;
}

.breadcrumb a { color: var(--text3); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent2); }
.breadcrumb i { font-size: 9px; }

.tool-hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em; margin-bottom: 12px;
}

.tool-hero-title span { background: linear-gradient(135deg, var(--accent2), var(--accent3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.tool-hero-desc { font-size: 1.05rem; color: var(--text2); max-width: 600px; margin-bottom: 32px; }

/* ── TOOL LAYOUT ── */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px; padding: 48px 0;
  align-items: start;
}

@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
}

.tool-main-col > *+* { margin-top: 24px; }

/* ── TOOL CARD WRAPPER ── */
.tool-card-wrapper {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow);
}

.tool-card-wrapper h2 {
  font-size: 1.1rem; margin-bottom: 24px; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}

.tool-card-wrapper h2 i { color: var(--accent); }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--text2); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em;
}

.form-group .hint { font-size: 0.78rem; color: var(--text3); margin-top: 4px; }

input[type="number"], input[type="text"], input[type="email"], input[type="url"],
select, textarea {
  width: 100%; padding: 12px 16px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none; appearance: none;
}

input[type="number"]:focus, input[type="text"]:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

input::placeholder { color: var(--text3); }

select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239898b0' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; cursor: pointer; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ── RANGE SLIDER ── */
.range-group { display: flex; align-items: center; gap: 12px; }
.range-group input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 4px; background: var(--bg4); border-radius: 99px;
  outline: none; padding: 0; border: none; box-shadow: none;
}
.range-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); cursor: pointer; box-shadow: 0 0 8px rgba(108,99,255,0.4);
}
.range-value {
  min-width: 48px; text-align: right; font-weight: 600; font-size: 0.9rem; color: var(--accent2);
}

/* ── BTN ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 700;
  cursor: pointer; border: none; transition: all var(--transition); letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; box-shadow: 0 4px 20px rgba(108,99,255,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(108,99,255,0.5); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text2);
}
.btn-secondary:hover { background: var(--bg4); color: var(--text); }

.btn-outline {
  background: transparent; border: 1px solid var(--accent); color: var(--accent2);
}
.btn-outline:hover { background: rgba(108,99,255,0.1); }

.btn-full { width: 100%; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── RESULTS BOX ── */
.result-box {
  background: linear-gradient(135deg, rgba(108,99,255,0.08) 0%, rgba(56,189,248,0.06) 100%);
  border: 1px solid rgba(108,99,255,0.2); border-radius: var(--radius-lg);
  padding: 28px; margin-top: 24px;
  display: none;
}

.result-box.show { display: block; animation: fadeInUp 0.3s ease; }

.result-main {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 6px;
}

.result-label { font-size: 0.82rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; }

.result-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
  margin-top: 16px;
}

.result-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
}
.result-item .r-val { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--text); }
.result-item .r-lbl { font-size: 0.75rem; color: var(--text3); margin-top: 4px; }

/* ── SIDEBAR ── */
.tool-sidebar > *+* { margin-top: 20px; }

.sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}

.sidebar-card h3 { font-size: 0.9rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.sidebar-card h3 i { color: var(--accent); }

.related-list { list-style: none; }
.related-list li { border-bottom: 1px solid var(--border); }
.related-list li:last-child { border-bottom: none; }
.related-list li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; font-size: 0.875rem; color: var(--text2);
  transition: color var(--transition);
}
.related-list li a:hover { color: var(--accent2); }
.related-list li a i { width: 20px; text-align: center; font-size: 12px; color: var(--text3); }

/* ── SEO CONTENT ── */
.seo-content {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  margin-top: 0;
}

.seo-content h2 { font-size: 1.3rem; margin-bottom: 16px; }
.seo-content h3 { font-size: 1rem; margin: 20px 0 10px; color: var(--text); }
.seo-content p { font-size: 0.9rem; line-height: 1.8; margin-bottom: 14px; }
.seo-content ul { padding-left: 20px; margin-bottom: 14px; }
.seo-content ul li { font-size: 0.9rem; color: var(--text2); line-height: 1.8; }

/* ── LAST USED ── */
.last-used-bar {
  background: rgba(108,99,255,0.08); border: 1px solid rgba(108,99,255,0.18);
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-size: 0.82rem; color: var(--text3); margin-bottom: 20px;
  display: none; align-items: center; gap: 8px;
}
.last-used-bar.show { display: flex; }
.last-used-bar strong { color: var(--accent2); }

/* ── TOGGLE SWITCH ── */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.toggle-row label { font-size: 0.85rem; color: var(--text2); }

.toggle {
  position: relative; width: 44px; height: 24px; cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 99px;
  background: var(--bg4); transition: background var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  left: 3px; top: 3px; background: var(--text3); transition: transform var(--transition), background var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: white; }

/* ── CHART AREA ── */
.chart-container { position: relative; height: 220px; margin-top: 20px; }

/* ── COPY BUTTON ── */
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text3); font-size: 0.78rem; cursor: pointer;
  transition: all var(--transition);
}
.copy-btn:hover { color: var(--green); border-color: var(--green); }
.copy-btn.copied { color: var(--green); border-color: var(--green); background: rgba(34,211,160,0.08); }

/* ── PROGRESS BAR ── */
.progress-bar { height: 8px; background: var(--bg4); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── TABS ── */
.tabs { display: flex; gap: 4px; background: var(--bg3); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 20px; }
.tab-btn {
  flex: 1; padding: 8px 12px; border-radius: 8px; border: none; background: transparent;
  color: var(--text3); font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
}
.tab-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

/* ── TOOLTIP ── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--bg4); color: var(--text); font-size: 0.78rem; padding: 6px 10px;
  border-radius: 8px; border: 1px solid var(--border); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity var(--transition); z-index: 50;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── SEPARATOR ── */
.separator { height: 1px; background: var(--border); margin: 24px 0; }

/* ── EMOJI / ICON LIST ── */
.feature-list { list-style: none; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; color: var(--text2); }
.feature-list li:last-child { border-bottom: none; }
.feature-list i { color: var(--green); margin-top: 2px; flex-shrink: 0; }

/* ── NO RESULTS ── */
.no-results {
  display: none; grid-column: 1 / -1; text-align: center; padding: 64px 24px;
  color: var(--text3);
}
.no-results i { font-size: 48px; margin-bottom: 16px; display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-search { display: none; }
  :root { --gutter: 16px; }
  .hero { padding: 64px 0 48px; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .tool-card-wrapper { padding: 20px; }
  .result-main { font-size: 2rem; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tool-card { padding: 16px; }
  .popular-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── UTILITY ── */
.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }
.text-yellow { color: var(--yellow) !important; }
.text-accent { color: var(--accent2) !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* ── LOADING SKELETON ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── PWA INSTALL BANNER ── */
#install-banner {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow-lg); display: none; max-width: 320px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }
#install-banner.show { display: block; }
#install-banner h4 { font-size: 0.9rem; margin-bottom: 6px; }
#install-banner p { font-size: 0.8rem; color: var(--text3); margin-bottom: 14px; }
#install-banner .btn-group { justify-content: flex-end; }

/* ── RECENTLY VIEWED ── */
.recently-viewed { padding: 0 0 40px; }
.recent-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.recent-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text2); text-decoration: none;
  transition: all var(--transition);
}
.recent-chip:hover { background: var(--surface2); color: var(--accent2); }
.recent-chip i { font-size: 11px; }

/* ── STAR BUTTON ── */
.btn-star {
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--text3); font-size: 18px; transition: all var(--transition);
  display: flex; align-items: center;
}
.btn-star:hover, .btn-star.starred { color: var(--yellow); }
.btn-star.starred i::before { content: '\f005'; font-weight: 900; }
