/* ═══════════════════ MATRIX RADAR — MAIN STYLES ═══════════════════ */

:root {
    --yellow: #FFD700;
    --orange: #FF6600;
    --red: #FF0000;
    --green: #00FF00;
    --pump: #00FF88;
    --bg-dark: #000000;
    --bg-table: rgba(0, 20, 0, 0.85);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg-dark);
    font-family: 'Courier New', monospace;
    min-height: 100vh;
}

/* Pause all animations when tab is inactive */
body.tab-inactive *,
body.tab-inactive *::before,
body.tab-inactive *::after {
    animation-play-state: paused !important;
}

body.has-topbar {
    padding-top: 50px;
}

/* ═══════════════════ TRIAL NOTIFICATION ═══════════════════ */

.trial-notification {
    position: fixed;
    top: 60px;
    right: 20px;
    left: 20px;
    max-width: 600px;
    margin: 0 auto;
    z-index: 1000;
    border: 1px solid var(--green);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 20, 0, 0.95), rgba(0, 20, 0, 0.98));
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 20px rgba(0, 255, 0, 0.3);
}

.trial-notification.trial-welcome {
    border-color: var(--pump);
    background: rgba(0, 30, 0, 0.95);
}

.trial-notification.trial-urgent {
    border-color: var(--orange);
    background: rgba(30, 20, 0, 0.95);
    animation: pulse 2s ease-in-out infinite;
}

.trial-notification.trial-expired {
    border-color: var(--red);
    background: rgba(20, 0, 0, 0.95);
}

.trial-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
    position: relative;
}

.trial-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.trial-text {
    flex: 1;
    color: var(--green);
    font-size: 14px;
    line-height: 1.4;
}

.trial-notification.trial-welcome .trial-text {
    color: var(--pump);
}

.trial-notification.trial-urgent .trial-text {
    color: var(--orange);
}

.trial-notification.trial-expired .trial-text {
    color: var(--red);
}

.trial-actions {
    flex-shrink: 0;
}

.trial-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: var(--green);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.trial-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 102, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 102, 0, 0.6);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .trial-notification {
        top: 50px;
        right: 10px;
        left: 10px;
    }
    
    .trial-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .trial-actions {
        width: 100%;
    }
    
    .trial-actions .btn {
        width: 100%;
    }
}

/* ═══════════════════ TOP BAR (MENU) ═══════════════════ */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: linear-gradient(to bottom, rgba(0, 20, 0, 0.85), rgba(0, 20, 0, 0.72));
    border-bottom: 1px solid rgba(0, 255, 0, 0.22);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px 2px 2px;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: var(--green);
    user-select: none;
    font-size: 13px;
}

.topbar-brand .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 255, 0, 0.10);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.15);
    border: 1px solid rgba(0, 255, 0, 0.3);
    overflow: hidden;
    flex: 0 0 auto;
}

.topbar-brand .brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.topbar-brand .brand-text {
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1;
    white-space: nowrap;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    color: var(--green);
    background: rgba(0, 17, 0, 0.6);
    border: 1px solid rgba(0, 255, 0, 0.4);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.15), inset 0 0 4px rgba(0, 255, 0, 0.05);
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.topbar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.topbar-btn:hover {
    background: rgba(0, 255, 0, 0.12);
    border-color: rgba(0, 255, 0, 0.8);
    color: var(--green);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.4), inset 0 0 8px rgba(0, 255, 0, 0.1);
    transform: translateY(-1px);
}

.topbar-btn:hover::before {
    left: 100%;
}

.upgrade-btn.topbar-btn {
    background: rgba(0, 255, 0, 0.15);
    border-color: rgba(0, 255, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2), inset 0 0 6px rgba(0, 255, 0, 0.08);
}

.upgrade-btn.topbar-btn:hover {
    background: rgba(0, 255, 0, 0.2);
    border-color: rgba(0, 255, 0, 0.9);
    box-shadow: 0 0 14px rgba(0, 255, 0, 0.5), inset 0 0 10px rgba(0, 255, 0, 0.15);
}

/* ═══════════════════ BILLING / UPGRADE BUTTON ═══════════════════ */
.upgrade-btn {
    /* now used inside .topbar; layout handled there */
}

.upgrade-btn:hover {
    /* hover handled by .topbar-btn */
}

/* ═══════════════════ TRY BUTTON ═══════════════════ */
.try-btn.topbar-btn {
    background: rgba(255, 165, 0, 0.15);
    border-color: rgba(255, 165, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.2), inset 0 0 6px rgba(255, 165, 0, 0.08);
}

.try-btn.topbar-btn:hover {
    background: rgba(255, 165, 0, 0.2);
    border-color: rgba(255, 165, 0, 0.9);
    box-shadow: 0 0 14px rgba(255, 165, 0, 0.5), inset 0 0 10px rgba(255, 165, 0, 0.15);
}

.try-btn.topbar-btn {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.2), rgba(255, 165, 0, 0.1));
    border: 2px solid #FFA500;
    color: #FFA500;
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(255, 165, 0, 0.5);
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.3), inset 0 0 8px rgba(255, 165, 0, 0.1);
    animation: tryButtonPulse 2s ease-in-out infinite;
}

.try-btn.topbar-btn:hover {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.35), rgba(255, 165, 0, 0.2));
    border-color: #FFB733;
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.6), inset 0 0 15px rgba(255, 165, 0, 0.2);
    transform: scale(1.05);
}

@keyframes tryButtonPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 165, 0, 0.3), inset 0 0 8px rgba(255, 165, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 18px rgba(255, 165, 0, 0.5), inset 0 0 12px rgba(255, 165, 0, 0.15);
    }
}

/* ═══════════════════ TOPBAR ICON BUTTONS ═══════════════════ */
.topbar-icon-btn {
    padding: 0 8px;
    min-width: 32px;
}

.topbar-icon-btn .icon-inline {
    width: 18px;
    height: 18px;
}

/* ═══════════════════ TOPBAR PROFILE BUTTON ═══════════════════ */
.topbar-profile-btn {
    padding: 0 8px;
    min-width: 32px;
}

.topbar-profile-btn .icon-inline {
    width: 18px;
    height: 18px;
}

/* ═══════════════════ TOPBAR HAMBURGER BUTTON ═══════════════════ */
.topbar-hamburger-btn {
    padding: 0 8px;
    min-width: 32px;
}

.topbar-hamburger-btn .icon-inline {
    width: 20px;
    height: 20px;
}

/* ═══════════════════ TOPBAR DROPDOWN MENU ═══════════════════ */
.topbar-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 15, 0, 0.98);
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3), inset 0 0 30px rgba(0, 255, 0, 0.05);
    padding: 6px;
    min-width: 180px;
    z-index: 1000;
}

.topbar-dropdown.show {
    display: block;
}

.topbar-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00FF88, transparent);
}

.dropdown-menu {
    --bs-dropdown-bg: rgba(0, 15, 0, 0.98);
    --bs-dropdown-border-color: rgba(0, 255, 0, 0.4);
    --bs-dropdown-link-hover-bg: rgba(0, 255, 0, 0.1);
    --bs-dropdown-link-active-bg: rgba(0, 255, 0, 0.2);
    --bs-dropdown-link-color: #00FF00;
    --bs-dropdown-link-hover-color: #00FF88;
    --bs-dropdown-divider-bg: rgba(0, 255, 0, 0.2);
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #00FF00;
}

.topbar-dropdown-item:hover,
.topbar-dropdown-item:focus {
    background: rgba(0, 255, 0, 0.1);
    color: #00FF88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.topbar-dropdown-item:active,
.topbar-dropdown-item.active {
    background: rgba(0, 255, 0, 0.2);
    color: #00FF88;
}

.dropdown-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.8;
}

.topbar-dropdown-item:hover .dropdown-icon,
.topbar-dropdown-item:focus .dropdown-icon {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(0, 255, 136, 0.5));
}

.dropdown-divider {
    border-color: rgba(0, 255, 0, 0.2);
    margin: 6px 0;
}

.app-version {
    font-size: 10px;
    color: rgba(0, 255, 0, 0.5);
    margin-left: auto;
    letter-spacing: 0;
}

