/* ===== Mia Trading AI - 银发战斗天使 Alita 风格 ===== */

/* ===== CSS Variables ===== */
:root {
    /* 主背景 - 深空黑（更纯粹，去除紫色AI感） */
    --bg-void: #08080c;
    --bg-deep: #0c0c10;
    --bg-surface: #101014;
    --bg-card: #161619;
    --bg-elevated: #1c1c20;
    
    /* Mia 银发主题色 */
    --mia-silver: #c0c8d8;        /* 银白色 */
    --mia-silver-bright: #e8ecf4; /* 亮银色 */
    --mia-silver-glow: #f0f4ff;   /* 银色光晕 */
    --mia-rose: #e8a0b0;          /* 淡玫瑰（Alita 嘴唇色） */
    --mia-eye: #7eb8c9;           /* 柔和青蓝（眼睛色，不刺眼） */
    
    /* 渐变色 - 银色系 */
    --gradient-primary: linear-gradient(135deg, #c0c8d8 0%, #8090a8 50%, #a0b0c8 100%);
    --gradient-accent: linear-gradient(135deg, #e8a0b0 0%, #c8a0b8 100%);
    --gradient-silver: linear-gradient(135deg, #e8ecf4 0%, #c0c8d8 50%, #a8b0c0 100%);
    
    /* 文字 */
    --text-bright: #f0f2f8;
    --text-normal: #a0a8b8;
    --text-dim: #606878;
    --text-muted: #404450;
    
    /* 状态色 */
    --up: #5cd08c;               /* 柔和绿 */
    --down: #e86070;             /* 柔和红 */
    --warn: #e8b060;             /* 柔和橙 */
    --neutral: #808898;
    
    /* 边框 - 银色系 */
    --border-subtle: rgba(192, 200, 216, 0.06);
    --border-normal: rgba(192, 200, 216, 0.12);
    --border-accent: rgba(192, 200, 216, 0.25);
    
    /* 字体 */
    --font-display: 'Orbitron', 'Courier New', monospace;
    --font-ui: 'Rajdhani', 'Segoe UI', sans-serif;
    --font-body: 'Noto Sans SC', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    
    /* 尺寸 */
    --sidebar-width: 380px;
    --header-height: 52px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg-void);
    color: var(--text-normal);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== 银发天使风格背景 ===== */
.app-container {
    display: flex;
    height: 100vh;
    position: relative;
    background: 
        /* 柔和星点（银白色） */
        radial-gradient(1px 1px at 15% 25%, rgba(240,244,255,0.25) 1px, transparent 1px),
        radial-gradient(1px 1px at 35% 65%, rgba(240,244,255,0.15) 1px, transparent 1px),
        radial-gradient(1px 1px at 55% 35%, rgba(240,244,255,0.2) 1px, transparent 1px),
        radial-gradient(1px 1px at 75% 55%, rgba(240,244,255,0.15) 1px, transparent 1px),
        radial-gradient(1.5px 1.5px at 85% 15%, rgba(192, 200, 216, 0.3) 1px, transparent 1.5px),
        radial-gradient(1.5px 1.5px at 25% 85%, rgba(232, 160, 176, 0.2) 1px, transparent 1.5px),
        /* 纯净深空背景（无紫色） */
        linear-gradient(180deg, 
            rgba(8, 8, 12, 1) 0%, 
            rgba(12, 12, 16, 1) 30%,
            rgba(14, 14, 18, 1) 60%,
            rgba(10, 10, 14, 1) 100%
        );
    background-size: 200px 200px, 150px 150px, 180px 180px, 160px 160px, 300px 300px, 350px 350px, 100% 100%;
}

/* 银色光晕效果 */
.app-container::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 0;
    background: 
        /* 银白光晕 */
        radial-gradient(ellipse at 15% 20%, rgba(192, 200, 216, 0.06) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 75%, rgba(192, 200, 216, 0.04) 0%, transparent 45%),
        /* 淡淡玫瑰色点缀（Mia 的腮红） */
        radial-gradient(ellipse at 70% 25%, rgba(232, 160, 176, 0.03) 0%, transparent 35%);
    animation: aurora 25s ease-in-out infinite alternate;
}

@keyframes aurora {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, -5%) rotate(3deg); }
}

/* ===== Scanline (更微妙的CRT效果) ===== */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.02) 2px,
        rgba(0, 0, 0, 0.02) 4px
    );
    opacity: 0.4;
}

/* ===== Main Panel ===== */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    z-index: 1;
    overflow-y: auto;
}

/* ===== Header ===== */
.header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    background: rgba(14, 14, 26, 0.9);
    border-bottom: 1px solid var(--border-normal);
    backdrop-filter: blur(10px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    background: var(--gradient-silver);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 25px rgba(192, 200, 216, 0.4);
}

