:root {
    --bg-main: #191b20;
    --bg-panel: #20222a;
    --bg-panel-light: #2c2f3a;
    --text-main: #ffffff;
    --text-muted: #8b92a5;
    --primary: #f0b90b; /* Binance Yellow */
    --success: #0ecb81;
    --danger: #f6465d;
    --border: #2b3139;
    --glass-bg: rgba(32, 34, 42, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-main);
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    overflow-x: hidden;
}

.view {
    display: none;
    padding-bottom: 70px;
    animation: fadeIn 0.3s ease;
}
.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Utilities */
/* Flex Utilities */
.d-flex { display: flex; }
.align-center { align-items: center; }
.flex-between { display: flex; justify-content: space-between; }
.gap-xs { gap: 5px; }
.gap-sm { gap: 10px; }
.gap-md { gap: 15px; }

/* Margin & Padding Utilities */
.m-0 { margin: 0; }
.p-0 { padding: 0; }
.mt-xs { margin-top: 5px; } .mb-xs { margin-bottom: 5px; } .px-xs { padding-left: 5px; padding-right: 5px; } .py-xs { padding-top: 5px; padding-bottom: 5px; }
.mt-sm { margin-top: 10px; } .mb-sm { margin-bottom: 10px; } .pt-sm { padding-top: 10px; } .pb-sm { padding-bottom: 10px; } .px-sm { padding-left: 10px; padding-right: 10px; } .py-sm { padding-top: 10px; padding-bottom: 10px; }
.mt-md { margin-top: 15px; } .mb-md { margin-bottom: 15px; } .pt-md { padding-top: 15px; } .pb-md { padding-bottom: 15px; } .px-md { padding-left: 15px; padding-right: 15px; } .py-md { padding-top: 15px; padding-bottom: 15px; }
.mt-lg { margin-top: 20px; } .mb-lg { margin-bottom: 20px; } .pt-lg { padding-top: 20px; } .pb-lg { padding-bottom: 20px; } .px-lg { padding-left: 20px; padding-right: 20px; } .py-lg { padding-top: 20px; padding-bottom: 20px; }