/* ═══════════════════ MATRIX CANVAS ═══════════════════ */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    display: block;
}

/* ═══════════════════ CONTAINER ═══════════════════ */
.container {
    position: relative;
    z-index: 2;
    padding: 10px;
    max-width: 100%;
}

h1 {
    text-align: center;
    color: var(--green);
    text-shadow: 0 0 20px var(--green);
    margin: 10px;
    font-size: clamp(1.2em, 4vw, 2em);
}

.brand-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.brand-title--left {
    justify-content: flex-start;
}

.brand-title-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex: 0 0 auto;
}

.slogan {
    text-align: center;
    color: var(--green);
    opacity: 0.7;
    font-size: 12px;
    margin-bottom: 15px;
}

/* ═══════════════════ ADD SYMBOL PANEL ═══════════════════ */
.add-panel-container {
    display: flex;
    justify-content: center;
    margin: 8px 0 16px 0;
}

.add-symbol-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 800px;
}

.add-symbol-label {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #00aa00;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.add-input-group {
    display: flex;
    gap: 0;
    width: 100%;
    position: relative;
}

.add-panel-container input {
    flex: 1;
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Courier New', monospace;
    background: #000800;
    color: #00ff00;
    border: 2px solid #00aa00;
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    transition: border-color 0.2s;
}

.add-panel-container input:focus {
    border-color: #00ff00;
}

.add-panel-container input::placeholder {
    color: #006600;
    font-size: 13px;
}

.symbol-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 110px;
    background: #001100;
    border: 2px solid #00aa00;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.symbol-suggestions::-webkit-scrollbar {
    width: 8px;
}

.symbol-suggestions::-webkit-scrollbar-track {
    background: #001100;
}

.symbol-suggestions::-webkit-scrollbar-thumb {
    background: #00aa00;
    border-radius: 4px;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #002200;
    transition: background 0.15s;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: #002200;
}

.suggestion-symbol {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    color: #00ff00;
}

.suggestion-type {
    font-size: 10px;
    color: #008800;
    text-transform: uppercase;
}

.add-symbol-btn {
    padding: 14px 24px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: linear-gradient(180deg, #00cc00 0%, #00aa00 100%);
    color: #000;
    border: 2px solid #00aa00;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-icon {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.btn-text {
    font-size: 13px;
    letter-spacing: 1px;
}

.add-symbol-btn:hover {
    background: linear-gradient(180deg, #00ff00 0%, #00cc00 100%);
    border-color: #00ff00;
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.4);
}

.add-symbol-btn:active {
    transform: scale(0.98);
}

/* ═══════════════════ STATUS ═══════════════════ */
.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier New', 'VT323', monospace;
    font-size: 11px;
    color: #0f0;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.6);
    padding: 4px 8px;
    background: rgba(0, 20, 0, 0.3);
    border-left: 2px solid #0f0;
    border-radius: 0 3px 3px 0;
}

.status svg {
    width: 14px;
    height: 14px;
    filter: drop-shadow(0 0 3px rgba(0, 255, 0, 0.8));
}

.status.online {
    border-left-color: #0f0;
}

.status.offline {
    color: #f55;
    text-shadow: 0 0 4px rgba(255, 50, 50, 0.6);
    border-left-color: #f55;
}

.status.offline svg {
    filter: drop-shadow(0 0 3px rgba(255, 50, 50, 0.8));
}

.hidden-pairs-count {
    color: #ff0;
    font-size: 10px;
    background: rgba(40, 40, 0, 0.4);
    padding: 2px 6px;
    border-radius: 3px;
    border-left: 2px solid #ff0;
    margin-left: auto;
}

.hidden-pairs-count:empty {
    display: none !important;
}

.filtered-pairs-count {
    color: #0f0;
    font-size: 10px;
    background: rgba(0, 40, 0, 0.4);
    padding: 2px 6px;
    border-radius: 3px;
    border-left: 2px solid #0f0;
    margin-left: 8px;
}

.filtered-pairs-count:empty {
    display: none !important;
}

.status.connecting {
    animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.status-blink {
    display: inline-block;
    width: 8px;
    height: 12px;
    background: #0f0;
    margin-left: 4px;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.8);
}

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

/* ═══════════════════ INFORMATION BLOCK ═══════════════════ */
.info-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Terminal-like panel styling */
.terminal-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px;
    padding: 4px 8px;
    background: #0a0a0a;
    border: 1px solid #0f0;
    border-radius: 2px;
}

.terminal-status {
    background: rgba(0, 30, 0, 0.4);
    padding: 4px 8px;
    font-size: 12px;
    min-width: fit-content;
}

.terminal-status .hidden-pairs-count {
    color: #ff0;
    font-size: 10px;
    background: rgba(40, 40, 0, 0.4);
    padding: 2px 6px;
    border-radius: 3px;
    border-left: 2px solid #ff0;
    margin-left: 8px;
}

.terminal-status .hidden-pairs-count:empty {
    display: none !important;
}

.terminal-status .filtered-pairs-count {
    color: #0f0;
    font-size: 10px;
    background: rgba(0, 40, 0, 0.4);
    padding: 2px 6px;
    border-radius: 3px;
    border-left: 2px solid #0f0;
    margin-left: 8px;
}

.terminal-status .filtered-pairs-count:empty {
    display: none !important;
}

.terminal-info {
    background: rgba(0, 10, 0, 0.3);
    padding: 4px 8px;
    font-family: 'Courier New', 'VT323', 'Fira Code', monospace;
    font-size: 11px;
    color: #0f0;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.5);
    overflow: hidden;
}

.terminal-info .info-block-summary {
    font-family: 'Courier New', 'VT323', 'Fira Code', monospace;
}

.terminal-info .top-movers-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.terminal-info .top-movers-title {
    font-size: 10px;
    color: #0a0;
    opacity: 0.7;
    margin-bottom: 6px;
    font-family: 'Courier New', 'VT323', monospace;
}

.terminal-info .top-movers-column {
    overflow: hidden;
}

.terminal-info .top-movers-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.terminal-info .top-movers-item {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 2px;
    background: rgba(0, 30, 0, 0.3);
    display: flex;
    align-items: center;
}

.terminal-info .top-movers-item:hover {
    background: rgba(0, 60, 0, 0.5);
}

.terminal-info .top-movers-symbol {
    font-weight: bold;
}

.terminal-info .indicator-fall {
    color: #f55;
}

.terminal-info .indicator-growth {
    color: #5f5;
}

.terminal-info .indicator-fall .top-movers-change {
    color: #f77;
}

.terminal-info .indicator-growth .top-movers-change {
    color: #7f7;
}

#statusFrame {
    margin: 10px 0;
}

#statusFrame .status {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    font-family: 'Courier New', monospace;
    color: #0f0;
    text-shadow: 0 0 5px rgba(0, 255, 100, 0.5);
}

#statusFrame .info-block {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#favoritesFrame {
    margin: 10px 0;
}

#mainFrame {
    margin: 10px 0;
}

.ticker-item {
    padding: 4px 8px;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 4px;
    color: #0f0;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.ticker-item:hover {
    background: rgba(0, 255, 0, 0.2);
    border-color: rgba(0, 255, 0, 0.5);
}

.ticker-item.indicator-pump {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
    color: #0ff;
    animation: pulse-pump 1.5s ease-in-out infinite;
    will-change: opacity, box-shadow;
    transform: translateZ(0);
}

.ticker-item.indicator-dump {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.5);
    color: #f00;
    animation: pulse-dump 1.5s ease-in-out infinite;
    will-change: opacity, box-shadow;
    transform: translateZ(0);
}

.ticker-item.indicator-growth {
    background: rgba(0, 255, 0, 0.15);
    border-color: rgba(0, 255, 0, 0.4);
    color: #0f0;
}

.ticker-item.indicator-fall {
    background: rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.4);
    color: #f00;
}

.ticker-item.indicator-neutral {
    background: rgba(128, 128, 128, 0.1);
    border-color: rgba(128, 128, 128, 0.3);
    color: #888;
}

