/* SatoshiConclaveCEX - Professional Trading Platform Styles */

/* ==================== VARIABLES ==================== */
:root {
    /* Trading Colors */
    --buy-color: #10b981;
    --sell-color: #ef4444;
    --long-color: #10b981;
    --short-color: #ef4444;

    /* Layout */
    --header-height: 60px;
    --sidebar-width: 280px;
    --orderbook-width: 320px;
    --trading-panel-height: 400px;
    --orders-panel-height: 250px;

    /* Professional Trading Theme */
    --bg-primary: #0f0f13;
    --bg-secondary: #16161a;
    --bg-tertiary: #1c1c21;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
}

/* ==================== GLOBAL OVERRIDES ==================== */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding-top: 0;
    overflow-x: hidden;
    /* Changed from hidden to allow scrolling on new pages */
    font-size: 13px;
}

/* Hide Global Search on CEX to save space */
#header-container .header-bottom {
    display: none;
}

/* Hide Global Footer on CEX to maintain full-screen trading app experience */
#footer-container {
    display: none;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--bg-tertiary) var(--bg-secondary);
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

*::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #2a2a30;
}

/* ==================== HEADER ==================== */
.dex-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
}

/* Adjust global header height if needed via overrides */
#header-container .site-header {
    height: auto;
    max-height: 130px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.header-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.header-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.main-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--accent-color);
    background: rgba(247, 147, 26, 0.1);
}
/* Beta badge */
.beta-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 12px;
    letter-spacing: 0.03em;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 2;
    justify-content: center;
}

.market-selector {
    position: relative;
}

.selected-market {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.selected-market:hover {
    background: #2a2a30;
}

.market-pair {
    font-weight: 600;
    font-size: 1rem;
}

.market-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
}

.market-dropdown.hidden {
    display: none;
}

.market-search {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.market-search input {
    flex: 1;
    background: var(--bg-tertiary);
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    color: var(--text-primary);
}

.price-ticker {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ticker-price {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: monospace;
}

.ticker-change {
    font-size: 0.9rem;
    font-weight: 600;
}

.ticker-change.positive {
    color: var(--buy-color);
}

.ticker-change.negative {
    color: var(--sell-color);
}

.market-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.stat-value {
    font-weight: 600;
    font-family: monospace;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
}

.icon-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.icon-btn:hover {
    background: #2a2a30;
    border-color: var(--accent-color);
}

/* ==================== TRADING LAYOUT ==================== */
.trading-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--orderbook-width);
    height: calc(100vh - var(--header-height));
    margin-top: 0;
    /* Removed margin-top as header is sticky */
    overflow: hidden;
}

/* ==================== MARKET PAIRS PANEL ==================== */
.market-pairs-panel {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.panel-tabs {
    display: flex;
    gap: 0.25rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--bg-tertiary);
    color: var(--accent-color);
}