/* Font Utilities */
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-md { font-size: 15px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 22px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-white { color: #fff; }
.text-muted { color: #7b8293; }
.text-success { color: #00c076; }
.text-danger { color: #d92525; }
.text-warning { color: #eebb2c; }
.bg-success { background-color: #00c076; }
.bg-danger { background-color: #d92525; }
.bg-panel { background-color: var(--bg-panel); }
.mx-md { margin-left: 15px; margin-right: 15px; }
.mt-md { margin-top: 15px; }
.mt-lg { margin-top: 25px; }
.rounded-md { border-radius: 12px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}
.greeting { font-size: 14px; font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 15px; }
.header-link { color: var(--text-main); text-decoration: none; font-size: 13px; display: flex; gap: 5px; align-items: center; }
.header-lang { font-size: 13px; color: var(--text-main); display: flex; gap: 5px; align-items: center; cursor: pointer; }

/* Banner */
.banner-container {
    padding: 10px 15px;
}
.banner-img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

/* Grid Menu */
.grid-menu {
    display: flex;
    flex-wrap: wrap;
    padding: 15px 5px;
    margin-bottom: 15px;
}
.grid-item {
    width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    cursor: pointer;
}
.grid-item img {
    height: 28px;
}
.grid-item span {
    font-size: 12px;
    color: var(--text-main);
}

/* Notice Bar */
.notice-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--bg-panel);
    color: #f3ba2f; /* Vàng */
    font-size: 13px;
    margin-bottom: 15px;
}

/* 3 Main Crypto Cards */
.main-crypto-cards {
    display: flex;
    gap: 10px;
}
.crypto-card {
    flex: 1;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.crypto-card:active { transform: scale(0.95); }
.cc-icon { height: 28px; margin-bottom: 8px; }
.cc-name { font-size: 11px; color: var(--text-muted); margin-bottom: 5px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cc-change { font-weight: 600; padding: 2px 4px; border-radius: 4px; }
.cc-change.up { color: var(--success); }
.cc-change.down { color: var(--danger); }
.cc-price { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.cc-usd { font-size: 12px; color: var(--text-muted); }

.price-up { color: var(--success) !important; animation: highlightUp 0.5s ease; }
.price-down { color: var(--danger) !important; animation: highlightDown 0.5s ease; }

@keyframes highlightUp {
    0% { color: #fff; text-shadow: 0 0 10px var(--success); }
    100% { color: var(--success); text-shadow: none; }
}
@keyframes highlightDown {
    0% { color: #fff; text-shadow: 0 0 10px var(--danger); }
    100% { color: var(--danger); text-shadow: none; }
}

/* Market List */
.tabs-market {
    display: flex;
    padding: 0 15px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}
.tab-m {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
}
.tab-m.active {
    color: var(--text-main);
}
.tab-m.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: var(--primary);
}

.market-list { padding: 0 15px; }
.market-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s;
}
.market-item.flash-up {
    animation: flashBgUp 0.5s ease;
}
.market-item.flash-down {
    animation: flashBgDown 0.5s ease;
}

@keyframes flashBgUp {
    0% { background-color: rgba(14, 203, 129, 0.2); }
    100% { background-color: transparent; }
}
@keyframes flashBgDown {
    0% { background-color: rgba(246, 70, 93, 0.2); }
    100% { background-color: transparent; }
}
.market-item:last-child { border-bottom: none; }
.mi-col-1 { flex: 4; display: flex; flex-direction: column; gap: 4px; }
.mi-col-2 { flex: 4; text-align: right; font-size: 16px; font-weight: 600; padding-right: 15px; }
.mi-col-3 { flex: 3; text-align: right; }
.mi-symbol { font-weight: 700; font-size: 15px; }
.mi-vol { font-size: 11px; color: var(--text-muted); }
.mi-change {
    display: inline-block;
    padding: 8px 0;
    width: 75px;
    text-align: center;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}
.mi-change.up { background-color: var(--success); }
.mi-change.down { background-color: var(--danger); }

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    display: flex;
    padding: 6px 0;
    z-index: 100;
    border-top: 1px solid var(--border);
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
}
.nav-item img { height: 18px; }
.nav-item.active { color: var(--primary); }

/* Auth */
.auth-header { padding: 15px; }
.btn-icon { background: none; border: none; color: var(--text-main); font-size: 16px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.auth-container { padding: 20px 30px; }
.logo { text-align: center; font-size: 36px; font-weight: 700; color: var(--primary); margin-bottom: 40px; }
.tabs { display: flex; margin-bottom: 30px; border-bottom: 1px solid var(--border); }
.tab { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 12px; font-size: 16px; font-weight: 600; cursor: pointer; }
.tab.active { color: var(--text-main); border-bottom: 2px solid var(--primary); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 14px; }
.form-group input { width: 100%; padding: 14px 15px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; color: var(--text-main); font-size: 16px; outline: none; transition: border-color 0.2s; }
.form-group input:focus { border-color: var(--primary); }
.message { margin-top: 15px; text-align: center; font-size: 14px; }

/* Buttons */
.btn { padding: 14px 20px; border-radius: 8px; border: none; font-weight: 600; font-size: 16px; cursor: pointer; transition: opacity 0.2s; }
.btn:active { opacity: 0.8; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #000; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-sm { padding: 8px 12px; font-size: 12px; }

/* Wallet & Trade Cards */
.card { background: var(--bg-panel); border-radius: 12px; padding: 20px; }
.page-title { font-size: 18px; font-weight: 600; }
.font-bold { font-weight: 700; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 24px; }
.text-sm { font-size: 12px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-1 { flex: 1; }
.gap-md { gap: 15px; }
.mb-xs { margin-bottom: 5px; }
.mb-sm { margin-bottom: 10px; }
.mb-md { margin-bottom: 15px; }
.mb-lg { margin-bottom: 25px; }
.p-md { padding: 15px; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Fast Trade UI */
.pulse-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
    background: rgba(14, 203, 129, 0.2);
    box-shadow: 0 0 20px var(--success);
    animation: pulse 2s infinite;
    transition: background 0.3s, box-shadow 0.3s;
}
.pulse-ring.down {
    background: rgba(246, 70, 93, 0.2);
    box-shadow: 0 0 20px var(--danger);
}
@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 0.4; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.btn-duration {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 5px;
    border-radius: 6px;
    margin: 0 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.btn-duration.active {
    background: rgba(240, 185, 11, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.ft-amount-input input {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    font-weight: bold;
    outline: none;
}
.ft-amount-input input:focus {
    border-color: var(--primary);
}

.order-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}
.order-row { display: flex; justify-content: space-between; margin-bottom: 5px; }
.countdown { font-size: 18px; font-weight: bold; color: var(--primary); }

.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    display: flex;
    padding: 6px 0;
    z-index: 100;
    border-top: 1px solid var(--border);
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
}
.nav-item img { height: 18px; }
.nav-item.active { color: var(--primary); }

/* Auth */
.auth-header { padding: 15px; }
.btn-icon { background: none; border: none; color: var(--text-main); font-size: 16px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.auth-container { padding: 20px 30px; }
.logo { text-align: center; font-size: 36px; font-weight: 700; color: var(--primary); margin-bottom: 40px; }
.tabs { display: flex; margin-bottom: 30px; border-bottom: 1px solid var(--border); }
.tab { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 12px; font-size: 16px; font-weight: 600; cursor: pointer; }
.tab.active { color: var(--text-main); border-bottom: 2px solid var(--primary); }
.form-group { margin-bottom: 20px; position: relative; }
.form-group label:not(.custom-checkbox) { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 14px; }

.input-icon i { position: absolute; left: 15px; top: 16px; color: var(--text-muted); font-size: 18px; }
.input-icon input { width: 100%; padding: 14px 15px 14px 45px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; color: var(--text-main); font-size: 16px; outline: none; transition: border-color 0.2s; }
.input-icon input:focus { border-color: var(--primary); }

.checkbox-group { margin-top: 10px; margin-bottom: 25px; }
.custom-checkbox { display: flex; align-items: flex-start; cursor: pointer; font-size: 12px; color: var(--text-muted); line-height: 1.4; position: relative; padding-left: 28px; }
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { position: absolute; top: -2px; left: 0; height: 18px; width: 18px; background-color: transparent; border: 2px solid var(--border); border-radius: 4px; transition: all 0.2s; }
.custom-checkbox:hover input ~ .checkmark { border-color: var(--primary); }
.custom-checkbox input:checked ~ .checkmark { background-color: var(--primary); border-color: var(--primary); }
.checkmark:after { content: ""; position: absolute; display: none; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.custom-checkbox input:checked ~ .checkmark:after { display: block; }
.text-primary { color: var(--primary); text-decoration: none; }
.text-primary:hover { text-decoration: underline; }

.message { margin-top: 15px; text-align: center; font-size: 14px; }
.auth-footer { margin-top: 40px; }

/* Buttons */
.btn { padding: 14px 20px; border-radius: 8px; border: none; font-weight: 600; font-size: 16px; cursor: pointer; transition: opacity 0.2s; }
.btn:active { opacity: 0.8; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #000; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-sm { padding: 8px 12px; font-size: 12px; }

/* Wallet & Trade Cards */
.card { background: var(--bg-panel); border-radius: 12px; padding: 20px; }
.page-title { font-size: 20px; font-weight: 600; }
.wallet-card h3 { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; font-weight: 400; }
.wallet-card h2 { font-size: 32px; font-weight: 700; margin-bottom: 20px; }
.wallet-actions { display: flex; gap: 15px; }
.wallet-actions .btn { flex: 1; }

.trade-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
#trade-symbol-main { font-weight: 600; font-size: 20px; }
#trade-price-main { font-size: 28px; font-weight: 700; }
.trade-controls input { width: 100%; padding: 14px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; color: white; margin-bottom: 15px; text-align: center; font-size: 16px; outline: none; }
.trade-buttons { display: flex; gap: 15px; }

/* === PREMIUM FAST TRADE UI === */
.ft-ticker-bar {
    border-bottom: 1px solid var(--border);
}
.btn-quick {
    background: var(--bg-hover);
    border: none;
    color: var(--text-muted);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-quick:hover {
    background: var(--bg-active);
    color: var(--text-light);
}
.bg-input {
    background: var(--bg);
}
.btn-buy {
    background: linear-gradient(135deg, #02c076 0%, #009955 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(2, 192, 118, 0.3);
}
.btn-sell {
    background: linear-gradient(135deg, #f84960 0%, #cc3043 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(248, 73, 96, 0.3);
}
.pulse-hover:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}
.pulse-hover:active {
    transform: translateY(1px);
}
.ft-durations {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.ft-durations .btn-duration {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 8px 0;
    font-weight: 600;
}
.ft-durations .btn-duration.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.tv-lightweight-charts {
    font-family: 'Inter', sans-serif !important;
}
/* === PREMIUM FAST TRADE UI v2 === */
.ft-bitwell-layout {
    display: flex;
    padding: 8px;
    gap: 10px;
    color: #9fa6b5;
    background-color: #121216;
}
.ft-col-left {
    flex: 1.3;
}
.ft-col-right {
    flex: 0.9;
    font-size: 10px;
    background: #18181c;
    border-radius: 6px;
    padding: 6px 4px;
}
.ft-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #18181c;
    border-bottom: 1px solid #2a2a34;
}
.ft-top-bar .text-lg {
    font-size: 14px;
}
.ft-input-group {
    display: flex;
    align-items: center;
    background: #1e1e24;
    border: 1px solid #2a2a34;
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 10px;
}
.ft-input-group input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    outline: none;
    font-size: 12px;
    font-weight: 500;
}
.ft-pct-btns {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.ft-pct-btns button {
    flex: 1;
    background: #2a2a34;
    color: #9fa6b5;
    border: none;
    padding: 4px 0;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.ft-pct-btns button:hover {
    background: #343445;
    color: #fff;
}
.ft-time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.ft-time-grid button {
    background: #2a2a34;
    color: #9fa6b5;
    border: none;
    padding: 6px 0;
    border-radius: 4px;
    font-weight: 500;
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s;
}
.ft-time-grid button.active {
    background: #eebb2c;
    color: #121216;
    font-weight: bold;
}
.ft-info-table {
    font-size: 10px;
    margin-bottom: 12px;
    background: #18181c;
    padding: 8px;
    border-radius: 6px;
}
.ft-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.ft-info-row:last-child {
    margin-bottom: 0;
}
.ft-btn-buy {
    background: #1a5e3a;
    color: #fff;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.ft-btn-buy:hover { background: #1e7045; }
.ft-btn-sell {
    background: #d92525;
    color: #fff;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.ft-btn-sell:hover { background: #eb3434; }
.ob-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #7b8293;
    font-size: 9px;
    padding: 0 4px;
}
.ob-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    position: relative;
    padding: 2px 4px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    font-size: 10px;
}
.ob-row.ask .price { color: #d92525; }
.ob-row.bid .price { color: #00c076; }
.ob-row .vol { color: #d1d5db; }
.ob-bg-ask {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: rgba(217, 37, 37, 0.12);
    z-index: 0;
}
.ob-bg-bid {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: rgba(0, 192, 118, 0.12);
    z-index: 0;
}
.ob-row > span { position: relative; z-index: 1; }
.ob-mid {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    margin: 8px 0;
}
.ob-footer {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    margin-top: 10px;
    color: #7b8293;
    border-top: 1px solid #2a2a34;
    padding-top: 6px;
    padding-left: 2px;
    padding-right: 2px;
}
.ft-history-sec {
    background: #121216;
    padding: 0 10px 15px 10px;
}
.ft-history-tabs {
    display: flex;
    gap: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    border-bottom: 1px solid #2a2a34;
    padding-bottom: 8px;
}
.ft-history-tabs .active {
    color: #eebb2c;
    border-bottom: 2px solid #eebb2c;
    margin-bottom: -9px;
    padding-bottom: 7px;
}
.ft-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.2fr 1.5fr 1fr 1.2fr;
    font-size: 9px;
    background: #1e1e24;
    padding: 6px;
    border-radius: 4px;
    color: #9fa6b5;
    text-align: center;
}
.ft-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.2fr 1.5fr 1fr 1.2fr;
    font-size: 9px;
    padding: 8px 6px;
    border-bottom: 1px solid #2a2a34;
    text-align: center;
    align-items: center;
}
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.drawer-overlay.active {
    display: block;
    opacity: 1;
}
.drawer-content {
    position: absolute;
    top: 0;
    left: -80vw;
    width: 75vw;
    height: 100vh;
    background: #18181c;
    transition: left 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}
.drawer-overlay.active .drawer-content {
    left: 0;
}
.coin-list-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 10px;
    border-bottom: 1px solid #2a2a34;
    font-size: 13px;
    cursor: pointer;
}
.coin-list-item:hover {
    background: #1e1e24;
}

/* === TOAST NOTIFICATION SYSTEM === */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: #2a2a34;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toast-slide-down 0.3s ease forwards;
}
.toast.toast-success { border-left: 4px solid #00c076; }
.toast.toast-error { border-left: 4px solid #d92525; }
.toast.toast-warning { border-left: 4px solid #eebb2c; }

@keyframes toast-slide-down {
    0% { opacity: 0; transform: translateY(-20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-fade-out {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* === DRAWER OVERHAUL === */
.drawer-header {
    background: #1e1e24;
}
.drawer-search {
    background: #121216;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 15px;
}
.drawer-search input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 13px;
    width: 100%;
    outline: none;
}
.drawer-coin-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 15px;
    border-bottom: 1px solid #1e1e24;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}
.drawer-coin-row:hover { background: #1e1e24; }
.drawer-coin-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2a2a34;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
}
.drawer-coin-symbol {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
.drawer-coin-vol {
    font-size: 10px;
    color: #7b8293;
}
.drawer-coin-price {
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}
.drawer-coin-change {
    text-align: right;
}
.drawer-coin-change span {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    min-width: 60px;
    text-align: center;
}


/* === BO RESULT MODAL === */
#bo-result-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
#bo-result-modal.show {
    display: flex;
}
.bo-modal-content {
    background: #1e1e24;
    border-radius: 16px;
    width: 320px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#bo-result-modal.show .bo-modal-content {
    transform: scale(1);
    opacity: 1;
}
.bo-modal-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
}
.bo-modal-win .bo-modal-icon { background: rgba(0, 192, 118, 0.2); color: #00c076; }
.bo-modal-lose .bo-modal-icon { background: rgba(217, 37, 37, 0.2); color: #d92525; }
.bo-modal-title { font-size: 22px; font-weight: bold; margin-bottom: 5px; }
.bo-modal-win .bo-modal-title { color: #00c076; }
.bo-modal-lose .bo-modal-title { color: #d92525; }
.bo-modal-profit { font-size: 28px; font-weight: 800; margin-bottom: 20px; color: #fff; }
.bo-modal-detail {
    display: flex; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #2b3139;
    font-size: 13px;
}
.bo-modal-detail:last-child { border-bottom: none; }

.btn-interval { background: transparent; border: none; color: #7b8293; padding: 4px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.btn-interval.active { background: #eebb2c; color: #000; font-weight: bold; }

/* === LIVE CHAT WIDGET STYLES === */
.chat-fab-bubble {
    position: fixed;
    bottom: 75px;
    right: 18px;
    z-index: 990;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease;
}
.chat-fab-bubble:hover {
    transform: scale(1.08);
}
.chat-fab-inner {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fcd535 0%, #f0b90b 100%);
    box-shadow: 0 4px 20px rgba(240, 185, 11, 0.5), 0 0 0 0 rgba(240, 185, 11, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 24px;
    position: relative;
    animation: chatPulse 2s infinite;
}
@keyframes chatPulse {
    0% { box-shadow: 0 4px 15px rgba(240, 185, 11, 0.4), 0 0 0 0 rgba(240, 185, 11, 0.7); }
    70% { box-shadow: 0 4px 15px rgba(240, 185, 11, 0.4), 0 0 0 14px rgba(240, 185, 11, 0); }
    100% { box-shadow: 0 4px 15px rgba(240, 185, 11, 0.4), 0 0 0 0 rgba(240, 185, 11, 0); }
}
.chat-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #f6465d;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #181a20;
}
.chat-fab-label {
    font-size: 11px;
    font-weight: 700;
    color: #fcd535;
    background: rgba(24, 26, 32, 0.95);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
    border: 1px solid rgba(252, 213, 53, 0.3);
    white-space: nowrap;
}

/* Chat Popup Window */
.chat-window-popup {
    position: fixed;
    bottom: 85px;
    right: 18px;
    width: 360px;
    max-width: calc(100vw - 36px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #181a20;
    border: 1px solid #2b3139;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-win-header {
    background: #1e2026;
    padding: 14px 16px;
    border-bottom: 1px solid #2b3139;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-win-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-avatar-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2b3139;
    color: #fcd535;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
    border: 1px solid #fcd535;
}
.chat-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0ecb81;
    border: 2px solid #181a20;
}
.chat-close-btn {
    background: transparent;
    border: none;
    color: #848e9c;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: 0.2s;
}
.chat-close-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.chat-quick-faqs {
    padding: 8px 12px;
    background: #14151a;
    border-bottom: 1px solid #2b3139;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
}
.chat-quick-faqs::-webkit-scrollbar { display: none; }
.chat-faq-chip {
    background: #2b3139;
    color: #eaecef;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}
.chat-faq-chip:hover {
    background: #fcd535;
    color: #000;
}

.chat-messages-container {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #121418;
}
.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 82%;
}
.chat-msg.msg-admin {
    align-self: flex-start;
}
.chat-msg.msg-user {
    align-self: flex-end;
}
.chat-msg.msg-admin .msg-bubble {
    background: #1e2026;
    color: #eaecef;
    border: 1px solid #2b3139;
    border-radius: 12px 12px 12px 2px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.chat-msg.msg-user .msg-bubble {
    background: linear-gradient(135deg, #fcd535 0%, #e5be26 100%);
    color: #000;
    font-weight: 500;
    border-radius: 12px 12px 2px 12px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.msg-time {
    font-size: 10px;
    color: #848e9c;
    margin-top: 3px;
    padding: 0 4px;
}
.chat-msg.msg-user .msg-time {
    text-align: right;
}

.chat-input-bar {
    padding: 10px 12px;
    background: #181a20;
    border-top: 1px solid #2b3139;
    display: flex;
    gap: 8px;
    align-items: center;
}
.chat-input-bar input {
    flex: 1;
    background: #121418;
    border: 1px solid #2b3139;
    color: #fff;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
}
.chat-input-bar input:focus {
    border-color: #fcd535;
}
.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fcd535;
    color: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}
.chat-send-btn:hover {
    background: #e5be26;
    transform: scale(1.05);
}

/* === ORDER BOOK STYLES === */
.ob-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 3px 6px;
    font-size: 11px;
    height: 22px;
    cursor: pointer;
}
.ob-row.ask .price { color: #ff3b69; font-weight: 500; z-index: 2; }
.ob-row.bid .price { color: #00e676; font-weight: 500; z-index: 2; }
.ob-row .vol { color: #7b8293; z-index: 2; font-size: 10px; }
.ob-bg-ask {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(255, 59, 105, 0.15);
    z-index: 1;
    transition: width 0.2s;
    border-radius: 2px;
}
.ob-bg-bid {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 230, 118, 0.15);
    z-index: 1;
    transition: width 0.2s;
    border-radius: 2px;
}
.ob-mid {
    text-align: center;
    padding: 6px 0;
    font-size: 14px;
}