.ticker-item.ticker-unavailable {
    background: rgba(128, 128, 128, 0.05);
    border-color: rgba(128, 128, 128, 0.2);
    color: #666;
    opacity: 0.6;
}

.ticker-empty {
    color: #666;
    font-size: 9px;
    font-style: italic;
}

.info-block-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 9px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-label {
    color: #888;
}

.summary-value {
    color: #0f0;
    font-weight: bold;
}

.summary-empty {
    color: #666;
    font-style: italic;
}

/* ═══════════════════ TOP MOVERS ═══════════════════ */
.top-movers-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.top-movers-title {
    color: #0f0;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    border-bottom: 1px solid rgba(0, 255, 0, 0.3);
    padding-bottom: 4px;
}

.top-movers-columns {
    display: flex;
    gap: 8px;
}

.top-movers-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.top-movers-column-title {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px 4px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    margin-bottom: 4px;
}

.rising-title {
    color: #0f0;
}

.falling-title {
    color: #f55;
}

.top-movers-items {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.top-movers-item {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 6px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
    gap: 8px;
}

.top-movers-item:hover {
    transform: scale(1.02);
}

.top-movers-symbol {
    font-weight: 600;
}

.top-movers-change {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    font-weight: bold;
}

.top-movers-empty {
    color: #444;
    font-size: 10px;
    font-style: italic;
    padding: 4px 6px;
}

@media (max-width: 576px) {
    .top-movers-columns {
        flex-direction: column;
        gap: 6px;
    }

    /* Fix status text wrapping on small screens - OPTIMIZED WORKFLOW TEST */
    .terminal-panel {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .terminal-status {
        min-width: auto;
        white-space: normal;
        word-wrap: break-word;
        word-break: break-all;
        line-height: 1.3;
        padding: 6px 8px;
    }

    .terminal-status .status-text {
        white-space: normal;
        word-wrap: break-word;
        word-break: break-all;
        display: inline;
    }

    #orderbookBytes {
        color: #0a0;
        font-size: 11px;
        margin-left: 8px;
        opacity: 0.8;
    }

    .status {
        white-space: normal;
        word-wrap: break-word;
        word-break: break-all;
        line-height: 1.3;
    }

    .status svg {
        flex-shrink: 0;
        margin-right: 4px;
    }
}

/* ═══════════════════ FAVORITE PAIRS SECTION ═══════════════════ */
.favorites-section {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

/* Favorites table uses same styling as main table */
.favorites-section .table-wrap {
    margin: 0;
    width: 100%;
}

/* Main table section wrapper */
#mainTableSection {
    margin-top: 8px;
}

/* Ensure exactly 8px between favorites section and main table */
.favorites-section + #mainTableSection {
    margin-top: 8px;
}

.favorites-section tbody tr.favorite-pair-unavailable {
    opacity: 0.6;
}

/* Remove button for favorites table */
.favorite-pair-remove-btn {
    background: transparent;
    border: 1px solid #f00;
    color: #f00;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: auto;
    height: auto;
}

.favorite-pair-remove-btn:hover {
    background: #f00;
    color: #000;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.favorite-pair-remove-btn .icon-inline {
    filter: drop-shadow(0 0 2px #f00);
}

.favorites-empty {
    color: #666;
    font-size: 12px;
    font-style: italic;
    padding: 10px;
    text-align: center;
}

/* Animations for indicators */
@keyframes pulse-pump {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
    }
}

@keyframes pulse-dump {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    }
}

/* ═══════════════════ TABLE ═══════════════════ */
.table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    margin: 0;
    width: 100%;
    position: relative;
}

/* Reduced spacing between tables */
.table-wrap:last-of-type {
    margin-bottom: 8px;
}

/* CRT Scanlines effect - striped screen of old terminal */
.table-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 100;
    opacity: 0.6;
    animation: scanlines-flicker 0.5s steps(4) infinite;
    will-change: opacity;
    transform: translateZ(0);
}

/* Scanlines flickering for old monitor effect - optimized */
@keyframes scanlines-flicker {
    0%, 100% { opacity: 0.6; }
    25% { opacity: 0.55; }
    50% { opacity: 0.45; }
    75% { opacity: 0.5; }
}

.table-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 255, 0, 0.03) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 99;
    box-shadow:
        inset 0 0 100px rgba(0, 0, 0, 0.3),
        inset 0 0 200px rgba(0, 0, 0, 0.1);
    will-change: box-shadow;
    transform: translateZ(0);
}

table {
    width: 100%;
    color: var(--green);
    font-size: clamp(10px, 2vw, 13px);
    background: var(--bg-table);
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    table-layout: fixed;
    position: relative;
    z-index: 1;
    text-shadow:
        0 0 1px rgba(0, 255, 0, 0.6),
        0 0 2px rgba(0, 255, 0, 0.3);
    animation: terminal-flicker 3s ease-in-out infinite;
    box-shadow:
        inset 0 0 30px rgba(0, 255, 0, 0.05),
        0 0 10px rgba(0, 255, 0, 0.03);
}

/* Text flickering like old CRT - optimized */
@keyframes terminal-flicker {
    0%, 100% { opacity: 1; }
    98% { opacity: 1; }
    99% { opacity: 0.98; }
    99.5% { opacity: 1; }
}

thead {
    position: relative;
    /* Retro effect for table header */
    background: rgba(0, 20, 0, 0.5) !important;
    /* Scanlines on header */
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.02) 0px,
        rgba(0, 255, 0, 0.02) 1px,
        transparent 1px,
        transparent 2px
    ) !important;
}

th, td {
    padding: 8px 6px;
    border: 1px solid rgba(0, 255, 0, 0.3);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 1px rgba(0, 255, 0, 0.4);
    position: relative;
    z-index: 2;
    cursor: default;
}

td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6),
td:nth-child(7),
td:nth-child(8),
td:nth-child(9) {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 1px rgba(0, 255, 0, 0.3);
}

/* Apply Matrix font to market context numeric values */
#ctx-pulse,
#ctx-corr,
#ctx-anomalies,
#ctx-avg-change,
#ctx-dump-count {
    font-family: 'VT323', monospace;
    font-size: 24px;
    letter-spacing: 2px;
    font-weight: 400;
}

/* Apply Matrix font to badge elements with numbers */
.badge {
    font-family: 'VT323', monospace;
    font-size: 16px;
    letter-spacing: 1px;
    font-weight: 400;
}

/* Mini buttons for alert system testing */
#anomalies-dump-card .btn-group .btn {
    padding: 0.25rem 0.35rem;
    border-color: rgba(255,255,255,0.2);
    background: transparent;
}

#anomalies-dump-card .btn-group .btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
    color: var(--matrix-green, #00ff00);
}

#anomalies-dump-card .btn-group .btn:active {
    background: rgba(0,255,0,0.2);
    transform: scale(0.95);
}

/* Additional scanlines inside cells for deeper effect */
td::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 1px,
        rgba(0, 255, 0, 0.02) 1px,
        rgba(0, 255, 0, 0.02) 2px
    );
    pointer-events: none;
    opacity: 0.5;
    z-index: 1;
}

/* Remove duplicate ::before for skeleton cells, as they have their own */
.skeleton-row td::before {
    background: none;
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03) 0px,
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.4;
}

th:nth-child(1), td:nth-child(1) { width: 30px; min-width: 30px; max-width: 30px; }
th:nth-child(2), td:nth-child(2) { width: 12%; min-width: 120px; }
th:nth-child(3), td:nth-child(3) { width: 12%; min-width: 100px; }
th:nth-child(4), td:nth-child(4) { width: 9%; min-width: 80px; }
th:nth-child(5), td:nth-child(5) { width: 9%; min-width: 80px; }
th:nth-child(6), td:nth-child(6) { width: 9%; min-width: 70px; }
th:nth-child(7), td:nth-child(7) { width: 12%; min-width: 100px; }
th:nth-child(8), td:nth-child(8) { width: 12%; min-width: 100px; }
th:nth-child(9), td:nth-child(9) { width: 12%; min-width: 100px; }
th:nth-child(10), td:nth-child(10) { width: 45px; min-width: 45px; max-width: 45px; }

