/* ============================================================
   EasyToolz.click — Global Design System
   ============================================================ */

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

/* ===== CSS Variables ===== */
:root {
  --bg: #080c18;
  --bg-2: #0d1424;
  --bg-3: #111827;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);

  --teal: #00d4aa;
  --purple: #818cf8;
  --gradient: linear-gradient(135deg, #00d4aa 0%, #818cf8 100%);
  --gradient-alt: linear-gradient(135deg, #818cf8 0%, #00d4aa 100%);

  --text: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;

  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --radius-pill: 100px;

  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px rgba(0, 212, 170, 0.2);

  --nav-height: 64px;
  --container: 1200px;

  /* Category Colors */
  --c-images:  #f472b6;
  --c-pdf:     #fb923c;
  --c-calc:    #60a5fa;
  --c-text:    #34d399;
  --c-dev:     #f59e0b;
  --c-util:    #a78bfa;
  --c-daily:   #f87171;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ===== Container ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-height);
  background: rgba(8, 12, 24, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em;
}
.logo-icon {
  width: 34px; height: 34px;
  background: var(--gradient);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.nav-logo .brand {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links {
  display: flex; align-items: center; gap: 4px; list-style: none;
}
.nav-links a {
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; color: var(--text-2);
  transition: all 0.18s ease;
}
.nav-links a:hover { color: var(--text); background: var(--glass); }
.nav-links a.active { color: var(--teal); }

.nav-toggle {
  display: none; background: none; border: none;
  padding: 8px; border-radius: var(--radius-sm); color: var(--text-2);
  transition: all 0.18s;
}
.nav-toggle:hover { color: var(--text); background: var(--glass); }

/* ===== Hero ===== */
.hero {
  padding: 80px 0 56px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero-glow-1 {
  position: absolute; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,212,170,0.1) 0%, transparent 65%);
  top: -250px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(129,140,248,0.09) 0%, transparent 65%);
  bottom: -100px; right: 8%;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  background: rgba(0,212,170,0.08); border: 1px solid rgba(0,212,170,0.25);
  border-radius: var(--radius-pill);
  font-size: 0.78rem; font-weight: 600; color: var(--teal);
  margin-bottom: 24px; letter-spacing: 0.03em;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.12;
  margin-bottom: 16px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p {
  font-size: 1.05rem; color: var(--text-2);
  max-width: 460px; margin: 0 auto 40px;
}

/* Search */
.search-wrapper {
  max-width: 540px; margin: 0 auto 44px; position: relative;
}
.search-icon-left {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none; font-size: 1.1rem;
}
#searchInput {
  width: 100%;
  padding: 15px 52px;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: inherit; font-size: 0.95rem; color: var(--text);
  outline: none; transition: all 0.25s ease;
}
#searchInput::placeholder { color: var(--text-3); }
#searchInput:focus {
  border-color: var(--teal);
  background: rgba(0,212,170,0.05);
  box-shadow: 0 0 0 4px rgba(0,212,170,0.1);
}
#searchClear {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-3);
  padding: 6px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  transition: all 0.18s;
}
#searchClear.visible { display: flex; }
#searchClear:hover { color: var(--text); background: var(--glass); }

/* Stats */
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 28px; font-size: 0.85rem; color: var(--text-2); flex-wrap: wrap;
}
.hero-stats span { display: flex; align-items: center; gap: 6px; }
.hero-stats strong { color: var(--text); font-weight: 600; }

/* ===== Category Tabs ===== */
.cat-bar {
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; margin-bottom: 28px;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--glass); border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.855rem; font-weight: 500;
  transition: all 0.2s ease;
  display: flex; align-items: center; gap: 5px;
}
.cat-tab:hover { border-color: var(--teal); color: var(--text); }
.cat-tab.active {
  background: var(--teal); border-color: var(--teal);
  color: #000; font-weight: 700;
}

/* ===== Tools Grid ===== */
.tools-section { padding-bottom: 80px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-title { font-size: 1.15rem; font-weight: 700; }
#toolsCount { font-size: 0.85rem; color: var(--text-3); }

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

/* Tool Card */
.tool-card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all 0.22s ease; position: relative; overflow: hidden;
}
.tool-card::after {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  opacity: 0; transition: opacity 0.25s ease;
}
.tool-card:hover {
  background: var(--glass-hover); border-color: var(--border-hover);
  transform: translateY(-3px); box-shadow: var(--shadow-card);
}
.tool-card:hover::after { opacity: 1; }

