/* ===== Root Variables ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-hover: #252532;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --accent-primary: #6366f1;
    --accent-secondary: #818cf8;
    --bullish: #22c55e;
    --bullish-bg: rgba(34, 197, 94, 0.1);
    --bearish: #ef4444;
    --bearish-bg: rgba(239, 68, 68, 0.1);
    --neutral: #f59e0b;
    --neutral-bg: rgba(245, 158, 11, 0.1);
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-lg: 16px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== App Container ===== */
.app-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Content Layout ===== */
.content-layout {
    display: flex;
    gap: 24px;
    flex: 1;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* ===== Header ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo h1 {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-summary {
    display: flex;
    gap: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.summary-item .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item .value {
    font-size: 1rem;
    font-weight: 700;
}

/* ===== Add Stock Section ===== */
.add-stock-section {
    margin-bottom: 24px;
}

.add-stock-form {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.add-stock-form input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.add-stock-form input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.add-stock-form input::placeholder {
    color: var(--text-muted);
}

.add-stock-form input[type="number"] {
    max-width: 120px;
}

.add-stock-form button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.add-stock-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ===== Holdings Section ===== */
.holdings-section {
    margin-bottom: 24px;
}

.holdings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.holdings-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.ai-analyze-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* AI Analysis Container */
.ai-analysis-container {
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
}

.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--accent);
}

.ai-analysis-header .close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
}

.ai-analysis-header .close-btn:hover {
    color: var(--text-primary);
}

.ai-analysis-content {
    padding: 16px;
    line-height: 1.6;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.ai-analysis-content p {
    margin-bottom: 12px;
}

.ai-analysis-content strong {
    color: var(--text-primary);
}

.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    color: var(--text-muted);
}

.analysis-meta {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.analysis-error {
    text-align: center;
    padding: 20px;
}

.holdings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* ===== Sectors Section ===== */
.sectors-section {
    margin-top: 32px;
}

.sectors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sectors-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* Skeleton Loading */
.sector-skeleton {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-secondary) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-line.title {
    height: 18px;
    width: 70%;
    margin-bottom: 8px;
}

.skeleton-line.symbol {
    height: 12px;
    width: 40%;
    margin-bottom: 12px;
}

.skeleton-line.price {
    height: 24px;
    width: 50%;
    margin-bottom: 12px;
}

.skeleton-metrics {
    display: flex;
    gap: 8px;
}

.skeleton-metric {
    flex: 1;
    height: 40px;
    background: var(--bg-hover);
    border-radius: 6px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.sector-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    position: relative;
    transition: all 0.2s ease;
    overflow: hidden;
}

.sector-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.sector-card.top-gainer {
    border-color: var(--bullish);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--bg-card) 100%);
}

.sector-card.positive {
    border-left: 3px solid var(--bullish);
}

.sector-card.negative {
    border-left: 3px solid var(--bearish);
}

.rank-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a1a2e;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.5);
    z-index: 10;
}

.sector-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sector-symbol {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.sector-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sector-metrics {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.metric-box {
    flex: 1;
    background: var(--bg-hover);
    border-radius: 6px;
    padding: 8px 4px;
    text-align: center;
}

.metric-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.metric-value {
    font-size: 0.75rem;
    font-weight: 600;
}

.metric-box.positive .metric-value {
    color: var(--bullish);
}

.metric-box.negative .metric-value {
    color: var(--bearish);
}

.holding-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.holding-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow);
}

.holding-card.selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

.holding-symbol {
    font-size: 1.5rem;
    font-weight: 700;
}

