:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --ad-bg: #f1f5f9;
}

* { box-sizing: border-box; font-family: 'Inter', sans-serif; margin: 0; padding: 0; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; }

header { background-color: var(--primary-color); color: white; padding: 2rem 1rem; text-align: center; }
header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
header a { color: white; text-decoration: none; font-weight: 600; font-size: 0.9rem; opacity: 0.9; display: inline-block; margin-bottom: 1rem; }
header a:hover { opacity: 1; }

.container { max-width: 800px; margin: 0 auto; padding: 2rem 1rem; }
.tool-card { background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 2rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }

.ad-container { width: 100%; background-color: var(--ad-bg); border: 2px dashed #cbd5e1; border-radius: 8px; text-align: center; padding: 1.5rem 1rem; margin: 1.5rem 0; color: var(--text-muted); font-weight: 600; }

.form-group { margin-bottom: 1.5rem; }
label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.95rem; }
input[type="text"], input[type="number"], textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 1rem; transition: border-color 0.3s; }
input:focus, textarea:focus { outline: none; border-color: var(--primary-color); }
textarea { resize: vertical; min-height: 150px; }

.btn { background-color: var(--primary-color); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.3s; width: 100%; }
.btn:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: #e2e8f0; color: var(--text-main); margin-top: 0.5rem; }
.btn-secondary:hover { background-color: #cbd5e1; }

.result-box { margin-top: 1.5rem; padding: 1.5rem; background-color: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; display: none; }
.result-box.active { display: block; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; }
.stat-item { background: var(--bg-color); padding: 1rem; border-radius: 8px; text-align: center; border: 1px solid var(--border-color); }
.stat-item span { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary-color); }