:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --bullish-color: #22c55e;
    --bearish-color: #ef4444;
    --neutral-color: #eab308;
    --border-color: #334155;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem;
}

/* ... (header styles remain same) ... */

.grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 1600px) {
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#last-updated {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

button:hover {
    background-color: #2563eb;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.global-card {
    background-color: #1e293b;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.global-card h2 {
    margin-top: 0;
    color: #60a5fa;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#summary-content {
    color: #e2e8f0;
    line-height: 1.7;
    font-size: 1.05rem;
}

.news-analysis-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #475569;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.news-title {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 1.1rem;
}

.news-reason {
    color: #94a3b8;
    font-size: 0.95rem;
}

.news-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-impulse {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid #22c55e;
}

.badge-priced-in {
    background-color: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid #eab308;
}

.badge-distribution {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid #ef4444;
}

.badge-divergence {
    background-color: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid #a855f7;
}

.badge-neutral {
    background-color: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    border: 1px solid #94a3b8;
}

.badge-bullish {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid #22c55e;
}

.badge-bearish {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid #ef4444;
}



.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.symbol-info h2 {
    margin: 0;
    font-size: 1.25rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.sentiment-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sentiment-bullish {
    background-color: rgba(34, 197, 94, 0.2);
    color: var(--bullish-color);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.sentiment-bearish {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--bearish-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.sentiment-neutral {
    background-color: rgba(234, 179, 8, 0.2);
    color: var(--neutral-color);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.score-bar {
    height: 6px;
    background-color: #334155;
    border-radius: 3px;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

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

.analysis-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.analysis-content p {
    margin-bottom: 0.5rem;
}

.drivers {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.drivers h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.drivers ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: #cbd5e1;
}

.news-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.news-section h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
}

.news-item {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.news-item a {
    color: #60a5fa;
    text-decoration: none;
}

.news-item a:hover {
    text-decoration: underline;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50vh;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}