 
        :root {
            --green-color: #0ECB81;
            /* Standart Borsa Yeşili */
            --red-color: #F6465D;
            /* Standart Borsa Kırmızısı */
            --green-light: rgba(14, 203, 129, 0.2);
            --red-light: rgba(246, 70, 93, 0.2);
            --yellow-color: #F0B90B;
        }


        /* NEW CSS: Console Style Loader (For All Modules) */
        @keyframes blink {
            50% {
                opacity: 0;
            }
        }

        /* Chart Loader overlay (including Heatmap and Liquidity) fully covers */
        .chart-loader-overlay,
        #liquidity-loader-overlay {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            background-color: rgba(6, 7, 10, 0.7); /* Deep sleek backdrop */
            backdrop-filter: blur(8px); /* Frosted glass effect */
            z-index: 100;
            position: absolute;
            inset: 0;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.4s ease, visibility 0.4s ease;
        }

        .chart-loader-overlay.visible,
        #liquidity-loader-overlay.visible {
            opacity: 1;
            visibility: visible;
        }

        /* FIX: position:absolute removed and made flex compatible to center loader content. */
        .ai-console-loader {
            width: auto;
            max-width: 300px;
            padding: 8px 12px;
            background-color: var(--dark-bg);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            font-family: 'Fira Code', monospace;
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 20px;
            /* To separate from spinner */

            /* Initial state for animations */
            opacity: 0;
            transform: translateY(-10px);
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        /* Enable custom positioning for Heatmap and Liquidity loaders */
        #liquidity-loader-overlay.visible .ai-console-loader {
            opacity: 1;
            transform: translateY(0);
        }

        .ai-console-loader .text-muted {
            color: var(--text-tertiary);
            margin-right: 5px;
        }

        .ai-console-loader .cursor {
            display: inline-block;
            width: 8px;
            height: 1px;
            background-color: var(--text-secondary);
            margin-left: 2px;
            animation: blink 1s step-start infinite;
        }

        /* Theme Settings */
        .theme-dark {
            /* Modern Dark Theme - Saturated & Glassy */
            --dark-bg: #18191c;
            --dark-border: rgba(255, 255, 255, 0.08);
            --content-bg: #202225;
            /* Main chart background */
            --border-color: rgba(255, 255, 255, 0.08);
            /* Grid lines */
            --dark-text-secondary: #a1a1aa;
            --text-secondary: #a1a1aa;
            --content-bg-fade: rgba(5, 5, 5, 0.95);
            /* Loader background */

            /* Colors for Crosshair label (Item 1) */
            --crosshair-bg: #2962FF;
            /* Bright Blue Accent */
            --crosshair-text: #FFFFFF;
        }

        .theme-light {
            /* Colors for Crosshair label (Item 1) */
            --crosshair-bg: #FFFFFF;
            --crosshair-text: #111827;
            --content-bg-fade: rgba(255, 255, 255, 0.95);
            /* Loader background */

            /* Golden Rate Light Theme Fixes (Desired Modern Look) */
            --gr-console-bg: #f8f9fa;
            /* Light gray/white console */
            --gr-console-border: #dee2e6;
            /* Light border */
            --gr-console-text: #212529;
            /* Dark text */
            --gr-prompt-color: #007bff;
            /* Blue prompt */
            --gr-command-color: #6c757d;
            /* Gray command */
            --gr-info-color: #17a2b8;
            /* Turquoise info */
        }

        /* GOLDEN RATE LIGHT THEME FIX */
        .theme-light #golden-rate-container .finder-console-container,
        .theme-light #nadaraya-watson-container .finder-console-container {
            background-color: var(--gr-console-bg);
            border: 1px solid var(--gr-console-border);
            color: var(--gr-console-text);
        }

        .theme-light #golden-rate-container .console-header,
        .theme-light #nadaraya-watson-container .console-header {
            background-color: var(--gr-console-border);
            border-bottom: 1px solid var(--gr-console-border);
            color: #495057;
        }

        .theme-light #golden-rate-container .console-content .prompt,
        .theme-light #nadaraya-watson-container .console-content .prompt {
            color: var(--gr-prompt-color);
        }

        .theme-light #golden-rate-container .console-content .command,
        .theme-light #nadaraya-watson-container .console-content .command {
            color: var(--gr-command-color);
        }

        .theme-light #golden-rate-container .console-content .info,
        .theme-light #nadaraya-watson-container .console-content .info {
            color: var(--gr-info-color);
        }

        .theme-light #golden-rate-container .console-content .console-cursor,
        .theme-light #nadaraya-watson-container .console-content .console-cursor {
            background-color: var(--gr-console-text);
        }

        .theme-light #golden-rate-container .finder-table th,
        .theme-light #nadaraya-watson-container .finder-table th {
            background-color: var(--gr-console-border);
        }

        .chart-wrapper {
            position: relative;
            overflow: hidden;
            /* Prevent spillover */
            display: flex;
            /* Ensure proper sizing of children */
            flex-direction: column;
            width: 100%;
            height: 100%;
        }

        /* 1. Crosshair label style */
        .crosshair-label {
            position: absolute;
            background-color: var(--crosshair-bg);
            color: var(--crosshair-text);
            padding: 4px 8px;
            /* SIZE INCREASED */
            border-radius: 4px;
            /* SIZE INCREASED */
            font-size: 13px;
            /* SIZE INCREASED */
            font-weight: 600;
            /* BOLD ADDED */
            z-index: 100;
            white-space: nowrap;
            /* 1. For labels to appear to the right of priceScaleCanvas */
            pointer-events: none;
        }

        .price-label {
            right: 90px;
            left: auto !important;
        }

        .time-label {
            bottom: 35px;
            top: auto !important;
        }

        .chart-title {
            display: flex;
            align-items: center;
        }

        .chart-header .live-price-info {
            margin-left: 15px;
            font-weight: 600;
            font-size: 14px;
            /* Resetting padding since percentage is removed */
            padding: 0;
        }

        .market-status-badge {
            display: inline-block;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            margin-left: 10px;
            vertical-align: middle;
        }

        .market-status-badge.closed {
            background-color: rgba(246, 70, 93, 0.2);
            color: var(--red-color);
            border: 1px solid var(--red-color);
        }

        .market-status-badge.open {
            background-color: rgba(14, 203, 129, 0.2);
            color: var(--green-color);
            border: 1px solid var(--green-color);
            display: none;
            /* Usually don't show "Open" if default, or show it? User asked to show "closed" especially. */
        }

        /* Golden Rate Tab CSS */
        #page-golden-rate.active,
        #page-nadaraya-watson.active {
            display: flex;
            flex-direction: column;
            padding: 20px;
            flex-grow: 1;
            min-height: 0;
        }

        #golden-rate-container,
        #nadaraya-watson-container {
            background-color: var(--content-bg);
            border-radius: 8px;
            box-shadow: var(--shadow-md);
            padding: 20px;
            min-height: 500px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        .golden-rate-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            flex-grow: 1;
            text-align: center;
            min-height: 400px;
            /* To increase visibility */
        }

        .golden-rate-step h4 {
            margin-bottom: 20px;
            font-size: 1.5rem;
            color: var(--text-primary);
        }

        .golden-rate-step .finder-choice-btn,
        .golden-rate-step .time-btn {
            padding: 12px 25px;
            font-size: 1rem;
            margin: 10px;
            border-radius: 6px;
            cursor: pointer;
            transition: background-color 0.2s;
            border: 1px solid var(--border-color);
            background-color: var(--dark-bg);
            color: var(--text-secondary);
        }

        .golden-rate-step .time-btn.active,
        .golden-rate-step .finder-choice-btn:hover,
        .golden-rate-step .time-btn:hover {
            background-color: var(--accent-color);
            color: var(--white);
        }

        .finder-toolbar.timeframe-toolbar {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            max-width: 600px;
        }

        /* Step 3: Result screen */
        #gr-step-3,
        #nw-step-3 {
            display: flex;
            flex-direction: column;
            flex-grow: 1;
            gap: 15px;
            width: 100%;
            min-height: 0;
        }

        .gr-step-1-lead {
            max-width: 520px;
            margin: 0 auto 20px;
            color: var(--text-tertiary);
            font-size: 0.95rem;
            line-height: 1.5;
        }

        .gr-step-1-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
            width: 100%;
            max-width: 520px;
        }

        .gr-watchlist-hint {
            margin-top: 18px;
            padding: 14px 16px;
            border-radius: 10px;
            border: 1px solid var(--border-color);
            background: rgba(255, 255, 255, 0.03);
            max-width: 520px;
            width: 100%;
        }

        .gr-mode-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-bottom: 16px;
            flex-wrap: wrap;
            width: 100%;
        }

        .finder-back-btn {
            align-self: flex-start;
            margin-top: 4px;
        }

        @media (max-width: 768px) {
            #page-golden-rate.active,
            #page-nadaraya-watson.active {
                padding: 12px;
            }

            #golden-rate-container,
            #nadaraya-watson-container {
                padding: 14px;
                min-height: auto;
            }

            .golden-rate-step {
                min-height: 280px;
                padding: 8px 0;
            }

            .golden-rate-step h4 {
                font-size: 1.15rem;
            }

            .finder-toolbar.timeframe-toolbar {
                max-width: 100%;
                gap: 8px;
            }

            .golden-rate-step .finder-choice-btn,
            .golden-rate-step .time-btn {
                padding: 10px 14px;
                font-size: 0.9rem;
                margin: 4px;
            }

            .finder-actions {
                flex-wrap: wrap;
                justify-content: stretch;
            }

            .finder-search-container {
                max-width: 100% !important;
                flex: 1 1 100%;
            }

            .finder-table-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .finder-table {
                min-width: 520px;
            }

            .finder-table th,
            .finder-table td {
                padding: 10px 8px;
                font-size: 13px;
            }
        }

        .finder-console-container {
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background-color: #1a1a1a;
            color: #E0E0E0;
            font-family: 'Fira Code', monospace;
            font-size: 14px;
            max-height: 200px;
            min-height: 50px;
            overflow-y: auto;
            transition: max-height 0.3s ease;
        }

        .finder-console-container.collapsed {
            max-height: 50px;
        }

        .console-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 5px 10px;
            background-color: #000000;
            border-bottom: 1px solid var(--border-color);
            color: var(--text-tertiary);
        }

        .console-toggle-btn {
            background: none;
            border: none;
            color: var(--text-tertiary);
            cursor: pointer;
            font-size: 14px;
        }

        .console-content {
            padding: 10px;
            overflow-y: auto;
            display: flex;
            flex-direction: column-reverse;
        }

        .console-content p {
            margin: 0;
            white-space: nowrap;
        }

        .console-content .prompt {
            color: var(--accent-yellow);
            margin-right: 5px;
        }

        .console-content .command {
            color: var(--accent-blue);
        }

        .console-content .info {
            color: var(--accent-blue);
        }

        .console-content .success {
            color: var(--green-color);
        }

        .console-content .error {
            color: var(--red-color);
        }

        .console-cursor {
            animation: blink 1s step-start infinite;
            display: inline-block;
            width: 1ch;
            height: 1.2em;
            background-color: #E0E0E0;
            vertical-align: middle;
            margin-left: 2px;
        }

        .finder-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .finder-search-container {
            display: flex;
            align-items: center;
            background-color: var(--dark-bg);
            border-radius: 8px;
            padding: 5px 10px;
            border: 1px solid var(--border-color);
        }

        .finder-search-container i {
            margin-right: 10px;
            color: var(--text-tertiary);
        }

        .apple-search-bar {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1rem;
            padding: 0;
            flex-grow: 1;
            outline: none;
        }

        .finder-table-container {
            flex-grow: 1;
            overflow-y: auto;
            border: 1px solid var(--border-color);
            border-radius: 8px;
        }

        .finder-table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
        }

        .finder-table th,
        .finder-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
            font-size: 14px;
        }

        .finder-table th {
            cursor: pointer;
            background-color: var(--dark-bg);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .finder-table th:hover {
            background-color: var(--dark-bg-hover);
        }

        .finder-table th.sorted-asc::after {
            content: " ▲";
        }

        .finder-table th.sorted-desc::after {
            content: " ▼";
        }

        .finder-table td {
            cursor: pointer;
        }

        .finder-table tr:hover {
            background-color: var(--dark-bg-hover);
        }

        .finder-table .pair-info {
            display: flex;
            align-items: center;
        }

        .finder-table .pair-info img {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            margin-right: 8px;
        }

        .finder-table .gr-percent {
            font-weight: 700;
        }

        .finder-table .gr-percent.down {
            padding: 5px;
            border-radius: 4px;
        }

        /* [NEW] Custom Grid Resizer Gutters */
        .grid-gutter-v {
            width: 12px;
            cursor: col-resize;
            background: rgba(255, 255, 255, 0.05);
            /* More visible */
            z-index: 999;
            /* On top */
            margin-left: -6px;
            /* Left by Width/2 */
            transition: background 0.2s;
            position: relative;
            justify-self: start;
            /* Align left */
            height: 100%;
        }

        .grid-gutter-v:hover,
        .grid-gutter-v:active {
            background: #4ADE80;
            box-shadow: 0 0 15px rgba(74, 222, 128, 0.5);
        }

        .grid-gutter-h {
            height: 12px;
            cursor: row-resize;
            background: rgba(255, 255, 255, 0.05);
            z-index: 999;
            margin-top: -6px;
            /* Up by Height/2 */
            transition: background 0.2s;
            position: relative;
            align-self: start;
            /* Align up */
            width: 100%;
        }

        .grid-gutter-h:hover,
        .grid-gutter-h:active {
            background: #4ADE80;
            box-shadow: 0 0 15px rgba(74, 222, 128, 0.5);
        }

        /* Timeframe Selector & Favorites */
        .chart-header .timeframe-combobox {
            position: relative;
            margin-left: 10px;
            z-index: 101;
        }

        .timeframe-combobox-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: #ffffff;
            padding: 8px 14px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            display: flex;
            align-items: center;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            min-width: 100px;
            justify-content: space-between;
        }
        
        .timeframe-combobox-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-1px);
        }

        .timeframe-combobox-btn:after {
            content: '\f078';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            font-size: 10px;
            margin-left: 8px;
            color: var(--text-tertiary);
        }

        .timeframe-combobox-btn:hover,
        .timeframe-combobox-btn.active {
            background: var(--bg-hover);
            border-color: var(--text-secondary);
        }

        .timeframe-dropdown {
            position: absolute;
            top: calc(100% + 5px);
            left: 0;
            background-color: #1a1a1a;
            /* Solid background */
            border: 1px solid var(--border-color);
            border-radius: 6px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
            /* Stronger shadow */
            min-width: 160px;
            display: none;
            flex-direction: column;
            max-height: 350px;
            overflow-y: auto;
            z-index: 9999;
            /* Ensure on top */
            padding: 5px 0;
        }

        .timeframe-dropdown.visible {
            display: flex;
        }

        .timeframe-group {
            display: flex;
            flex-direction: column;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .timeframe-group:last-child {
            border-bottom: none;
        }

        .timeframe-group-title {
            padding: 8px 12px 4px;
            font-size: 10px;
            color: var(--text-tertiary);
            text-transform: uppercase;
            background: transparent;
            font-weight: 700;
            cursor: default;
            letter-spacing: 0.5px;
        }

        .timeframe-options {
            display: flex;
            flex-direction: column;
            padding-bottom: 4px;
        }

        .timeframe-option {
            padding: 8px 15px;
            display: flex;
            align-items: center;
            cursor: pointer;
            font-size: 13px;
            color: var(--text-secondary);
            background: none;
            border: none;
            width: 100%;
            text-align: left;
            transition: all 0.15s;
        }

        .timeframe-option:hover {
            background-color: var(--bg-hover);
            color: var(--text-primary);
        }

        .timeframe-option.active {
            color: var(--accent-color);
            background-color: rgba(33, 150, 243, 0.08);
        }

        .timeframe-option .fav-btn {
            padding: 4px;
            color: var(--text-secondary);
            cursor: pointer;
            margin-right: 8px;
            font-size: 14px;
            transition: color 0.1s;
        }

        .timeframe-option .fav-btn:hover,
        .timeframe-option .fav-btn.active {
            color: #FFC107;
        }

        .timeframe-option .checkmark {
            margin-left: auto;
            opacity: 0;
            font-size: 11px;
        }

        .timeframe-option.active .checkmark {
            opacity: 1;
        }


        /* Header Favorited Intervals */
        .favorited-intervals {
            display: flex;
            align-items: center;
            margin-left: 10px;
            gap: 5px;
        }

        .fav-interval-btn {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            padding: 3px 8px;
            border-radius: 4px;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .fav-interval-btn:hover {
            background: var(--hover-color);
            color: var(--text-primary);
            border-color: var(--text-secondary);
        }

        .fav-interval-btn.active {
            color: var(--accent-color);
            background: rgba(33, 150, 243, 0.1);
            border-color: var(--accent-color);
        }

        margin-top: 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        font-weight: 600;
        letter-spacing: 0.5px;
        }

        .time-group-label:first-child {
            border-top: none;
            margin-top: 0;
            padding-top: 4px;
        }

        /* Modern Select Box Styling */
        .settings-select {
            appearance: none;
            -webkit-appearance: none;
            width: 100%;
            background-color: var(--bg-input);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            padding: 10px 12px;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 16px;
            transition: all 0.2s;
        }

        .settings-select:hover {
            border-color: var(--text-secondary);
        }

        .settings-select:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
        }

        /* Sidebar Nav Item Active Styling */
        .nav-link.active {
            background: linear-gradient(90deg, rgba(33, 150, 243, 0.15) 0%, rgba(33, 150, 243, 0) 100%);
            color: var(--accent-color);
            border-left: 3px solid var(--accent-color);
        }

        .nav-link.active i {
            color: var(--accent-color);
        }

        /* Select Box Option Styling (For Dark/Light Theme Compatibility) */
        .settings-select option {
            background-color: var(--bg-card);
            color: var(--text-primary);
            padding: 8px;
        }

        /* Custom Chart Context Menu - Modernized */
        #chart-context-menu {
            position: absolute;
            z-index: 99999;
            background: var(--bg-secondary, #1e1e1e);
            /* Fallback to solid dark */
            border: 1px solid var(--border-color, #333);
            border-radius: 8px;
            /* Slightly more rounded */
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
            /* Deeper shadow */
            min-width: 220px;
            padding: 6px;
            display: none;
            font-family: 'Inter', sans-serif;
            opacity: 1;
            /* Ensure opacity */
        }

        #chart-context-menu ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        #chart-context-menu li {
            padding: 10px 12px;
            cursor: pointer;
            font-size: 13px;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 12px;
            border-radius: 6px;
            /* Rounded items */
            transition: all 0.1s ease;
        }

        #chart-context-menu li:hover {
            background-color: var(--accent-color);
            color: #ffffff;
        }

        #chart-context-menu li:hover i {
            color: #ffffff;
        }

        #chart-context-menu li i {
            width: 20px;
            text-align: center;
            color: var(--text-secondary);
            transition: color 0.1s;
        }

        #chart-context-menu li.separator {
            height: 1px;
            background: var(--border-color);
            margin: 6px 0;
            padding: 0;
            pointer-events: none;
        }

        /* Pane Resizer Styles */
        .pane-separator {
            position: absolute;
            left: 0;
            width: 100%;
            height: 6px;
            margin-top: -3px;
            cursor: row-resize;
            z-index: 900;
            /* Above charts */
            background: transparent;
            transition: background 0.2s;
        }

        .pane-separator:hover,
        .pane-separator.active {
            background: var(--accent-color);
        }

        /* Drawing Toolbar Styles */
        /* Drawing Toolbar Styles */
        .drawing-toolbar {
            position: absolute;
            top: 150px;
            left: 50px;
            width: 42px;
            background-color: #1e222d;
            border: 1px solid #2a2e39;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 8px 0;
            gap: 6px;
            z-index: 50;
            border-radius: 6px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
            cursor: default;
        }

        /* Floating Settings Toolbar for Selected Drawing */
        .drawing-settings-toolbar {
            position: absolute;
            background-color: #1e222d;
            border: 1px solid #2a2e39;
            border-radius: 6px;
            padding: 4px;
            display: flex;
            gap: 4px;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            pointer-events: auto;
            align-items: center;
        }

        .setting-btn {
            background: transparent;
            border: none;
            color: #b2b5be;
            width: 28px;
            height: 28px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: background 0.15s;
        }

        .setting-btn:hover {
            background: #2a2e39;
            color: #fff;
        }

        .setting-btn.delete-btn:hover {
            color: #ef5350;
            background: rgba(239, 83, 80, 0.1);
        }

        .color-picker-wrapper {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            overflow: hidden;
            border: 2px solid #363a45;
            cursor: pointer;
            position: relative;
        }

        .color-picker-input {
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            cursor: pointer;
            opacity: 0;
        }



        .header-icon-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: var(--text-secondary);
            width: 34px;
            height: 34px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 10px;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-size: 14px;
        }

        .header-icon-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
            transform: translateY(-1px);
        }

        .header-icon-btn:hover,
        .header-icon-btn.active {
            background: var(--bg-hover);
            color: var(--text-primary);
            border-color: var(--text-primary);
        }

        .draw-tool-btn {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            border: 1px solid transparent;
            background: transparent;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            font-size: 14px;
            flex-shrink: 0;
        }

        .draw-tool-btn:hover {
            background-color: var(--bg-hover);
            color: var(--text-primary);
        }

        .draw-tool-btn.active {
            color: var(--accent-color);
            background-color: rgba(33, 150, 243, 0.1);
        }

        .draw-tool-btn.delete-btn:hover {
            color: var(--accent-red);
            background-color: rgba(239, 68, 68, 0.1);
        }

        .toolbar-separator {
            width: 20px;
            height: 1px;
            background-color: var(--border-color);
            margin: 4px 0;
        }

        .main-chart-content {
            display: flex;
            flex-direction: column;
            width: 100%;
            height: 100%;
            position: relative;
        }

        .chart-container-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            width: 100%;
            overflow: hidden;
            position: relative;
        }

        .chart-content {
            flex: 1;
            /* Take remaining space after header */
            position: relative;
            width: 100%;
            overflow: hidden;
            background-color: var(--content-bg);
        }

        .chartCanvas,
        .drawingCanvas,
        .crosshairCanvas {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            /* JS will resize logical size, CSS controls display size */
            height: 100%;
        }

        .chartCanvas {
            z-index: 1;
        }

        .drawingCanvas {
            z-index: 2;
            pointer-events: none;
        }

        .crosshairCanvas {
            z-index: 3;
            pointer-events: none;
        }

        .priceScaleCanvas {
            position: absolute;
            top: 0;
            height: 100%;
            z-index: 4;
            cursor: ns-resize;
            touch-action: none !important;
        }

        .timeScaleCanvas {
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 30px;
            z-index: 4;
            cursor: ew-resize;
            touch-action: none !important;
        }

        /* Pair Selector Styles */
        /* Pair Selector Modern Styles */
        .pair-selector-content {
            width: min(1200px, 96vw);
            height: 600px;
            max-width: 96vw;
            max-height: 85vh;
            border-radius: 12px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            background-color: var(--dark-bg);
        }

        @media (max-width: 768px) {
            .pair-selector-content {
                width: 100% !important;
                height: 100% !important;
                max-width: 100% !important;
                max-height: 100% !important;
                border-radius: 0;
            }
        }

        .pair-selector-nav {
            display: none;
            /* Hide old top nav */
        }

        .pair-selector-header {
            background-color: transparent;
        }

        .pairs-list-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 24px;
            border-bottom: 1px solid var(--border-color);
            cursor: pointer;
            transition: background 0.2s;
        }

        .pairs-list-item:hover {
            background-color: rgba(255, 255, 255, 0.03);
        }

        .pairs-list-item.active {
            background-color: rgba(14, 203, 129, 0.05);
        }

        .pair-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .pair-left img {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background-color: #2a2e39;
        }

        .pair-symbol {
            font-weight: 500;
            color: var(--text-primary);
            font-size: 14px;
        }

        .pair-right {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .pair-exchange {
            font-size: 12px;
            color: var(--text-tertiary);
            background: rgba(255, 255, 255, 0.05);
            padding: 2px 8px;
            border-radius: 4px;
        }

        .pair-fav-btn {
            background: none;
            border: none;
            color: var(--text-tertiary);
            cursor: pointer;
            font-size: 16px;
            padding: 5px;
            transition: all 0.2s;
        }

        .pair-fav-btn:hover {
            color: #FFC107;
            transform: scale(1.11);
        }

        .pair-fav-btn.active {
            color: #FFC107;
        }

        /* Market Status Indicator */
        @keyframes market-pulse {
            0% {
                transform: scale(0.95);
                box-shadow: 0 0 0 0 rgba(246, 70, 93, 0.7);
            }

            70% {
                transform: scale(1);
                box-shadow: 0 0 0 6px rgba(246, 70, 93, 0);
            }

            100% {
                transform: scale(0.95);
                box-shadow: 0 0 0 0 rgba(246, 70, 93, 0);
            }
        }

        .market-closed-indicator {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 10px;
            color: var(--red-color);
            background: rgba(246, 70, 93, 0.1);
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: 600;
            margin-left: 8px;
        }

        /* Fixed: Missing CSS for Market Status Badge */
        .market-status-badge {
            font-size: 10px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 4px;
            text-transform: uppercase;
            display: inline-block;
            margin-left: 8px;
            border: 1px solid currentColor;
        }

        .market-status-badge.closed {
            color: #ef5350;
            background: rgba(239, 83, 80, 0.1);
            border-color: rgba(239, 83, 80, 0.3);
        }

        .market-status-badge-header {
            margin-left: 10px;
            font-size: 11px;
            padding: 3px 8px;
        }

        .market-closed-dot {
            width: 6px;
            height: 6px;
            background-color: var(--red-color);
            border-radius: 50%;
            animation: market-pulse 2s infinite;
        }

        .pair-selector-subfilter {
            display: flex;
            padding: 8px 16px;
            gap: 8px;
            border-bottom: 1px solid var(--border-color);
            background-color: var(--content-bg);
        }

        .pair-filter-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid transparent;
            border-radius: 4px;
            padding: 4px 10px;
            color: var(--text-secondary);
            font-size: 12px;
            cursor: pointer;
        }

        .pair-filter-btn.active {
            background: rgba(14, 203, 129, 0.2);
            color: var(--green-color);
            border-color: var(--green-color);
        }

        /* Chart Layout Updates for Dynamic Panels */
        .chart-wrapper {
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
        }

        .chart-container-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
            /* Important for flex nesting */
            overflow: hidden;
        }

        .chart-content {
            flex: 1;
            position: relative;
            min-height: 0;
            overflow: hidden;
        }

        .chart-panels-container {
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            background: var(--content-bg);
            border-top: 1px solid var(--border-color);
        }

        .indicator-pane {
            display: flex;
            flex-direction: column;
            position: relative;
            background: var(--content-bg);
            /* border-bottom: 1px solid var(--border-color); */
        }

        .pane-header {
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-secondary);
            background: rgba(255, 255, 255, 0.02);
            user-select: none;
        }

        .pane-content {
            flex: 1;
            position: relative;
            min-height: 0;
        }

        .panelCanvas {
            position: absolute;
            top: 0;
            left: 0;
            pointer-events: none;
        }

        .pane-separator {
            height: 4px;
            background: transparent;
            cursor: row-resize;
            transition: background 0.2s;
            z-index: 10;
        }

        .pane-separator:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        /* Settings Select Dark Theme Fix */
        .settings-select {
            width: 100%;
            background-color: #2a2e39;
            color: #e1e3eb;
            border: 1px solid #434651;
            padding: 8px;
            border-radius: 4px;
            outline: none;
        }

        .theme-light .settings-select {
            background-color: #ffffff;
            color: #333;
            border-color: #ccc;
        }

        .settings-select option {
            background-color: #2a2e39;
            color: #e1e3eb;
        }

        .theme-light .settings-select option {
            background-color: #ffffff;
            color: #333;
        }

        /* Updates Page Styles */
        .updates-container {
            max-width: 860px;
            margin: 40px auto;
            padding: 0 20px 60px 20px;
            font-family: 'Inter', sans-serif;
            animation: fade-in-up 0.5s ease;
        }

        .page-title-large {
            font-size: 32px;
            font-weight: 800;
            margin-bottom: 8px;
            background: linear-gradient(90deg, #fff, #aeb2b8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .page-subtitle {
            font-size: 15px;
            color: var(--text-tertiary);
            margin-bottom: 40px;
        }

        .update-card {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--border-color);
            border-radius: 18px;
            padding: 28px;
            margin-bottom: 24px;
            position: relative;
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
        }

        .update-card--featured {
            border-color: rgba(255, 255, 255, 0.1);
            background: linear-gradient(168deg, #1a1a1d 0%, #0e0e10 50%, #060607 100%);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
            padding-top: 36px;
        }

        .update-latest-badge {
            position: absolute;
            top: 14px;
            right: 16px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.4px;
            text-transform: uppercase;
            color: #d4d4d8;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 5px 11px;
            border-radius: 999px;
        }

        .update-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
            border-color: rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.03);
        }

        .update-card--featured:hover {
            border-color: rgba(255, 255, 255, 0.14);
            background: linear-gradient(168deg, #222225 0%, #101012 50%, #080809 100%);
        }

        .update-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .update-version {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .version-tag {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.08);
            padding: 4px 10px;
            border-radius: 8px;
            font-family: 'JetBrains Mono', monospace;
        }

        .update-date {
            font-size: 13px;
            color: var(--text-tertiary);
        }

        .update-read-time {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 600;
            color: var(--primary-color);
            background: rgba(61, 145, 255, 0.12);
            padding: 4px 10px;
            border-radius: 999px;
        }

        .update-card--empty {
            text-align: center;
            padding: 48px 24px;
        }

        .update-empty-text {
            color: var(--text-tertiary);
            margin: 0;
        }

        .update-body ul {
            margin: 12px 0 0 18px;
            padding: 0;
        }

        .update-body li {
            margin-bottom: 8px;
            color: var(--text-secondary);
            line-height: 1.6;
        }

        .update-body p {
            color: var(--text-secondary);
            line-height: 1.7;
            margin: 0 0 12px;
        }

        .update-status-tag {
            font-size: 11px;
            font-weight: 600;
            padding: 4px 12px;
            border-radius: 20px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .update-status-tag.feature {
            background: rgba(38, 166, 154, 0.1);
            color: #26a69a;
            border: 1px solid rgba(38, 166, 154, 0.25);
        }

        .update-status-tag.fix {
            background: rgba(239, 83, 80, 0.1);
            color: #ef5350;
            border: 1px solid rgba(239, 83, 80, 0.25);
        }

        .update-status-tag.improvement {
            background: rgba(66, 165, 245, 0.1);
            color: #42a5f5;
            border: 1px solid rgba(66, 165, 245, 0.25);
        }

        .update-title {
            font-size: 20px;
            color: var(--text-primary);
            margin: 0 0 12px 0;
            font-weight: 600;
            letter-spacing: -0.3px;
        }

        .update-body {
            color: var(--text-secondary);
            font-size: 15px;
            line-height: 1.6;
        }

        .update-body ul {
            margin: 10px 0 0 20px;
            padding: 0;
        }

        .update-body li {
            margin-bottom: 6px;
            color: var(--text-secondary);
        }

        .update-lead {
            font-size: 17px;
            line-height: 1.75;
            color: var(--text-primary);
            margin: 0 0 22px;
            font-weight: 500;
        }

        .update-highlights {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 12px;
            margin-bottom: 26px;
        }

        .update-highlight {
            display: flex;
            gap: 12px;
            align-items: flex-start;
            padding: 14px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
        }

        .update-highlight__icon {
            flex-shrink: 0;
            width: 34px;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.06);
            color: #d4d4d8;
            font-size: 14px;
        }

        .update-highlight strong {
            display: block;
            color: var(--text-primary);
            font-size: 14px;
            margin-bottom: 4px;
        }

        .update-highlight span {
            display: block;
            color: var(--text-secondary);
            font-size: 13px;
            line-height: 1.5;
        }

        .update-sections {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .update-section {
            padding-top: 18px;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
        }

        .update-section__title {
            margin: 0 0 12px;
            font-size: 15px;
            font-weight: 700;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .update-section__title i {
            color: #a1a1aa;
            font-size: 14px;
        }

        .update-checklist {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .update-checklist li {
            position: relative;
            padding-left: 22px;
            margin-bottom: 10px;
            line-height: 1.65;
            color: var(--text-secondary);
        }

        .update-checklist li::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0.55em;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #71717a;
            box-shadow: 0 0 0 3px rgba(113, 113, 122, 0.15);
        }

        .update-footnote {
            margin: 22px 0 0;
            padding: 12px 14px;
            border-radius: 10px;
            font-size: 13px;
            color: var(--text-tertiary);
            background: rgba(255, 255, 255, 0.02);
            border: 1px dashed rgba(255, 255, 255, 0.08);
        }

        .update-footnote i {
            margin-right: 6px;
            color: #a1a1aa;
        }

        @keyframes fade-in-up {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Features Page Styles - Accordion Layout */
        .features-container {
            padding: 30px;
            max-width: 900px;
            /* Narrower for better list view */
            margin: 0 auto;
            animation: fade-in-up 0.6s ease;
        }

        .features-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .features-title {
            font-size: 2.2rem;
            background: linear-gradient(135deg, #fff 0%, #aeb2b8 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 8px;
            font-weight: 800;
        }

        .features-subtitle {
            color: var(--text-tertiary);
            font-size: 1rem;
        }

        .feature-accordion {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .feature-item {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            overflow: hidden;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
        }

        .feature-item.active {
            background: rgba(255, 255, 255, 0.06);
            border-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        }

        .feature-header {
            padding: 18px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            width: 100%;
            background: transparent;
            border: none;
            outline: none;
            color: var(--text-primary);
            transition: background 0.2s;
        }

        .feature-header:hover {
            background: rgba(255, 255, 255, 0.02);
        }

        .feature-title-wrapper {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .feature-icon-wrapper {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            background: rgba(33, 150, 243, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: var(--accent-color);
            flex-shrink: 0;
        }

        .feature-item h3 {
            font-size: 1.1rem;
            margin: 0;
            font-weight: 600;
            color: var(--text-primary);
        }

        .feature-chevron {
            color: var(--text-tertiary);
            transition: transform 0.3s ease;
        }

        .feature-item.active .feature-chevron {
            transform: rotate(180deg);
            color: var(--text-primary);
        }

        .feature-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease-out, opacity 0.3s ease;
            opacity: 0;
            background: rgba(0, 0, 0, 0.1);
            /* Subtle darkening for content */
        }

        .feature-item.active .feature-content {
            max-height: 500px;
            /* Arbitrary large number */
            opacity: 1;
            /* Padding handled inside content-inner to avoid jumpiness */
        }

        .feature-content-inner {
            padding: 20px 24px 24px 80px;
            /* Indent text to align with title */
        }

        /* Mobile tweaks */
        @media (max-width: 600px) {
            .feature-content-inner {
                padding: 16px 20px;
            }
        }

        .feature-tag {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-left: 10px;
            vertical-align: middle;
        }

        .tag-basic {
            background: rgba(158, 158, 158, 0.1);
            color: #9e9e9e;
        }

        .tag-advanced {
            background: rgba(33, 150, 243, 0.1);
            color: #2196f3;
        }

        .tag-pro {
            background: rgba(255, 193, 7, 0.1);
            color: #ffc107;
        }

        .tag-ai {
            background: rgba(105, 240, 174, 0.1);
            color: #69f0ae;
        }
 
    
    