/* Styles for SYMBOL column (second column) - flex layout */
td:nth-child(2) b {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

td:nth-child(2) .symbol-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

td:nth-child(2) .symbol-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Styles for links with icons in SYMBOL column */
td:nth-child(2) .symbol-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    transition: opacity 0.2s;
}

td:nth-child(2) .symbol-icons a:hover {
    opacity: 0.7;
}

/* Styles for PERPETUAL icon */
td:nth-child(2) .perpetual-icon {
    color: #0f0;
}

/* Styles for OB button (Orderbook) */
.ob-btn {
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ob-btn:hover {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.ob-btn .icon-inline {
    filter: drop-shadow(0 0 2px #0f0);
}

/* FAV icon (star) styling - just icon, no button */
.fav-icon {
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s;
    color: #0f0;
    opacity: 0.6;
}

.fav-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.fav-icon-filled {
    color: #ff0;
    opacity: 1;
}

.fav-icon-filled:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.fav-icon .icon-inline {
    display: block;
    filter: drop-shadow(0 0 2px currentColor);
}

.fav-icon-filled .icon-inline {
    filter: drop-shadow(0 0 3px #ff0);
}

/* Settings icon button in table header */
.settings-icon-btn {
    display: inline-flex;
    cursor: pointer;
    transition: all 0.2s;
    color: #888;
    opacity: 0.7;
    padding: 4px;
    border-radius: 4px;
}

.settings-icon-btn:hover {
    opacity: 1;
    color: #0f0;
    background: rgba(0, 255, 0, 0.15);
}

.settings-icon-btn .icon-inline {
    display: block;
}

/* Narrow FAV column - applies to main table and favorites table */
.matrix-frame table thead th:first-child,
.matrix-frame table tbody td:first-child {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 4px 2px;
    text-align: center;
}

/* ═══════════════════ ORDERBOOK LAYOUT ═══════════════════ */

/* Modal wrapper - fills entire modal body */
.orderbook-modal-wrapper {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dual container - two columns side by side */
.orderbook-dual-container {
    display: flex;
    gap: 15px;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Individual column (SPOT, PERPETUAL) */
.orderbook-column {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
    overflow: hidden;
}

/* Column title */
.orderbook-column-title {
    flex-shrink: 0;
    padding: 4px 8px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #0f0;
    border-bottom: 2px solid rgba(0, 255, 0, 0.3);
}

/* Price row (top of column) */
.orderbook-price-row {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    background: linear-gradient(to bottom,
        rgba(0, 255, 0, 0.15) 0%,
        rgba(0, 255, 0, 0.12) 50%,
        rgba(0, 255, 0, 0.15) 100%);
    border-bottom: 2px solid rgba(0, 255, 0, 0.6);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2) inset;
}

/* Container for ASK and BID columns side by side */
.orderbook-rows-container {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    gap: 8px;
    padding: 4px;
}

/* Individual side column (ASK or BID) */
.orderbook-side-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

/* Side section title */
.orderbook-section-title {
    flex-shrink: 0;
    padding: 2px 0;
    margin: 0;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 0 8px currentColor;
}

.orderbook-title-asks { color: #f00; }
.orderbook-title-bids { color: #0f0; }

/* Rows container within side column */
.orderbook-side-rows {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 2px;
}

/* ASK rows - attached to bottom */
.orderbook-asks-col .orderbook-side-rows {
    justify-content: flex-end;
}

/* BID rows - attached to top */
.orderbook-bids-col .orderbook-side-rows {
    justify-content: flex-start;
}

/* Market price display */
.orderbook-market-price {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.market-price-label {
    color: #0a0;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
}

.market-price-value {
    color: #0f0;
    font-size: 18px;
    font-weight: 400;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8),
                 0 0 20px rgba(0, 255, 0, 0.5),
                 0 0 30px rgba(0, 255, 0, 0.3);
    animation: marketPriceGlow 2s ease-in-out infinite alternate;
}

@keyframes marketPriceGlow {
    from { text-shadow: 0 0 10px rgba(0, 255, 0, 0.8), 0 0 20px rgba(0, 255, 0, 0.5), 0 0 30px rgba(0, 255, 0, 0.3); }
    to { text-shadow: 0 0 15px rgba(0, 255, 0, 1), 0 0 25px rgba(0, 255, 0, 0.7), 0 0 35px rgba(0, 255, 0, 0.5); }
}

/* Orderbook stats */
.orderbook-stats { width: 100%; margin-top: 4px; }
.bulls-bears-scale { width: 100%; }
.scale-bar {
    width: 100%;
    height: 20px;
    display: flex;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 0, 0.4);
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.6);
}

.scale-bids {
    background: linear-gradient(to right, rgba(0, 255, 0, 0.5) 0%, rgba(0, 220, 0, 0.6) 50%, rgba(0, 255, 0, 0.5) 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.scale-asks {
    background: linear-gradient(to left, rgba(255, 0, 0, 0.5) 0%, rgba(220, 0, 0, 0.6) 50%, rgba(255, 0, 0, 0.5) 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Orderbook row */
.orderbook-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    padding: 2px 8px;
    font-size: 9px;
    border-radius: 2px;
    min-height: 20px;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(0, 255, 0, 0.08);
    cursor: help;
    transition: background-color 0.3s ease;
}

.orderbook-price {
    text-align: right;
    font-weight: 600;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.orderbook-amount {
    text-align: right;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    min-width: 70px;
}

.orderbook-row.bid .orderbook-price { color: #0f0; }
.orderbook-row.ask .orderbook-price { color: #f00; }
.orderbook-row.bid .orderbook-amount { color: #0f0; }
.orderbook-row.ask .orderbook-amount { color: #f00; }

.orderbook-row.bid { background: rgba(0, 40, 0, 0.3); }
.orderbook-row.ask { background: rgba(40, 0, 0, 0.3); }
.orderbook-row.bid:hover,
.orderbook-row.ask:hover { background: rgba(0, 255, 0, 0.15); }

.orderbook-row.orderbook-empty { opacity: 0.2; pointer-events: none; }
.orderbook-row.orderbook-empty .orderbook-price,
.orderbook-row.orderbook-empty .orderbook-amount { visibility: hidden; }

.orderbook-loading { text-align: center; color: #0a0; padding: 20px; }

.orderbook-row.bid.updated { animation: dataUpdateFlashBid 0.5s ease; }
.orderbook-row.ask.updated { animation: dataUpdateFlashAsk 0.5s ease; }

@keyframes dataUpdateFlashBid { 0% { background-color: rgba(0, 255, 0, 0.3); } 100% { background-color: transparent; } }
@keyframes dataUpdateFlashAsk { 0% { background-color: rgba(255, 0, 0, 0.3); } 100% { background-color: transparent; } }

.orderbook-row.orderbook-whale { background: rgba(255, 215, 0, 0.15); }
.orderbook-row.orderbook-whale .orderbook-price { text-shadow: 0 0 8px rgba(255, 215, 0, 0.8); }
.orderbook-row.orderbook-large { background: rgba(0, 255, 136, 0.1); }
.orderbook-row.orderbook-large .orderbook-amount { font-weight: bold; }

/* th styles */
.orderbook-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    padding: 2px 8px;
    font-size: 9px;
    border-radius: 2px;
    min-height: 20px;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(0, 255, 0, 0.08);
    cursor: help;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.orderbook-row::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(to right,
        transparent 0%,
        rgba(0, 255, 0, 0.15) 50%,
        transparent 100%);
}

.orderbook-price {
    text-align: right;
    font-weight: 600;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.orderbook-amount {
    text-align: right;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    min-width: 70px;
}

.orderbook-row.bid .orderbook-price { color: #0f0; }
.orderbook-row.ask .orderbook-price { color: #f00; }
.orderbook-row.bid .orderbook-amount { color: #0f0; }
.orderbook-row.ask .orderbook-amount { color: #f00; }

.orderbook-row.bid { background: rgba(0, 40, 0, 0.3); }
.orderbook-row.ask { background: rgba(40, 0, 0, 0.3); }

.orderbook-row.bid:hover,
.orderbook-row.ask:hover {
    background: rgba(0, 255, 0, 0.15);
}

.orderbook-row.orderbook-empty {
    opacity: 0.2;
    pointer-events: none;
}

.orderbook-row.orderbook-empty .orderbook-price,
.orderbook-row.orderbook-empty .orderbook-amount {
    visibility: hidden;
}

.orderbook-loading {
    text-align: center;
    color: #0a0;
    padding: 20px;
}

.orderbook-row.updated {
    animation: dataUpdateFlash 0.5s ease;
}

.orderbook-row.bid.updated {
    animation: dataUpdateFlashBid 0.5s ease;
}

.orderbook-row.ask.updated {
    animation: dataUpdateFlashAsk 0.5s ease;
}

@keyframes dataUpdateFlashBid {
    0% { background-color: rgba(0, 255, 0, 0.3); }
    100% { background-color: transparent; }
}

@keyframes dataUpdateFlashAsk {
    0% { background-color: rgba(255, 0, 0, 0.3); }
    100% { background-color: transparent; }
}

/* Whale highlighting */
.orderbook-row.orderbook-whale {
    background: rgba(255, 215, 0, 0.15);
}

.orderbook-row.orderbook-whale .orderbook-price {
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.orderbook-row.orderbook-large {
    background: rgba(0, 255, 136, 0.1);
}

.orderbook-row.orderbook-large .orderbook-amount {
    font-weight: bold;
}

/* th styles */
    background: #001a00;
    position: sticky;
    top: 0;
    /* Retro glow effect for headers */
    text-shadow:
        0 0 3px rgba(0, 255, 0, 0.8),
        0 0 6px rgba(0, 255, 0, 0.4),
        0 0 9px rgba(0, 255, 0, 0.2);
    /* Light header flickering */
    animation: header-flicker 5s ease-in-out infinite;
}

/* Header flickering for old terminal effect */
@keyframes header-flicker {
    0%, 100% {
        text-shadow:
            0 0 3px rgba(0, 255, 0, 0.8),
            0 0 6px rgba(0, 255, 0, 0.4),
            0 0 9px rgba(0, 255, 0, 0.2);
    }
    50% {
        text-shadow:
            0 0 4px rgba(0, 255, 0, 0.9),
            0 0 8px rgba(0, 255, 0, 0.5),
            0 0 12px rgba(0, 255, 0, 0.3);
    }
}

/* ═══════════════════ SORTABLE HEADERS ═══════════════════ */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s;
}

.sortable-header:hover {
    background: #002a00;
}

.limited-mode .sortable-header {
    opacity: 0.85;
}

.limited-mode .settings-panel input[disabled],
.limited-mode .settings-panel select[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.limited-mode .settings-panel label {
    opacity: 0.85;
}

.limited-mode .paid-only {
    display: none !important;
}

.limited-mode .sort-indicator,
.limited-mode #priceFilterDropdown {
    display: none !important;
}

.sort-indicator {
    margin-left: 5px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* Up arrow for ascending sort */
.sort-asc .sort-indicator::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid var(--green);
    filter: drop-shadow(0 0 3px var(--green));
    margin-left: 2px;
}

/* Down arrow for descending sort */
.sort-desc .sort-indicator::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--green);
    filter: drop-shadow(0 0 3px var(--green));
    margin-left: 2px;
}

/* ═══════════════════ PRICE FILTER INDICATOR ═══════════════════ */
.price-filter-indicator {
    display: inline-block;
    margin-left: 5px;
    color: var(--green);
    font-size: 13px;
    font-weight: bold;
    cursor: help;
    vertical-align: middle;
    text-shadow: 0 0 5px var(--green);
    animation: pulse-filter 2s ease-in-out infinite;
}

@keyframes pulse-filter {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 5px var(--green);
    }
    50% {
        opacity: 0.7;
        text-shadow: 0 0 10px var(--green);
    }
}

th.sortable-header {
    position: relative;
}

/* ═══════════════════ PRICE TEXT WITH FILTER ICON ═══════════════════ */
.price-text {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.price-text:hover {
    color: var(--green);
    text-decoration: underline;
    text-decoration-color: rgba(0, 255, 0, 0.5);
}

.price-text .filter-icon {
    font-size: 11px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.price-text:hover .filter-icon {
    opacity: 1;
}


/* Alert level colors moved to modal.css */
/*
#alert.yellow { background: rgba(255, 215, 0, 0.9); color: #000; }
#alert.orange { background: rgba(255, 102, 0, 0.95); color: #000; }
#alert.red { background: rgba(180, 0, 0, 0.98); color: #fff; }
#alert.pump { background: rgba(0, 100, 0, 0.95); color: var(--green); }
*/

.alert-2 {
    background: rgba(255, 102, 0, 0.4) !important;
    color: var(--orange) !important;
    animation: pulse 0.8s steps(2) infinite;
    will-change: opacity;
    transform: translateZ(0);
}

.alert-3 {
    background: rgba(255, 0, 0, 0.5) !important;
    color: #fff !important;
    animation: flash 0.6s steps(2) infinite;
    will-change: opacity, background;
    transform: translateZ(0);
}

.alert-4 {
    background: rgba(0, 255, 100, 0.4) !important;
    color: var(--pump) !important;
}

.invalid {
    opacity: 0.4;
    color: #444 !important;
}

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

@keyframes flash {
    0%, 100% {
        opacity: 1;
        background: rgba(255, 0, 0, 0.7);
    }
    50% {
        opacity: 0.5;
        background: rgba(139, 0, 0, 0.9);
    }
}

@keyframes glow {
    0%, 100% { box-shadow: inset 0 0 20px var(--green); }
    50% { box-shadow: inset 0 0 40px var(--green); }
}

/* ═══════════════════ DELETE BUTTON ═══════════════════ */
.delete-btn {
    background: #500;
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 8px;
    font-size: 12px;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: var(--red);
    color: #000;
}

/* ═══════════════════ FULLSCREEN ALERT (OLD - DEPRECATED) ═══════════════════ */
/* Alert styles moved to modal.css - this is kept for reference only */
/*
#alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-weight: bold;
    text-align: center;
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.3s;
}
*/

#alert.yellow {
    background: rgba(255, 215, 0, 0.9);
    color: #000;
}

#alert.orange {
    background: rgba(255, 102, 0, 0.95);
    color: #000;
}

#alert.red {
    background: rgba(180, 0, 0, 0.98);
    color: #fff;
}

#alert.pump {
    background: rgba(0, 100, 0, 0.95);
    color: var(--green);
}

/* Alert text styles moved to modal.css */
/*
#alert h2 { font-size: clamp(30px, 10vw, 80px); margin: 0; text-shadow: 0 0 30px currentColor; }
#alert p { font-size: clamp(16px, 5vw, 40px); margin: 10px 0; }
*/

.about-btn {
    /* styled by .topbar-btn; keep class for selectors */
}

/* ═══════════════════ SETTINGS BUTTON ═══════════════════ */
.settings-btn {
    /* styled by .topbar-btn; keep class for JS */
}

.settings-btn:hover {
    /* hover handled by .topbar-btn */
}

/* ═══════════════════ PAIRS SELECTION BUTTON ═══════════════════ */
.pairs-btn {
    /* styled by .topbar-btn; keep class for JS */
}

.pairs-btn:hover {
    /* hover handled by .topbar-btn */
}

/* ═══════════════════ SETTINGS PANEL ═══════════════════ */
.overlay-bg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
}

.overlay-bg.open {
    display: block;
}

.settings-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #001100;
    border: 2px solid var(--green);
    padding: 20px;
    border-radius: 15px;
    z-index: 1000;
    min-width: 300px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.settings-panel.open {
    display: block;
}

.settings-panel h3 {
    color: var(--green);
    margin-top: 0;
    text-align: center;
}

.settings-panel label {
    display: block;
    color: var(--green);
    margin: 10px 0 5px;
}

.settings-panel input[type="range"] {
    width: 100%;
    accent-color: var(--green);
}

.settings-panel input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--green);
}

.settings-panel select {
    width: 100%;
    padding: 8px;
    background: #000;
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: 5px;
}

.settings-panel .close-btn {
    background: var(--green);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s;
}

.settings-panel .close-btn:hover {
    background: #0a0;
}

.threshold-value {
    color: var(--green);
    float: right;
    font-weight: 400;
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 600px) {
    .add-panel {
        flex-direction: column;
        align-items: center;
    }

    .add-panel input {
        width: 100%;
        max-width: none;
    }

    .add-panel button {
        width: 100%;
    }

    th, td {
        padding: 5px 3px;
        font-size: 11px;
    }

    .topbar-btn {
        height: 30px;
        padding: 0 8px;
        font-size: 11px;
        gap: 4px;
    }

    .topbar {
        padding: 6px 8px;
        gap: 6px;
    }

    .topbar-actions {
        gap: 4px;
    }
}

/* Custom Modal Styles */
/* Ensure modal dialog is above backdrop */
.modal-dialog {
    z-index: 1060;
}

/* Modal backdrop - backdrop appears when modal is open
   but should NOT block clicks on modal content */
.modal-backdrop {
    z-index: 1050;
    pointer-events: none !important;
}

/* Ensure modal itself is above backdrop */
.modal {
    z-index: 1055;
}

/* Modal content must be above backdrop */
.modal-content {
    z-index: 1061;
    position: relative;
}

.custom-modal-content {
    background-color: rgba(0, 0, 0, 0.9); /* Darker background */
    color: #0f0; /* Matrix green text */
    border: 1px solid #0f0; /* Green border */
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.7); /* Green glow effect */
}

.custom-modal-header {
    border-bottom: 1px solid #0f0; /* Green separator */
}

.custom-modal-header .modal-title {
    color: #0f0; /* Green title text */
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-modal-header {
    flex-wrap: wrap;
}

.custom-btn-close {
    filter: invert(1) grayscale(1) brightness(2); /* Make close button green */
}

.btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 255, 0, 0.25); /* Green focus outline */
}

.custom-modal-body {
    /* Optional: padding adjustments */
    display: flex;
    flex-direction: column;
    margin: 12px;
}

.custom-modal-body label {
    display: block;
    width: 100%;
    margin: 10px 0 5px;
    color: var(--green);
}

.custom-modal-body input[type="range"] {
    width: 100%;
    display: block;
    margin-bottom: 10px;
    accent-color: var(--green);
}

.custom-modal-body input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--green);
}

.custom-modal-body input[type="number"] {
    width: 100%;
    display: block;
    padding: 10px 12px;
    background: #000800;
    color: #0f0;
    border: 2px solid #00aa00;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.custom-modal-body input[type="number"]:focus {
    border-color: #0f0;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.custom-modal-body select {
    width: 100%;
    display: block;
    padding: 8px;
    background: #000;
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: 4px;
    margin-bottom: 10px;
}

.custom-modal-body hr {
    width: 100%;
    margin: 15px 0;
}

.custom-modal-body h4 {
    width: 100%;
    margin: 10px 0;
}

.custom-modal-body .paid-only {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.custom-modal-body .paid-only label {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.custom-modal-body p {
    width: 100%;
    display: block;
    margin: 10px 0;
}

.custom-modal-body h3 {
    color: #0f0; /* Green for h3 inside modal */
}

.custom-modal-body ul {
    list-style-type: square; /* Square bullet points */
    padding-left: 20px;
}

.custom-modal-body ul li {
    margin-bottom: 5px;
}

.settings-system-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 20, 0, 0.4);
    border-top: 1px solid rgba(0, 255, 0, 0.3);
    margin-top: 8px;
}

.settings-system-actions-title {
    color: #0f0;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-system-actions-buttons {
    display: flex;
    gap: 6px;
}

.settings-system-actions .system-action-btn {
    padding: 6px 8px;
    background: transparent;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 4px;
    color: #0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.settings-system-actions .system-action-btn:hover {
    background: rgba(0, 255, 0, 0.15);
    border-color: rgba(0, 255, 0, 0.7);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
}

.settings-system-actions .system-action-btn:active {
    transform: scale(0.95);
    background: rgba(0, 255, 0, 0.25);
}

.settings-system-actions .system-action-btn .icon-inline {
    filter: drop-shadow(0 0 2px currentColor);
}

.custom-modal-footer {
    border-top: 1px solid #0f0; /* Green separator */
    justify-content: center; /* Center buttons */
    padding: 12px;
}

.custom-btn {
    background-color: #0f0; /* Green background for buttons */
    color: #000; /* Black text for buttons */
    border: 1px solid #0f0; /* Green border for buttons */
    margin: 0 5px;
}

.custom-btn:hover {
    background-color: #0a0; /* Darker green on hover */
    border-color: #0a0;
    color: #fff; /* White text on hover */
}

/* Specific button styles if needed */
.btn-secondary.custom-btn {
    background-color: #0f0; /* Ensure all custom buttons are green */
    border-color: #0f0;
    color: #000;
}

.btn-primary.custom-btn {
    background-color: #0f0; /* Ensure all custom buttons are green */
    border-color: #0f0;
    color: #000;
}

/* ═══════════════════ ICONS STYLING ═══════════════════ */
.icon-inline {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-right: 0.3em;
    color: var(--green);
    filter: drop-shadow(0 0 4px var(--green));
    stroke-width: 2;
}

.icon-inline:last-child {
    margin-right: 0;
}

button .icon-inline,
.btn .icon-inline {
    margin-right: 5px !important;
}

button .icon-inline:last-child,
.btn .icon-inline:last-child {
    margin-right: 0;
    margin-left: 0.4em;
}

.icon-alert {
    width: 1.2em;
    height: 1.2em;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 4px var(--green));
        opacity: 1;
    }
    50% {
        filter: drop-shadow(0 0 12px var(--green));
        opacity: 0.8;
    }
}

/* Icon glow on hover for interactive elements */
button:hover .icon-inline,
.btn:hover .icon-inline,
.topbar-btn:hover .icon-inline {
    filter: drop-shadow(0 0 6px var(--green));
    transition: filter 0.2s ease;
}

/* Exceptions for buttons with black text - icons remain black on hover */
.close-btn:hover .icon-inline,
.settings-panel .close-btn:hover .icon-inline,
.add-panel button:hover .icon-inline,
.btn-secondary.custom-btn:hover .icon-inline,
.btn-primary.custom-btn:hover .icon-inline,
#pairsModal .btn-sm:first-of-type:hover .icon-inline,
button[style*="background:#0f0"]:hover .icon-inline,
button[style*="background:#f60"]:hover .icon-inline,
button[style*="background:var(--green)"]:hover .icon-inline {
    filter: none !important;
    color: #000 !important;
    stroke: #000 !important;
}

/* Icons in buttons with colored background (Apply, Reset) - no glow */
button[style*="background:#0f0"] .icon-inline,
button[style*="background:#f60"] .icon-inline,
button[style*="background:var(--green)"] .icon-inline {
    filter: none !important;
    color: #000 !important;
    stroke: #000 !important;
}

/* Icons in buttons with black text - no glow */
.custom-modal-footer button .icon-inline {
    filter: none !important;
    color: #000 !important;
    stroke: #000 !important;
    margin: 0;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Icons in green buttons with black text - black icons */
.close-btn .icon-inline,
.settings-panel .close-btn .icon-inline,
.add-panel button .icon-inline,
.btn-secondary.custom-btn .icon-inline,
.btn-primary.custom-btn .icon-inline,
#pairsModal .btn-sm:first-of-type .icon-inline {
    filter: none !important;
    color: #000 !important;
    stroke: #000 !important;
}

/* Icons in buttons with green text on dark background - green icons */
#pairsModal .btn-sm:nth-of-type(2) .icon-inline {
    filter: drop-shadow(0 0 4px var(--green)) !important;
    color: #00FF00 !important;
    stroke: #00FF00 !important;
}

#pairsModal .btn-sm:nth-of-type(3) .icon-inline {
    filter: drop-shadow(0 0 4px #00FF88) !important;
    color: #00FF88 !important;
    stroke: #00FF88 !important;
}

/* Icons in topbar buttons - green icons (already correct, but ensuring) */
.topbar-btn .icon-inline {
    color: var(--green) !important;
    stroke: var(--green) !important;
    filter: drop-shadow(0 0 3px var(--green));
    width: 14px;
    height: 14px;
    margin-right: 4px;
    flex-shrink: 0;
}

/* ═══════════════════ PAIRS MODAL MULTI-COLUMN LAYOUT ═══════════════════ */
#pairsListContainer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

/* 2 columns on tablets */
@media (min-width: 576px) {
    #pairsListContainer {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 3 columns on medium screens */
@media (min-width: 768px) {
    #pairsListContainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 4 columns on large screens */
@media (min-width: 992px) {
    #pairsListContainer {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pair-item {
    display: block;
    padding: 5px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pair-item:hover {
    background: rgba(0, 255, 0, 0.05);
}

/* ═══════════════════ PAIRS MODAL BUTTONS - MATRIX GREEN VARIATIONS ═══════════════════ */
/* Select All button - bright green */
#pairsModal .btn-sm:first-of-type {
    background: #00FF00 !important; /* var(--green) */
    color: #000 !important;
    border: 1px solid #00FF00 !important;
}

#pairsModal .btn-sm:first-of-type:hover {
    background: #00CC00 !important; /* darker green */
    border-color: #00CC00 !important;
    color: #000 !important;
}

/* Deselect All button - medium green */
#pairsModal .btn-sm:nth-of-type(2) {
    background: rgba(0, 255, 0, 0.25) !important; /* semi-transparent green */
    color: #00FF00 !important;
    border: 1px solid rgba(0, 255, 0, 0.6) !important;
}

#pairsModal .btn-sm:nth-of-type(2):hover {
    background: rgba(0, 255, 0, 0.4) !important;
    border-color: rgba(0, 255, 0, 0.8) !important;
    color: #00FF00 !important;
}

/* Reset to Full List button - dark green with border */
#pairsModal .btn-sm:nth-of-type(3) {
    background: #001100 !important; /* dark green background */
    color: #00FF88 !important; /* var(--pump) - lighter green text */
    border: 1px solid rgba(0, 255, 0, 0.55) !important;
}