.logo-sub {
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* Coin Selector - 胶囊按钮风格 */
.coin-selector {
    display: flex;
    background: rgba(192, 200, 216, 0.05);
    border-radius: 20px;
    padding: 3px;
    border: 1px solid var(--border-subtle);
}

.coin-btn {
    padding: 5px 16px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 16px;
}

.coin-btn:hover {
    color: var(--text-normal);
}

.coin-btn.active {
    background: var(--gradient-primary);
    color: var(--bg-void);
    box-shadow: 0 0 15px rgba(192, 200, 216, 0.4);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-dim);
}

.status-indicator.online {
    background: var(--up);
    box-shadow: 0 0 8px var(--up);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.last-update {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
}

/* 语言切换按钮 */
.lang-switcher {
    display: flex;
    background: rgba(192, 200, 216, 0.05);
    border-radius: 12px;
    padding: 2px;
    border: 1px solid var(--border-subtle);
}

.lang-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--text-normal);
}

.lang-btn.active {
    background: var(--gradient-silver);
    color: var(--bg-void);
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-normal);
    border-radius: 50%;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: var(--mia-silver);
    color: var(--mia-silver);
    box-shadow: 0 0 12px rgba(192, 200, 216, 0.3);
}

/* ===== Price Bar ===== */
.price-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(18, 18, 31, 0.8);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(5px);
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.price-value {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(192, 200, 216, 0.3);
}

.price-change {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
}

.price-change.up {
    color: var(--up);
    background: rgba(0, 255, 157, 0.15);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

.price-change.down {
    color: var(--down);
    background: rgba(255, 71, 87, 0.15);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.2);
}

.price-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-normal);
}

/* ===== Chart Container ===== */
.chart-container {
    flex: 1;
    min-height: 280px;
    background: rgba(14, 14, 26, 0.6);
    position: relative;
}

#tradingview-widget,
.tradingview-widget-container,
#tradingview_chart {
    width: 100%;
    height: 100%;
}

/* ===== Data Grid - 二次元卡片风格 ===== */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    background: var(--border-subtle);
}

