/* trading.css - Updated with fixed footer */

:root {
    --primary: #6366f1;
    --primary-light: rgba(99, 102, 241, 0.1);
    --primary-dark: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --success-dark: #0e9f7a;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --danger-dark: #d13b3b;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #58595a;
    
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --hover-bg: rgba(0, 0, 0, 0.02);
    --active-bg: rgba(99, 102, 241, 0.1);
    
    --orderbook-ask: rgba(239, 68, 68, 0.08);
    --orderbook-bid: rgba(16, 185, 129, 0.08);
    
    --chart-bg: #ffffff;
    --chart-grid: rgba(0, 0, 0, 0.05);
    --chart-tooltip-bg: #ffffff;
    --chart-tooltip-border: #e5e7eb;
    --chart-line: #6366f1;
    --chart-fill: rgba(99, 102, 241, 0.1);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-full: 9999px;
}

/* Hide mobile order forms on desktop */
.order-forms-container-mobile {
    display: none;
}
.dark-mode {
    --primary: #818cf8;
    --primary-light: rgba(129, 140, 248, 0.1);
    --primary-dark: #6366f1;
    --primary-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.1);
    --success-dark: #10b981;
    
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.1);
    --danger-dark: #ef4444;
    
    --warning: #fbbf24;
    --info: #60a5fa;
    
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    
    --border-light: #334155;
    --border-medium: #475569;
    --border-dark: #64748b;
    
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #020617;
    
    --hover-bg: rgba(255, 255, 255, 0.05);
    --active-bg: rgba(129, 140, 248, 0.2);
    
    --orderbook-ask: rgba(248, 113, 113, 0.1);
    --orderbook-bid: rgba(52, 211, 153, 0.1);
    
    --chart-bg: #1e293b;
    --chart-grid: rgba(255, 255, 255, 0.05);
    --chart-tooltip-bg: #1e293b;
    --chart-tooltip-border: #334155;
    --chart-line: #818cf8;
    --chart-fill: rgba(129, 140, 248, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    line-height: 1.5;
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/* Order update animations */
tr.highlight {
    animation: orderHighlight 1.5s ease-out;
}

@keyframes orderHighlight {
    0% {
        background-color: rgba(99, 102, 241, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

tr.highlight td {
    font-weight: bold;
    transition: font-weight 1.5s ease-out;
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.5s ease;
}
/* Show market icon only on desktop */
.market-icon.desktop-only {
    display: flex;
}

/* Hide market icon on mobile */
@media only screen and (max-width: 768px) {
    .market-icon.desktop-only {
        display: none !important;
    }
    
    /* Adjust the market pair container to account for missing icon */
    .market-pair-container {
        gap: 0.5rem;
    }
}
.market-link-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    text-decoration: none !important; /* This removes the underline */
}

.market-link-logo img {
    height: 100%;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.market-link-logo:hover img,
.market-link-logo:hover i {
    opacity: 1;
}

.market-link-logo i {
    font-size: 16px;
    color: var(--text-secondary);
    transition: color 0.2s;
    text-decoration: none !important; /* Ensures no underline on the icon */
}

.market-link-logo:hover i {
    color: var(--primary);
    text-decoration: none !important;
}
.market-links.desktop-only {
    display: flex;
}

/* Hide market links on mobile */
@media only screen and (max-width: 768px) {
    .market-links.desktop-only {
        display: none !important;
    }
    
    /* Adjust the market pair container to account for missing links */
    .market-pair-container {
        gap: 0.5rem;
    }
}
.market-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}

.market-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.market-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: bold;
    font-size: 0.75rem;
}

.dark-mode .market-icon {
    background-color: var(--bg-secondary);
}

.dark-mode .market-icon-fallback {
    background-color: var(--primary-dark);
    color: white;
}

/* Mobile adjustments */
@media only screen and (max-width: 768px) {
    .market-icon {
        width: 20px;
        height: 20px;
        margin-right: 6px;
    }
    
    .market-icon-fallback {
        font-size: 0.65rem;
    }
}

@media only screen and (max-width: 480px) {
    .market-icon {
        width: 18px;
        height: 18px;
        margin-right: 4px;
    }
}
/* Dashboard Layout */
.dashboard-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 0;
    padding-bottom: 2rem; /* Space for footer */
}

/* Header Styles */
.dashboard-header {
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.25rem;
    color: var(--primary);
}

.header-left h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-left h1 span {
    color: var(--primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb i {
    margin: 0 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
/* Favorite Button Styles */
.favorite-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.favorite-btn:hover {
    background-color: rgba(var(--warning-rgb), 0.1);
}

.favorite-btn .fa-star {
    color: var(--warning);
}

.favorite-btn .far.fa-star {
    color: var(--text-secondary);
}

.favorite-btn:hover .far.fa-star {
    color: var(--warning);
}

.favorite-btn::before {
    content: attr(aria-label);
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tooltip-bg);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.favorite-btn:hover::before {
    opacity: 1;
}

/* Adjust market item layout */
.market-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.market-item:last-child {
    border-bottom: none;
}

.market-item:hover {
    background-color: var(--hover-bg);
}

.market-item.active {
    background-color: var(--active-bg);
    border-left: 2px solid var(--primary);
}

.market-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0.5rem;
}

.market-price {
    width: 6rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    padding-left: 0.5rem;
}

.market-changeB {
    width: 5rem;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 0.2rem;
    font-family: 'Roboto Mono', monospace, 'Inter', sans-serif;
}
.market-change {
    width: 5rem;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 2.0rem !important;
}
.dark-mode .favorite-btn {
    color: var(--text-muted);
}

.dark-mode .favorite-btn:hover {
    background-color: rgba(var(--warning-rgb), 0.2);
}
/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 3px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-dark);
}

.btn-icon {
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: var(--primary);
    color: white;
}

/* Trading Content Layout */
.trading-content {
    display: grid;
    grid-template-columns: 18rem 1fr 18rem;
    grid-template-rows: 1fr;
    gap: 1rem;
    height: calc(100vh - 4rem);
    padding: 1rem;
    transition: var(--transition);
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    grid-column: 1;
}

.chart-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    grid-column: 2;
}