#pairsModal .btn-sm:nth-of-type(3):hover {
    background: rgba(0, 255, 0, 0.16) !important;
    border-color: rgba(0, 255, 0, 0.9) !important;
    color: #00FF00 !important;
}

.corner {
    filter:
        drop-shadow(0 0 6px rgba(0,255,100,0.8))
        drop-shadow(0 0 12px rgba(0,255,100,0.4));
}

.matrix-frame {
    position: relative;
    padding: 2px;
    background: rgba(0, 15, 0, 0.4);
    /* Retro glow effect for frame */
    box-shadow:
        inset 0 0 20px rgba(0, 255, 100, 0.1),
        0 0 10px rgba(0, 255, 100, 0.05);
}

.matrix-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0,255,100,0.2);
    box-shadow: inset 0 0 15px rgba(0,255,100,0.1);
    pointer-events: none;
    /* Additional scanlines on frame */
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 1px,
        rgba(0, 255, 100, 0.01) 1px,
        rgba(0, 255, 100, 0.01) 2px
    );
    opacity: 0.3;
}

.tl { top:-3px; left:-3px; border-width:2px 0 0 2px; }
.tr { top:-3px; right:-3px; border-width:2px 2px 0 0; }
.bl { bottom:-3px; left:-3px; border-width:0 0 2px 2px; }
.br { bottom:-3px; right:-3px; border-width:0 2px 2px 0; }

.corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border-style: solid;
    border-color: rgba(0,255,100,0.8);
}

/* Cell effects */
#tableBody td {
    position: relative;
    transition: color 0.3s ease;
}

#tableBody td:hover {
    cursor: help;
    overflow: visible;
    z-index: 10;
}

#tableBody td.energy-up {
    color: #00ff66 !important;
    text-shadow: 0 0 5px rgba(0, 255, 100, 0.5);  /* reduced from 8px to 5px */
}

#tableBody td.energy-down {
    color: #ff5555 !important;
    text-shadow: 0 0 5px rgba(255, 85, 85, 0.5);  /* reduced from 8px to 5px */
}

#tableBody td::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.matrix-frame.active .corner {
    filter:
        drop-shadow(0 0 10px rgba(0,255,100,1))
        drop-shadow(0 0 22px rgba(0,255,100,0.8));
}

#tableBody td {
    position: relative;
}

@keyframes cell-flash {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.02); }
}

.table-wrap {
    padding: 10px;
}

.matrix-frame {
    position: relative;
    border: 1px solid rgba(0, 255, 100, 0.2);
    background: rgba(0, 10, 0, 0.4);
    box-shadow:
        inset 0 0 20px rgba(0, 255, 100, 0.05),
        0 0 5px rgba(0, 255, 100, 0.1);
    /* Retro frame flickering effect */
    animation: frame-flicker 4s ease-in-out infinite;
}

