.trade-history {
            position: fixed;
            top: 50px;
            left: 75%;
            width: 300px;
            height: calc(100% - 50px);
            background-color: #0e131a;
            color: white;
            padding: 0 20px 15px 20px;
            overflow-y: auto;
            border-left: 1px solid #1f242b;
            scrollbar-width: none;
            scroll-behavior: smooth;
        }

        /* Hide scrollbar normally */
        .trade-history::-webkit-scrollbar {
            width: 0;
            background: transparent;
        }

        /* Show scrollbar only on hover */
        .trade-history:hover {
            scrollbar-width: thin;
            scrollbar-color: #3f5069 #0e131a;
        }

        .trade-history:hover::-webkit-scrollbar {
            width: 10px;
        }

        .trade-history:hover::-webkit-scrollbar-track {
            background: #0e131a;
            border-left: 1px solid #1f242b;
        }

        .trade-history:hover::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #238636, #2ea043);
            border-radius: 10px;
            box-shadow: 0 0 4px rgba(46, 160, 67, 0.6);
        }

        .trade-history:hover::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #2ea043, #3fb950);
            box-shadow: 0 0 6px rgba(63, 185, 80, 0.8);
        }

        /* Title stays visible */
        .trade-history h2 {
            font-size: 18px;
            color: #c9d1d9;
            border-bottom: 1px solid #30363d;
            padding: 10px 0;
            margin-bottom: 10px;
            background-color: #0e131a;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        /* Enhanced Trade item styling */
        .trade-item {
            background-color: #161b22;
            border: 1px solid #21262d;
            border-radius: 8px;
            padding: 12px 14px;
            margin: 10px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            transition: all 0.2s ease-in-out;
            cursor: pointer;
            position: relative;
        }

        .trade-item:hover {
            background-color: #1c2128;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .trade-item.expanded {
            margin-bottom: 0;
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
            border-bottom: none;
        }

        /* Left and right sections are vertically aligned */
        .trade-left, .trade-right {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        /* Left side aligns to start, right side aligns to end */
        .trade-left {
            align-items: flex-start;
            text-align: left;
        }

        .trade-right {
            align-items: flex-end;
            text-align: right;
        }

        /* Text spacing and visual balance */
        .trade-pair {
            font-weight: 600;
            color: #f0f6fc;
            font-size: 14px;
            margin-bottom: 2px;
        }

        .trade-percent {
            font-size: 12px;
            color: #00c853;
            margin-left: 4px;
        }

        .trade-amount {
            color: #9da5b4;
            font-size: 13px;
        }

        /* Profit/Loss visually aligned */
        .trade-profit {
            color: #00e676;
            font-weight: 600;
            font-size: 14px;
        }

        .trade-loss {
            color: #ff5252;
            font-weight: 600;
            font-size: 14px;
        }

        .trade-time {
            font-size: 12px;
            color: #8b949e;
            margin-top: 2px;
        }

        .trade-history ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .trade-history {
            display: flex;
            flex-direction: column;
            align-items: stretch;
        }

        /* Tabs styling */
        .tabs {
            display: flex;
            border-bottom: 1px solid #30363d;
            margin-bottom: 10px;
        }

        .tab-button {
            flex: 1;
            background: none;
            border: none;
            color: #8b949e;
            padding: 10px 0;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
            position: relative;
        }

        .tab-button.active {
            color: #00e676;
            border-bottom: 2px solid #00e676;
        }

        .tab-button:hover:not(.active) {
            color: #c9d1d9;
            background-color: #161b22;
        }

        .tab-content {
            display: none;
            height: calc(100% - 60px);
            overflow-y: auto;
        }

        .tab-content.active {
            display: block;
        }

        /* Opened trade specific styling */
        .trade-countdown {
            font-size: 11px;
            color: #ffa500;
            margin-top: 2px;
            font-weight: 600;
        }

        .trade-status {
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 4px;
            margin-top: 2px;
        }

        .status-open {
            background-color: rgba(255, 165, 0, 0.2);
            color: #ffa500;
        }

        .status-closed {
            background-color: rgba(128, 128, 128, 0.2);
            color: #808080;
        }

        /* Adjust scrollable area for tabs */
        .trade-history .tab-content::-webkit-scrollbar {
            width: 0;
            background: transparent;
        }

        .trade-history .tab-content:hover::-webkit-scrollbar {
            width: 10px;
        }

        .trade-history .tab-content:hover::-webkit-scrollbar-track {
            background: #0e131a;
        }

        .trade-history .tab-content:hover::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #238636, #2ea043);
            border-radius: 10px;
        }

        /* Enhanced countdown styling */
        .trade-countdown {
            font-size: 12px;
            font-weight: 600;
            margin-top: 2px;
            font-family: 'Courier New', monospace;
            transition: color 0.3s ease;
        }

        /* Status badges */
        .status-open {
            background-color: rgba(255, 165, 0, 0.2);
            color: #ffa500;
            border: 1px solid #ffa500;
        }

        .status-win {
            background-color: rgba(0, 230, 118, 0.2);
            color: #00e676;
            border: 1px solid #00e676;
        }

        .status-loss {
            background-color: rgba(255, 82, 82, 0.2);
            color: #ff5252;
            border: 1px solid #ff5252;
        }

        /* Trade item animations */
        .trade-item.removing {
            opacity: 0;
            transform: translateX(-100%);
            transition: all 0.3s ease;
        }

        /* No trades message */
        .no-trades {
            text-align: center;
            color: #8b949e;
            font-style: italic;
            padding: 20px;
            font-size: 14px;
        }

        /* Balance animation for deductions */
        .balance-deduction {
            animation: balancePulse 0.6s ease;
        }

        @keyframes balancePulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        /* Trade details panel */
        .trade-details {
            background-color: #1c2128;
            border: 1px solid #21262d;
            border-top: none;
            border-radius: 0 0 8px 8px;
            padding: 12px 14px;
            margin-top: 0;
            margin-bottom: 10px;
            display: none;
            animation: slideDown 0.3s ease-out;
        }

        .trade-details.active {
            display: block;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .details-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 13px;
        }

        .details-label {
            color: #8b949e;
        }

        .details-value {
            color: #c9d1d9;
            font-weight: 500;
        }

        .details-divider {
            height: 1px;
            background-color: #30363d;
            margin: 10px 0;
        }
