body {
    margin: 0;
    padding: 0;
    background-color: #1e222d;
    color: white;
    height: var(--vh);
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
}

.price-display {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #f0f0f0;
}

.atr-container {
    margin-left: auto;
}

.chart-placeholder {
    height: 200px;
    background-color: #3a3f4b;
    margin-bottom: 15px;
    border-radius: 4px;
    position: relative;
}

.time-markers {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #8a8f9d;
    margin-bottom: 15px;
}

.order-form {
    display: none;
    background-color: #3a3f4b;
    padding: 15px;
    border-radius: 8px;
    margin-top: 2px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center;
}

.form-label {
    color: #8a8f9d;
    font-size: 14px;
}

.form-input {
    background-color: #2a2e39;
    border: 1px solid #4a4f5b;
    color: white;
    padding: 8px;
    border-radius: 4px;
    width: 100px;
    text-align: right;
}

.direction-buttons {
    display: flex;
    margin-bottom: 15px;
}

.buy-btn,
.sell-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.buy-btn {
    background-color: #0ecb81;
    color: white;
    margin-right: 5px;
}

.orderType-btn {
    background-color: #3540e3;
    color: white;
    margin-left: 5px;
}

.sell-btn {
    background-color: #f6465d;
    color: white;
    margin-left: 5px;
}

.buy-btn:hover {
    background-color: #0dbd77;
}

.sell-btn:hover {
    background-color: #e53c54;
}

.tp-sl-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #8a8f9d;
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-left: 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4a4f5b;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #0ecb81;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #f6465d;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #e53c54;
}


/* Interval Selector Styles */
.interval-selector select {
    background-color: #2a3042;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
}

.interval-selector select:focus {
    outline: none;
}

/* Candlestick chart specific styles */
.price-chart-container {
    position: relative;
    /*height: 300px;
    margin-bottom: 15px;*/
}

/* Tooltip styling */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    color: white;
    padding: 8px;
    pointer-events: none;
}

.header {
    display: content !important;
    /*justify-content: space-between;*/
    align-items: center;
    margin-bottom: 0px;
}

.pair-selector {
    font-weight: bold;
    font-size: 18px;
}

.timeframe {
    background-color: #2a3042;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
}

#chart {
    width: 101% !important;

}

.chart-container {
    flex: 1 1 auto;
    position: relative;
    height: 60vh;
    /* On mobile for duckduckgo */
}

/*
@supports (-moz-appearance:none) {
    .chart-container {
        height: 65vh;  
    }
}*/

@media (min-width: 1024px) {

    /* on pc with firefox */
    .chart-container {
        height: 48vh !important;
    }
}

.time-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}

.promo-banner {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: bold;
}

.price-info {
    margin-bottom: 2px;
}

