/* TopSearch.in Production Stylesheet */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-main: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
}

.hero p {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 24px;
}

.search-box {
  max-width: 540px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 44px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  font-size: 16px;
  outline: none;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.tool-card .icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.tool-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  flex-grow: 1;
}

.result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  background: #f1f5f9;
  display: none;
}

.result.show {
  display: block;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

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

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 80px;
}

footer a {
  color: var(--text-muted);
  margin: 0 10px;
  text-decoration: none;
}

footer a:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  }
  .nav-links.mobile {
    display: flex;
  }
}

#menuBtn{display:none;background:none;border:1px solid var(--border);border-radius:8px;font-size:20px;padding:4px 10px;cursor:pointer}
@media(max-width:768px){#menuBtn{display:block}}
footer a{display:inline-block;padding:4px 0}
.panel{background:#fff;border:1px solid var(--border);border-radius:16px;padding:24px}
.tool-grid{display:grid;gap:24px;margin-top:20px}
@media(min-width:900px){.tool-grid{grid-template-columns:340px 1fr}}
.f label{display:block;font-size:13px;font-weight:600;margin:12px 0 4px}
.f input,.f select,.f textarea{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}
.f input[type=range],.f input[type=checkbox]{padding:0;width:auto}.f input[type=range]{width:100%}
.btn2{background:#e2e8f0;color:#0f172a;border:none;border-radius:8px;padding:12px 16px;font-weight:600;cursor:pointer;margin:6px 6px 0 0}
.btn-primary{margin:6px 6px 0 0}
.note{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;border-radius:10px;padding:14px 16px;margin:24px 0;font-size:14px}
.prose{max-width:800px;margin:32px auto 0;line-height:1.7}.prose h2{font-size:22px;margin:24px 0 10px}
.prose li{margin-left:20px}.prose details{border:1px solid var(--border);background:#fff;border-radius:10px;padding:12px 16px;margin:8px 0}
.prose summary{font-weight:600;cursor:pointer}
canvas{max-width:100%;height:auto;border:1px solid var(--border);border-radius:8px;touch-action:none}
:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
