* {
    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;
    color: white;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.last-updated {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

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

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

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #007cba;
    background: white;
    color: #007cba;
    cursor: pointer;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #007cba;
    color: white;
    transform: translateY(-2px);
}

.search input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    width: 250px;
    font-size: 14px;
}

.search input:focus {
    outline: none;
    border-color: #007cba;
}

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

.stat {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #007cba;
}

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

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

.stock-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid #007cba;
}

.stock-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.stock-ticker {
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
}

.stock-region {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.stock-name {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.stock-price {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 5px;
}

.price-change {
    font-weight: 600;
    margin-bottom: 15px;
}

.price-change.positive { color: #28a745; }
.price-change.negative { color: #dc3545; }

.confidence-score {
    margin: 15px 0;
}

.score-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.score-high { background: linear-gradient(90deg, #28a745, #20c997); }
.score-medium { background: linear-gradient(90deg, #ffc107, #fd7e14); }
.score-low { background: linear-gradient(90deg, #dc3545, #e83e8c); }

.score-text {
    font-size: 0.9em;
    color: #666;
}

.catalyst {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 3px solid #007cba;
}

.catalyst-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.analysis {
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}

.loading {
    text-align: center;
    padding: 40px;
    color: white;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.disclaimer {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: white;
    backdrop-filter: blur(10px);
}

.info {
    color: rgba(255,255,255,0.8);
    font-size: 0.9em;
}

.info a {
    color: white;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search input {
        width: 100%;
    }
    
    .stock-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2em;
    }
}