.data-block {
    background: rgba(18, 18, 31, 0.9);
    padding: 12px 14px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

/* 卡片顶部装饰线 */
.data-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

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

.block-title {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    color: var(--mia-silver);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.block-source {
    font-family: var(--font-mono);
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* RSI Grid */
.rsi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.rsi-item {
    text-align: center;
    padding: 6px 4px;
    background: rgba(192, 200, 216, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.rsi-period {
    display: block;
    font-size: 9px;
    color: var(--text-dim);
    margin-bottom: 2px;
}

.rsi-value {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
}

.rsi-value.overbought { color: var(--down); }
.rsi-value.oversold { color: var(--up); }

/* Taker Buy/Sell */
.taker-content {
    text-align: center;
}

.taker-ratio {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.taker-ratio.buy-dominant { color: var(--up); }
.taker-ratio.sell-dominant { color: var(--down); }
.taker-ratio.balanced { color: var(--neutral); }

.taker-bar {
    height: 6px;
    display: flex;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
    background: var(--bg-void);
}

.taker-buy { background: linear-gradient(90deg, var(--up), #00cc7a); transition: width 0.5s; }
.taker-sell { background: linear-gradient(90deg, #cc3344, var(--down)); transition: width 0.5s; }

.taker-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
}

.taker-labels .buy { color: var(--up); }
.taker-labels .sell { color: var(--down); }

/* OI Change */
.oi-change-content {
    text-align: center;
}

.oi-change-value {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.oi-change-value.positive { color: var(--up); }
.oi-change-value.negative { color: var(--down); }

.oi-change-hint {
    font-size: 10px;
    color: var(--text-dim);
}

/* Liquidation */
.liq-content {
    text-align: center;
}

.liq-total {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--warn);
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(232, 176, 96, 0.3);
}

.liq-bar-container {
    padding: 0 4px;
}

.liq-bar {
    height: 5px;
    display: flex;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
    background: var(--bg-void);
}

.liq-long {
    background: linear-gradient(90deg, var(--up), #00cc7a);
    transition: width 0.5s;
}

.liq-short {
    background: linear-gradient(90deg, #cc3344, var(--down));
    transition: width 0.5s;
}

.liq-labels {
    display: flex;
    justify-content: space-between;
}

.liq-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
}

.liq-label.long { color: var(--up); }
.liq-label.short { color: var(--down); }

/* Fear & Greed */
.fgi-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fgi-main {
    flex: 1;
    text-align: center;
}

.fgi-value {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
}

.fgi-value.extreme-fear { color: var(--down); text-shadow: 0 0 15px rgba(255, 71, 87, 0.5); }
.fgi-value.fear { color: var(--warn); text-shadow: 0 0 15px rgba(232, 176, 96, 0.5); }
.fgi-value.neutral { color: var(--neutral); }
.fgi-value.greed { color: var(--up); text-shadow: 0 0 15px rgba(0, 255, 157, 0.5); }
.fgi-value.extreme-greed { color: var(--mia-silver); text-shadow: 0 0 15px rgba(192, 200, 216, 0.5); }

.fgi-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 2px;
}

.fgi-label.extreme-fear { background: rgba(255, 71, 87, 0.2); color: var(--down); }
.fgi-label.fear { background: rgba(232, 176, 96, 0.2); color: var(--warn); }
.fgi-label.neutral { background: rgba(116, 125, 140, 0.2); color: var(--neutral); }
.fgi-label.greed { background: rgba(0, 255, 157, 0.2); color: var(--up); }
.fgi-label.extreme-greed { background: rgba(192, 200, 216, 0.2); color: var(--mia-silver); }

.fgi-history {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fgi-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 6px;
    background: rgba(192, 200, 216, 0.05);
    border-radius: 3px;
    min-width: 70px;
}

.fgi-period {
    font-size: 9px;
    color: var(--text-dim);
}

.fgi-num {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-normal);
}

/* Orderbook */
.orderbook-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.orderbook-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background: rgba(192, 200, 216, 0.05);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.orderbook-row.bid { border-left: 2px solid var(--up); }
.orderbook-row.ask { border-left: 2px solid var(--down); }

.orderbook-price { color: var(--text-dim); font-size: 10px; }
.orderbook-amount { color: var(--text-normal); }

/* ===== Mia Sidebar - 二次元风格 ===== */
.mia-sidebar {
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: rgba(14, 14, 26, 0.95);
    border-left: 1px solid var(--border-normal);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

/* 侧边栏装饰 */
.mia-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.5;
}

/* Mia Header */
.mia-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(192, 200, 216, 0.08) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-normal);
}

.clear-chat-btn {
    margin-left: auto;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-normal);
    border-radius: 50%;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
}

.clear-chat-btn:hover {
    opacity: 1;
    border-color: var(--down);
    color: var(--down);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

.mia-avatar-container {
    position: relative;
    width: 52px;
    height: 52px;
}

/* Mia 头像 - 二次元风格边框 */
.mia-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid transparent;
    background: 
        linear-gradient(var(--bg-deep), var(--bg-deep)) padding-box,
        var(--gradient-primary) border-box;
    box-shadow: 
        0 0 20px rgba(192, 200, 216, 0.4),
        0 0 40px rgba(232, 160, 176, 0.2);
}

.avatar-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.2;
    animation: avatar-pulse 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes avatar-pulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.15); opacity: 0.1; }
}

.mia-info {
    flex: 1;
}

.mia-name {
    display: block;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.mia-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--up);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--up);
    box-shadow: 0 0 6px var(--up);
}

/* Chat Container */
.chat-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 3px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(192, 200, 216, 0.2);
    border-radius: 2px;
}

/* Messages - 气泡风格 */
.message {
    max-width: 88%;
}

.message.mia {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    line-height: 1.6;
}

.message.mia .message-content {
    background: linear-gradient(135deg, rgba(192, 200, 216, 0.1) 0%, rgba(232, 160, 176, 0.08) 100%);
    border: 1px solid rgba(192, 200, 216, 0.2);
    border-radius: 4px 16px 16px 16px;
    color: var(--text-normal);
}

.message.user .message-content {
    background: var(--gradient-accent);
    border-radius: 16px 4px 16px 16px;
    color: var(--text-bright);
    box-shadow: 0 4px 15px rgba(232, 160, 176, 0.3);
}

.message-content p {
    margin-bottom: 6px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-time {
    display: block;
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 4px;
    padding: 0 4px;
}

.message.user .message-time {
    text-align: right;
}

/* Strategy Panel */
.strategy-panel {
    border-top: 1px solid var(--border-normal);
    background: rgba(18, 18, 40, 0.9);
}

.strategy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.strategy-title {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    color: var(--mia-silver);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.strategy-refresh {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-normal);
    border-radius: 50%;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.strategy-refresh:hover {
    border-color: var(--mia-silver);
    color: var(--mia-silver);
    box-shadow: 0 0 10px rgba(192, 200, 216, 0.3);
}

.strategy-content {
    padding: 14px;
    max-height: 180px;
    overflow-y: auto;
}

.strategy-placeholder {
    text-align: center;
    color: var(--text-dim);
    font-size: 11px;
    padding: 16px;
}

/* Strategy Result */
.strategy-result {
    font-size: 12px;
}

.strategy-direction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
}

.strategy-direction.long {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.15) 0%, rgba(0, 204, 122, 0.1) 100%);
    border: 1px solid rgba(0, 255, 157, 0.3);
    color: var(--up);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}

