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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 700;
}

.logo i { font-size: 1.5rem; }

.nav-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-link:hover { background: #f0f4ff; }

.main { flex: 1; }

.calculator-card {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

.calculator-card h1 {
    font-size: 1.8rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    margin-bottom: 28px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 60px 16px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s;
    background: #f8f9fa;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
}

.input-wrapper .unit {
    position: absolute;
    right: 16px;
    color: #888;
    font-weight: 500;
}

.result-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    margin-bottom: 20px;
}

.bmi-display { margin-bottom: 24px; }

.bmi-value {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.bmi-label {
    color: #666;
    font-size: 0.95rem;
    margin-top: 8px;
}

.bmi-gauge { margin-bottom: 20px; }

.gauge-bar {
    height: 12px;
    background: linear-gradient(to right, #3498db 0%, #2ecc71 25%, #f1c40f 50%, #e74c3c 75%, #c0392b 100%);
    border-radius: 6px;
    position: relative;
    margin-bottom: 8px;
}

.gauge-pointer {
    position: absolute;
    top: -6px;
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid #333;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.5s ease;
    left: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
}

.category-badge {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    background: #e8e8e8;
    color: #666;
}

.category-badge.underweight { background: #3498db; color: white; }
.category-badge.normal { background: #2ecc71; color: white; }
.category-badge.overweight { background: #f1c40f; color: #333; }
.category-badge.obese { background: #e74c3c; color: white; }

.details-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px;
    border-radius: 12px;
}

.detail-item i {
    font-size: 1.5rem;
    color: #667eea;
}

.detail-content { display: flex; flex-direction: column; }
.detail-label { font-size: 0.85rem; color: #888; }
.detail-value { font-weight: 600; color: #333; }

.health-advice {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    color: #555;
    line-height: 1.6;
}

.info-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.scale-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.scale-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #f5f5f5;
}

.scale-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.scale-item.underweight .dot { background: #3498db; }
.scale-item.normal .dot { background: #2ecc71; }
.scale-item.overweight .dot { background: #f1c40f; }
.scale-item.obese .dot { background: #e74c3c; }

.note { font-size: 0.8rem; color: #888; }

.footer {
    text-align: center;
    padding: 24px;
    color: #888;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.9rem;
}

.footer-links a { color: #667eea; text-decoration: none; }
.footer-links span { color: #ccc; }

@media (max-width: 600px) {
    .container { padding: 12px; }
    .calculator-card { padding: 24px 20px; }
    .calculator-card h1 { font-size: 1.5rem; }
    .input-row { grid-template-columns: 1fr; gap: 16px; }
    .bmi-value { font-size: 3rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .scale-grid { grid-template-columns: repeat(2, 1fr); }
    .header { flex-direction: column; gap: 12px; }
}
