.calculator {
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.98);
    padding: 35px;
    max-width: 600px;
    width: calc(100% - 40px);
    margin: 2em auto;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    box-sizing: border-box;
    color: #333;
}

.calculator h2 {
    text-align: center;
    color: #1f2937;
    margin-bottom: 35px;
    font-size: 1.5em;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
    font-family: 'Playfair Display', serif;
    white-space: nowrap;
}

.calculator h2 i {
    color: #4CAF50;
    margin-right: 10px;
}

.calculator h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 2px;
}

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

.calculator label {
    display: block;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 600;
    font-size: 1.05em;
}

.calculator .input-with-icon {
    position: relative;
    flex: 1;
}

.calculator .input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    z-index: 1;
}

.calculator .input-with-icon input,
.calculator .input-with-icon select {
    padding: 14px 14px 14px 45px;
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.05em;
    transition: all 0.3s ease;
    background: white;
    color: #1f2937;
    box-sizing: border-box;
}

.calculator .input-with-icon input:focus,
.calculator .input-with-icon select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
    transform: translateY(-1px);
}

.calculator .duration-toggle {
    display: flex;
    gap: 12px;
}

.calculator .duration-toggle input {
    flex: 2;
}

.calculator .duration-toggle select {
    flex: 1;
}

.calculator button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.15em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(76, 175, 80, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
}

.calculator button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(76, 175, 80, 0.25);
}

.calculator button:active {
    transform: translateY(0);
}

.calculator .results {
    margin-top: 35px;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculator .results.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.calculator .result-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
}

.calculator .result-card h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calculator .result-card h3 i {
    color: #4CAF50;
}

.calculator .metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.calculator .metric {
    background: white;
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease;
}

.calculator .metric:hover {
    transform: translateY(-2px);
}

.calculator .metric-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95em;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.calculator .metric-label i {
    color: #4CAF50;
}

.calculator .metric-value {
    display: block;
    font-size: 1.3em;
    font-weight: 700;
    color: #4CAF50;
}

.calculator .error {
    color: #dc2626;
    font-size: 0.9em;
    margin-top: 6px;
    display: block;
    height: 20px;
    font-weight: 500;
}

.calculator .feedback-section {
    margin-top: 35px;
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.calculator .feedback-section h3 {
    color: #1f2937;
    font-size: 1.4em;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calculator .feedback-section h3 i {
    color: #4CAF50;
}

.calculator .profile-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

.calculator .profile-type {
    font-size: 1.25em;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.calculator .profile-description {
    color: #4b5563;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 1.05em;
}

.calculator .risk-analysis {
    margin: 20px 0;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 10px;
    color: #374151;
}

.calculator .suggestions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calculator .suggestions a {
    display: inline-block;
    padding: 12px 20px;
    background: #f3f4f6;
    border-radius: 10px;
    color: #4CAF50;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid #e5e7eb;
}

.calculator .suggestions a:hover {
    background: #4CAF50;
    color: white;
    transform: translateX(5px);
}

.calculator .chart-container {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

@media (max-width: 600px) {
    .calculator {
        padding: 25px;
        margin: 15px;
        border-radius: 20px;
        width: calc(100% - 30px);
    }

    .calculator .metrics {
        grid-template-columns: 1fr;
    }

    .calculator h2 {
        font-size: 1.5em;
    }

    .calculator .feedback-section {
        padding: 20px;
    }

    .calculator .suggestions a {
        padding: 10px 16px;
    }
}