:root {
    --bg-color: #0a0a0f;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --primary-accent: #00f2ff;
    /* Cyan Neon */
    --secondary-accent: #7000ff;
    /* Purple Neon */
    --success-color: #00ff9d;
    /* Green Neon */
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --font-family: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Glow Effect */
.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(112, 0, 255, 0.15) 0%, rgba(10, 10, 15, 0) 50%);
    z-index: -1;
    pointer-events: none;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #a0a0b0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

/* Search Bar */
.search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    padding: 0.5rem;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.search-container:focus-within {
    border-color: var(--primary-accent);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

#ticker-input {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
}

#search-btn {
    background: var(--primary-accent);
    color: #000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

#search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.4);
}

/* Results Section */
.hidden {
    display: none !important;
}

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

.badge.live {
    color: var(--success-color);
    font-size: 0.9rem;
    font-weight: 600;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* News Card */
.news-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.source {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sentiment-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
}

.sentiment-badge.bullish {
    background: rgba(0, 255, 157, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.sentiment-badge.bearish {
    background: rgba(255, 50, 50, 0.1);
    color: #ff3232;
    border: 1px solid rgba(255, 50, 50, 0.3);
}

.news-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
}

.read-more:hover {
    gap: 0.6rem;
}

/* Loading & Error */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-accent);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

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

.error-msg {
    background: rgba(255, 50, 50, 0.1);
    border: 1px solid rgba(255, 50, 50, 0.3);
    color: #ff3232;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 2rem;
}

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

.modal-content {
    background: #15151a;
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: #fff;
    margin-bottom: 0.5rem;
}

.hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hint a {
    color: var(--primary-accent);
}

.primary-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--secondary-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

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

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

    /* Optimize Search Bar for Mobile */
    .search-container {
        padding: 0.25rem;
    }

    #ticker-input {
        padding: 0.8rem 0.8rem;
        font-size: 1rem;
    }

    #search-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

/* Watchlist Section */
#watchlist-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

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

.section-header h2 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-main);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.secondary-btn.active {
    background: rgba(0, 255, 157, 0.2);
    border-color: var(--success-color);
    color: var(--success-color);
}

.watchlist-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#watchlist-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-main);
    font-family: inherit;
}

#add-watchlist-btn {
    background: var(--primary-accent);
    color: #000;
    border: none;
    border-radius: 8px;
    width: 48px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#add-watchlist-btn:hover {
    background: #00d4e0;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.chip:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.chip .remove {
    cursor: pointer;
    opacity: 0.6;
    font-size: 1.1rem;
    line-height: 1;
}

.chip .remove:hover {
    opacity: 1;
    color: #ff3232;
}

/* Impact Badge */
.badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.impact-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
}

.impact-badge.positive {
    background: rgba(0, 255, 157, 0.1);
    color: var(--success-color);
    border-color: rgba(0, 255, 157, 0.3);
}

/* Update Toast Notification */
#update-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(21, 21, 26, 0.95);
    border: 1px solid var(--primary-accent);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.27);
    backdrop-filter: blur(10px);
}

#update-toast.show {
    transform: translateX(-50%) translateY(0);
}

#update-toast p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.95rem;
}

#reload-btn {
    background: var(--primary-accent);
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

#reload-btn:hover {
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

#dismiss-toast {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.25rem;
}

#dismiss-toast:hover {
    color: #fff;
}

/* Refresh Button Animation */
.spinning svg {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--text-main);
    border-bottom-color: var(--primary-accent);
}

.tab-content.hidden {
    display: none;
}

/* Active Tickers List */
.tickers-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    transition: transform 0.2s, background 0.2s;
}

.ticker-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
}

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

.ticker-symbol {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-accent);
}

.ticker-volume {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ticker-price {
    font-weight: 600;
    font-size: 1.1rem;
}

.ticker-change {
    font-size: 0.9rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
}

.ticker-change.positive {
    background: rgba(0, 255, 157, 0.1);
    color: var(--success-color);
}

.ticker-change.negative {
    background: rgba(255, 50, 50, 0.1);
    color: #ff3232;
}
/* Analyst Ratings */
.analyst-rating-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

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

.analyst-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
}

.analyst-target {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-accent);
}

.rating-meter {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.rating-bar-container {
    display: flex;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
}

.rating-bar {
    height: 100%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.rating-bar.buy {
    background: var(--success-color);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.rating-bar.hold {
    background: #ffd700; /* Gold */
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.rating-bar.sell {
    background: #ff3232;
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.3);
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.rating-labels span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.rating-labels .label-buy { color: var(--success-color); }
.rating-labels .label-hold { color: #ffd700; }
.rating-labels .label-sell { color: #ff3232; }

.rating-labels .label-buy span,
.rating-labels .label-hold span,
.rating-labels .label-sell span {
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

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

.analyst-current {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}
/* PR Newswire Branding */
.provider-credit {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

#pr-newswire-section .news-card {
    border-left: 3px solid #ff3232;
    /* Signature Red */
}