/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Force light theme regardless of system preferences */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff !important;
    min-height: 100vh;
    color: #1d1d1f !important;
    line-height: 1.6;
}

/* Override system color scheme preferences */
:root {
    color-scheme: light !important;
}

/* Force light theme for all browsers */
@media (prefers-color-scheme: dark) {
    body {
        background: #ffffff !important;
        color: #1d1d1f !important;
    }
    
    .container {
        background: #ffffff !important;
    }
    
    .calculator-section {
        background: #ffffff !important;
    }
    
    .results-section {
        background: #ffffff !important;
    }
    
    .input-group input {
        background: #ffffff !important;
        color: #1d1d1f !important;
        border-color: #e0e0e0 !important;
    }
    
    .detail-card {
        background: #ffffff !important;
        color: #1d1d1f !important;
        border-color: #e0e0e0 !important;
    }
    
    .chart-item {
        background: #ffffff !important;
        color: #1d1d1f !important;
        border-color: #e0e0e0 !important;
    }
    
    .footer {
        background: #ffffff !important;
        color: #1d1d1f !important;
        border-color: #e0e0e0 !important;
    }
}

.container {
    max-width: 100%;
    min-height: 100vh;
    background: #ffffff !important;
}

/* Header */
.header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.app-info h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.app-info p {
    font-size: 16px;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Calculator Section */
.calculator-section {
    margin-bottom: 40px;
}

.calculator-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 10px;
    font-size: 16px;
}

.input-group label i {
    color: #4CAF50;
    width: 20px;
    text-align: center;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    background: #ffffff;
    color: #1d1d1f;
}

.input-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

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

/* Results Section */
.results-section {
    margin-bottom: 40px;
}

.results-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.imc-result {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 1px solid #e0e0e0;
}

.imc-value {
    font-size: 48px;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 8px;
}

.imc-label {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 8px;
}

.imc-classification {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
}

.detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.detail-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
}

/* Classification Chart */
.classification-chart {
    margin-bottom: 30px;
}

.classification-chart h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #1d1d1f;
    font-size: 20px;
}

.chart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.chart-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chart-item[data-category="abaixo"] {
    border-left: 4px solid #2196F3;
}

.chart-item[data-category="normal"] {
    border-left: 4px solid #4CAF50;
}

.chart-item[data-category="sobrepeso"] {
    border-left: 4px solid #FF9800;
}

.chart-item[data-category="obesidade1"] {
    border-left: 4px solid #F44336;
}

.chart-item[data-category="obesidade2"] {
    border-left: 4px solid #9C27B0;
}

.chart-item[data-category="obesidade3"] {
    border-left: 4px solid #795548;
}

.chart-label {
    font-weight: 500;
    color: #1d1d1f;
}

.chart-range {
    font-weight: 600;
    color: #6c757d;
    font-family: 'Courier New', monospace;
}

.new-calculation-btn {
    width: 100%;
    background: #ffffff;
    color: #4CAF50;
    border: 2px solid #4CAF50;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.new-calculation-btn:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.loading-state p {
    font-size: 18px;
    color: #6c757d;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 48px;
    color: #F44336;
    margin-bottom: 20px;
}

.error-state h3 {
    font-size: 24px;
    color: #1d1d1f;
    margin-bottom: 10px;
}

.error-state p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 20px;
}

.retry-btn {
    background: #F44336;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.retry-btn:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.3);
}

/* Footer */
.footer {
    background: #ffffff;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    color: #86868b;
    font-size: 14px;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffffff;
    color: #1d1d1f;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    border: 1px solid #e0e0e0;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon {
    color: #4CAF50;
}

.toast.error .toast-icon {
    color: #F44336;
}

.toast.info .toast-icon {
    color: #2196F3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .app-info h1 {
        font-size: 24px;
    }

    .main-content {
        padding: 20px 15px;
    }

    .calculator-container,
    .results-container {
        padding: 25px;
    }

    .imc-value {
        font-size: 36px;
    }

    .imc-classification {
        font-size: 20px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .chart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}
