/* QuickTools - Professional Green & White Theme */
:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #22c55e;
    --primary-bg: #f0fdf4;
    --accent: #059669;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --white: #ffffff;
    --bg-soft: #f9fafb;
    --danger: #dc2626;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 10px -6px rgba(0,0,0,0.08);
    --radius: 10px;
    --radius-sm: 6px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

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

/* ---------- Header / Nav ---------- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.nav {
    display: flex; align-items: center; justify-content: space-between;
    height: 70px;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.35rem; font-weight: 700; color: var(--text);
}
.logo i { color: var(--primary); font-size: 1.6rem; }
.logo:hover { color: var(--primary); }

.nav-menu {
    display: flex; list-style: none; gap: 4px; align-items: center;
}
.nav-menu a {
    color: var(--text); font-weight: 500; padding: 8px 14px;
    border-radius: var(--radius-sm); font-size: 0.95rem;
}
.nav-menu a:hover, .nav-menu a.active {
    background: var(--primary-bg); color: var(--primary-dark);
}
.nav-cta {
    background: var(--primary) !important; color: var(--white) !important;
    padding: 9px 18px !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }

.nav-toggle {
    display: none; background: none; border: none;
    font-size: 1.5rem; color: var(--text); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #ffffff 100%);
    padding: 80px 0 70px;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; right: -100px; top: -100px;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(34,197,94,0.12), transparent 70%);
}
.hero-content { text-align: center; position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--white); border: 1px solid var(--border);
    padding: 6px 14px; border-radius: 999px; font-size: 0.85rem;
    color: var(--primary-dark); font-weight: 500; margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.hero-badge i { color: var(--primary); }
.hero h1 {
    font-size: 3rem; font-weight: 800; line-height: 1.15;
    color: var(--text); margin-bottom: 18px;
}
.hero h1 .accent { color: var(--primary); }
.hero p {
    font-size: 1.2rem; color: var(--text-light);
    max-width: 640px; margin: 0 auto 30px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.95rem; cursor: pointer;
    border: none; transition: all .2s; text-decoration: none;
    font-family: inherit;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-1px); }
.btn-secondary { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-soft); color: var(--primary-dark); border-color: var(--primary); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #b91c1c; color: var(--white); }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 50px; }
.section-eyebrow {
    color: var(--primary); font-weight: 600; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
}
.section h2 {
    font-size: 2.25rem; font-weight: 700; margin-bottom: 14px; color: var(--text);
}
.section-head p { color: var(--text-light); font-size: 1.1rem; }

/* ---------- Tools Grid ---------- */
.tools-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.tool-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
    transition: all .25s; display: flex; flex-direction: column;
    text-decoration: none; color: var(--text);
}
.tool-card:hover {
    border-color: var(--primary); transform: translateY(-4px);
    box-shadow: var(--shadow-lg); color: var(--text);
}
.tool-icon {
    width: 52px; height: 52px; border-radius: 12px;
    background: var(--primary-bg); display: flex;
    align-items: center; justify-content: center;
    color: var(--primary-dark); font-size: 1.5rem; margin-bottom: 18px;
}
.tool-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.tool-card p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 16px; flex-grow: 1; }
.tool-link {
    color: var(--primary); font-weight: 600; font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 6px;
}

/* ---------- Features ---------- */
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}
.feature {
    text-align: center; padding: 24px;
}
.feature-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--primary-bg); color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin-bottom: 18px;
}
.feature h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--text-light); font-size: 0.95rem; }

/* ---------- Stats ---------- */
.stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px; text-align: center;
}
.stat-num {
    font-size: 2.5rem; font-weight: 800; color: var(--primary); line-height: 1;
}
.stat-label { color: var(--text-light); font-size: 0.95rem; margin-top: 6px; }

/* ---------- Tool page ---------- */
.tool-page { padding: 50px 0 80px; }
.tool-header { text-align: center; margin-bottom: 40px; }
.tool-header .tool-icon { margin: 0 auto 18px; }
.tool-header h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 10px; }
.tool-header p { color: var(--text-light); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.tool-workspace {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
    max-width: 900px; margin: 0 auto;
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-weight: 600; margin-bottom: 8px;
    font-size: 0.95rem; color: var(--text);
}
.form-control, textarea.form-control, select.form-control {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.95rem;
    font-family: inherit; color: var(--text); background: var(--white);
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
}
textarea.form-control { resize: vertical; min-height: 140px; font-family: 'Courier New', monospace; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 16px; }
.checkbox-group label {
    display: flex; align-items: center; gap: 8px; font-weight: 500;
    cursor: pointer; margin-bottom: 0;
}
.checkbox-group input[type="checkbox"] { accent-color: var(--primary); width: 18px; height: 18px; }

.range-wrap { display: flex; align-items: center; gap: 14px; }
.range-wrap input[type=range] { flex: 1; accent-color: var(--primary); }
.range-wrap .range-val {
    min-width: 50px; text-align: center; font-weight: 700;
    color: var(--primary-dark); background: var(--primary-bg);
    padding: 4px 10px; border-radius: var(--radius-sm);
}

.result-box {
    background: var(--primary-bg); border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm); padding: 16px; margin-top: 16px;
    font-family: 'Courier New', monospace; word-break: break-all;
    min-height: 50px; display: flex; align-items: center;
}
.result-box.empty { color: var(--text-light); font-style: italic; font-family: inherit; }

