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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation Styles */
.navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: #2980b9;
}

.nav-btn.secondary {
    background: #95a5a6;
}

.nav-btn.secondary:hover {
    background: #7f8c8d;
}

/* Navigation Brand Logo */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.nav-brand i {
    font-size: 24px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(231, 76, 60, 0.3));
    transition: all 0.3s ease;
}

.nav-brand:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(231, 76, 60, 0.5));
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #2c3e50;
    padding: 5px;
}

.mobile-menu-toggle:hover {
    background: #f8f9fa;
    border-radius: 4px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.modal h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
}

.modal h3 {
    color: #34495e;
    margin: 20px 0 10px 0;
    font-size: 20px;
}

.modal ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.modal li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Footer Styles */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: auto;
}

.footer p {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.footer-links a:hover {
    background: #34495e;
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
}

/* Content Section Styles for Information Pages */
.content-section {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.content-section h3 {
    color: #34495e;
    margin: 20px 0 15px 0;
    font-size: 20px;
}

.content-section h4 {
    color: #5d6d7e;
    margin: 15px 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.content-section ul, .content-section ol {
    margin: 15px 0;
    padding-left: 25px;
}

.content-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Special Boxes */
.reference-table, .clinical-box, .strategy-box, .population-box, 
.warning-box, .formula-box, .approach-steps, .alternatives-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.warning-box {
    background: #fff3cd;
    border-color: #ffeaa7;
    border-left: 4px solid #f39c12;
}

.formula-box {
    background: #e8f4fd;
    border-color: #3498db;
    border-left: 4px solid #3498db;
    font-family: 'Courier New', monospace;
}

.clinical-box {
    background: #f0f8ff;
    border-color: #87ceeb;
    border-left: 4px solid #2980b9;
}

.strategy-box {
    background: #f0fff0;
    border-color: #90ee90;
    border-left: 4px solid #27ae60;
}

.population-box {
    background: #fef9e7;
    border-color: #f4d03f;
    border-left: 4px solid #f39c12;
}

/* Case Studies */
.case-study {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin: 15px 0;
    border-left: 4px solid #9b59b6;
}

.case-study h3 {
    color: #8e44ad;
    margin-bottom: 15px;
}

/* Steps and Procedures */
.step {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
}

.step h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Special Content Types */
.diet-section, .hydration-box, .exercise-box, .avoid-box, 
.monitoring-schedule, .prognosis-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.diet-section {
    border-left: 4px solid #e67e22;
}

.hydration-box {
    border-left: 4px solid #3498db;
}

.exercise-box {
    border-left: 4px solid #27ae60;
}

.avoid-box {
    border-left: 4px solid #e74c3c;
}

.monitoring-schedule {
    border-left: 4px solid #9b59b6;
}

.prognosis-box {
    border-left: 4px solid #f39c12;
}

/* Formula and Correction Boxes */
.formula-correction, .pediatric-formulas, .pregnancy-values, 
.amputation-corrections, .ethnic-corrections {
    background: #f7f9fc;
    border: 1px solid #d1ecf1;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
}

.formula-correction {
    border-left: 4px solid #17a2b8;
}

/* Subtitle styling */
.subtitle {
    color: #6c757d;
    font-size: 18px;
    margin-bottom: 30px;
    text-align: center;
    font-style: italic;
}

/* Desktop - hide mobile toggle */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 10px;
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        z-index: 1001;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        display: none;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex !important;
    }
    
    .nav-btn {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .container {
        margin: 10px;
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .modal h2 {
        font-size: 24px;
    }
    
    .modal h3 {
        font-size: 18px;
    }
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #34495e;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.calculate-btn {
    width: 100%;
    background: #3498db;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.calculate-btn:hover {
    background: #2980b9;
}

.calculate-btn:active {
    transform: translateY(1px);
}

.result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.metric {
    font-size: 24px;
    font-weight: 700;
    margin: 10px 0;
}

.info-section {
    margin-top: 30px;
    padding: 20px;
    background: #e8f4f8;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.formula-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.formula {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 10px 0;
}

.instructions {
    margin-top: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
}

.instructions h3 {
    color: #856404;
    margin-bottom: 15px;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
    color: #856404;
}

.disclaimer {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.disclaimer strong {
    color: #d68910;
}

.reference-values {
    margin-top: 20px;
    padding: 15px;
    background: #e8f6f3;
    border-radius: 8px;
}

.error-list {
    text-align: left;
    margin-top: 10px;
}

.error-list li {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links a {
        font-size: 13px;
        padding: 6px 10px;
    }
}