/* Stocks Page - Complete Redesign */

/* Market Hero Section */
.market-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 30px 20px;
    border-bottom: 2px solid #334155;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
}

.market-hero h1 {
    color: #facc15;
    font-size: 32px;
    margin-bottom: 20px;
}

.indices-overview {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.index-card {
    background: #334155;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
}

.index-name {
    color: #94a3b8;
    font-size: 14px;
}

.index-value {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.index-change {
    font-size: 14px;
    font-weight: 600;
}

.index-change.up {
    color: #22c55e;
}

.index-change.down {
    color: #ef4444;
}

.market-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: #334155;
    border-radius: 8px;
    color: #94a3b8;
    margin-left: auto;
}

.market-status.open {
    color: #22c55e;
}

.market-status.closed {
    color: #ef4444;
}

.market-status i {
    font-size: 12px;
}

/* Affiliate Banner Section */
.affiliate-banner-section {
    background: #1e293b;
    padding: 20px;
    position: relative;
    border-bottom: 1px solid #334155;
}

.affiliate-banner {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    height: 100px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.banner-slide.active {
    opacity: 1;
    pointer-events: all;
}

.banner-content {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 25px 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.banner-content i {
    font-size: 40px;
    color: #fff;
}

.banner-text {
    flex: 1;
}

.banner-text h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 5px;
}

.banner-text p {
    color: #e0e7ff;
    font-size: 14px;
}

.banner-btn {
    padding: 12px 24px;
    background: #fff;
    color: #3b82f6;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.banner-btn:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #334155;
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #3b82f6;
    width: 30px;
    border-radius: 5px;
}

/* Main Container Layout */
.stocks-main-container {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

/* Market Movers Sidebar */
.market-movers-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
}

.sidebar-header {
    color: #facc15;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.movers-tabs-sidebar {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.sidebar-tab {
    flex: 1;
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.sidebar-tab:hover {
    background: #334155;
    color: #fff;
}

.sidebar-tab.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.movers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mover-item {
    background: #0f172a;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.mover-item:hover {
    background: #334155;
    transform: translateX(3px);
}

.mover-item.gainer {
    border-left-color: #22c55e;
}

.mover-item.loser {
    border-left-color: #ef4444;
}

.mover-symbol {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    margin-bottom: 3px;
}

.mover-price {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 3px;
}

.mover-change {
    font-size: 13px;
    font-weight: 600;
}

.mover-change.up {
    color: #22c55e;
}

.mover-change.down {
    color: #ef4444;
}

/* News Feed */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.news-item {
    background: #0f172a;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.news-item:hover {
    background: #334155;
}

.news-title {
    color: #e2e8f0;
    font-size: 13px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748b;
}

/* Center Content Area */
.stocks-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Search and Controls */
.stocks-controls {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
}

.search-section {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.stock-search-input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid #334155;
    background: #0f172a;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

.stock-search-input:focus {
    outline: none;
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}

.screener-toggle-btn {
    padding: 12px 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.screener-toggle-btn:hover {
    background: #2563eb;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.category-tab {
    padding: 8px 16px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.category-tab:hover {
    background: #334155;
    color: #fff;
}

.category-tab.active {
    background: #facc15;
    color: #0f172a;
    border-color: #facc15;
}

/* Advanced Screener */
.advanced-screener {
    background: #0f172a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.screener-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.screener-field label {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 5px;
}

.screener-field input,
.screener-field select {
    width: 100%;
    padding: 8px 12px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #fff;
    border-radius: 6px;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.range-inputs input {
    flex: 1;
}

.range-inputs span {
    color: #94a3b8;
}

.screener-actions {
    display: flex;
    gap: 10px;
}

.apply-screener-btn,
.reset-screener-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.apply-screener-btn {
    background: #22c55e;
    color: #fff;
}

.apply-screener-btn:hover {
    background: #16a34a;
}

.reset-screener-btn {
    background: #334155;
    color: #fff;
}

.reset-screener-btn:hover {
    background: #475569;
}

/* Sort and View Controls */
.sort-view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sort-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-section label {
    color: #94a3b8;
}

.sort-section select {
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.sort-order-btn {
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-order-btn:hover {
    background: #334155;
}

.sort-order-btn[data-order="asc"] i {
    transform: rotate(180deg);
}

.view-section {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 10px 15px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    background: #334155;
    color: #fff;
}

.view-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Watchlist Section */
.watchlist-section {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
}

.watchlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.watchlist-header h2 {
    color: #facc15;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portfolio-tracker-btn {
    padding: 10px 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portfolio-tracker-btn:hover {
    background: #2563eb;
}

.watchlist-stocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.watchlist-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.watchlist-stock-card {
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.watchlist-stock-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.remove-watchlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 14px;
}

.watchlist-stock-symbol {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.watchlist-stock-price {
    color: #e2e8f0;
    font-size: 14px;
    margin-bottom: 5px;
}

.watchlist-stock-change {
    font-size: 14px;
    font-weight: 600;
}

/* Affiliate Native Card */
.affiliate-native-card {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.sponsored-label {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.native-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.native-content i {
    font-size: 40px;
    color: #fff;
}

.native-text {
    flex: 1;
}

.native-text h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 5px;
}

.native-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.native-link {
    padding: 12px 24px;
    background: #fff;
    color: #d97706;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.native-link:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

/* Stocks Display */
.stocks-display-section {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
}

/* Grid View */
.stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.stock-card {
    background: #0f172a;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.stock-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
}

.stock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.stock-info {
    flex: 1;
}

.stock-symbol {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.stock-name {
    font-size: 13px;
    color: #94a3b8;
}

.stock-exchange {
    font-size: 11px;
    color: #64748b;
    background: #1e293b;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 3px;
}

.stock-actions-mini {
    display: flex;
    gap: 8px;
}

.stock-action-icon {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.stock-action-icon:hover {
    color: #facc15;
    transform: scale(1.1);
}

.stock-action-icon.active {
    color: #facc15;
}

.stock-price-section {
    margin-bottom: 15px;
}

.stock-price {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.stock-change-details {
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.stock-change {
    font-weight: 600;
}

.stock-change.up {
    color: #22c55e;
}

.stock-change.down {
    color: #ef4444;
}

.stock-percent-change {
    font-weight: 600;
}

.stock-sparkline {
    height: 60px;
    margin-bottom: 15px;
}

.stock-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #334155;
}

.stock-metric {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.metric-label {
    font-size: 12px;
    color: #94a3b8;
}

.metric-value {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

/* List View */
.stocks-list {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
}

.stocks-table {
    width: 100%;
    border-collapse: collapse;
}

.stocks-table thead {
    background: #0f172a;
}

.stocks-table th {
    padding: 15px;
    text-align: left;
    color: #94a3b8;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid #334155;
}

.stocks-table tbody tr {
    border-bottom: 1px solid #334155;
    transition: background 0.2s;
    cursor: pointer;
}

.stocks-table tbody tr:hover {
    background: #334155;
}

.stocks-table td {
    padding: 15px;
    color: #fff;
    font-size: 14px;
}

.table-stock-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.table-stock-symbol {
    font-weight: 600;
}

.table-stock-name {
    font-size: 12px;
    color: #94a3b8;
}

.table-sparkline-cell {
    width: 100px;
    height: 40px;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-action-btn {
    padding: 6px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.table-action-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
}

/* Load More */
.load-more-section {
    text-align: center;
    margin-top: 20px;
}

.load-more-btn {
    padding: 12px 30px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: #2563eb;
}

/* Affiliate Sidebar */
.affiliate-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.affiliate-widget {
    background: #1e293b;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    border: 2px solid #334155;
    transition: all 0.3s;
}

.affiliate-widget:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

.widget-label {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    color: #64748b;
    background: #0f172a;
    padding: 4px 8px;
    border-radius: 4px;
}

.widget-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.widget-icon i {
    font-size: 28px;
    color: #fff;
}

.affiliate-widget h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 10px;
}

.affiliate-widget p {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.widget-features {
    list-style: none;
    margin-bottom: 15px;
}

.widget-features li {
    color: #e2e8f0;
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-features i {
    color: #22c55e;
    font-size: 12px;
}

.widget-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.widget-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #1e293b;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-large {
    max-width: 1000px;
}

.modal-xlarge {
    max-width: 1200px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #ef4444;
}

.modal-content h2 {
    color: #facc15;
    margin-bottom: 20px;
}

.modal-subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Stock Detail Modal */
.stock-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #334155;
}

.stock-detail-info h2 {
    color: #fff;
    margin-bottom: 8px;
}

.stock-detail-price {
    text-align: right;
}

.detail-price {
    display: block;
    font-size: 32px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.detail-change {
    font-size: 16px;
    font-weight: 600;
}

.detail-change.up {
    color: #22c55e;
}

.detail-change.down {
    color: #ef4444;
}

.stock-detail-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.metric-item {
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
}

.metric-item .metric-label {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 5px;
}

.metric-item .metric-value {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.stock-detail-chart {
    margin-bottom: 20px;
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.chart-timeframes {
    display: flex;
    gap: 8px;
}

.chart-timeframe-btn {
    padding: 8px 14px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.chart-timeframe-btn:hover {
    background: #334155;
    color: #fff;
}

.chart-timeframe-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.chart-indicators {
    display: flex;
    gap: 8px;
}

.indicator-btn {
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.indicator-btn:hover {
    background: #334155;
    color: #fff;
}

.indicator-btn.active {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

.chart-placeholder {
    background: #0f172a;
    border: 2px dashed #334155;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    height: 100%;
}

.stock-actions-modal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-btn {
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.watchlist-action-btn {
    background: #facc15;
    color: #0f172a;
}

.watchlist-action-btn:hover {
    background: #fbbf24;
}

.alert-action-btn {
    background: #f59e0b;
    color: #fff;
}

.alert-action-btn:hover {
    background: #d97706;
}

.compare-action-btn {
    background: #8b5cf6;
    color: #fff;
}

.compare-action-btn:hover {
    background: #7c3aed;
}

.trade-action-btn {
    background: #3b82f6;
    color: #fff;
}

.trade-action-btn:hover {
    background: #2563eb;
}

/* Comparison Modal */
.comparison-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.compare-input {
    flex: 1;
    padding: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    border-radius: 6px;
}

.compare-submit-btn {
    padding: 12px 24px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.comparison-table th {
    background: #0f172a;
    color: #facc15;
}

.comparison-table td {
    color: #e2e8f0;
}

/* Portfolio Modal */
.portfolio-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.portfolio-stat {
    flex: 1;
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
}

.portfolio-stat .stat-label {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 5px;
}

.portfolio-stat .stat-value {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.portfolio-stat .stat-value.up {
    color: #22c55e;
}

.portfolio-stat .stat-value.down {
    color: #ef4444;
}

.add-position-form h3 {
    color: #facc15;
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.form-input {
    flex: 1;
    padding: 10px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    border-radius: 6px;
}

.add-position-btn {
    padding: 10px 20px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.portfolio-positions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.position-item {
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.position-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.position-symbol {
    font-weight: 600;
    color: #fff;
}

.position-shares {
    color: #94a3b8;
    font-size: 13px;
}

.position-value {
    text-align: right;
}

.position-current-value {
    color: #fff;
    font-weight: 600;
}

.position-pl {
    font-size: 14px;
    font-weight: 600;
}

.position-pl.up {
    color: #22c55e;
}

.position-pl.down {
    color: #ef4444;
}

/* Alert Form */
.alert-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #94a3b8;
    margin-bottom: 5px;
    font-size: 13px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.active-alerts-section h3 {
    color: #94a3b8;
    margin-bottom: 15px;
}

.alert-item {
    background: #0f172a;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-info {
    color: #e2e8f0;
}

.delete-alert-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 18px;
}

/* Affiliate Marketplace */
.affiliate-marketplace {
    background: #1e293b;
    padding: 40px 20px;
    margin-top: 40px;
}

.marketplace-header {
    color: #facc15;
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
}

.marketplace-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.marketplace-tab {
    padding: 10px 20px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.marketplace-tab:hover {
    background: #334155;
    color: #fff;
}

.marketplace-tab.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.marketplace-card {
    background: #0f172a;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    border: 2px solid #334155;
    transition: all 0.3s;
}

.marketplace-card:hover {
    border-color: #3b82f6;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.card-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.marketplace-card h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 10px;
}

.marketplace-card p {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.card-features {
    list-style: none;
    margin-bottom: 20px;
}

.card-features li {
    color: #e2e8f0;
    font-size: 13px;
    margin-bottom: 8px;
    padding-left: 0;
}

.marketplace-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.marketplace-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* Loading and Error States */
.loading-indicator {
    text-align: center;
    color: #facc15;
    padding: 40px;
    font-style: italic;
}

.error-indicator {
    text-align: center;
    color: #ef4444;
    padding: 40px;
    font-weight: 600;
}

/* Light Theme Adjustments */
body.light-theme .market-hero,
body.light-theme .affiliate-banner-section,
body.light-theme .stocks-main-container,
body.light-theme .sidebar-section,
body.light-theme .stocks-controls,
body.light-theme .affiliate-marketplace {
    background: #e2e8f0;
    color: #1e293b;
}

body.light-theme .stock-card,
body.light-theme .affiliate-widget,
body.light-theme .marketplace-card {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.light-theme .modal-content {
    background: #fff;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .stocks-main-container {
        grid-template-columns: 250px 1fr 280px;
    }
}

@media (max-width: 1200px) {
    .stocks-main-container {
        grid-template-columns: 1fr;
    }
    
    .market-movers-sidebar,
    .affiliate-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .indices-overview {
        flex-direction: column;
    }
    
    .index-card {
        width: 100%;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .category-tabs {
        justify-content: center;
    }
    
    .stocks-grid {
        grid-template-columns: 1fr;
    }
    
    .stock-detail-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .marketplace-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-selector {
        flex-direction: column;
    }
    
    .portfolio-summary {
        flex-direction: column;
    }
}


/* Scrolling Stock Ticker Bar */
.stock-ticker-bar {
    background: linear-gradient(135deg, #1a1d29 0%, #252936 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    overflow: hidden;
    height: 50px;
    position: relative;
    width: 100%;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: scroll-ticker 60s linear infinite;
    gap: 40px;
    padding: 0 20px;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Courier New', monospace;
    padding: 12px 0;
}

.ticker-symbol {
    font-weight: 700;
    font-size: 14px;
    color: #f59e0b;
    letter-spacing: 0.5px;
}

.ticker-price {
    font-size: 14px;
    color: #e5e7eb;
    font-weight: 500;
}

.ticker-change {
    font-size: 13px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.ticker-change.up {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.ticker-change.down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-content:hover {
    animation-play-state: paused;
}

/* Resize NordProtect banner */
.nord-protect-banner,
.affiliate-banner,
[class*="nord"] {
    max-width: 300px !important;   /* 3 inches at 96 DPI */
    max-height: 480px !important;  /* 5 inches at 96 DPI */
    width: 100% !important;
    height: auto !important;
    overflow: hidden !important;
}

/* If it's an iframe */
iframe[src*="nordprotect"],
iframe[src*="nordvpn"] {
    max-width: 300px !important;
    max-height: 480px !important;
    transform: scale(0.5);  /* Scale down if needed */
    transform-origin: top left;
}