.strategy-direction.short {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.15) 0%, rgba(204, 51, 68, 0.1) 100%);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: var(--down);
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.2);
}

.strategy-direction.neutral {
    background: linear-gradient(135deg, rgba(255, 165, 2, 0.15) 0%, rgba(204, 132, 2, 0.1) 100%);
    border: 1px solid rgba(255, 165, 2, 0.3);
    color: var(--warn);
    box-shadow: 0 0 20px rgba(255, 165, 2, 0.2);
}

.strategy-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.strategy-item {
    padding: 8px;
    background: rgba(192, 200, 216, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.strategy-item-label {
    display: block;
    font-size: 9px;
    color: var(--text-dim);
    margin-bottom: 2px;
}

.strategy-item-value {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright);
}

/* Chat Input - 二次元风格 */
.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 14px;
    background: rgba(18, 18, 40, 0.9);
    border-top: 1px solid var(--border-normal);
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(192, 200, 216, 0.05);
    border: 1px solid var(--border-normal);
    border-radius: 20px;
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.chat-input::placeholder {
    color: var(--text-dim);
}

.chat-input:focus {
    border-color: var(--mia-silver);
    box-shadow: 0 0 15px rgba(192, 200, 216, 0.2);
}

.send-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border: none;
    border-radius: 50%;
    color: var(--text-bright);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(232, 160, 176, 0.3);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(232, 160, 176, 0.5);
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 18, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid transparent;
    border-top-color: var(--mia-silver);
    border-right-color: var(--mia-rose);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--mia-silver);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-void);
}

::-webkit-scrollbar-thumb {
    background: rgba(192, 200, 216, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(192, 200, 216, 0.4);
}

/* ===== 移动端专属元素（默认隐藏） ===== */
.resize-handle,
.mia-float-btn,
.collapse-btn {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 340px;
    }
    .data-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    
    .main-panel {
        border-right: none;
        flex: 1;
        min-height: 0;
    }
    
    /* Mia 侧边栏 - 可收起 */
    .mia-sidebar {
        width: 100%;
        height: 45vh;
        min-height: 150px;
        max-height: 80vh;
        border-left: none;
        border-top: none;
        position: relative;
        transition: height 0.3s ease, opacity 0.3s ease;
    }
    
    .mia-sidebar.collapsed {
        height: 0 !important;
        min-height: 0 !important;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }
    
    .mia-sidebar::before {
        display: none;
    }
    
    /* 移动端拖拽手柄 */
    .resize-handle {
        display: flex !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 20px;
        cursor: ns-resize;
        background: var(--bg-card);
        border-top: 1px solid var(--border-normal);
        align-items: center;
        justify-content: center;
        z-index: 10;
        touch-action: none;
    }
    
    .resize-handle::before {
        content: '';
        width: 40px;
        height: 4px;
        background: var(--mia-silver);
        border-radius: 2px;
        opacity: 0.4;
    }
    
    .resize-handle:hover::before,
    .resize-handle:active::before {
        opacity: 0.7;
    }
    
    .mia-header {
        margin-top: 20px;
    }
    
    /* 浮动 Mia 头像按钮 */
    .mia-float-btn {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--bg-card);
        border: 2px solid var(--mia-silver);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(192, 200, 216, 0.2);
        cursor: pointer;
        z-index: 1000;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        align-items: center;
        justify-content: center;
    }
    
    .mia-float-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5), 0 0 30px rgba(192, 200, 216, 0.3);
    }
    
    .mia-float-btn:active {
        transform: scale(0.95);
    }
    
    .mia-float-btn img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .mia-float-btn.hidden {
        transform: scale(0);
        opacity: 0;
        pointer-events: none;
    }
    
    /* 收起按钮 */
    .collapse-btn {
        display: flex !important;
        position: absolute;
        top: 0;
        right: 12px;
        width: 28px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        z-index: 11;
    }
    
    .collapse-btn svg {
        width: 16px;
        height: 16px;
        stroke: var(--mia-silver);
        opacity: 0.6;
        transition: opacity 0.2s;
    }
    
    .collapse-btn:hover svg {
        opacity: 1;
    }
    
    .data-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .price-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .price-stats {
        width: 100%;
        justify-content: space-between;
    }
}

/* ===== Utility Classes ===== */
.hidden { display: none !important; }
.text-up { color: var(--up) !important; }
.text-down { color: var(--down) !important; }
.text-warn { color: var(--warn) !important; }
.text-accent { color: var(--mia-silver) !important; }