.right-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    grid-column: 3;
}

/* Card Styles */
.market-selector,
.order-book,
.recent-trades,
.open-orders,
.open-orders-mobile,
.chart-container,
.buy-order-form,
.sell-order-form {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

/* Market Selector */
.market-selector {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.market-selector-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.market-selector-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.search-box i {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}
/* Add this to your CSS */
.order-book-row.latest-update {
    animation: highlightUpdate 1s ease-out;
}

@keyframes highlightUpdate {
    0% {
        background-color: rgba(99, 102, 241, 0.3);
    }
    100% {
        background-color: transparent;
    }
}

.order-book-asks .order-book-row.latest-update {
    animation-name: highlightAskUpdate;
}

.order-book-bids .order-book-row.latest-update {
    animation-name: highlightBidUpdate;
}

@keyframes highlightAskUpdate {
    0% {
        background-color: rgba(239, 68, 68, 0.3);
    }
    100% {
        background-color: var(--orderbook-ask);
    }
}

@keyframes highlightBidUpdate {
    0% {
        background-color: rgba(16, 185, 129, 0.3);
    }
    100% {
        background-color: var(--orderbook-bid);
    }
}

.order-book .loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-style: italic;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin: 1rem;
}

/* Order book new order highlights */
.order-book-row.bid.new-order {
    background-color: rgba(5, 150, 105, 0.3) !important;
    animation: bidHighlight 3s ease-out forwards;
}

.order-book-row.ask.new-order {
    background-color: rgba(220, 38, 38, 0.3) !important;
    animation: askHighlight 3s ease-out forwards;
}

@keyframes bidHighlight {
    0% { background-color: rgba(5, 150, 105, 0.6); }
    100% { background-color: transparent; }
}

@keyframes askHighlight {
    0% { background-color: rgba(220, 38, 38, 0.6); }
    100% { background-color: transparent; }
}

/* Make loading message more visible */
.order-book .loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-style: italic;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin: 1rem;
}
.order-book-row.latest-update {
    animation: debugHighlight 2s ease-out;
}
.market-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.market-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
}

.market-item:last-child {
    border-bottom: none;
}

.market-item:hover {
    background-color: var(--hover-bg);
}

.market-item.active {
    background-color: var(--active-bg);
    border-left: 2px solid var(--primary);
}

.market-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-price {
    width: 6rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    padding-left: 0.5rem;
}

.market-change {
    width: 5rem;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 0.5rem;
}

.market-change.positive {
    background-color: var(--success-light);
    color: var(--success);
}

.market-change.negative {
    background-color: var(--danger-light);
    color: var(--danger);
}
.market-changeB.positive {
    background-color: var(--success-light);
    color: var(--success);
}

.market-changeB.negative {
    background-color: var(--danger-light);
    color: var(--danger);
}
.loading-markets {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
    gap: 0.5rem;
}

.loading-markets i {
    font-size: 1.25rem;
    animation: spin 1s linear infinite;
}

