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

html {
    font-size: 15px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 12px;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 0;
    overflow-x: hidden;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
}

.form-section {
    margin-bottom: 18px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 0.95em;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    max-width: 100%;
    transition: border-color 0.3s;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    transform: scale(1.2);
    margin-right: 5px;
}

.radio-option label {
    display: inline;
    font-weight: normal;
    margin-bottom: 0;
}

.bmi-unit-toggle {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.bmi-unit-toggle .unit-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
}

.bmi-unit-toggle .unit-option input {
    margin: 0;
}

.bmi-calculator {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.bmi-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

.bmi-imperial.bmi-inputs {
    grid-template-columns: 1fr 1fr 1fr;
}

.bmi-result {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    font-weight: bold;
    color: #667eea;
}

.bmi-calc-btn {
    padding: 8px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.bmi-calc-btn:hover {
    background: #5568d3;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 16px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #b0b0b0;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.section-title {
    font-size: 1.1em;
    color: #667eea;
    margin-bottom: 12px;
    font-weight: 600;
}

.progress-indicator {
    text-align: center;
    margin-bottom: 14px;
    font-size: 0.95em;
    color: #666;
    font-weight: 500;
}

.progress-indicator #current-step {
    color: #667eea;
    font-weight: bold;
    font-size: 1.05em;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.nav-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.back-btn {
    background: #6c757d;
    color: white;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.next-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.nav-btn:active {
    transform: translateY(0);
}

.form-navigation .submit-btn {
    margin-top: 0;
    flex: 1;
}

/* Mobile layout */
@media (max-width: 600px) {
    html {
        font-size: 13px;
    }
    body {
        padding: 8px;
    }
    .container {
        padding: 14px;
        border-radius: 10px;
    }
    h1 {
        font-size: 1.35em;
        margin-bottom: 14px;
    }
    .form-section {
        padding: 12px;
        margin-bottom: 14px;
    }
    .radio-group {
        flex-wrap: wrap;
        gap: 10px;
    }
    .bmi-unit-toggle {
        flex-wrap: wrap;
        gap: 10px;
    }
    .bmi-inputs {
        grid-template-columns: 1fr;
    }
    .bmi-imperial.bmi-inputs {
        grid-template-columns: 1fr;
    }
}

