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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 20px;
}

.language-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.lang-btn {
    padding: 8px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.input-section {
    margin-bottom: 40px;
}

h2 {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

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

input[type="number"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.9rem;
    pointer-events: none;
    margin-top: 15px;
}

.calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

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

.results-section {
    animation: fadeIn 0.5s ease;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.result-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #e0e0e0;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-card h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.result-status {
    font-size: 1rem;
    color: #888;
    margin-bottom: 10px;
}

.result-detail {
    font-size: 0.9rem;
    color: #999;
}

.advice-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid #bee3f8;
}

.advice-section h3 {
    color: #2563eb;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.advice-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #475569;
}

.calorie-plan {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #fbbf24;
}

.calorie-plan h3 {
    color: #d97706;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.plan-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.plan-card h4 {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.plan-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f59e0b;
    margin-bottom: 5px;
}

.plan-detail {
    font-size: 0.85rem;
    color: #999;
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 25px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-grid {
        grid-template-columns: 1fr;
    }
    
    .calculate-btn {
        width: 100%;
    }
    
    .result-value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    main {
        padding: 20px;
    }
    
    .language-selector {
        flex-wrap: wrap;
    }
    
    .lang-btn {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
}