.stats-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px; margin-top: 20px;
}
.stat-card {
    background: var(--primary-bg); border-radius: var(--radius-sm);
    padding: 14px; text-align: center;
}
.stat-card .num { font-size: 1.6rem; font-weight: 700; color: var(--primary-dark); }
.stat-card .lbl { font-size: 0.8rem; color: var(--text-light); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--text); color: var(--white); padding: 12px 22px;
    border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500;
    opacity: 0; transition: all .3s; z-index: 1000; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.tool-info {
    max-width: 900px; margin: 40px auto 0; padding: 30px;
    background: var(--bg-soft); border-radius: var(--radius);
}
.tool-info h2 { font-size: 1.4rem; margin-bottom: 14px; color: var(--text); }
.tool-info h3 { font-size: 1.1rem; margin: 18px 0 10px; color: var(--text); }
.tool-info p, .tool-info li { color: var(--text-light); margin-bottom: 8px; font-size: 0.95rem; }
.tool-info ul { padding-left: 20px; }

/* ---------- Blog ---------- */
.page-header {
    background: linear-gradient(135deg, var(--primary-bg), #ffffff);
    padding: 60px 0 50px; text-align: center;
}
.page-header h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.page-header p { color: var(--text-light); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.blog-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}
.blog-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: all .25s; display: flex; flex-direction: column;
}
.blog-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-thumb {
    height: 180px; background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 3rem;
}
.blog-body { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; }
.blog-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 10px; }
.blog-meta .tag {
    display: inline-block; background: var(--primary-bg); color: var(--primary-dark);
    padding: 3px 10px; border-radius: 999px; font-size: 0.78rem;
    font-weight: 600; margin-right: 8px;
}
.blog-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--primary); }
.blog-card p { color: var(--text-light); font-size: 0.95rem; flex-grow: 1; margin-bottom: 14px; }

/* ---------- Article ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 50px 24px 80px; }
.article-header { margin-bottom: 30px; }
.article-header h1 { font-size: 2.2rem; line-height: 1.25; margin-bottom: 14px; }
.article-meta { color: var(--text-light); font-size: 0.9rem; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.article-meta .tag {
    background: var(--primary-bg); color: var(--primary-dark);
    padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
}
.article-cover {
    height: 280px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 5rem; margin-bottom: 30px;
}
.article-body { font-size: 1.05rem; line-height: 1.8; color: #374151; }
.article-body h2 { font-size: 1.6rem; margin: 30px 0 14px; color: var(--text); }
.article-body h3 { font-size: 1.25rem; margin: 24px 0 10px; color: var(--text); }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
    border-left: 4px solid var(--primary); padding: 12px 20px;
    background: var(--primary-bg); margin: 20px 0; font-style: italic; color: #14532d;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body code {
    background: var(--bg-soft); padding: 2px 7px; border-radius: 4px;
    font-family: 'Courier New', monospace; font-size: 0.9em; color: var(--primary-dark);
}
.article-body strong { color: var(--text); }

/* ---------- Content pages ---------- */
.content-page { max-width: 820px; margin: 0 auto; padding: 50px 24px 80px; }
.content-page h1 { font-size: 2.2rem; margin-bottom: 20px; }
.content-page h2 { font-size: 1.5rem; margin: 30px 0 14px; color: var(--text); }
.content-page p, .content-page li { color: #4b5563; margin-bottom: 12px; line-height: 1.75; }
.content-page ul { padding-left: 22px; margin-bottom: 16px; }
.content-page .muted { color: var(--text-light); font-size: 0.9rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info-card {
    background: var(--bg-soft); padding: 24px; border-radius: var(--radius);
}
.contact-info-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.contact-info-card .item { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.contact-info-card .item i { color: var(--primary); font-size: 1.1rem; margin-top: 4px; }
.contact-info-card .item strong { display: block; color: var(--text); }
.contact-info-card .item span { color: var(--text-light); font-size: 0.92rem; }

/* ---------- QR Output ---------- */
#qrcode { display: flex; justify-content: center; padding: 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); min-height: 220px; align-items: center; }
#qrcode img, #qrcode canvas { max-width: 256px; }

/* ---------- Footer ---------- */
.site-footer {
    background: #0f172a; color: #cbd5e1; padding: 60px 0 24px;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
    margin-bottom: 40px;
}
.footer-brand .logo { color: var(--white); }
.footer-brand p { color: #94a3b8; margin-top: 14px; font-size: 0.95rem; max-width: 320px; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 16px; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #94a3b8; font-size: 0.92rem; }
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom {
    border-top: 1px solid #1e293b; padding-top: 20px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
    color: #94a3b8; font-size: 0.88rem;
}
.social-links { display: flex; gap: 12px; }
.social-links a {
    width: 36px; height: 36px; border-radius: 50%;
    background: #1e293b; display: flex; align-items: center;
    justify-content: center; color: #cbd5e1;
}
.social-links a:hover { background: var(--primary); color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: absolute; top: 70px; left: 0; right: 0;
        background: var(--white); flex-direction: column;
        padding: 16px 24px; box-shadow: var(--shadow);
        border-top: 1px solid var(--border);
        display: none;
    }
    .nav-menu.open { display: flex; }
    .nav-menu li { width: 100%; }
    .nav-menu a { display: block; padding: 12px 14px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.05rem; }
    .section { padding: 60px 0; }
    .section h2 { font-size: 1.8rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 60px 0 50px; }
    .hero h1 { font-size: 1.9rem; }
    .page-header h1 { font-size: 1.8rem; }
    .article-header h1 { font-size: 1.7rem; }
    .article-cover { height: 200px; font-size: 3.5rem; }
    .tool-workspace { padding: 20px; }
}