/* Light frame flickering for old terminal effect - optimized */
@keyframes frame-flicker {
    0%, 100% {
        box-shadow:
            inset 0 0 20px rgba(0, 255, 100, 0.05),
            0 0 5px rgba(0, 255, 100, 0.1);
    }
    50% {
        box-shadow:
            inset 0 0 25px rgba(0, 255, 100, 0.08),
            0 0 8px rgba(0, 255, 100, 0.15);
    }
}

.matrix-frame {
    position: relative;
    padding: 2px;
    background: rgba(0, 15, 0, 0.4);
    box-shadow:
        inset 0 0 20px rgba(0, 255, 100, 0.05),
        0 0 10px rgba(0, 255, 100, 0.05);
    animation: frame-flicker 4s ease-in-out infinite;
    will-change: box-shadow;
    transform: translateZ(0);
}

/* ═══════════════════ COOLDOWN INDICATORS ═══════════════════ */
/* Elegant gray circular pie chart indicator that decreases clockwise */
/* Shows time remaining until next data update */
.cooldown-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    z-index: 10;
    cursor: default;
}

/* Background circle - subtle gray background */
.cooldown-bg {
    fill: rgba(128, 128, 128, 0.15);
    stroke: rgba(128, 128, 128, 0.25);
    stroke-width: 0.5;
}

/* Progress circle - elegant gray stroke that decreases clockwise */
.cooldown-progress {
    fill: none;
    stroke: rgba(128, 128, 128, 0.6);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 44;
    stroke-dashoffset: 0;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: none; /* Remove transition to allow smooth animation */
}

/* Active state - animates the progress circle decreasing clockwise */
.cooldown-indicator.active .cooldown-progress {
    animation: cooldown-decrease 60s linear forwards;
}

/* Decrease animation - pie chart decreases clockwise from full to empty */
/* stroke-dashoffset goes from 0 (full circle) to -44 (empty circle) */
/* Negative values make it decrease clockwise (positive = counter-clockwise) */
/* Creates elegant countdown effect */
@keyframes cooldown-decrease {
    0% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        stroke-dashoffset: -44;
        opacity: 0.4;
    }
}

/* ═══════════════════ SKELETON LOADING STATES ═══════════════════ */
/* Retro terminal skeleton loading animation for table rows and components */
.skeleton {
    display: inline-block;
    background: rgba(0, 255, 0, 0.08);
    border-radius: 0; /* Remove border radius for retro look */
    position: relative;
    overflow: hidden;
    /* Glow effect like old terminals */
    box-shadow:
        inset 0 0 3px rgba(0, 255, 0, 0.2),
        0 0 2px rgba(0, 255, 0, 0.1);
}

.skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 0, 0.15) 50%,
        transparent 100%
    );
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.skeleton-row {
    opacity: 0.7;
    animation: skeleton-row-fade 0.3s ease-in;
    /* Retro flickering effect for skeleton */
    animation: skeleton-row-fade 0.3s ease-in, terminal-flicker 2s ease-in-out infinite;
}

@keyframes skeleton-row-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.7;
    }
}

