:root {
    --bg-dark: #0a0b10;
    --card-bg: rgba(18, 20, 30, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #e0e6ed;
    --text-secondary: #94a3b8;
    --accent-blue: #52afff;
    --accent-gold: #ffd740;
    --accent-green: #00e676;
    --accent-red: #ff5252;
    --impact-high: #ff9800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: var(--accent-blue);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40%;
    height: 40%;
    background: var(--accent-red);
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30%;
    height: 30%;
    background: var(--accent-gold);
}

.dashboard {
    max-width: 100%;
    margin: 0;
    padding: 0.5rem 1rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--card-border);
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.index-ticker {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    padding: 0 0.5rem;
    justify-content: space-evenly;
    align-items: center;
}

.ticker-item {
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
    min-width: 0;
}

.ticker-name {
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: -2px;
    white-space: nowrap;
}

.ticker-data {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.ticker-price {
    font-size: 0.8rem;
    font-weight: 600;
}

.ticker-change {
    font-size: 0.65rem;
    font-weight: 600;
}

.ticker-change.up {
    color: var(--accent-green);
}

.ticker-change.down {
    color: var(--accent-red);
}

@media (max-width: 480px) {
    .header {
        gap: 0.5rem;
        padding: 0.4rem 0;
    }

    .index-ticker {
        gap: 0.3rem 0.5rem;
        padding: 0 0.25rem;
    }

    .ticker-name {
        font-size: 0.48rem;
        letter-spacing: 0;
    }

    .ticker-price {
        font-size: 0.68rem;
    }

    .ticker-change {
        font-size: 0.55rem;
    }
}

@media (max-width: 360px) {
    .index-ticker {
        gap: 0.2rem 0.4rem;
        padding: 0;
    }

    .ticker-name {
        font-size: 0.44rem;
    }

    .ticker-price {
        font-size: 0.6rem;
    }

    .ticker-change {
        font-size: 0.5rem;
    }
}

.stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}



.live-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-green);
}

.live-pulse {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

.content-grid {
    display: block;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem;
}



.feed-header {
    margin-bottom: 1rem;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.header-main h2 {
    font-size: 1.1rem;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.7rem;
}

.filter-btn.active {
    background: var(--text-secondary);
    color: var(--bg-dark);
}

.search-container {
    flex: 1;
    max-width: 300px;
    margin: 0 1rem;
}

#news-search {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

#news-search:focus {
    border-color: var(--accent-blue);
}

@media (max-width: 600px) {
    .header-main {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .search-container {
        order: 3;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
}

.feed-section {
    min-width: 0;
    overflow: hidden;
}

.news-feed {
    min-width: 0;
}

.news-article {
    border-bottom: 1px solid var(--card-border);
    padding: 0.75rem 0.25rem;
    animation: fadeIn 0.4s ease backwards;
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.source {
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.7rem;
    margin-right: 0.5rem;
}

.time {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.news-article h3 {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

@media (max-width: 480px) {
    .news-article {
        padding: 0.6rem 0.15rem;
    }

    .news-article h3 {
        font-size: 0.85rem;
        line-height: 1.35;
    }

    .source {
        font-size: 0.6rem;
    }

    .time {
        font-size: 0.6rem;
    }

    .feed-header {
        margin-bottom: 0.5rem;
    }

    .header-main h2 {
        font-size: 0.95rem;
    }

    .filter-btn {
        padding: 3px 8px;
        font-size: 0.6rem;
    }
}

.impact-word {
    font-weight: 700;
    padding: 0 4px;
    border-radius: 4px;
}

.impact-high {
    color: #ffeb3b;
    background: rgba(255, 235, 59, 0.15);
}

.impact-pos {
    color: #00e676;
    background: rgba(0, 230, 118, 0.1);
}

.impact-neg {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
}



.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.clear-filter {
    font-size: 0.65rem;
    color: var(--accent-blue);
    cursor: pointer;
    background: none;
    border: none;
}

.status-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.status-item.active {
    background: rgba(82, 175, 255, 0.1);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-name {
    flex: 1;
    color: var(--text-secondary);
}

.status-label {
    font-weight: 700;
    font-size: 0.65rem;
}

.loader {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}



/* Support Link & Modal */
.support-link {
    cursor: pointer;
    color: var(--accent-gold);
    font-size: 1.1rem;
    transition: text-shadow 0.3s ease;
}

.support-link:hover {
    text-shadow: 0 0 12px rgba(255, 215, 64, 0.5);
}

.support-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.support-modal.active {
    display: flex;
}

.support-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: fadeIn 0.3s ease;
}

.support-modal-content h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

.qr-image {
    width: 100%;
    max-width: 240px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.paypal-link {
    display: inline-block;
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.paypal-link:hover {
    background: rgba(82, 175, 255, 0.15);
}

@media (max-width: 480px) {
    .support-modal-content {
        padding: 1rem;
        max-width: 260px;
    }

    .qr-image {
        max-width: 180px;
    }
}