:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --bg-color: #f8fafc;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-solid: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: rgba(226, 232, 240, 0.8);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
  --gradient-main: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-color);
  background-image:
    radial-gradient(at 0% 0%, hsla(253,16%,7%,0.03) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(339,49%,30%,0.03) 0, transparent 50%);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: 80px;
  background: var(--surface);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100; display: flex; align-items: center;
}

.nav-content { display: flex; justify-content: space-between; align-items: center; width: 100%; }



.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-weight: 600; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: 9999px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none; font-size: 1rem;
}

.btn-primary { background: var(--gradient-main); color: white; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); opacity: 0.95; }

.btn-secondary { background: white; color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-color); }

.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; color: var(--text-main); }

main { margin-top: 80px; min-height: calc(100vh - 80px - 300px); }

.hero { text-align: center; padding: 8rem 1.5rem 6rem; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -50%; left: -10%; width: 120%; height: 150%;
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 60%); z-index: -1;
}

.hero h1 { font-size: 4rem; font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.hero h1 span { background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 2.5rem; }

.hero-buttons { display: flex; gap: 1rem; justify-content: center; }

.tool-section { padding: 4rem 0; }
.tool-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }

.card {
  background: var(--surface);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  box-shadow: var(--shadow-glass);
}

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.card-title { font-weight: 700; font-size: 1.25rem; }

textarea.input-box {
  width: 100%; height: 200px; padding: 1.25rem;
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  font-size: 1.125rem; resize: vertical; font-family: inherit; margin-bottom: 1.5rem;
  background: var(--surface-solid); transition: all 0.2s;
}
textarea.input-box:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }

.output-box {
  background: var(--surface-solid); padding: 1.5rem; border-radius: var(--radius-md);
  font-family: monospace; font-size: 1.25rem; word-break: break-all; min-height: 80px;
  margin-bottom: 1.5rem; border: 1px solid var(--border-color);
}

.tool-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-top: 2rem; }
.stat-box {
  background: var(--surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 1.25rem; text-align: center;
  box-shadow: var(--shadow-glass);
}
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text-main); }
.stat-label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; letter-spacing: 0.05em; margin-top: 0.25rem; }

.options-group { margin-bottom: 1.5rem; }
.options-label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--text-main); }

.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--border-color); }
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
input:checked + .slider { background: var(--gradient-main); }
input:checked + .slider:before { transform: translateX(20px); }

.radio-group { display: flex; background: rgba(0,0,0,0.03); padding: 0.35rem; border-radius: var(--radius-md); gap: 0.35rem; }
.radio-group input[type="radio"] { display: none; }
.radio-group label {
  flex: 1; text-align: center; padding: 0.6rem; font-size: 0.875rem; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--text-muted); transition: all 0.2s;
}
.radio-group input[type="radio"]:checked + label { background: var(--surface-solid); color: var(--primary); box-shadow: var(--shadow-sm); }

.features { padding: 8rem 0; background: var(--surface-solid); }
.section-title { text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 4rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card { padding: 2.5rem; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-color); transition: transform 0.3s, box-shadow 0.3s; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.feature-icon { width: 56px; height: 56px; background: rgba(99,102,241,0.1); color: var(--primary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
.feature-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; }

.page-header { text-align: center; padding: 6rem 1.5rem 4rem; background: var(--surface-solid); border-bottom: 1px solid var(--border-color); }
.page-header h1 { font-size: 3rem; font-weight: 900; margin-bottom: 1rem; letter-spacing: -0.02em; }

.content-wrap { max-width: 800px; margin: 4rem auto; padding: 0 1.5rem; }
.prose { font-size: 1.125rem; line-height: 1.8; color: #334155; }
.prose h2 { font-size: 2rem; color: var(--text-main); margin: 3rem 0 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.5rem; color: var(--text-main); margin: 2rem 0 1rem; font-weight: 700; }
.prose p { margin-bottom: 1.5rem; }
.prose ul, .prose ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.75rem; }
.prose a { color: var(--primary); text-decoration: underline; font-weight: 500; }

.table-of-contents { background: var(--bg-color); padding: 2rem; border-radius: var(--radius-lg); margin-bottom: 3rem; border: 1px solid var(--border-color); }
.table-of-contents ul { margin: 0; padding-left: 1.5rem; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; padding: 4rem 0; }
.blog-card { border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-solid); display: flex; flex-direction: column; transition: transform 0.3s, box-shadow 0.3s; }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.blog-card-img { height: 220px; background: var(--gradient-main); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.9); font-size: 3rem; font-weight: 900; }
.blog-card-content { padding: 2rem; display: flex; flex-direction: column; flex: 1; }
.blog-meta { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.blog-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.3; letter-spacing: -0.01em; }
.blog-excerpt { color: var(--text-muted); margin-bottom: 1.5rem; flex: 1; }
.blog-link { color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; gap: 0.5rem; }

footer { background: #0f172a; color: #94a3b8; padding: 6rem 0 3rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; margin-bottom: 4rem; }
.footer-col h3 { color: white; font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 1rem; }
.footer-col a:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 3rem; border-top: 1px solid #1e293b; font-size: 0.875rem; }

input[type="text"], input[type="number"], input[type="email"], textarea {
  width: 100%; padding: 1rem 1.25rem; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); font-family: inherit; font-size: 1rem;
  background: var(--surface-solid); transition: all 0.2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }
.input-label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--text-main); }

.mobile-menu { display: none; position: fixed; top: 80px; left: 0; right: 0; bottom: 0; background: var(--surface-solid); z-index: 99; padding: 2rem; flex-direction: column; gap: 1.5rem; overflow-y: auto; }
.mobile-menu.active { display: flex; }
.mobile-menu a { font-size: 1.25rem; font-weight: 700; color: var(--text-main); padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }

.contact-form { background: var(--surface-solid); padding: 3rem; border-radius: var(--radius-lg); border: 1px solid var(--border-color); box-shadow: var(--shadow-md); }
.form-group { margin-bottom: 1.5rem; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .tool-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.75rem; }
  .hero p { font-size: 1.125rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}


/* UPDATE HEADER STYLES */
.site-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.desktop-nav {
    display: flex;
    gap: 1.5rem;
}
.desktop-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}
.desktop-nav a:hover {
    color: var(--primary-color);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
}
.mobile-nav {
    display: none;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
}
.mobile-nav.active {
    display: flex;
    flex-direction: column;
}
.mobile-nav a {
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}
.mobile-nav a:last-child {
    border-bottom: none;
}
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .header-actions .btn { display: none; }
    .mobile-menu-btn { display: block; }
}

/* UPDATE FOOTER STYLES */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    line-height: 1.6;
}
.footer-links h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}
.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--primary-color);
}
.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* POLISHED HOMEPAGE SECTIONS */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
}
.card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.card-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}
.comparison-table-wrapper {
    overflow-x: auto;
}
.comparison-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}
.comparison-table th, .comparison-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.comparison-table th {
    background: var(--bg-secondary);
    font-weight: 600;
}
.comparison-table tr:last-child td {
    border-bottom: none;
}
.tag-good {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}
.tag-bad {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}
body.dark-mode .tag-good {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}
body.dark-mode .tag-bad {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }
.py-4 { padding-top: 4rem; padding-bottom: 4rem; }

.example-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.example-box code {
    display: block;
    background: var(--bg-color);
    padding: 0.75rem;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

