/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.header-text p {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 400;
}

/* Main content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    padding: 20px;
    font-weight: 600;
}

.card-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

/* Input groups */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.input-group input:focus {
    outline: none;
    border-color: #4299e1;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.input-hint {
    display: block;
    font-size: 0.85rem;
    color: #718096;
    margin-top: 4px;
    font-style: italic;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(72, 187, 120, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(72, 187, 120, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
}

/* Results section */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.results-card .card-header {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.result-item {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: #edf2f7;
    transform: scale(1.02);
}

.result-item.primary {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b35 100%);
    color: white;
    grid-column: span 2;
}

.result-item.primary:hover {
    background: linear-gradient(135deg, #ff6b35 0%, #e53e3e 100%);
}

.result-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.8;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

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

.result-unit {
    font-size: 0.85rem;
    opacity: 0.7;
    font-weight: 500;
}

/* Investment advice */
.advice-content {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
    padding: 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.advice-content.warning {
    background: #fffbf0;
    border-left-color: #ed8936;
}

.advice-content.danger {
    background: #fff5f5;
    border-left-color: #e53e3e;
}

/* Sensitivity analysis */
.sensitivity-analysis {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sensitivity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.sensitivity-item:hover {
    background: #edf2f7;
}

.sensitivity-item label {
    font-weight: 500;
    color: #2d3748;
}

.sensitivity-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #4299e1;
}

.separator {
    color: #a0aec0;
}

.unit {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 400;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.footer p {
    margin-bottom: 8px;
    color: #4a5568;
}

.disclaimer {
    font-size: 0.9rem;
    color: #718096;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-item.primary {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .sensitivity-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Loading animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading .result-value {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Smooth transitions for value changes */
.result-value {
    transition: all 0.5s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

