:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --error-color: #ef4444;
  --success-color: #22c55e;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-height: 70px;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
  --primary-color: #3b82f6;
  --primary-hover: #60a5fa;
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #334155;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--primary-color); text-decoration: none; transition: color 0.2s; }
a:hover { text-decoration: underline; color: var(--primary-hover); }

/* Header */
header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}
.logo { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; }
.logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-secondary); font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-color); text-decoration: none; }
.theme-toggle, .hamburger { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 0.5rem; display: flex; align-items: center; justify-content: center; }
.theme-toggle:hover, .hamburger:hover { color: var(--primary-color); }
.hamburger { display: none; font-size: 1.5rem; color: var(--text-primary); }

/* Layout */
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
section { margin-bottom: 4rem; }
.container { max-width: 800px; margin: 0 auto; }
.content-section {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.content-section:last-child { margin-bottom: 0; }

/* Breadcrumbs */
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary-color); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-separator { color: var(--border-color); }

/* Typography */
h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1rem; font-weight: 800; }
h2 { font-size: 2rem; margin-bottom: 1rem; margin-top: 2rem; font-weight: 700; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; margin-top: 1.5rem; font-weight: 600; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; color: var(--text-secondary); }
li { margin-bottom: 0.5rem; }
.content-section h2:first-child { margin-top: 0; }

/* Buttons */
.cta-button { background-color: var(--primary-color); color: #ffffff !important; padding: 0.5rem 1rem; border-radius: var(--radius-md); font-weight: 600; text-decoration: none !important; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background-color 0.2s; }
.cta-button:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: transparent; color: var(--text-primary) !important; border: 1px solid var(--border-color); padding: 0.5rem 1rem; border-radius: var(--radius-md); font-weight: 600; text-decoration: none !important; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center;}
.btn-secondary:hover { background-color: var(--surface-color); border-color: var(--text-secondary); }

/* Hero */
.hero { text-align: center; padding: 3rem 0; }
.hero p { font-size: 1.25rem; max-width: 650px; margin: 0 auto 2rem; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* Tool */
.tool-card { background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-md); margin-bottom: 2rem; }
.input-group { margin-bottom: 1.5rem; }
.input-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-primary); }
.textarea-container { position: relative; }
textarea { width: 100%; min-height: 150px; padding: 1rem; background-color: var(--bg-color); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-family: inherit; font-size: 1rem; resize: vertical; }
textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.input-meta { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.5rem; }
.tool-actions { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.btn-clear { background: none; border: 1px solid var(--border-color); color: var(--text-secondary); padding: 0.5rem 1rem; border-radius: var(--radius-md); cursor: pointer; font-weight: 600; transition: all 0.2s; }
.btn-clear:hover { background-color: var(--bg-color); color: var(--text-primary); }
.hash-output-card { background-color: var(--bg-color); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1.5rem; display: none; }
.hash-output-card.active { display: block; }
.hash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem;}
.hash-header h3 { margin: 0; }
.hash-value { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; background-color: var(--surface-color); padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--border-color); word-break: break-all; font-size: 1.125rem; color: var(--text-primary); margin-bottom: 1rem; user-select: all; }
.output-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.privacy-notice { text-align: center; font-size: 0.875rem; color: var(--text-secondary); margin-top: 1.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }

/* Grid / Blog Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.card { background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1.5rem; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column;}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card h3 { margin-top: 0; font-size: 1.25rem; }
.card h3 a { color: var(--text-primary); }
.card h3 a:hover { color: var(--primary-color); }
.card-meta { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1rem; }
.card-link { margin-top: auto; font-weight: 600; display: inline-flex; align-items: center; gap: 0.25rem; }

/* Forms & Tables */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.form-control { width: 100%; padding: 0.75rem; background-color: var(--bg-color); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-family: inherit; }
.form-control:focus { outline: none; border-color: var(--primary-color); }
table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-color); color: var(--text-secondary); }
th { background-color: var(--bg-color); font-weight: 600; color: var(--text-primary); }
tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-item h3 { margin-top: 0; font-size: 1.25rem; color: var(--text-primary); }

/* Footer */
footer { background-color: var(--surface-color); border-top: 1px solid var(--border-color); padding: 3rem 0 1.5rem; margin-top: auto; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section h4 { font-size: 1.125rem; margin-bottom: 1rem; color: var(--text-primary); }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section a { color: var(--text-secondary); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border-color); color: var(--text-secondary); font-size: 0.875rem; }
