
:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --primary: #10b981;
    --primary-hover: #059669;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --input-bg: #020617;
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
    --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    background-image: radial-gradient(circle at 15% 50%, rgba(16, 185, 129, 0.08), transparent 25%), radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.08), transparent 25%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.navbar {
    display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text-main); text-decoration: none; }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 1rem; align-items: center; }
.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 2rem 1.5rem; flex: 1; }
.hero { text-align: center; margin: 2rem 0 3rem 0; animation: fadeIn 0.8s; }
.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; color: #fff; }
.hero p { color: var(--text-muted); font-size: 1.1rem; }
.grid-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.5rem;
    transition: 0.3s; display: flex; flex-direction: column; justify-content: space-between;
}
.card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--text-main); }
.card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.calculator-box {
    max-width: 600px; margin: 0 auto; background: var(--card-bg); padding: 2rem;
    border-radius: var(--radius); border: 1px solid var(--border-color); box-shadow: var(--shadow-lg);
}
.form-group { margin-bottom: 1.5rem; }
label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.9rem; }
input, select {
    width: 100%; padding: 0.75rem; background: var(--input-bg); border: 1px solid var(--border-color);
    border-radius: 8px; color: var(--text-main); font-family: 'JetBrains Mono', monospace; font-size: 1rem;
}
input:focus, select:focus { outline: none; border-color: var(--primary); }
.btn-outline {
    background: transparent; border: 1px solid var(--border-color); color: var(--text-main);
    padding: 0.5rem 1rem; border-radius: 8px; text-decoration: none; font-size: 0.9rem; cursor: pointer;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
    background: var(--primary); color: white; border: none; padding: 0.75rem; border-radius: 8px;
    font-weight: 600; cursor: pointer; width: 100%; margin-top: 1rem;
}
.btn-primary:hover { background: var(--primary-hover); }
.result-box {
    margin-top: 2rem; padding: 1.5rem; background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color); border-radius: 8px; display: grid; gap: 0.8rem;
}
.result-row { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.5rem; }
.result-row:last-child { border-bottom: none; }
.result-val { color: var(--primary); font-family: 'JetBrains Mono', monospace; font-weight: bold; }
.warning { margin-top: 1.5rem; padding: 0.75rem; background: rgba(220, 38, 38, 0.1); color: #fca5a5; font-size: 0.85rem; text-align: center; border-radius: 8px; }
footer { text-align: center; padding: 2rem; margin-top: auto; border-top: 1px solid var(--border-color); color: var(--text-muted); }
footer a { color: var(--text-main); text-decoration: none; margin: 0 0.5rem; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 768px) { .navbar { flex-direction: column; gap: 1rem; } }