.pairs-search {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pairs-search input {
    flex: 1;
    background: var(--bg-tertiary);
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.pairs-table {
    flex: 1;
    overflow-y: auto;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.pairs-list {
    display: flex;
    flex-direction: column;
}

.pair-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.pair-item:hover {
    background: var(--bg-tertiary);
}

.pair-item.active {
    background: rgba(247, 147, 26, 0.1);
}

.pair-name {
    font-weight: 600;
}

.pair-price {
    font-family: monospace;
    text-align: right;
}

.pair-change {
    font-family: monospace;
    text-align: right;
    font-weight: 600;
}

.pair-change.positive {
    color: var(--buy-color);
}

.pair-change.negative {
    color: var(--sell-color);
}

/* ==================== CENTER AREA ==================== */
.center-area {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==================== CHART SECTION ==================== */
.chart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    min-height: 400px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.timeframe-selector {
    display: flex;
    gap: 0.25rem;
}

.tf-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.tf-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tf-btn.active {
    background: var(--accent-color);
    color: white;
}

.chart-tools {
    display: flex;
    gap: 0.5rem;
}

.tool-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.chart-container {
    flex: 1;
    position: relative;
    background: var(--bg-primary);
}

/* ==================== TRADING PANEL ==================== */
.trading-panel {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.trading-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.trading-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.trading-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.trading-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.trading-mode {
    display: none;
}

.trading-mode.active {
    display: block;
}

.order-type-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.order-type-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.order-type-btn:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.order-type-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.order-sides {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-color);
}

.order-side {
    background: var(--bg-secondary);
    padding: 1rem;
}

.side-header {
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 1rem;
}

.side-header.buy,
.side-header.long {
    background: rgba(16, 185, 129, 0.1);
    color: var(--buy-color);
}

.side-header.sell,
.side-header.short {
    background: rgba(239, 68, 68, 0.1);
    color: var(--sell-color);
}

.balance-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.order-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem;
    padding-right: 4rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: monospace;
}

.order-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.input-suffix {
    position: absolute;
    right: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.amount-slider {
    display: flex;
    gap: 0.5rem;
}

.percent-btn {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.percent-btn:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.order-btn {
    padding: 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.buy-btn,
.long-btn {
    background: var(--buy-color);
    color: white;
}

.buy-btn:hover,
.long-btn:hover {
    background: #0ea472;
}

.sell-btn,
.short-btn {
    background: var(--sell-color);
    color: white;
}

.sell-btn:hover,
.short-btn:hover {
    background: #dc2626;
}

/* ==================== FUTURES CONTROLS ==================== */
.futures-controls {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 2rem;
}

.leverage-control {
    flex: 1;
}

.leverage-control label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.leverage-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.leverage-slider {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 0.5rem;
}

.leverage-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
}

.leverage-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.leverage-marks {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.margin-type {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.margin-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.margin-btn:hover {
    border-color: var(--accent-color);
}

.margin-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.position-info {
    background: var(--bg-tertiary);
    padding: 0.75rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.info-row span:first-child {
    color: var(--text-secondary);
}

.info-row span:last-child {
    font-weight: 600;
    font-family: monospace;
}

/* ==================== ORDERS SECTION ==================== */
.orders-section {
    background: var(--bg-secondary);
    height: var(--orders-panel-height);
    display: flex;
    flex-direction: column;
}

.orders-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.orders-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.orders-tab:hover {
    color: var(--text-primary);
}

.orders-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.orders-content {
    flex: 1;
    overflow-y: auto;
}

.orders-table {
    display: none;
    height: 100%;
}

.orders-table.active {
    display: block;
}

.orders-table table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table thead {
    position: sticky;
    top: 0;
    background: var(--bg-tertiary);
    z-index: 1;
}

.orders-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.orders-table td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    font-family: monospace;
}

.orders-table .empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.cancel-btn {
    background: var(--sell-color);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.cancel-btn:hover {
    background: #dc2626;
}

.close-btn {
    background: var(--accent-color);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.close-btn:hover {
    background: #F15A24;
}

/* ==================== ORDERBOOK PANEL ==================== */
.orderbook-panel {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.orderbook-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.orderbook-controls {
    display: flex;
    gap: 0.25rem;
}

.ob-view-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.ob-view-btn:hover {
    background: var(--bg-tertiary);
}

.ob-view-btn.active {
    background: var(--bg-tertiary);
    color: var(--accent-color);
}

.orderbook-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.orderbook-header span:nth-child(2),
.orderbook-header span:nth-child(3) {
    text-align: right;
}

.orderbook-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.asks-list,
.bids-list {
    display: flex;
    flex-direction: column;
}

.asks-list {
    flex-direction: column-reverse;
}

.ob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
    font-family: monospace;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.ob-row:hover {
    background: var(--bg-tertiary);
}

.ob-row::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0.1;
}

.ob-row.ask {
    color: var(--sell-color);
}

.ob-row.bid {
    color: var(--buy-color);
}

.ob-row span:nth-child(2),
.ob-row span:nth-child(3) {
    text-align: right;
}

.current-price {
    padding: 1rem;
    text-align: center;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: monospace;
}

.price-arrow {
    color: var(--buy-color);
}

/* ==================== TRADES SECTION ==================== */
.trades-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.trades-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.trades-header span:nth-child(2),
.trades-header span:nth-child(3) {
    text-align: right;
}

.trades-list {
    flex: 1;
    overflow-y: auto;
}

.trade-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-family: monospace;
    cursor: pointer;
    transition: background 0.2s;
}

.trade-row:hover {
    background: var(--bg-tertiary);
}

.trade-row.buy {
    color: var(--buy-color);
}

.trade-row.sell {
    color: var(--sell-color);
}

.trade-row span:nth-child(2),
.trade-row span:nth-child(3) {
    text-align: right;
}

.trade-row span:nth-child(3) {
    color: var(--text-muted);
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(150%);
    transition: transform 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
}

.toast i {
    font-size: 1.5rem;
    color: var(--buy-color);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1600px) {
    .trading-layout {
        grid-template-columns: 240px 1fr 280px;
    }
}

@media (max-width: 1400px) {
    .market-stats {
        display: none;
    }
}

@media (max-width: 1200px) {
    .trading-layout {
        grid-template-columns: 1fr 280px;
    }

    .market-pairs-panel {
        display: none;
    }
}

/* ==================== NEW SECTIONS (Markets, Portfolio, Earn) ==================== */

/* Markets Page Styles */
.markets-layout {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.market-stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.summary-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-card .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.summary-card .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.markets-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.market-tabs {
    display: flex;
    gap: 0.5rem;
}

.market-tabs .tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.market-tabs .tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.market-tabs .tab-btn.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.market-search-box {
    position: relative;
    width: 300px;
}

.market-search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.market-search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
}

.market-search-box input:focus {
    border-color: var(--primary-color);
}

.markets-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow-x: auto;
}

.markets-table {
    width: 100%;
    border-collapse: collapse;
}

.markets-table th,
.markets-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.markets-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.markets-table th:hover {
    color: var(--text-primary);
}

.markets-table th i {
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.markets-table tr:last-child td {
    border-bottom: none;
}

.markets-table tr:hover {
    background: var(--bg-tertiary);
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.coin-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.coin-symbol {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.coin-name {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.trade-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--accent-color);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.trade-btn:hover {
    opacity: 0.9;
}

/* Portfolio Page Styles */
.portfolio-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.portfolio-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.balance-total {
    margin-bottom: 2rem;
}

.balance-total .label {
    color: var(--text-secondary);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.balance-total .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.balance-total .btc-value {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-left: 0.5rem;
}

.asset-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.asset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.asset-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.asset-right {
    text-align: right;
}

.asset-amount {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.asset-value {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Earn Page Styles */
.earn-hero {
    background: linear-gradient(135deg, var(--accent-color), #F15A24);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
}

.earn-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.earn-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.earn-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-apy {
    margin-bottom: 1.5rem;
}

.apy-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.apy-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--buy-color);
}

.product-features {
    list-style: none;
    margin-bottom: 1.5rem;
    padding: 0;
}

.product-features li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-features li i {
    color: var(--accent-color);
}

.subscribe-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.subscribe-btn:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}
