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

:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --text: #eee;
    --text-muted: #aaa;
    --card-bg: #1f1f3d;
    --border: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary);
    color: var(--text);
    line-height: 1.6;
}

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

/* Header */
header {
    background: var(--secondary);
    padding: 30px 0;
    text-align: center;
    border-bottom: 3px solid var(--accent);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

header .tagline {
    color: var(--text-muted);
    margin-top: 5px;
}

/* Navigation */
nav {
    background: var(--secondary);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    flex-wrap: wrap;
}

nav a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

nav a:hover,
nav a.active {
    background: var(--accent);
}

/* Main Content */
main {
    padding: 30px 0;
}

.news-section {
    margin-bottom: 50px;
}

.news-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.news-card .source {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.news-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.news-card time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.news-card a {
    color: var(--accent);
    text-decoration: none;
}

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

/* Stock Card */
.stock-card .stock-price {
    font-size: 2rem;
    font-weight: 700;
    color: #4ade80;
}

.stock-card.negative .stock-price {
    color: var(--accent);
}

/* Footer */
footer {
    background: var(--secondary);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer p {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    nav ul {
        gap: 5px;
    }

    nav a {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

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

/* Loading Animation */
.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
