/* Reset và cài đặt cơ bản */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content {
    flex: 1;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
}

.home-btn {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.home-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Main content */
.main-content {
    padding: 32px;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 32px;
    margin-bottom: 40px;
}

@media (max-width: 1100px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
}

/* Input section */
.input-section, .results-section, .info-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.input-section h2, .results-section h2, .info-section h2 {
    color: #4f46e5;
    font-size: 22px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
}

.input-group input {
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f8fafc;
}

.input-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.4;
}

.btn-group {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
    flex: 2;
}

.btn-primary:hover {
    background-color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #475569;
    flex: 1;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

/* Results section */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.result-card {
    background-color: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #4f46e5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.result-header h3 {
    font-size: 18px;
    color: #1e293b;
    font-weight: 700;
}

.result-value {
    font-size: 20px;
    font-weight: 700;
    color: #4f46e5;
}

.result-description {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.5;
}

.result-bar {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
}

.good .bar-fill {
    background-color: #10b981;
}

.medium .bar-fill {
    background-color: #f59e0b;
}

.low .bar-fill {
    background-color: #ef4444;
}

.summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.summary h3 {
    color: #4f46e5;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #10b981;
}

/* Info section */
.info-section {
    margin-top: 40px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.info-card {
    background-color: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    border-top: 4px solid #7c3aed;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
    color: #1e293b;
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
}

.info-card p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: #cbd5e1;
    text-align: center;
    padding: 24px;
    font-size: 14px;
    line-height: 1.6;
}

.footer p {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .home-btn {
        align-self: stretch;
        justify-content: center;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .input-grid, .results-grid, .info-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .input-section, .results-section, .info-section {
        padding: 20px 16px;
    }
}