.holding-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.holding-remove {
    width: 28px;
    height: 28px;
    background: var(--bearish-bg);
    border: none;
    border-radius: 6px;
    color: var(--bearish);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.holding-remove:hover {
    background: var(--bearish);
    color: white;
}

.holding-price {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
}

.holding-current-price {
    font-size: 1.75rem;
    font-weight: 700;
}

.holding-change {
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.holding-change.positive {
    background: var(--bullish-bg);
    color: var(--bullish);
}

.holding-change.negative {
    background: var(--bearish-bg);
    color: var(--bearish);
}

.holding-details {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.holding-cost-basis {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.holding-cost-basis.no-cost {
    flex-wrap: wrap;
    gap: 8px;
}

.holding-pl {
    font-weight: 600;
}

.holding-pl.positive {
    color: var(--bullish);
}

.holding-pl.negative {
    color: var(--bearish);
}

.edit-holding-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    align-items: flex-end;
}

.edit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.edit-field label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edit-input {
    padding: 8px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    width: 100%;
}

.edit-input:focus {
    border-color: var(--accent-primary);
}

.edit-save-btn {
    padding: 8px 12px;
    background: var(--accent-primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.edit-save-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
}

/* ===== Main Sidebar ===== */
.main-sidebar {
    width: 420px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 60px);
    position: sticky;
    top: 20px;
}

.sidebar-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 2;
    min-height: 180px;
}

/* News gets less space than sectors */
.news-section-sidebar {
    flex: 1;
    min-height: 150px;
}

/* P&L Section - Fixed height, no scroll */
.pl-section {
    flex: 0 0 auto;
    min-height: auto;
}

.pl-summary {
    padding: 12px;
    display: flex;
    gap: 8px;
}

.pl-item {
    flex: 1;
    background: var(--bg-hover);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.pl-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.pl-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sectors-scroll {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sectors-scroll .sector-card {
    flex-shrink: 0;
}

/* News Section Styles */
.news-scroll {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
}

.news-item {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: var(--bg-hover);
}

.news-source {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.news-title {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.news-symbols {
    color: var(--bullish);
    font-weight: 500;
}

.twitter-embeds {
    flex: 1;
    overflow-y: auto;
}

.embed-section {
    border-bottom: 1px solid var(--border);
}

.embed-section:last-child {
    border-bottom: none;
}

.embed-label {
    padding: 10px 16px;
    background: var(--bg-hover);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
}

.twitter-profiles {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.profile-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.profile-avatar {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: 50%;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.profile-handle {
    font-size: 0.8rem;
    color: var(--accent-secondary);
    margin-bottom: 4px;
}

.profile-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.profile-action {
    flex-shrink: 0;
}

.view-btn {
    display: inline-block;
    padding: 8px 14px;
    background: var(--accent-primary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.profile-card:hover .view-btn {
    background: var(--accent-secondary);
}

.sidebar-note {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-hover);
}

.sidebar-note p {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

/* Market Feed Styles */
.market-feed {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.news-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
}

.news-item:hover {
    background: var(--bg-hover);
}

.news-source {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 4px;
}

.news-headline {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.news-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Twitter Quick Links */
.twitter-quick-links {
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    background: var(--bg-card);
}

.quick-links-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.quick-links {
    display: flex;
    gap: 8px;
}

.quick-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: var(--bg-hover);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.quick-link:hover {
    background: var(--accent-primary);
    color: white;
}

.link-icon {
    font-size: 1rem;
}

.refresh-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.2s;
}

.refresh-btn:hover {
    background: var(--bg-hover);
    transform: rotate(180deg);
}

.feed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    gap: 12px;
}

.spinner-small {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.feed-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
}

.feed-empty .hint {
    font-size: 0.8rem;
    margin-top: 8px;
}

.tweet-item {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
}

.tweet-item:hover {
    background: var(--bg-hover);
}

.tweet-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.tweet-account {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.tweet-handle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tweet-text {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.tweet-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.twitter-links {
    border-top: 1px solid var(--border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.twitter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: 8px;
    text-decoration: none;
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.2s;
}

.twitter-link:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.link-arrow {
    font-size: 0.9rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state .hint {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== News Section ===== */
.news-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 24px;
}

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

.news-header h2 {
    font-size: 1.25rem;
}

.sentiment-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.sentiment-badge.bullish {
    background: var(--bullish-bg);
    color: var(--bullish);
}

.sentiment-badge.bearish {
    background: var(--bearish-bg);
    color: var(--bearish);
}

.sentiment-badge.neutral {
    background: var(--neutral-bg);
    color: var(--neutral);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.news-item:hover {
    border-color: var(--accent-primary);
}

.news-thumbnail {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-hover);
}

.news-content {
    flex: 1;
}

.news-title {
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.news-title a:hover {
    color: var(--accent-secondary);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.news-sentiment {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.news-sentiment.bullish {
    color: var(--bullish);
}

.news-sentiment.bearish {
    color: var(--bearish);
}

.news-sentiment.neutral {
    color: var(--neutral);
}

/* ===== Footer ===== */
.footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .twitter-sidebar {
        width: 320px;
    }
}

@media (max-width: 1024px) {
    .content-layout {
        flex-direction: column;
    }

    .twitter-sidebar {
        width: 100%;
        max-height: 500px;
        position: static;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }

    .portfolio-summary {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }

    .summary-item {
        min-width: 80px;
    }

    .add-stock-form {
        flex-wrap: wrap;
    }

    .add-stock-form input {
        width: 100%;
    }

    .add-stock-form button {
        width: 100%;
        justify-content: center;
    }

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

    .edit-holding-row {
        flex-wrap: wrap;
    }

    .edit-field {
        min-width: 80px;
    }
}