@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

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

:root {
    --bg: #0f0f13;
    --card: #1a1a2e;
    --border: rgba(255,255,255,0.06);
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --accent-1: #f43f5e;
    --accent-2: #e11d48;
    --accent-3: #be123c;
    --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    --radius: 0.75rem;
    --radius-lg: 1rem;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
.site-header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    background: rgba(15,15,19,0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.15rem;
}

.logo-icon {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 800;
}

nav { display: flex; gap: 1.25rem; }

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover { color: var(--text); }

/* Ad Slots */
.ad-slot {
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin: 1.5rem auto;
    max-width: 728px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 0 1.5rem;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Card */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Calculator Form */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input, .form-group select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 1rem;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-1);
}

.unit-toggle {
    display: flex;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.unit-toggle button {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    background: var(--bg);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.unit-toggle button.active {
    background: var(--gradient);
    color: #fff;
}

.height-inputs {
    display: flex;
    gap: 0.5rem;
}

.height-inputs input { flex: 1; }

.btn-calculate {
    grid-column: 1 / -1;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.85rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 0.5rem;
}

.btn-calculate:hover { opacity: 0.9; }

/* Result */
.result-section {
    text-align: center;
    padding: 2rem 0;
}

.bmi-value {
    font-size: 4rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.bmi-category {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* BMI Gauge */
.bmi-gauge {
    position: relative;
    height: 24px;
    border-radius: 12px;
    overflow: visible;
    margin: 1.5rem 0;
    display: flex;
}

.gauge-segment {
    height: 100%;
    position: relative;
}

.gauge-segment:first-child { border-radius: 12px 0 0 12px; }
.gauge-segment:last-child { border-radius: 0 12px 12px 0; }

.gauge-underweight { background: #38bdf8; flex: 18.5; }
.gauge-normal { background: #4ade80; flex: 6.4; }
.gauge-overweight { background: #fbbf24; flex: 5; }
.gauge-obese { background: #f43f5e; flex: 10; }

.gauge-marker {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 40px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
    transition: left 0.5s ease;
    z-index: 10;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.info-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.info-card .info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.info-card .info-value {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

/* Content Section */
.content-section h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
    color: var(--text);
}

.content-section p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
}

/* Footer */
.site-footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.site-footer nav {
    display: flex;
    gap: 1.25rem;
}

.site-footer nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.site-footer nav a:hover { color: var(--text); }

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.6rem; }
    .form-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .bmi-value { font-size: 3rem; }
    .card { padding: 1.25rem; }
}