.current-price {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.price {
    font-size: 24px;
    font-weight: bold;
    margin-right: 10px;
}

.change {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 16px;
}

.change.positive {
    background-color: #10b981;
    color: white;
}

.change.negative {
    background-color: #ef4444;
    color: white;
}

.price-range {
    display: flex;
    font-size: 14px;
}

.low {
    color: #ef4444;
    margin-right: 15px;
}

.high {
    color: #10b981;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.button {
    flex: 1;
    padding: 5px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.sell-btn {
    background-color: #ef4444;
    color: white;
}

.advice-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 30px;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e2e8f0;
}

.orderTypeBtn {
    background-color: #2a3042;
    color: white;
}

.buy-btn {
    background-color: #10b981;
    color: white;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    padding-bottom: 70px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    flex-shrink: 0;
    display: flex;
    background-color: #2a2e39;
    border-top: 1px solid #3a3f4b;
    width: 100%;
    margin-bottom: 0;
}

.nav-item {
    flex: 1;
    text-align: center;
    color: #8a8f9d;
    text-decoration: none;
    font-size: 14px;
}

.nav-item.active {
    color: #0ecb81;
    border-top: 2px solid #0ecb81;
}

.nav-item i {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.position-tabs {
    display: flex;
    border-bottom: 1px solid #3a3f4b;
}

.position-tab {
    padding: 12px 0;
    flex: 1;
    text-align: center;
    color: #8a8f9d;
}

.position-tab.active {
    color: white;
    border-bottom: 2px solid #0ecb81;
}




.position-item {
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    margin-bottom: 10px;
    /* Add spacing between items */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;

}

/* Flexbox layout for content inside each position item */
.position-content {
    display: flex;
    justify-content: space-between;
    /* Space between details and actions */
    align-items: flex-start;
    /* Align items at the top */
    flex-wrap: wrap;
    /* Allow wrapping if necessary */
}

/* Details section (left side) */
.position-details {
    flex: 1;
    /* Take up available space */
    min-width: 0;
    /* Prevent overflow */
    margin-right: 10px;
    /* Add spacing between details and actions */
    word-wrap: break-word;
    /* Allow wrapping of long text */
}

.instrument {
    font-weight: bold;
    margin-bottom: 5px;
}

.position-meta {
    display: block;
    /* Allow wrapping to the next line */
    font-size: 0.9em;
    /* Slightly smaller font for meta details */
    color: #666;
}

/* Actions section (right side) */
.position-actions {
    flex-shrink: 0;
    /* Prevent shrinking of the close button */
}

/* Direction indicator styling */
.direction-indicator {
    font-weight: bold;
    margin-right: 5px;
}

.direction-indicator.bullish {
    color: green;
}

.direction-indicator.bearish {
    color: red;
}





.profit {
    color: #0ecb81;
}

.loss {
    color: #f6465d;
}





/* Button styling */
.btn {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-close {
    background-color: #ff4d4d;
    color: white;
    font-size: 0.9em;
    /* Reduce font size */
    padding: 5px 8px;
    /* Reduce padding */
    width: auto;
    /* Ensure the button width is minimal */
}

.btn-close:hover {
    background-color: #e60000;
}

.btn-edit {
    background-color: #3a3f4b;
    color: white;
}


.trades-container,
.journal-container,
.wallet-container,
.news-container,
.walloffame-container,
.account-container {
    align-self: center;
    display: none;
    width: 95%;
    padding: 20px;
    background-color: #2a2e39;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.market-container,
.trades-container,
.news-container,
.wallet-container,
.walloffame-container,
.account-container {
    height: calc(100vh - 70px); /* Adjust height to account for navbar */
    overflow-y: auto;
}

.news-header,
.account-header,
.wallet-header,
.trades-header {
    text-align: center;
    margin-bottom: 30px;
}

.wallet-balance {
    font-size: 36px;
    font-weight: bold;
    margin: 10px 0;
}

.wallet-label {
    color: #8a8f9d;
    font-size: 14px;
}

.wallet-details {
    background-color: #2a2e39;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.balances-grid {
    background-color: #2a2e39;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #3a3f4b;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #8a8f9d;
}

.detail-value {
    font-weight: bold;
}



.operations {
    text-align: center;
}

.bonus-btn {
    background-color: #0ecb81;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}



.no-positions {
    padding: 20px;
    text-align: center;
    color: #8a8f9d;
}



.refresh-btn {
    background: #2a2e39;
    border: none;
    color: #8a8f9d;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.refresh-btn:hover {
    color: #0ecb81;
}

.refresh-icon {
    transition: transform 0.3s;
}

.refresh-btn:hover .refresh-icon {
    transform: rotate(180deg);
}

.loading-indicator {
    color: #8a8f9d;
    font-size: 14px;
}

#trades-container {
    min-height: 300px;
    position: relative;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.refreshing .refresh-icon {
    animation: spin 0.1s linear infinite;
}

/* Add to your existing CSS */


.position-meta span {
    display: inline-block;
    margin-right: 10px;
}

.current-price-value {
    font-weight: bold;
    transition: color 0.3s ease;
}

.price-up {
    color: #0ecb81;
    animation: pulseGreen 0.5s;
}

.price-down {
    color: #f6465d;
    animation: pulseRed 0.5s;
}

@keyframes pulseGreen {
    0% {
        color: #0ecb81;
    }

    50% {
        color: #ffffff;
    }

    100% {
        color: #0ecb81;
    }
}

@keyframes pulseRed {
    0% {
        color: #f6465d;
    }

    50% {
        color: #ffffff;
    }

    100% {
        color: #f6465d;
    }
}

.notification-banner {
    position: fixed;
    top: 10px;
    left: 0px;
    right: 0px;
    height: 40px;
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    overflow: hidden;
    display: none;
    align-items: center;
    transition: opacity 0.3s ease;
}

.notification-banner.show {
    display: flex;
    opacity: 1;
}

.notification-banner:not(.show) {
    opacity: 0;
}

.notification-scroll-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.notification-message {
    display: inline-block;
    padding-left: 100%;
    animation: scrollText 15s linear infinite;
    font-size: 14px;
    line-height: 1.4;
}

/* Pause animation on hover */
.notification-banner:hover .notification-message {
    animation-play-state: paused;
}

/* Color classes */
.notification-banner-success {
    background-color: #0f5132;
    border-color: #0ecb81;
}

.notification-banner-error {
    background-color: #842029;
    border-color: #f6465d;
    color: #FFF;
}

.notification-banner-warning {
    background-color: #664d03;
    border-color: #f0b90b;
    color: #FFF;
}

.notification-banner-info {
    background-color: #055160;
    border-color: #2e5bff;
}

/* Scrolling animation */
@keyframes scrollText {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* For very long messages, adjust animation duration */
.notification-message[data-length="long"] {
    animation-duration: 25s;
}

.notification-message[data-length="very-long"] {
    animation-duration: 35s;
}

.error-message {
    color: #f6465d;
    font-size: 14px;
    margin-top: 5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}






.wallet-balance {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}



.detail-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.detail-label {
    font-weight: bold;
}



.profit {
    color: #0ecb81;
}

.loss {
    color: #f6465d;
}


.balances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.balance-card {
    background-color: #2a2e39;
    padding: 15px;
    border-radius: 8px;
}

.balance-currency {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.balance-amount {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.balance-value {
    color: #666;
    margin-bottom: 10px;
}

.balance-details {
    font-size: 0.9rem;

    display: flex;
    justify-content: space-between;
}

.reset-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    margin-top: 20px;
}


.account-section {
    background-color: #2a2e39;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    padding: 10px 15px;
    background-color: #2e5bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-danger {
    background-color: #f6465d;
}

.account-info {
    margin-bottom: 15px;
}

.account-info strong {
    display: inline-block;
    width: 150px;
}

.input-with-toggle {
    position: relative;
}

.input-with-toggle input {
    padding-right: 40px;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
}

.account-mode-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}


.mode-option {
    padding: 20px;
    border-radius: 8px;

    background: #2a2e39;
    border: 2px solid #ddd;
}

.mode-option.active {
    border-color: #0ecb81;
    background: #2a2e39;
}

.mode-option h3 {
    margin-top: 0;
    color: #ddd;
}

.live-status {
    color: #0ecb81;
    font-weight: bold;
}

.pre {
    white-space: pre-wrap;
    /* Since CSS 2.1 */
    white-space: -moz-pre-wrap;
    /* Mozilla, since 1999 */
    white-space: -pre-wrap;
    /* Opera 4-6 */
    white-space: -o-pre-wrap;
    /* Opera 7 */
    word-wrap: break-word;
    /* Internet Explorer 5.5+ */
}

h1 {
    color: rgb(9, 127, 245)
}

h2 {
    color: rgb(115, 170, 224) !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 1.5em;
}

p {
    margin: 1em 0;
}

ul {
    padding-left: 20px;
    margin: 1em 0;
}

li {
    margin-bottom: 0.5em;
}

strong {
    color: rgb(4, 189, 250)
}

.timestamp {
    color: #777;
    font-size: 0.9em;
    margin-bottom: 1.5em;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    background-color: #f6465d;
    /* Red color for logout */
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.logout-button:hover {
    background-color: #d63031;
    /* Darker red on hover */
}

.logout-button:active {
    transform: scale(0.95);
    /* Slightly shrink the button on click */
}

.logout-button::before {
    content: '🚪';
    /* UTF-8 logout icon */
    margin-right: 8px;
    font-size: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #34495e !important;
    color: #ffffff;
}

tr:nth-child(even) {
    background-color: #3b3f4a;
}

tr:nth-child(odd) {
    background-color: #2e323d;
}

.positive {
    color: #0ecb81;
}

.negative {
    color: #f6465d;
}

.current-price-divider {
    border-top: 2px solid #0ecb81;
    margin: 16px 0;
    text-align: center;
    color: #0ecb81;
    font-weight: bold;
    padding: 8px 0;
    background: #f8f8f8;
}

.trades-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.trades-header-bar h2 {
    margin: 0 auto;
    font-size: 1.5rem;
    font-weight: bold;
    flex: 1;
    text-align: center;
}

.trades-header-bar .header-actions {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Support/Resistance Controls */
.sr-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    display: flex;
    gap: 5px;
}

.sr-controls button {
    background: rgba(30, 144, 255, 0.8) !important;
    border: none;
    border-radius: 4px;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sr-controls button:hover {
    background: rgba(30, 144, 255, 1) !important;
}

/* Chart tooltip enhancements for S/R lines */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 4px;
    color: white;
    padding: 8px;
    pointer-events: none;
    font-size: 12px;
}

/* Support/Resistance level labels */
.sr-level-label {
    position: absolute;
    background: rgba(30, 144, 255, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    pointer-events: none;
    z-index: 50;
}

/* Compact Interval Selector */
.compact-interval-selector {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.interval-display {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    cursor: pointer;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    min-width: 60px;
    transition: all 0.2s ease;
}

.interval-display:hover {
    background-color: #4a5568;
    border-color: #718096;
}

.current-interval {
    flex: 1;
}

.dropdown-arrow {
    font-size: 10px;
    color: #a0aec0;
    transition: transform 0.2s ease;
}

.interval-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1001;
    max-height: 200px;
    overflow-y: auto;
}

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

.interval-option {
    padding: 8px 12px;
    cursor: pointer;
    color: #e2e8f0;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #4a5568;
}

.interval-option:last-child {
    border-bottom: none;
}

.interval-option:hover {
    background-color: #4299e1;
    color: white;
}

.interval-option.active {
    background-color: #4299e1;
    color: white;
    font-weight: 600;
}

/* Compact Interval Button Styles */
.compact-interval-selector {
    display: flex;
    gap: 3px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.interval-btn {
    padding: 4px 8px;
    border: 1px solid #4a5568;
    border-radius: 4px;
    background-color: #2d3748;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
    line-height: 1.2;
}

.interval-btn:hover {
    background-color: #4a5568;
    border-color: #718096;
    transform: translateY(-1px);
}

.interval-btn.active {
    background-color: #4299e1;
    border-color: #4299e1;
    color: white;
    font-weight: 600;
}

.interval-btn:active {
    transform: translateY(0);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .main-content {
        padding-bottom: 60px; /* Slightly less padding on mobile if needed */
    }
    
    .bottom-nav {
        height: 60px; /* Consistent height */
    }
    
    .nav-item {
        padding: 3px 0; /* Adjust padding for fixed position */
    }

    .compact-interval-selector {
        gap: 2px;
        justify-content: flex-start;
    }

    .interval-btn {
        /*padding: 3px 12px;*/
        font-size: 10px;
        min-width: 28px;
        flex: 0 0 auto;
        /*margin-top: 5px;
            margin-bottom: 5px;*/
    }

    /* Hide when header is collapsed */
    .header.collapsed .compact-interval-selector {
        display: none !important;
    }
}

/* Desktop optimizations */
@media (min-width: 769px) {
    .compact-interval-selector {
        gap: 4px;
    }

    .interval-btn {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 36px;
    }
}

/* Compact alarm section */
.compact-alarm-section {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 30px;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e2e8f0;
}

.icon-btn:hover {
    background-color: #4a5568;
    border-color: #718096;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e53e3e;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alarms and Forex panels */
.alarms-panel,
.forex-alerts-panel {
    position: absolute;
    top: 70px;
    right: 15px;
    width: 300px;
    max-height: 400px;
    border: 1px solid #4a5568;
    border-radius: 6px;
    overflow: hidden;
    background-color: #2d3748;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.alarms-panel-header,
.forex-alerts-panel-header {
    cursor: pointer;
    font-weight: 600;
    padding: 12px;
    background-color: #4a5568;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e2e8f0;
}

.alarms-panel-close,
.forex-alerts-panel-close {
    cursor: pointer;
    font-size: 16px;
}

.active-alarms-list,
.forex-alerts-container {
    padding: 10px;
    max-height: 350px;
    overflow-y: auto;
    /*background-color: #2d3748;*/
}

/* Active alarms items */
.active-alarms-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background-color: #4a5568;
    border-radius: 4px;
    color: #e2e8f0;
    font-size: 14px;
}

.active-alarms-list button {
    background-color: #e53e3e;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.active-alarms-list button:hover {
    background-color: #c53030;
}

/* Header improvements */
.header {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background-color: #1a202c;
    border-bottom: 1px solid #4a5568;
    position: relative;



    transition: all 0.3s ease;
    /*overflow: hidden;
        max-height: 200px;
        opacity: 1;
        visibility: visible;*/
}

.header.collapsed {
    max-height: 50px;
    padding: 5px 10px;
    opacity: 0.9;
}

.header-toggle {
    /*display: none;*/
    position: absolute;
    top: 0px;
    right: 10px;
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    padding: 5px;
}

/* Show toggle button only on mobile */
@media (max-width: 768px) {
    .header-toggle {
        /*display: block;*/
    }

    .header.collapsed .pair-selector,
    .header.collapsed .interval-selector,
    .header.collapsed .compact-alarm-section,
    .header.collapsed .alarm-status {
        display: none !important;
    }

    .header.collapsed {
        /*max-height: 50px;*/
        min-height: 30px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0px;
        padding: 0px;

    }

    .interval-selector .radio-group {
        justify-content: flex-start;
        gap: 3px;
    }

    .radio-label {
        /*padding: 5px 5px;*/
        font-size: 8px;
        float: left;
        text-align: center;
        padding: 5px;
    }

    .compact-alarm-section {
        margin-left: 0;

        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .alarms-panel {
        position: fixed;
        /*top: 50%;*/
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        /*max-width: 350px;*/
        z-index: 1001;
    }
}

/* Fix panel overlap on mobile */
@media (max-width: 768px) {
    .forex-alerts-list {
        /*position: fixed !important;*/
        margin-top: 2vh !important;
        /*left: 50% !important;
            transform: translateX(-50%) !important;*/
        width: 100% !important;
        /*
             max-width: 350px !important;*/
        z-index: 1001 !important;
        max-height: 88vh !important;
    }
}

/* Pair selector improvements */
#pairSelect {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #4a5568;
    background-color: #2d3748;
    color: #e2e8f0;
    font-size: 14px;


}

#pairSelect:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

/* Alarm status */
.alarm-status {
    margin-left: 10px;
    font-size: 0.9em;
    color: #a0aec0;
}

/* Price info improvements */
.price-info {
    background-color: #2d3748;
    padding: 5px 5px;
    border-top: 1px solid #4a5568;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.current-price .price {
    font-size: 24px;
    font-weight: 600;
    color: #e2e8f0;
}

.price-range {
    font-size: 14px;
    color: #a0aec0;
}

/* Action buttons improvements */
.action-buttons {
    background-color: #2d3748;
    padding: 10px;
    border-top: 1px solid #4a5568;
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.sell-btn,
.buy-btn,
.orderType-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    max-width: 120px;
}

.sell-btn {
    background-color: #f56565;
    color: white;
}

.sell-btn:hover {
    background-color: #e53e3e;
    transform: translateY(-1px);
}

.buy-btn {
    background-color: #48bb78;
    color: white;
}

.buy-btn:hover {
    background-color: #38a169;
    transform: translateY(-1px);
}

.orderType-btn {
    background-color: #4299e1;
    color: white;
}

.orderType-btn:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
}

.forex-alerts-list {
    position: absolute;
    left: 0%;
    right: 0%;
    background: #1e2a3a;
    margin-top: 4em;
    z-index: 20;
    overflow-y: auto;
    max-height: 86vh;
}

/* CSS for the wallet */
/* GAGA Token Purchase Section Styles */
.token-purchase-form {
    background-color: #2a2e39;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #3a3f4b;
}

.token-purchase-form h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 1px solid #3a3f4b;
    padding-bottom: 10px;
}

.wallet-option {
    background-color: #2a2e39;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #3a3f4b;
}

.wallet-option h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.current-wallet {
    background: linear-gradient(135deg, #2a2e39 0%, #3a3f4b 100%) !important;
    border: 1px solid #4a4f5b;
    padding: 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
}

.current-wallet strong {
    color: #8a8f9d;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

#currentEthAddress {
    color: #0ecb81;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
    background-color: #1e222d;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #3a3f4b;
}

/* Form Elements for Token Purchase */
.token-purchase-form .form-group {
    margin-bottom: 20px;
}

.token-purchase-form label {
    display: block;
    margin-bottom: 8px;
    color: #8a8f9d;
    font-weight: 600;
    font-size: 0.9rem;
}

.token-purchase-form input,
.token-purchase-form select {
    width: 100%;
    padding: 12px;
    background-color: #1e222d;
    border: 1px solid #3a3f4b;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.token-purchase-form input:focus,
.token-purchase-form select:focus {
    outline: none;
    border-color: #0ecb81;
    box-shadow: 0 0 0 2px rgba(14, 203, 129, 0.2);
}

.token-purchase-form input::placeholder {
    color: #6b7280;
}

.token-purchase-form small {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

/* Price Calculation Box */
#priceCalculation {
    background: linear-gradient(135deg, #1e222d 0%, #2a2e39 100%) !important;
    border: 1px solid #3a3f4b !important;
    border-radius: 6px !important;
    padding: 15px !important;
    margin: 20px 0 !important;
}

#priceCalculation strong {
    color: #8a8f9d;
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

#priceDetails div {
    color: #fff;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

#priceDetails div:last-child {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #3a3f4b;
    font-weight: bold;
    color: #0ecb81;
}

/* Buttons */
#connectMetaMask,
#connectWalletConnect,
#saveManualAddress,
#purchaseBtn {
    background: linear-gradient(135deg, #0ecb81 0%, #0dbd77 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

#connectMetaMask:hover,
#connectWalletConnect:hover,
#saveManualAddress:hover,
#purchaseBtn:hover {
    background: linear-gradient(135deg, #0dbd77 0%, #0ca56c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 203, 129, 0.3);
}

#connectMetaMask:active,
#connectWalletConnect:active,
#saveManualAddress:active,
#purchaseBtn:active {
    transform: translateY(0);
}

/* Manual Address Input Group */
.wallet-option .form-group {
    /*display: flex;*/
    gap: 10px;
    align-items: flex-end;
}

.wallet-option .form-group input {
    flex: 1;
    margin-bottom: 0;
}

.wallet-option .form-group button {
    width: auto;
    min-width: 120px;
    margin-bottom: 0;
}

/* Transaction History */
.transaction-history {
    background-color: #2a2e39;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #3a3f4b;
}

.transaction-history h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid #3a3f4b;
    padding-bottom: 10px;
}

#transactionHistory {
    color: #8a8f9d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Token Balance Display */
#tokenBalance {
    color: #0ecb81;
    font-weight: bold;
    font-size: 1.1rem;
    background-color: #1e222d;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #3a3f4b;
    display: inline-block;
    margin-left: 10px;
}

/* Wallet Connection States */
.wallet-connected {
    border-color: #0ecb81 !important;
    background: linear-gradient(135deg, #2a2e39 0%, rgba(14, 203, 129, 0.1) 100%) !important;
}

.wallet-error {
    border-color: #f6465d !important;
    background: linear-gradient(135deg, #2a2e39 0%, rgba(246, 70, 93, 0.1) 100%) !important;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* Success States */
.success-message {
    color: #0ecb81;
    background-color: rgba(14, 203, 129, 0.1);
    border: 1px solid #0ecb81;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

/* Error States */
.error-message {
    color: #f6465d;
    background-color: rgba(246, 70, 93, 0.1);
    border: 1px solid #f6465d;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
    visibility: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wallet-option .form-group {
        flex-direction: column;
        gap: 10px;
    }

    .wallet-option .form-group button {
        width: 100%;
    }

    .token-purchase-form,
    .wallet-option,
    .current-wallet {
        padding: 15px;
    }

    #currentEthAddress {
        font-size: 0.8rem;
    }
}

/* MetaMask Button Specific Styles */
#connectMetaMask {
    background: linear-gradient(135deg, #f6851b 0%, #e2761b 100%);
}

#connectMetaMask:hover {
    background: linear-gradient(135deg, #e2761b 0%, #c86a17 100%);
    box-shadow: 0 4px 12px rgba(246, 133, 27, 0.3);
}

#connectWalletConnect {
    background: linear-gradient(135deg, #3b99fc 0%, #2e8bef 100%);
}

#connectWalletConnect:hover {
    background: linear-gradient(135deg, #2e8bef 0%, #1c7cd6 100%);
    box-shadow: 0 4px 12px rgba(59, 153, 252, 0.3);
}

/* Purchase Button States */
#purchaseBtn:disabled {
    background: #4a4f5b;
    color: #8a8f9d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#purchaseBtn:disabled:hover {
    background: #4a4f5b;
    transform: none;
    box-shadow: none;
}

/* Token Icon Placeholder */
.token-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #0ecb81 0%, #0dbd77 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-weight: bold;
    color: white;
    font-size: 12px;
}

/* Section Header Enhancement */
.account-section h2.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-section h2.section-title::before {
    content: '🪙';
    font-size: 1.2em;
}



/* Transaction History Items */
.transaction-item {
    background-color: #1e222d;
    border: 1px solid #3a3f4b;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-amount {
    color: #0ecb81;
    font-weight: bold;
    font-size: 1.1rem;
}

.transaction-date {
    color: #8a8f9d;
    font-size: 0.8rem;
}

.transaction-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-completed {
    background-color: rgba(14, 203, 129, 0.2);
    color: #0ecb81;
}

.status-pending {
    background-color: rgba(240, 185, 11, 0.2);
    color: #f0b90b;
}

.status-failed {
    background-color: rgba(246, 70, 93, 0.2);
    color: #f6465d;
}

/* AI Analysis Styles */
.ai-analysis-container {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid #3a3f4b;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3a3f4b;
}

.ai-analysis-header h3 {
    margin: 0;
    color: #0ecb81;
    font-size: 1.1rem;
    font-weight: 600;
}

.trading-pair-badge {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.analysis-section {
    margin-bottom: 15px;
    background: rgba(30, 34, 45, 0.5);
    border-radius: 6px;
    padding: 12px;
    border-left: 3px solid #3b82f6;
}

.analysis-section h4 {
    margin: 0 0 8px 0;
    color: #8a8f9d;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-content {
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.4;

}

.section-content ul {
    margin: 0;
    padding-left: 16px;
}

.section-content li {
    margin-bottom: 4px;
    color: #cbd5e0;
}

.risk-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 34, 45, 0.8);
    padding: 10px 12px;
    border-radius: 6px;
    margin: 15px 0;
    border: 1px solid #3a3f4b;
}

.risk-label {
    color: #8a8f9d;
    font-size: 0.85rem;
    font-weight: 600;
}

.risk-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-low {
    background: linear-gradient(135deg, #0ecb81, #10b981);
    color: white;
}

.risk-medium {
    background: linear-gradient(135deg, #f0b90b, #eab308);
    color: #1e222d;
}

.risk-high {
    background: linear-gradient(135deg, #f6465d, #ef4444);
    color: white;
}

.analysis-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #3a3f4b;
}

.analysis-footer small {
    color: #6b7280;
    font-size: 0.75rem;
}

/* AI Loading State */
.forex-ai-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    font-size: 0.85rem;
    padding: 10px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    margin: 10px 0;
}

.forex-ai-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #3b82f6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Close button for AI results */
.forex-ai-close-btn {
    background: #3a3f4b !important;
    color: #8a8f9d !important;
    border: 1px solid #4a4f5b !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.forex-ai-close-btn:hover {
    background: #4a4f5b !important;
    color: #cbd5e0 !important;
}

/* AskAI Button Styles */
.forex-ask-ai-btn {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6) !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-left: 8px !important;
}

.forex-ask-ai-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #2563eb) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.forex-ask-ai-btn:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ai-analysis-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .analysis-section {
        padding: 10px;
    }

    .risk-indicator {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Animation for new AI results */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-analysis-container {
    animation: fadeInUp 0.3s ease-out;
}

/* Trailing Stop Button */
.btn-trailing-stop {
    background: #f0b90b;
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 8px;
}

.btn-trailing-stop:hover {
    background: #d8a90a;
}

/* Trailing Stop Display */
.trailing-stop-display {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #3a3f4b;
}

.trailing-stop-display.active {
    background: #f0b90b;
    color: #000;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #2a2e39;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    border: 1px solid #3a3f4b;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #3a3f4b;
    display: flex;
    justify-content: between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    flex-grow: 1;
}

.close-modal {
    color: #8a8f9d;
    font-size: 24px;
    cursor: pointer;
}

.close-modal:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
}

.trade-info {
    background: #1a1e29;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
}

.trailing-stop-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.trailing-stop-form input {
    width: 100%;
    padding: 8px 12px;
    background: #1a1e29;
    border: 1px solid #3a3f4b;
    border-radius: 4px;
    color: white;
    margin-bottom: 10px;
}

.trailing-stop-info {
    background: #1a1e29;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 12px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-primary {
    background: #0ecb81;
    color: white;
}

.btn-secondary {
    background: #f6465d;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid #3a3f4b;
    color: #8a8f9d;
}

.trailing-stop-modal {
    position: relative;
    z-index: 1000;
    background: #2a2e39;
    border: 1px solid #3a3f4b;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin: 0;
    padding: 0;
}

.trailing-stop-form input:focus {
    outline: 2px solid #f0b90b;
    outline-offset: 2px;
    background: #1a1e29;
}

/* Prevent background interactions when modal is open */
body.modal-open {
    overflow: hidden;
}

body.modal-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    pointer-events: none;
}

/* Journal Styles */
.journal-container {
    align-self: center;
    display: none;
    width: 95%;
    padding: 20px;
    background-color: #2a2e39;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.journal-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.journal-header-bar h2 {
    margin: 0 auto;
    font-size: 1.5rem;
    font-weight: bold;
    flex: 1;
    text-align: center;
    color: #fff;
}

.journal-header-bar .header-actions {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Journal Tabs */
.journal-tabs {
    display: flex;
    border-bottom: 1px solid #3a3f4b;
    margin-bottom: 20px;
}

.journal-tab {
    padding: 12px 0;
    flex: 1;
    text-align: center;
    color: #8a8f9d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.journal-tab.active {
    color: #0ecb81;
    border-bottom: 2px solid #0ecb81;
}

.journal-tab:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Journal Entries */
.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.journal-entry {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid #3a3f4b;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.journal-entry:hover {
    border-color: #4a4f5b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

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

.entry-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    min-width: 200px;
}

.entry-date {
    color: #8a8f9d;
    font-size: 0.85rem;
    white-space: nowrap;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.trade-info {
    background: rgba(14, 203, 129, 0.1);
    color: #0ecb81;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(14, 203, 129, 0.3);
}

.entry-type {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.rating {
    background: rgba(240, 185, 11, 0.1);
    color: #f0b90b;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(240, 185, 11, 0.3);
}

.entry-content {
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: lowercase;
}

.emotion-tag {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.lesson-tag {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.entry-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #3a3f4b;
    padding-top: 15px;
}

.edit-journal-entry,
.delete-journal-entry {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-journal-entry {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.edit-journal-entry:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.delete-journal-entry {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.delete-journal-entry:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Strategy Notes */
.strategy-notes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.strategy-note {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid #3a3f4b;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.strategy-note:hover {
    border-color: #4a4f5b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

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

.note-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
}

.note-date {
    color: #8a8f9d;
    font-size: 0.85rem;
    white-space: nowrap;
}

.note-content {
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #3a3f4b;
    padding-top: 15px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #8a8f9d;
}

.empty-state h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Journal Modal */
.journal-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.journal-modal-content {
    background-color: #2a2e39;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #3a3f4b;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.journal-modal-header {
    padding: 20px;
    border-bottom: 1px solid #3a3f4b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
}

.journal-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
}

.journal-close {
    color: #8a8f9d;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.journal-close:hover {
    color: #fff;
}

.journal-modal-body {
    padding: 20px;
}

/* Journal Form */
.journal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #8a8f9d;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background-color: #1e222d;
    border: 1px solid #3a3f4b;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0ecb81;
    box-shadow: 0 0 0 2px rgba(14, 203, 129, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* Multiple Select Styles */
.form-group select[multiple] {
    height: 100px;
    padding: 8px;
}

.form-group select[multiple] option {
    padding: 6px 8px;
    background-color: #1e222d;
    color: #fff;
    border-bottom: 1px solid #3a3f4b;
}

.form-group select[multiple] option:hover {
    background-color: #0ecb81;
    color: #000;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #3a3f4b;
}

.btn-primary {
    background: linear-gradient(135deg, #0ecb81 0%, #0dbd77 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0dbd77 0%, #0ca56c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 203, 129, 0.3);
}

.btn-secondary {
    background: #3a3f4b;
    color: #fff;
    border: 1px solid #4a4f5b;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4a4f5b;
    transform: translateY(-1px);
}

/* Quick Journal Button */
.quick-journal-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.quick-journal-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .journal-container {
        width: 100%;
        padding: 15px;
        border-radius: 0;
    }
    
    .journal-header-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .journal-header-bar .header-actions {
        position: static;
        justify-content: center;
    }
    
    .journal-tabs {
        flex-wrap: wrap;
    }
    
    .journal-tab {
        flex: 1 0 50%;
        padding: 10px 0;
    }
    
    .strategy-notes {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .journal-modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .entry-header,
    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .entry-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* Animation for new entries */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.journal-entry,
.strategy-note {
    animation: slideInUp 0.3s ease-out;
}

/* Loading state for journal */
.journal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #8a8f9d;
}

.journal-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #3a3f4b;
    border-top: 2px solid #0ecb81;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Volatility-specific styling */
.volatility-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #1a1d21;
    border: 1px solid #2d3138;
    border-radius: 8px;
    overflow: hidden;
}

.volatility-table th,
.volatility-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #2d3138;
    text-align: left;
}

.volatility-table th {
    background: #2d3138;
    color: #ffffff;
    font-weight: 600;
    border-bottom: 2px solid #3a3f48;
}

.volatility-table tr:last-child td {
    border-bottom: none;
}

.volatility-table tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Highlight high volatility */
.high-volatility {
    color: #ff6b6b;
    font-weight: bold;
}

.low-volatility {
    color: #4caf50;
    font-weight: bold;
}

.extreme-volatility {
    color: #ff4444;
    font-weight: bold;
    animation: pulse 2s infinite;
}

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

/* Volatility container styling */
.volatility-container {
    background: #1a1d21;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #2d3138;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.volatility-container h3 {
    color: #ffffff;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #2d3138;
    font-size: 1.2rem;
}

.trailing-stop-message {
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-line;
    margin: 8px 0;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid;
}

/* AI Analysis Dark Theme Styles */
.ai-analysis-container {
    background: linear-gradient(145deg, #1a1d2b 0%, #161824 100%);
    border: 1px solid #2a2f45;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e0e0e0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2f45;
}

.header-left h3 {
    margin: 0 0 8px 0;
    color: #7c72ff;
    font-size: 1.4rem;
}

.trading-pair {
    background: #2a2f45;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #a0a7d0;
}

.signal-indicator {
    padding: 12px 24px;
    border-radius: 10px;
    text-align: center;
    min-width: 150px;
}

.signal-buy {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.signal-sell {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.signal-hold {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.15) 0%, rgba(156, 163, 175, 0.05) 100%);
    border: 1px solid rgba(156, 163, 175, 0.3);
    color: #9ca3af;
}

.signal-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.signal-confidence {
    font-size: 0.85rem;
    opacity: 0.9;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.analysis-card {
    background: #212637;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #2a2f45;
}

.analysis-card h4 {
    margin: 0 0 16px 0;
    color: #a0a7d0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-content p {
    margin: 10px 0;
    line-height: 1.5;
}

.action-primary {
    background: rgba(42, 47, 69, 0.5);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.action-title {
    display: block;
    font-size: 0.9rem;
    color: #a0a7d0;
    margin-bottom: 4px;
}

.action-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.action-buy { color: #10b981; }
.action-sell { color: #ef4444; }
.action-hold { color: #9ca3af; }

.factors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.factor-item {
    background: #212637;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid;
}

.factor-bullish { border-left-color: #10b981; }
.factor-bearish { border-left-color: #ef4444; }
.factor-neutral { border-left-color: #9ca3af; }

.factor-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #a0a7d0;
}

.factor-item ul {
    margin: 0;
    padding-left: 20px;
}

.factor-item li {
    margin: 8px 0;
    font-size: 0.95rem;
}

.price-action-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 16px 0;
}

.metric {
    background: #212637;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: #a0a7d0;
    margin-bottom: 6px;
}

.metric-value {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
}

.volatility-high { color: #f59e0b; }
.volatility-medium { color: #10b981; }
.volatility-low { color: #9ca3af; }

.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }
.trend-sideways { color: #9ca3af; }

.state-trending { color: #10b981; }
.state-consolidating { color: #f59e0b; }
.state-choppy { color: #ef4444; }

.sentiment-positive { color: #10b981; }
.sentiment-negative { color: #ef4444; }
.sentiment-neutral { color: #9ca3af; }

.risk-management {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 18px;
    margin: 20px 0;
}

.risk-level {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.risk-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.risk-low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.risk-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.risk-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.risk-points li {
    margin: 10px 0;
    padding-left: 8px;
}

.analysis-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #2a2f45;
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
}

.timestamp {
    display: block;
    margin-bottom: 4px;
    color: #9ca3af;
}

.disclaimer {
    font-style: italic;
    opacity: 0.8;
}

/* Icons (you can use font icons or SVG) */
.icon-ai::before { content: "🤖 "; }
.icon-impact::before { content: "💥 "; }
.icon-action::before { content: "⚡ "; }
.icon-factors::before { content: "🔍 "; }
.icon-price::before { content: "📈 "; }
.icon-risk::before { content: "⚠️ "; }
.icon-time::before { content: "🕒 "; }

/* COT Analysis Styles - Dark Theme Integration */
.cot-analysis-container {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid #3a3f4b;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3a3f4b;
}

.cot-header h3 {
    margin: 0;
    color: #0ecb81;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cot-header h3::before {
    content: '📊';
    font-size: 1.2em;
}

.cot-metadata {
    display: flex;
    gap: 15px;
    color: #8a8f9d;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.cot-metadata span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cot-metadata span::before {
    font-size: 0.9em;
}

.cot-report-date::before { content: '📅 '; }
.cot-release-date::before { content: '🔄 '; }

.cot-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #3a3f4b;
}

.cot-analysis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background-color: #1e222d;
}

.cot-analysis-table th {
    background: linear-gradient(135deg, #2a2e39 0%, #3a3f4b 100%);
    color: #e2e8f0;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #0ecb81;
    white-space: nowrap;
}

.cot-analysis-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #3a3f4b;
    color: #cbd5e0;
}

.cot-analysis-table tr:last-child td {
    border-bottom: none;
}

.cot-analysis-table tr:hover {
    background-color: rgba(14, 203, 129, 0.05);
}

/* Category-specific styling */
.cot-category-commercial {
    border-left: 3px solid #3b82f6;
}

.cot-category-noncommercial {
    border-left: 3px solid #f0b90b;
}

.cot-category-nonreportable {
    border-left: 3px solid #8b5cf6;
}

/* Position value styling */
.position-long {
    color: #0ecb81;
    font-weight: 500;
}

.position-short {
    color: #f6465d;
    font-weight: 500;
}

.position-net {
    color: #e2e8f0;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
}

/* Change indicators */
.change-positive {
    color: #0ecb81;
    font-weight: 500;
}

.change-positive::before {
    content: '▲ ';
    font-size: 0.8em;
}

.change-negative {
    color: #f6465d;
    font-weight: 500;
}

.change-negative::before {
    content: '▼ ';
    font-size: 0.8em;
}

.change-neutral {
    color: #8a8f9d;
}

/* Summary sections */
.cot-summary,
.cot-trading-implications,
.cot-historical-context {
    background: rgba(30, 34, 45, 0.7);
    border: 1px solid #3a3f4b;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid;
}

.cot-summary {
    border-left-color: #3b82f6;
}

.cot-summary h4 {
    color: #3b82f6;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cot-summary h4::before {
    content: '📈';
}

.cot-trading-implications {
    border-left-color: #0ecb81;
}

.cot-trading-implications h4 {
    color: #0ecb81;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cot-trading-implications h4::before {
    content: '💡';
}

.cot-historical-context {
    border-left-color: #f0b90b;
}

.cot-historical-context h4 {
    color: #f0b90b;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cot-historical-context h4::before {
    content: '📚';
}

/* Content styling within summary sections */
.cot-summary-content,
.cot-implications-content,
.cot-historical-content {
    color: #e2e8f0;
    line-height: 1.6;
    font-size: 0.9rem;
}

.cot-summary-content ul,
.cot-implications-content ul,
.cot-historical-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.cot-summary-content li,
.cot-implications-content li,
.cot-historical-content li {
    margin-bottom: 6px;
    padding-left: 5px;
}

/* Key metrics display */
.cot-key-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.cot-metric-card {
    background: linear-gradient(135deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid #3a3f4b;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.cot-metric-label {
    display: block;
    color: #8a8f9d;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.cot-metric-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.cot-metric-change {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.cot-metric-change.positive {
    background: rgba(14, 203, 129, 0.2);
    color: #0ecb81;
}

.cot-metric-change.negative {
    background: rgba(246, 70, 93, 0.2);
    color: #f6465d;
}

/* Sentiment indicators */
.cot-sentiment {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(30, 34, 45, 0.7);
    border-radius: 8px;
    border: 1px solid #3a3f4b;
}

.sentiment-indicator {
    flex: 1;
    text-align: center;
}

.sentiment-bar {
    height: 8px;
    background: #3a3f4b;
    border-radius: 4px;
    margin: 8px 0;
    overflow: hidden;
    position: relative;
}

.sentiment-fill {
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.sentiment-bullish .sentiment-fill {
    background: linear-gradient(90deg, #0ecb81, #10b981);
}

.sentiment-bearish .sentiment-fill {
    background: linear-gradient(90deg, #f6465d, #ef4444);
}

.sentiment-label {
    display: block;
    font-size: 0.8rem;
    color: #8a8f9d;
    margin-bottom: 5px;
}

.sentiment-value {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Legend */
.cot-legend {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    padding: 12px;
    background: rgba(30, 34, 45, 0.5);
    border-radius: 6px;
    border: 1px solid #3a3f4b;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #cbd5e0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-commercial {
    background: #3b82f6;
}

.legend-noncommercial {
    background: #f0b90b;
}

.legend-nonreportable {
    background: #8b5cf6;
}

/* Loading state */
.cot-loading {
    text-align: center;
    padding: 40px;
    color: #8a8f9d;
}

.cot-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #3a3f4b;
    border-top: 2px solid #0ecb81;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Empty state */
.cot-empty {
    text-align: center;
    padding: 40px;
    color: #8a8f9d;
    font-style: italic;
}

.cot-empty::before {
    content: '📊';
    font-size: 2em;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Responsive design */
@media (max-width: 768px) {
    .cot-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cot-metadata {
        flex-direction: column;
        gap: 5px;
    }
    
    .cot-key-metrics {
        grid-template-columns: 1fr;
    }
    
    .cot-sentiment {
        flex-direction: column;
        gap: 15px;
    }
    
    .cot-analysis-table {
        font-size: 0.8rem;
    }
    
    .cot-analysis-table th,
    .cot-analysis-table td {
        padding: 8px 10px;
    }
}

/* Animation for data updates */
@keyframes highlightUpdate {
    0% { background-color: rgba(14, 203, 129, 0.3); }
    100% { background-color: transparent; }
}

.cot-data-updated {
    animation: highlightUpdate 1s ease-out;
}

/* Print styles */
@media print {
    .cot-analysis-container {
        border: 1px solid #000;
        box-shadow: none;
        background: #fff;
        color: #000;
    }
    
    .cot-analysis-table {
        background: #fff;
        color: #000;
    }
    
    .cot-analysis-table th {
        background: #f0f0f0;
        color: #000;
    }
}