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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #4f6baf 0%, #3b5998 100%);
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
.header {
    background-color: #2c4a7c;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Hero Section */
.hero {
    background: white;
    padding: 2.5rem 2rem;
    text-align: center;
    border-bottom: 3px solid #f0f0f0;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.title {
    font-size: 2.25rem;
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Content */
.content {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Calculator Card */
.calculator-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.section-description {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.tooltip-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.75rem;
    cursor: help;
    margin-left: 0.5rem;
    position: relative;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: normal;
    width: 300px;
    margin-bottom: 0.5rem;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: normal;
    line-height: 1.5;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
    display: block;
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.btn-calculate {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

/* Results Section */
.results-section {
    margin-top: 2rem;
}

.results-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
}

.results-title {
    font-size: 1.75rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.main-result {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 3px solid #10b981;
}

.main-result.warning {
    border-color: #f59e0b;
}

.main-result.danger {
    border-color: #ef4444;
}

.result-label {
    font-size: 0.875rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 0.5rem;
}

.warning .result-value {
    color: #f59e0b;
}

.danger .result-value {
    color: #ef4444;
}

.result-unit {
    font-size: 0.875rem;
    color: #64748b;
}

.secondary-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.secondary-result {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.secondary-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.secondary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

/* Breakdown */
.breakdown {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.breakdown-title {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.breakdown-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
}

.breakdown-item-label {
    color: #64748b;
}

.breakdown-item-value {
    font-weight: 600;
    color: #1e293b;
}

/* Calculation Explanation */
.calculation-explanation {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.explanation-title {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.explanation-intro {
    color: #64748b;
    margin-bottom: 1rem;
}

.calculation-step {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 4px;
}

.step-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.step-formula {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 0.75rem;
    border-radius: 4px;
    margin: 0.5rem 0;
    color: #3b82f6;
    overflow-x: auto;
}

.step-result {
    font-weight: 600;
    color: #10b981;
    margin-top: 0.5rem;
}

/* Alert Section */
.alert-section {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert.success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert.warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert.danger {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* Insights */
.insights {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.insights-title {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.insight-item {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border-left: 4px solid #3b82f6;
}

.insight-item:last-child {
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: white;
}

.cta-text {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #2563eb;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: white;
    margin-top: 2rem;
}

.footer p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .result-value {
        font-size: 2.25rem;
    }

    .tooltip-icon:hover::after {
        width: 250px;
        font-size: 0.8125rem;
    }

    .secondary-results {
        grid-template-columns: 1fr;
    }
}
