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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #0b0e11;
    color: #eaecef;
    min-height: 100vh;
}

header {
    background: #1e2329;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2b2f36;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo i {
    color: #f0b90b;
    font-size: 28px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #f0b90b;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: #848e9c;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 15px;
}

nav a:hover, nav a.active {
    background: #2b2f36;
    color: #f0b90b;
}

.market-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0ecb81;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #0ecb81;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.price-ticker {
    margin-bottom: 30px;
}

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

.ticker-header h2 {
    font-size: 20px;
    color: #f0b90b;
}

.search-box {
    display: flex;
    align-items: center;
    background: #2b2f36;
    border-radius: 8px;
    padding: 8px 16px;
    gap: 8px;
}

.search-box input {
    background: transparent;
    border: none;
    color: #eaecef;
    font-size: 14px;
    outline: none;
    width: 250px;
}

.search-box i {
    color: #848e9c;
}

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

.ticker-card {
    background: #1e2329;
    border-radius: 10px;
    padding: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.ticker-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.ticker-card .symbol {
    font-weight: 600;
    font-size: 14px;
    color: #848e9c;
    margin-bottom: 8px;
}

.ticker-card .price {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ticker-card .change {
    font-size: 14px;
    font-weight: 500;
}

.ticker-card .change.green { color: #0ecb81; }
.ticker-card .change.red { color: #f6465d; }

.ticker-card .volume {
    font-size: 12px;
    color: #848e9c;
    margin-top: 5px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-section, .orderbook-section, .portfolio-section, .trades-section, .hot-section {
    background: #1e2329;
    border-radius: 12px;
    padding: 20px;
}

.chart-section h2, .orderbook-section h2, .portfolio-section h2, .trades-section h2, .hot-section h2 {
    font-size: 16px;
    color: #f0b90b;
    margin-bottom: 15px;
}

.chart-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.time-btn {
    background: #2b2f36;
    color: #848e9c;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.time-btn:hover, .time-btn.active {
    background: #f0b90b;
    color: #1a1a1a;
}

.chart-container {
    height: 350px;
    position: relative;
}

.chart-container canvas {
    width: 100%;
    height: 100%;
}

.orderbook-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.orderbook-header {
    font-size: 13px;
    color: #848e9c;
    margin-bottom: 10px;
    font-weight: 600;
}

.order-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid #2b2f36;
}

.order-row .price { font-weight: 600; }
.order-row .price.green { color: #0ecb81; }
.order-row .price.red { color: #f6465d; }
.order-row .amount { color: #848e9c; }

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portfolio-total {
    font-size: 22px;
    font-weight: 700;
    color: #f0b90b;
    margin-bottom: 15px;
}

.portfolio-chart {
    height: 150px;
    margin-bottom: 15px;
}

.portfolio-chart canvas {
    width: 100%;
    height: 100%;
}

.asset-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #2b2f36;
    font-size: 13px;
}

.asset-name { font-weight: 600; color: #f0b90b; }
.asset-amount { color: #eaecef; }
.asset-value { color: #848e9c; }
.asset-percent { color: #0ecb81; font-weight: 500; }

.trades-list, .hot-list {
    max-height: 300px;
    overflow-y: auto;
}

.trade-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #2b2f36;
    font-size: 12px;
}

.trade-time { color: #848e9c; }
.trade-price { color: #eaecef; }
.trade-amount { color: #848e9c; }
.trade-side { font-weight: 600; }
.trade-side.buy { color: #0ecb81; }
.trade-side.sell { color: #f6465d; }

.hot-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #2b2f36;
}

.hot-symbol { font-weight: 600; }
.hot-change { font-weight: 500; }
.hot-change.green { color: #0ecb81; }
.hot-change.red { color: #f6465d; }
.hot-volume { color: #848e9c; font-size: 12px; }

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1e2329;
}

::-webkit-scrollbar-thumb {
    background: #2b2f36;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3f47;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .orderbook-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    .ticker-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .search-box input {
        width: 150px;
    }
}