:root {
  --primary: #2563eb;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 20;
}

.top-title {
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
}

.top-actions { display: flex; align-items: center; gap: 0.75rem; }
.btn-icon {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

#main-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1rem 5rem 1rem;
  max-width: 768px;
  margin: 0 auto;
  width: 100%;
}
i.itext {
    font-size: 16px;
    font-weight: bold;
    font-style: unset;
    color: var(--text-main);
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.seo-article { margin-top: 1.5rem; line-height: 1.6; font-size: 0.95rem; }
.seo-article h2 { font-size: 1.2rem; margin: 1rem 0 0.5rem 0; color: var(--text-main); }
.seo-article p, .seo-article ul { color: var(--text-muted); margin-bottom: 0.75rem; }
.seo-article ul { padding-left: 1.25rem; }

.navbar {
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 20;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  width: 25%;
}

.nav-btn.active { color: var(--primary); font-weight: 600; }
.nav-btn i { font-size: 1.2rem; }