/* Portfolio Simulator Specific Styles */
.simulator-content {
    padding: 20px 0;
}

.simulator-intro {
    text-align: center;
    margin-bottom: 30px;
}

.simulator-intro h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #212529;
    background: linear-gradient(135deg, #0d6efd, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.simulator-intro p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.simulator-grid {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 30px;
    margin-bottom: 30px;
}

/* Controls Panel */
.controls-panel {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: fit-content;
}

.controls-panel h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #212529;
}

.asset-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.asset-control {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.asset-control label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #212529;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.stocks-slider {
    background: linear-gradient(90deg, #f8f9fa 0%, #6f42c1 100%);
}

.bonds-slider {
    background: linear-gradient(90deg, #f8f9fa 0%, #0d6efd 100%);
}

.funds-slider {
    background: linear-gradient(90deg, #f8f9fa 0%, #20c997 100%);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 3px solid #0d6efd;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 3px solid #0d6efd;
    cursor: pointer;
}

.value-display {
    font-weight: 600;
    font-size: 1rem;
    color: #0d6efd;
    min-width: 45px;
    text-align: right;
}

.asset-info {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.risk-level, .return-potential {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.risk-level.low, .return-potential.low {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.risk-level.medium, .return-potential.medium {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.risk-level.high, .return-potential.high {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.total-allocation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 20px;
}

.allocation-status {
    color: #28a745;
}

.allocation-status.warning {
    color: #ffc107;
}

.allocation-status.error {
    color: #dc3545;
}

.preset-portfolios h4 {
    margin-bottom: 10px;
    font-weight: 600;
    color: #212529;
    font-size: 1.1rem;
}

.preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preset-btn {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.preset-btn:hover {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Visualization Panel */
.visualization-panel {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #212529;
}

.pie-chart {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    transform: rotate(-90deg);
}

.chart-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.stocks-segment {
    background: conic-gradient(from 0deg, #6f42c1 0deg, transparent 0deg);
}

.bonds-segment {
    background: conic-gradient(from 0deg, transparent 0deg, #0d6efd 0deg, transparent 0deg);
}

.funds-segment {
    background: conic-gradient(from 0deg, transparent 0deg, #20c997 0deg, transparent 0deg);
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    text-align: center;
    background: white;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.portfolio-total {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
}

.portfolio-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.stocks-color {
    background: #6f42c1;
}

.bonds-color {
    background: #0d6efd;
}

.funds-color {
    background: #20c997;
}

.legend-item span:last-child {
    margin-left: auto;
    font-weight: 600;
    color: #212529;
}

/* Analysis Panel */
.analysis-panel {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: fit-content;
}

.analysis-panel h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #212529;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.metric-icon {
    font-size: 1.8rem;
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.recommendations {
    margin-bottom: 20px;
}

.recommendations h4 {
    margin-bottom: 10px;
    font-weight: 600;
    color: #212529;
    font-size: 1.1rem;
}

.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 8px;
    color: #155724;
    font-size: 0.9rem;
}

.recommendation-icon {
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    min-width: 120px;
}

.action-btn.primary {
    background: #0d6efd;
    color: white;
}

.action-btn.primary:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: white;
    color: #0d6efd;
    border: 1px solid #0d6efd;
}

.action-btn.secondary:hover {
    background: #0d6efd;
    color: white;
}

/* Performance Section */
.performance-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #dee2e6;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.performance-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #212529;
    text-align: center;
}

.performance-chart {
    margin-bottom: 20px;
    text-align: center;
    overflow-x: auto;
}

.performance-chart canvas {
    max-width: 100%;
    height: auto;
}

.performance-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    min-width: 80px;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.stat-value.positive {
    color: #28a745;
}

.stat-value.negative {
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .simulator-grid {
        grid-template-columns: 1fr 1fr;
    }
    .controls-panel {
        grid-column: span 2;
    }
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .performance-stats {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .simulator-grid {
        grid-template-columns: 1fr;
    }
    .controls-panel {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .simulator-intro h1 {
        font-size: 1.8rem;
    }
    
    .simulator-intro p {
        font-size: 1rem;
    }
    
    .controls-panel,
    .visualization-panel,
    .analysis-panel,
    .performance-section {
        padding: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    .action-buttons .action-btn {
        width: 100%;
    }
    
    .performance-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .pie-chart {
        width: 180px;
        height: 180px;
    }
    
    .chart-center {
        width: 90px;
        height: 90px;
    }
    .portfolio-total {
        font-size: 0.9rem;
    }
    .portfolio-label {
        font-size: 0.7rem;
    }
    .legend-item {
        font-size: 0.85rem;
    }
    .metric-card {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .simulator-intro h1 {
        font-size: 1.5rem;
    }
    .simulator-intro p {
        font-size: 0.9rem;
    }
    .controls-panel h3, .visualization-panel h3, .analysis-panel h3, .performance-section h3 {
        font-size: 1.1rem;
    }
    .asset-control label {
        font-size: 0.9rem;
    }
    .value-display {
        font-size: 0.9rem;
    }
    .risk-level, .return-potential {
        font-size: 0.75rem;
    }
    .total-allocation {
        font-size: 0.9rem;
    }
    .preset-portfolios h4 {
        font-size: 1rem;
    }
    .preset-btn {
        font-size: 0.85rem;
    }
    .pie-chart {
        width: 150px;
        height: 150px;
    }
    .chart-center {
        width: 75px;
        height: 75px;
    }
    .legend-item {
        font-size: 0.8rem;
        gap: 5px;
        padding: 5px;
    }
    .legend-color {
        width: 15px;
        height: 15px;
    }
    .metric-icon {
        font-size: 1.5rem;
    }
    .metric-label {
        font-size: 0.8rem;
    }
    .metric-value {
        font-size: 1rem;
    }
    .recommendations h4 {
        font-size: 1rem;
    }
    .recommendation-item {
        font-size: 0.85rem;
        padding: 10px;
    }
    .action-btn {
        font-size: 0.9rem;
    }
    .stat-label {
        font-size: 0.8rem;
    }
    .stat-value {
        font-size: 1.1rem;
    }
}