* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#tickerSearch {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    width: 300px;
    text-transform: uppercase;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
}

#tickerSearch:focus {
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    background: white;
    border-radius: 15px;
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #fcc;
    margin: 20px 0;
}

.hidden {
    display: none !important;
}

.ticker-header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.ticker-info h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.performance-summary {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.score-card {
    text-align: center;
}

.score {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
}

.score-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.quality-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.quality-excellent {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.quality-good {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.quality-fair {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.quality-poor {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.chart-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.chart-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.chart-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.chart-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.chart-controls input[type="checkbox"] {
    transform: scale(1.2);
    accent-color: #667eea;
}

#ohlcChart {
    width: 100% !important;
    height: 500px !important;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-card h4 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.1rem;
    flex: 1;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.metric-detail {
    color: #666;
    font-size: 0.9rem;
}

.details-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.detail-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.detail-card h4 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.2rem;
    flex: 1;
}

.param-grid {
    display: grid;
    gap: 15px;
}

.param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.param-item:last-child {
    border-bottom: none;
}

.param-label {
    font-weight: 600;
    color: #555;
}

.summary-content {
    margin-bottom: 30px;
}

.summary-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.summary-header h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 10px;
}

.summary-subtitle {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.overview-card {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
}

.overview-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.card-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.card-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
}

.accuracy-summary {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.accuracy-summary h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5rem;
}

.accuracy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.accuracy-card h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.accuracy-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #667eea;
    font-size: 1rem;
}

.performance-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.insight-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.insight-card h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.distribution-stats, .model-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dist-item, .model-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dist-item:last-child, .model-item:last-child {
    border-bottom: none;
}

.dist-label, .model-label {
    font-weight: 600;
    color: #555;
}

.dist-value, .model-value {
    color: #667eea;
    font-weight: bold;
}

.search-prompt {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.search-prompt p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #555;
}

.popular-tickers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.ticker-tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.ticker-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    position: relative;
}

.overview-card .info-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #667eea;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.6;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    z-index: 10;
}

.accuracy-card .info-icon {
    color: #667eea;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.6;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    margin-left: auto;
}

.info-icon:hover {
    opacity: 1;
    background: rgba(102, 126, 234, 0.25);
    transform: scale(1.15);
}

.accuracy-card {
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    position: relative;
}

.accuracy-card .card-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accuracy-card .card-header h4 {
    margin: 0;
    flex: 1;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 25px 30px 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.4rem;
}

.close-modal {
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: #667eea;
}

.modal-body {
    padding: 25px 30px 30px;
}

.modal-body #modalDescription {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

.examples-section {
    display: grid;
    gap: 20px;
}

.example-good, .example-bad {
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid;
}

.example-good {
    background: #f8fff8;
    border-left-color: #4caf50;
}

.example-bad {
    background: #fff8f8;
    border-left-color: #f44336;
}

.example-good h4, .example-bad h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
}

.example-good h4 {
    color: #2e7d32;
}

.example-bad h4 {
    color: #c62828;
}

.example-good p, .example-bad p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .search-container {
        flex-direction: column;
        align-items: center;
    }

    #tickerSearch {
        width: 100%;
        max-width: 300px;
    }

    .ticker-header {
        flex-direction: column;
        text-align: center;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-controls {
        flex-direction: column;
        gap: 10px;
    }

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

    .details-section {
        grid-template-columns: 1fr;
    }
}