/* Category top-border colors */
.tool-card[data-cat="images"]::after      { background: linear-gradient(90deg,#f472b6,#e11d48); }
.tool-card[data-cat="pdf"]::after         { background: linear-gradient(90deg,#fb923c,#ea580c); }
.tool-card[data-cat="calculators"]::after { background: linear-gradient(90deg,#60a5fa,#4f46e5); }
.tool-card[data-cat="text"]::after        { background: linear-gradient(90deg,#34d399,#0d9488); }
.tool-card[data-cat="developer"]::after   { background: linear-gradient(90deg,#f59e0b,#d97706); }
.tool-card[data-cat="utilities"]::after   { background: linear-gradient(90deg,#a78bfa,#7c3aed); }
.tool-card[data-cat="daily"]::after       { background: linear-gradient(90deg,#f87171,#ea580c); }

.tool-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.tool-card[data-cat="images"]      .tool-icon { background: rgba(244,114,182,0.13); }
.tool-card[data-cat="pdf"]         .tool-icon { background: rgba(251,146,60,0.13); }
.tool-card[data-cat="calculators"] .tool-icon { background: rgba(96,165,250,0.13); }
.tool-card[data-cat="text"]        .tool-icon { background: rgba(52,211,153,0.13); }
.tool-card[data-cat="developer"]   .tool-icon { background: rgba(245,158,11,0.13); }
.tool-card[data-cat="utilities"]   .tool-icon { background: rgba(167,139,250,0.13); }
.tool-card[data-cat="daily"]       .tool-icon { background: rgba(248,113,113,0.13); }

.tool-card h3 { font-size: 0.92rem; font-weight: 650; color: var(--text); }
.tool-card > p { font-size: 0.8rem; color: var(--text-2); flex: 1; line-height: 1.45; }
.tool-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}
.use-btn {
  font-size: 0.78rem; color: var(--teal); font-weight: 600;
  display: flex; align-items: center; gap: 3px;
  transition: gap 0.2s ease;
}
.tool-card:hover .use-btn { gap: 7px; }
.cat-badge {
  font-size: 0.67rem; font-weight: 700;
  padding: 2px 8px; border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cat-badge.images      { background: rgba(244,114,182,0.12); color: #f472b6; }
.cat-badge.pdf         { background: rgba(251,146,60,0.12); color: #fb923c; }
.cat-badge.calculators { background: rgba(96,165,250,0.12); color: #60a5fa; }
.cat-badge.text        { background: rgba(52,211,153,0.12); color: #34d399; }
.cat-badge.developer   { background: rgba(245,158,11,0.12); color: #f59e0b; }
.cat-badge.utilities   { background: rgba(167,139,250,0.12); color: #a78bfa; }
.cat-badge.daily       { background: rgba(248,113,113,0.12); color: #f87171; }

.no-results {
  grid-column: 1 / -1; text-align: center;
  padding: 60px 20px; display: none; flex-direction: column;
  align-items: center; gap: 12px; color: var(--text-2);
}
.no-results .emoji { font-size: 2.5rem; }

/* ===== AdSense Placeholder ===== */
.ad-slot {
  background: var(--glass); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 20px;
  text-align: center; color: var(--text-3); font-size: 0.75rem;
  margin: 24px 0;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-2); border-top: 1px solid var(--border);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand p { font-size: 0.85rem; color: var(--text-2); line-height: 1.6; margin-top: 12px; max-width: 260px; }
.footer-col h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.85rem; color: var(--text-2); transition: color 0.18s; }
.footer-col ul a:hover { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem; color: var(--text-3);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-3); transition: color 0.18s; }
.footer-links a:hover { color: var(--teal); }

/* ===== Tool Page ===== */
.tool-page { min-height: calc(100vh - var(--nav-height)); padding: 36px 0 80px; }
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--text-3); margin-bottom: 28px;
}
.breadcrumb a { color: var(--text-3); transition: color 0.18s; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .sep { color: var(--text-3); }
.breadcrumb .current { color: var(--text-2); }

.tool-page-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 32px;
}
.tool-page-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; flex-shrink: 0;
}
.tool-page-icon.images      { background: rgba(244,114,182,0.15); }
.tool-page-icon.pdf         { background: rgba(251,146,60,0.15); color: #fb923c; }
.tool-page-icon.calculators { background: rgba(96,165,250,0.15); }
.tool-page-icon.text        { background: rgba(52,211,153,0.15); }
.tool-page-icon.developer   { background: rgba(245,158,11,0.15); }
.tool-page-icon.utilities   { background: rgba(167,139,250,0.15); }
.tool-page-icon.daily       { background: rgba(248,113,113,0.15); }

.tool-page-header h1 { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.tool-page-header p { font-size: 0.875rem; color: var(--text-2); }

.tool-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.tool-layout.full-width { grid-template-columns: 1fr; }

.tool-box {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
}

.sidebar .ad-slot { margin: 0 0 16px; }
.sidebar-info {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.sidebar-info h4 { font-size: 0.875rem; font-weight: 700; margin-bottom: 12px; }
.sidebar-info ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-info ul li { font-size: 0.82rem; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; }
.sidebar-info ul li::before { content: '✓'; color: var(--teal); font-weight: 700; flex-shrink: 0; }

/* Form Elements */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }

.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit;
  font-size: 0.9rem; color: var(--text); outline: none;
  transition: all 0.2s ease; appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal); background: rgba(0,212,170,0.04);
  box-shadow: 0 0 0 3px rgba(0,212,170,0.12);
}
.form-input::placeholder { color: var(--text-3); }
.form-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='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.form-select option { background: #111827; }
.form-textarea { resize: vertical; min-height: 110px; line-height: 1.6; font-size: 0.875rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600; border: none;
  transition: all 0.2s ease; cursor: pointer;
}
.btn-primary { background: var(--gradient); color: #000; }
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,212,170,0.3); }
.btn-secondary { background: var(--glass); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--glass-hover); border-color: var(--border-hover); }
.btn-danger { background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.3); color: #f87171; }
.btn-danger:hover { background: rgba(248,113,113,0.25); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* Result */
.result-box {
  display: none; background: rgba(0,212,170,0.05);
  border: 1px solid rgba(0,212,170,0.2);
  border-radius: var(--radius); padding: 24px; text-align: center;
}
.result-box.show { display: block; }
.result-value {
  font-size: 2.2rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.2; margin-bottom: 6px;
}
.result-label { font-size: 0.875rem; color: var(--text-2); }
.result-sub { font-size: 0.8rem; color: var(--text-3); margin-top: 4px; }

/* Output box */
.output-box {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.875rem; color: var(--text); line-height: 1.6;
  word-break: break-all; min-height: 80px;
  white-space: pre-wrap;
}

/* Range Slider */
.range-wrap { display: flex; align-items: center; gap: 12px; }
.range-val {
  min-width: 36px; text-align: center;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px 8px;
  font-size: 0.8rem; font-weight: 600; color: var(--teal);
}
input[type=range] {
  flex: 1; height: 4px; border-radius: 2px;
  -webkit-appearance: none; appearance: none;
  background: var(--border); outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--teal); cursor: pointer;
}

/* Toggle / Checkbox */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 0.875rem; color: var(--text-2); }
.toggle {
  position: relative; width: 40px; height: 22px;
  background: var(--border); border-radius: 11px;
  cursor: pointer; transition: background 0.2s;
  border: none; flex-shrink: 0;
}
.toggle.on { background: var(--teal); }
.toggle::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: transform 0.2s ease;
}
.toggle.on::after { transform: translateX(18px); }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Info tooltip */
.info-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: rgba(129,140,248,0.1);
  border: 1px solid rgba(129,140,248,0.2); border-radius: var(--radius-sm);
  font-size: 0.8rem; color: var(--purple);
}

/* Copy button inside output */
.copy-btn {
  margin-top: 10px; padding: 8px 16px;
  background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.25);
  border-radius: var(--radius-sm); color: var(--teal);
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: all 0.18s;
}
.copy-btn:hover { background: rgba(0,212,170,0.2); }

/* Stopwatch & Timer display */
.time-display {
  font-size: 4rem; font-weight: 800; letter-spacing: -0.04em;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-align: center; padding: 28px 0;
  line-height: 1;
}
.time-controls { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Lap list */
.lap-list { list-style: none; max-height: 200px; overflow-y: auto; }
.lap-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  font-size: 0.875rem; color: var(--text-2);
}
.lap-list li:last-child { border-bottom: none; }
.lap-num { color: var(--teal); font-weight: 600; }

/* Notepad */
#noteContent {
  width: 100%; min-height: 380px; resize: none;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  font-family: 'Inter', sans-serif; font-size: 0.9rem;
  color: var(--text); line-height: 1.7; outline: none;
  transition: border-color 0.2s;
}
#noteContent:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,212,170,0.1); }
.note-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; font-size: 0.8rem; color: var(--text-3);
}

/* To-do */
.todo-input-row { display: flex; gap: 10px; margin-bottom: 20px; }
.todo-input-row .form-input { flex: 1; }
.todo-list-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.todo-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  transition: all 0.18s;
}
.todo-item.done { opacity: 0.5; }
.todo-item.done .todo-text { text-decoration: line-through; }
.todo-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); background: none;
  flex-shrink: 0; cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; justify-content: center;
}
.todo-check.checked { background: var(--teal); border-color: var(--teal); color: #000; font-size: 0.7rem; }
.todo-text { flex: 1; font-size: 0.875rem; color: var(--text); }
.todo-del {
  background: none; border: none; color: var(--text-3);
  cursor: pointer; font-size: 1rem; padding: 2px 4px;
  transition: color 0.18s;
}
.todo-del:hover { color: #f87171; }

/* Currency select with flag */
.currency-row { display: flex; gap: 12px; align-items: flex-end; }
.currency-row .form-group { flex: 1; }

/* Color picker display */
.color-preview {
  width: 100%; height: 120px; border-radius: var(--radius);
  border: 1px solid var(--border); margin-bottom: 16px;
  transition: background 0.2s;
}
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.swatch {
  width: 36px; height: 36px; border-radius: 8px;
  cursor: pointer; border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}
.swatch:hover { transform: scale(1.15); border-color: white; }

/* Scientific calculator */
.sci-display {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  text-align: right; margin-bottom: 12px;
}
.sci-expr { font-size: 0.8rem; color: var(--text-3); min-height: 20px; }
.sci-val { font-size: 1.8rem; font-weight: 700; color: var(--text); word-break: break-all; }
.sci-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.sci-btn {
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--border);
  color: var(--text); font-size: 0.9rem; font-weight: 600;
  transition: all 0.15s; cursor: pointer;
}
.sci-btn:hover { background: var(--glass-hover); border-color: var(--border-hover); }
.sci-btn.op { color: var(--teal); }
.sci-btn.eq { background: var(--gradient); color: #000; border-color: transparent; }
.sci-btn.fn { color: var(--purple); font-size: 0.78rem; }
.sci-btn.clr { color: #f87171; }

/* QR output */
#qrOutput { display: flex; justify-content: center; padding: 20px 0; }
#qrOutput canvas { border-radius: var(--radius-sm); }

/* About / Static pages */
.page-wrap { max-width: 800px; margin: 0 auto; padding: 60px 24px 100px; }
.page-wrap h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 8px; }
.page-wrap .lead { color: var(--text-2); margin-bottom: 40px; }
.page-wrap h2 { font-size: 1.15rem; font-weight: 700; margin: 36px 0 12px; color: var(--text); }
.page-wrap p { color: var(--text-2); margin-bottom: 14px; line-height: 1.8; }
.page-wrap ul { padding-left: 0; list-style: none; margin-bottom: 14px; }
.page-wrap ul li { color: var(--text-2); padding: 4px 0; padding-left: 20px; position: relative; line-height: 1.7; }
.page-wrap ul li::before { content: '→'; position: absolute; left: 0; color: var(--teal); }

/* Contact form */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.tool-card { animation: fadeUp 0.35s ease both; }
.tool-card:nth-child(2)  { animation-delay: .04s; }
.tool-card:nth-child(3)  { animation-delay: .08s; }
.tool-card:nth-child(4)  { animation-delay: .12s; }
.tool-card:nth-child(5)  { animation-delay: .16s; }
.tool-card:nth-child(6)  { animation-delay: .2s;  }
.tool-card:nth-child(7)  { animation-delay: .24s; }
.tool-card:nth-child(8)  { animation-delay: .28s; }
.tool-card:nth-child(n+9) { animation-delay: .32s; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
  .tool-layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .sidebar .ad-slot { display: none; }
}
@media (max-width: 768px) {
  .hero { padding: 48px 0 40px; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .tool-card { padding: 16px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 16px; gap: 4px; z-index: 200;
  }
  .form-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .sci-btn { padding: 12px; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .time-display { font-size: 3rem; }
}
