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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.06);
  --max-w: 1100px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.logo span { color: var(--primary); }

nav a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  margin-left: 1.5rem;
}

nav a:hover { color: var(--primary); text-decoration: none; }

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 3.5rem 1.5rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: .75rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto;
}

/* ===== AD BANNER ===== */
.ad-banner {
  max-width: var(--max-w);
  margin: 1rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

.ad-placeholder {
  background: #f1f5f9;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ===== TOOLS GRID ===== */
.tools-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

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

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool-card .icon {
  font-size: 2rem;
  margin-bottom: .75rem;
}

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.tool-card p {
  font-size: .9rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.tool-card .btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: .55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .875rem;
  text-align: center;
  transition: background .15s;
  align-self: flex-start;
}

.tool-card .btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

/* ===== TOOL PAGE LAYOUT ===== */
.tool-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  flex: 1;
}

.tool-page h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: .5rem;
}

.tool-page .desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.tool-page .breadcrumb {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.tool-page .breadcrumb a { color: var(--primary); }

.tool-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .35rem;
}

input[type="text"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  margin-bottom: 1rem;
  transition: border-color .15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

button, .btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .65rem 1.5rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}

button:hover, .btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
  padding: .65rem 1.5rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-secondary:hover { background: #e2e8f0; }

.result-area {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  word-break: break-all;
}

.btn-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ===== SEO CONTENT SECTION ===== */
.seo-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.8;
}

.seo-content h2 {
  color: var(--text);
  font-size: 1.25rem;
  margin-bottom: .75rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .tools-grid { grid-template-columns: 1fr; }
  nav a { margin-left: .75rem; font-size: .8rem; }
}