.order-book-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 400px;
    max-height: 550px;
    overflow: hidden;
    position: relative;
}

.order-book {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.order-book-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.order-book-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-book-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-book-depth {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.75rem;
    outline: none;
    transition: var(--transition);
}

.order-book-depth:focus {
    border-color: var(--primary);
}

.order-book-content {
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    height: 100%;
    overflow: hidden;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.order-book-content::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

.order-book-asks {
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column-reverse;
}

.order-book-asks, 
.order-book-bids {
    overflow-y: scroll;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    padding-right: 10px; /* Add some padding to prevent content clipping */
    margin-right: -10px; /* Counteract the padding */
}
.order-book-asks::-webkit-scrollbar,
.order-book-bids::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

.order-book-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    gap: 0.5rem;
    transition: var(--transition);
    min-width: 0; /* Prevent flex items from growing beyond container */
}

.order-book-asks .order-book-row {
    background-color: var(--orderbook-ask);
}

.order-book-asks .order-book-row:hover {
    background-color: rgba(239, 68, 68, 0.15);
}

.order-book-bids .order-book-row {
    background-color: var(--orderbook-bid);
}

.order-book-bids .order-book-row:hover {
    background-color: rgba(16, 185, 129, 0.15);
}

.order-book-price {
    font-weight: 500;
    text-align: left;
}

.order-book-amount {
    color: var(--text-muted);
    text-align: center;
}

.order-book-total {
    text-align: right;
}

.order-book-spread {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin: 0.25rem 0;
    flex-shrink: 0;
}

.spread-label {
    font-weight: 500;
}

.spread-value {
    font-weight: 600;
}

/* Chart Container */
.chart-container {
    height: 100%;
    min-height: 400px;
    max-height: 600px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.chart-header {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.market-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    flex-wrap: wrap;
}

.market-pair-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-grow: 1;
}

.market-pair {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    white-space: nowrap;
}

.market-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.market-change-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.market-changeB-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.market-change {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    display: inline-block;
}

.market-change.positive {
    background-color: var(--success-light);
    color: var(--success);
}

.market-change.negative {
    background-color: var(--danger-light);
    color: var(--danger);
}
.market-changeB {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    display: inline-block;
}

.market-changeB.positive {
    background-color: var(--success-light);
    color: var(--success);
}

.market-changeB.negative {
    background-color: var(--danger-light);
    color: var(--danger);
}

@keyframes flashGreen {
    0% { background-color: var(--success-light); }
    100% { background-color: transparent; }
}

@keyframes flashRed {
    0% { background-color: var(--danger-light); }
    100% { background-color: transparent; }
}

.market-change.up {
    animation: flashGreen 1s ease-in-out;
}

.market-change.down {
    animation: flashRed 1s ease-in-out;
}

.market-stats {
    width: 100%;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    font-weight: 500;
    color: var(--text-primary);
}

.stat-currency {
    color: var(--text-muted);
    font-size: 0.6875rem;
}

.chart-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.chart-intervals {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.interval-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background-color: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.6875rem;
    font-weight: 500;
    transition: var(--transition);
}

.interval-btn:hover {
    background-color: var(--hover-bg);
}

.interval-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.chart-actions {
    display: flex;
    gap: 0.5rem;
}

.chart-wrapper {
    flex: 1;
    position: relative;
    min-height: 300px;
    overflow: hidden;
}

.chart-action-btn {
    padding: 5px 8px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background-color: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.chart-action-btn:hover {
    background-color: var(--hover-bg);
}

#price-chart {
    width: 100% !important;
    height: 100% !important;
}

/* Order Forms Container */
.order-forms-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.buy-order-form, 
.sell-order-form {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.buy-order-form {
    border-top: 3px solid var(--success);
}

.sell-order-form {
    border-top: 3px solid var(--danger);
}

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

.form-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-header.buy h3 {
    color: var(--success);
}

.form-header.sell h3 {
    color: var(--danger);
}

.form-header h3 i {
    font-size: 1rem;
}

.balance-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.balance-label {
    color: var(--text-muted);
}

.balance-value {
    font-weight: 500;
}

.balance-currency {
    color: var(--text-muted);
    font-weight: 500;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-group {
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.input-currency {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-actions {
    margin-top: 20px;
}

.btn-buy, .btn-sell {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-buy {
    background-color: var(--success);
    color: white;
}

.btn-buy:hover {
    background-color: var(--success-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-sell {
    background-color: var(--danger);
    color: white;
}

.btn-sell:hover {
    background-color: var(--danger-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.form-percentages {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    gap: 5px;
}

.percent-btn {
    flex: 1;
    padding: 6px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background-color: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.percent-btn:hover {
    background-color: var(--hover-bg);
}

/* Recent Trades */
.recent-trades {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.trades-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.trades-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trades-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trades-table-container {
    overflow-x: auto;
    flex: 1;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.trades-table-container::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}


.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.trades-table th {
    text-align: left;
    padding: 8px;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.trades-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

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

.no-trades {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.buy-trade td:first-child {
    color: var(--success);
}

.sell-trade td:first-child {
    color: var(--danger);
}

/* Open Orders */
.open-orders,
.open-orders-mobile {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.orders-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.orders-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.open-orders {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 200px;
    max-height: 250px;
    overflow: hidden;
}

.orders-table-container {
    flex: 1;
    overflow-y: auto;
    position: relative;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.orders-table-container::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}
.order-book-content,
.trades-table-container,
.orders-table-container {
    padding: 0 10px;
    margin: 0 -10px;
}
.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
}

.orders-table th {
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    z-index: 10;
    text-align: left;
    padding: 8px;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.orders-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.no-orders {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.order-action {
    color: var(--primary);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.order-action:hover {
    text-decoration: underline;
}

@keyframes priceUp {
    0% { color: inherit; background-color: transparent; }
    50% { color: #10b981; background-color: rgba(16, 185, 129, 0.1); }
    100% { color: inherit; background-color: transparent; }
}

@keyframes priceDown {
    0% { color: inherit; background-color: transparent; }
    50% { color: #ef4444; background-color: rgba(239, 68, 68, 0.1); }
    100% { color: inherit; background-color: transparent; }
}

#market-price.up {
    animation: priceUp 1s ease-in-out;
}

#market-price.down {
    animation: priceDown 1s ease-in-out;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

/* Refresh Button */
.refresh-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.refresh-btn:hover {
    background-color: var(--hover-bg);
    color: var(--primary);
}

/* Modal */
.modalO {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modalO.show {
    display: flex;
    opacity: 1;
}

.modalO-content {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    width: 400px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modalO.show .modalO-content {
    transform: translateY(0);
}

.modalO-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modalO-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.modalO-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modalO-close:hover {
    color: var(--danger);
}

.modalO-body {
    padding: 15px;
}

.order-confirm-details {
    margin-bottom: 20px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.confirm-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.confirm-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.confirm-value {
    font-weight: 500;
    font-size: 0.95rem;
}

.modalO-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 15px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-icon.fa-check-circle {
    color: var(--success);
}

.toast-icon.fa-exclamation-circle {
    color: var(--danger);
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

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

.alert-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-lg);
}

.loading-spinner {
    animation: spin 1s linear infinite;
    font-size: 2rem;
    color: var(--primary);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .trading-content {
        grid-template-columns: 240px 1fr 240px;
    }
}

@media (max-width: 992px) {
    .trading-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
    }
    
    .left-column {
        grid-row: 1;
    }
    
    .chart-area {
        grid-row: 2;
    }
    
    .right-column {
        grid-row: 3;
    }
    
    .open-orders-mobile {
        display: block;
    }
    
    .right-column .open-orders {
        display: none;
    }
    
    .chart-wrapper {
        min-height: 300px;
    }
    
    .order-forms-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .market-selector {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        padding: 10px;
    }
    
    .header-left, .header-right {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .chart-intervals {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .interval-btn {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .orders-table th, 
    .orders-table td,
    .trades-table th,
    .trades-table td {
        padding: 6px;
        font-size: 12px;
    }
    
    .orders-table th:nth-child(1),
    .orders-table td:nth-child(1),
    .orders-table th:nth-child(6),
    .orders-table td:nth-child(6) {
        display: none;
    }
    
    .order-book-row:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    .dark-mode .order-book-row:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .form-group input {
        padding: 8px;
    }
    
    .percent-btn {
        padding: 4px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .orders-table th:nth-child(4),
    .orders-table td:nth-child(4) {
        display: none;
    }
    
    .btn-buy, .btn-sell {
        padding: 8px;
        font-size: 14px;
    }
    
    .market-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .market-stats {
        flex-direction: column;
        gap: 5px;
    }
}

/* Dark mode toggle animation */
.dark-mode-toggle {
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    transform: rotate(30deg);
}

/* Monospace font for numbers */
.order-book-price,
.order-book-amount,
.order-book-total {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.trades-table td,
.orders-table td,
.market-price,
.market-change,
.stat-value,
.input-group input,
.confirm-value {
    font-family: 'Roboto Mono', monospace, 'Inter', sans-serif;
}

/* Market icon styles */
.market-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}

.market-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.market-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: bold;
    font-size: 0.75rem;
}

.dark-mode .market-icon {
    background-color: var(--bg-secondary);
}

.dark-mode .market-icon-fallback {
    background-color: var(--primary-dark);
    color: white;
}

/* Mobile adjustments */
@media only screen and (max-width: 768px) {
    .market-icon {
        width: 20px;
        height: 20px;
        margin-right: 6px;
    }
    
    .market-icon-fallback {
        font-size: 0.65rem;
    }
}

@media only screen and (max-width: 480px) {
    .market-icon {
        width: 18px;
        height: 18px;
        margin-right: 4px;
    }
}

/* Footer Styles */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
}

.footer-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo-text span {
    color: var(--primary);
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link a:hover {
    color: var(--primary);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}

.footer-legal-link a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal-link a:hover {
    color: var(--primary);
}

.app-download p {
    margin: 1.5rem 0 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.app-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.app-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

.app-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.footer-newsletter {
    max-width: 300px;
}

.newsletter-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 1rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.newsletter-form input {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.payment-methods {
    margin-top: 1.5rem;
}

.payment-methods p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.payment-icons {
    display: flex;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Dark mode footer adjustments */
.dark-mode .footer {
    background-color: var(--bg-secondary);
    border-top-color: var(--border-medium);
}

.dark-mode .footer-description,
.dark-mode .footer-link a,
.dark-mode .footer-legal-link a,
.dark-mode .app-download p,
.dark-mode .newsletter-text,
.dark-mode .payment-methods p {
    color: var(--text-muted);
}

.dark-mode .social-link {
    background-color: var(--bg-tertiary);
}

/* Responsive footer adjustments */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-about, 
    .footer-newsletter {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-about, 
    .footer-newsletter {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-about, 
    .footer-newsletter {
        grid-column: span 1;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-legal-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.order-book-row.order-update {
    animation: orderUpdateHighlight 4s ease-out;
}

@keyframes orderUpdateHighlight {
    0% {
        background-color: rgba(99, 102, 241, 0.3);
    }
    100% {
        background-color: transparent;
    }
}

.order-book-row.ask.order-update {
    animation-name: askOrderUpdateHighlight;
    animation-duration: 4s;
}


.order-book-row.bid.order-update {
    animation-name: bidOrderUpdateHighlight;
    animation-duration: 4s;
}

@keyframes askOrderUpdateHighlight {
    0% {
        background-color: rgba(239, 68, 68, 0.3);
    }
    100% {
        background-color: var(--orderbook-ask);
    }
}

@keyframes bidOrderUpdateHighlight {
    0% {
        background-color: rgba(16, 185, 129, 0.3);
    }
    100% {
        background-color: var(--orderbook-bid);
    }
}

.order-book-row.order-update .order-book-price,
.order-book-row.order-update .order-book-amount,
.order-book-row.order-update .order-book-total {
    font-weight: bold;
    transition: font-weight 3s ease-out;
}

.order-book-row.ask.order-update .order-book-price {
    color: var(--danger);
}

.order-book-row.bid.order-update .order-book-price {
    color: var(--success);
}

/* Balance Notifications */
.balance-notifications {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.balance-notification {
    padding: 12px 16px;
    border-radius: 8px;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.3s;
}

.balance-notification.positive {
    border-left: 4px solid var(--success);
}

.balance-notification.negative {
    border-left: 4px solid var(--danger);
}

.balance-notification .currency {
    font-weight: bold;
    color: var(--text-primary);
}

.balance-notification .amount {
    font-family: monospace;
}

.balance-notification.positive .amount {
    color: var(--success);
}

.balance-notification.negative .amount {
    color: var(--danger);
}

.balance-notification.fade-out {
    opacity: 0;
}

/* Market volume animations */
.market-volume {
    transition: all 0.3s ease;
}

.market-volume.volume-update {
    color: var(--primary);
    font-weight: bold;
    animation: volumePulse 0.8s ease;
}

@keyframes volumePulse {
    0% { 
        transform: scale(1);
        color: inherit;
    }
    50% { 
        transform: scale(1.1);
        color: var(--primary);
        text-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    }
    100% { 
        transform: scale(1);
        color: inherit;
    }
    
}
/* Market count and load more button */
.market-count {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-secondary);
    text-align: center;
}

.load-more-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    color: var(--primary);
    border: none;
    border-top: 1px solid var(--border-light);
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition);
}

.load-more-btn:hover {
    background-color: var(--hover-bg);
}

/* Ensure market items don't exceed container */
.market-item {
    max-width: 100%;
}