/* ==================== CALCULATOR STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --success: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== NAVBAR ==================== */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo {
    font-size: 2rem;
}

.brand-name {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-back {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--light);
}

/* ==================== CALCULATOR CONTAINER ==================== */
.calculator-container {
    padding: 3rem 0;
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-header h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.calculator-header p {
    font-size: 1.3rem;
    color: var(--gray);
}

.calculator-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

/* ==================== FORM ==================== */
.calculator-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
    sticky: top;
}

.calculator-form h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--light);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.helper-text {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.3rem;
}

.btn-calculate {
    width: 100%;
    padding: 1rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

/* ==================== RESULTS ==================== */
.calculator-results {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.results-header {
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 1.8rem;
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-content.hidden {
    display: none;
}

.results-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}

.results-placeholder.hidden {
    display: none;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.placeholder-icon h3 {
    margin-bottom: 0.5rem;
}

/* ==================== RESULT CARDS ==================== */
.result-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 15px;
    transition: all 0.3s;
    animation: slideUp 0.5s ease-out;
}

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

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

.result-card.highlight {
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border: 2px solid var(--primary);
}

.result-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.result-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.result-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.3rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--dark);
}

.result-value.large {
    font-size: 2.5rem;
}

.result-stat.danger .result-value {
    color: var(--danger);
}

.result-stat.warning .result-value {
    color: var(--warning);
}

.result-stat.info .result-value {
    color: var(--info);
}

.result-stat.success .result-value {
    color: var(--success);
}

.result-note {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--gray);
}

/* ==================== RISK ASSESSMENT ==================== */
.risk-card {
    background: white;
    border-left: 4px solid var(--danger);
}

.risk-level {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.risk-bar {
    flex: 1;
    height: 20px;
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
}

.risk-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    transition: width 1s ease-out;
}

.risk-label {
    font-weight: 700;
    font-size: 1.2rem;
}

#risk-description {
    color: var(--gray);
}

/* ==================== RECOMMENDATION ==================== */
.recommendation-card {
    background: var(--gradient);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    animation: slideUp 0.5s ease-out;
}

.recommendation-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.recommendation-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.recommendation-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

/* ==================== INFO SECTION ==================== */
.info-section {
    padding: 5rem 0;
    background: white;
    margin-top: 4rem;
}

.info-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: var(--light);
    transition: all 0.3s;
}

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

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.info-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .calculator-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .calculator-header h1 {
        font-size: 2rem;
    }

    .calculator-header p {
        font-size: 1.1rem;
    }

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

    .result-value.large {
        font-size: 2rem;
    }

    .recommendation-actions {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }
}
