/* Main Styles for Mag7 Stock Analyzer */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Cards */
.card {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    border: none;
}

.card-header {
    font-weight: 600;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Stock Info */
.stock-info {
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stock-info h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.stock-info .d-flex {
    margin-bottom: 8px;
}

/* News Section */
#newsContainer .news-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

#newsContainer .news-item:hover {
    background-color: #f9f9f9;
}

#newsContainer .news-item h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

#newsContainer .news-item .news-meta {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

#newsContainer .news-item .news-summary {
    margin-bottom: 10px;
}

#newsContainer .news-item .btn {
    padding: 3px 10px;
    font-size: 0.85rem;
}

/* Investment Section */
#allocationInputs .form-group {
    margin-bottom: 10px;
}

#allocationInputs .input-group-text {
    width: 100px;
}

.strategy-card {
    height: 100%;
}

/* Education Section */
#termsAccordion .accordion-button {
    font-weight: 600;
}

#strategiesList .list-group-item {
    padding: 15px;
}

#strategiesList .strategy-title {
    font-weight: 600;
    color: var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
}

/* Utility Classes */
.positive-change {
    color: var(--success-color);
}

.negative-change {
    color: var(--danger-color);
}

.risk-low {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.risk-medium {
    background-color: rgba(255, 193, 7, 0.1);
    color: #d6a206;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.risk-high {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tooltips */
.tooltip-inner {
    max-width: 300px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    font-size: 0.9rem;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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