.skeleton-row td {
    position: relative;
    overflow: hidden;
    padding: 12px 8px !important;
    vertical-align: middle;
    /* Retro background for skeleton cells */
    background: rgba(0, 20, 0, 0.3) !important;
    /* Scanlines effect for skeleton */
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03) 0px,
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    ) !important;
}

/* Skeleton cell content - empty cells with retro terminal shimmer effect */
.skeleton-row td::before {
    content: '';
    display: block;
    width: 80px;
    height: 16px;
    background: rgba(0, 255, 0, 0.08);
    border-radius: 0; /* Remove border radius for retro look */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    overflow: hidden;
    /* Glow effect like old terminals */
    box-shadow:
        inset 0 0 2px rgba(0, 255, 0, 0.2),
        0 0 1px rgba(0, 255, 0, 0.1);
    /* Scanlines on skeleton elements */
    background-image: repeating-linear-gradient(
        90deg,
        rgba(0, 255, 0, 0.05) 0px,
        rgba(0, 255, 0, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
}

.skeleton-row td::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 8px;
    width: 80px;
    height: 16px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 0, 0.25) 50%,
        transparent 100%
    );
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 0; /* Remove border radius for retro look */
    /* Glow effect for shimmer animation */
    box-shadow: 0 0 3px rgba(0, 255, 0, 0.2);
}

/* Varied widths for different columns to look more realistic */
.skeleton-row td:nth-child(1)::before,
.skeleton-row td:nth-child(1)::after {
    width: 80px;
}

.skeleton-row td:nth-child(2)::before,
.skeleton-row td:nth-child(2)::after {
    width: 100px;
}

.skeleton-row td:nth-child(3)::before,
.skeleton-row td:nth-child(3)::after {
    width: 60px;
}

.skeleton-row td:nth-child(4)::before,
.skeleton-row td:nth-child(4)::after {
    width: 70px;
}

.skeleton-row td:nth-child(5)::before,
.skeleton-row td:nth-child(5)::after {
    width: 70px;
}

.skeleton-row td:nth-child(6)::before,
.skeleton-row td:nth-child(6)::after {
    width: 80px;
}

.skeleton-row td:nth-child(7)::before,
.skeleton-row td:nth-child(7)::after {
    width: 90px;
}

.skeleton-row td:nth-child(8)::before,
.skeleton-row td:nth-child(8)::after {
    width: 70px;
}

/* Skeleton for market context cards */
.skeleton-card {
    min-height: 60px;
    background: linear-gradient(
        90deg,
        rgba(0, 255, 0, 0.05) 0%,
        rgba(0, 255, 0, 0.1) 50%,
        rgba(0, 255, 0, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Loading state for status indicators */
.loading-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0, 255, 0, 0.3);
    border-top-color: rgba(0, 255, 0, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

/* Fade-in animation for content appearing */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ═══════════════════ BUG REPORT FEEDBACK BUTTON ═══════════════════ */
.bug-report-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.2), rgba(0, 255, 0, 0.15));
    border: 2px solid rgba(0, 255, 0, 0.5);
    color: #0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

/* Hide button when near bottom of page */
.bug-report-btn.hidden {
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
}

.bug-report-btn:hover {
    background: rgba(0, 255, 0, 0.25);
    border-color: rgba(0, 255, 0, 0.8);
    box-shadow: 0 6px 16px rgba(0, 255, 0, 0.5);
    transform: scale(1.05);
}

.bug-report-btn:active {
    transform: scale(0.95);
}

.bug-report-btn svg {
    filter: drop-shadow(0 0 4px rgba(0, 255, 0, 0.8));
}

/* Form input styles for bug report */
.custom-input,
.custom-textarea {
    width: 100%;
    padding: 10px;
    background: rgba(0, 20, 0, 0.5);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 4px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-input:focus,
.custom-textarea:focus {
    outline: none;
    border-color: rgba(0, 255, 0, 0.8);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.custom-input::placeholder,
.custom-textarea::placeholder {
    color: rgba(0, 255, 0, 0.4);
}

.custom-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Success/Error message styles */
#bugReportMessage {
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

#bugReportMessage.success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.5);
    color: #0f0;
}

#bugReportMessage.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: #f00;
}

/* Form group spacing */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #0f0;
    font-size: 12px;
    font-weight: bold;
}

/* Required field indicator */
.form-group label span {
    color: #f00;
    margin-left: 2px;
}

/* ═══════════════════ SYSTEM STATUS CARD ═══════════════════ */
.system-status-card {
    position: relative;
    overflow: hidden;
}

.system-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0f0, transparent);
    animation: statusGlow 2s ease-in-out infinite;
}

.system-status-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 1px,
        rgba(0, 255, 0, 0.02) 1px,
        rgba(0, 255, 0, 0.02) 2px
    );
    pointer-events: none;
    opacity: 0.5;
}

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

.system-status-label {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: #0a0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.system-status-content {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.pairs-clickable {
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.pairs-clickable:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.system-status-icon {
    width: 20px;
    height: 20px;
    color: #0f0;
    filter: drop-shadow(0 0 4px rgba(0, 255, 0, 0.8));
    flex-shrink: 0;
}

.system-status-card.connecting .system-status-icon {
    color: #fa0;
    animation: iconPulse 1s ease-in-out infinite;
}

.system-status-card.online .system-status-icon {
    color: #0f0;
}

.system-status-card.offline .system-status-icon {
    color: #f55;
    filter: drop-shadow(0 0 4px rgba(255, 50, 50, 0.8));
}

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

.system-status-text {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 18px;
    font-weight: 400;
    color: #0f0;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
    letter-spacing: 1px;
    position: relative;
}

.system-status-card.offline .system-status-text {
    color: #f55;
    text-shadow: 0 0 8px rgba(255, 50, 50, 0.6);
}

.system-status-count {
    font-family: 'VT323', monospace;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: auto;
    flex-shrink: 0;
}

.system-status-count.filtered-count {
    color: #0f0;
    background: rgba(0, 40, 0, 0.4);
    border-left: 2px solid #0f0;
}

.system-status-count.hidden-count {
    color: #ff0;
    background: rgba(40, 40, 0, 0.4);
    border-left: 2px solid #ff0;
}

/* ═══════════════════ ADD PANEL INFO (full width) ═══════════════════ */
.add-panel-info {
    width: 100%;
    margin: 8px 0;
}

.add-panel-info .info-block {
    width: 100%;
    background: linear-gradient(to bottom, rgba(0, 20, 0, 0.75), rgba(0, 20, 0, 0.6));
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.1);
}

.info-block-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #0f0;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.5);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-label {
    color: #0a0;
    opacity: 0.7;
}

.summary-value {
    color: #0f0;
    font-weight: bold;
}

.summary-empty {
    color: #666;
    font-style: italic;
}

/* Top movers in info block */
.top-movers-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.top-movers-column {
    flex: 1;
    min-width: 150px;
}

.top-movers-title {
    font-size: 10px;
    color: #0a0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    padding-bottom: 4px;
}

.top-movers-column-title.rising-title {
    color: #0f0;
}

.top-movers-column-title.falling-title {
    color: #f55;
}

.top-movers-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.top-movers-item {
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 30, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.top-movers-item:hover {
    background: rgba(0, 60, 0, 0.5);
    transform: scale(1.02);
}

.top-movers-symbol {
    font-weight: 600;
}

.top-movers-change {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
}

.top-movers-item.indicator-growth .top-movers-change {
    color: #5f5;
}

.top-movers-item.indicator-fall .top-movers-change {
    color: #f77;
}

.top-movers-empty {
    color: #444;
    font-size: 10px;
    font-style: italic;
}

/* Status blink animation */
.status-blink {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #0f0;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.8);
    vertical-align: middle;
}

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

/* Responsive adjustments for system status card */
@media (max-width: 768px) {
    .system-status-content {
        flex-wrap: wrap;
    }

    .system-status-count {
        margin-left: 0;
        margin-top: 4px;
    }

    .system-status-actions {
        margin-top: 10px;
    }
}
/* HOT-SWAP TEST Thu Feb  5 06:49:40 PM EST 2026 - verifying workflow */
