:root {
    --bg-dark: #0a0e17;
    --bg-panel: #111827;
    --bg-card: #1a2235;
    --border: #1e3a5f;
    --text: #f0f6ff;
    --text-secondary: #8899bb;
    --green: #00e5a0;
    --red: #ff4757;
    --yellow: #ffc107;
    --blue: #3b9eff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
}

.container { max-width: 1600px; margin: 0 auto; padding: 20px; }

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.logo { display: flex; align-items: center; gap: 15px; }
.logo-icon { font-size: 36px; }
.logo h1 { font-size: 24px; background: linear-gradient(90deg, var(--yellow), #ff7043); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo .subtitle { color: var(--text-secondary); font-size: 14px; }

.header-right { text-align: right; }
.time { font-size: 28px; font-weight: bold; font-family: monospace; }
.market-status { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #666; }
.status-dot.open { background: var(--green); animation: pulse 1.5s infinite; }
.status-dot.closed { background: #666; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Overview Cards */
.overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.card-icon { font-size: 32px; }
.card-info { display: flex; flex-direction: column; }
.card-label { color: var(--text-secondary); font-size: 13px; }
.card-value { font-size: 24px; font-weight: bold; margin-top: 5px; }
.card-value.up { color: var(--green); }
.card-value.down { color: var(--red); }

/* Content Layout */
.content { display: grid; grid-template-columns: 280px 1fr 260px; gap: 20px; }

/* Panel */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.panel h3 { font-size: 16px; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }

/* Position List */
.position-list .item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid transparent;
}
.position-list .item.loss { border-left-color: var(--red); }
.position-list .item .name { font-weight: 600; }
.position-list .item .code { font-size: 12px; color: var(--text-secondary); }
.position-list .item .profit { font-size: 12px; color: var(--red); }

/* Timeline */
.timeline { list-style: none; }
.timeline li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: none; }
.timeline .time { font-family: monospace; color: var(--text-secondary); font-size: 13px; min-width: 45px; }
.timeline .text { font-size: 14px; }
.timeline li.done .text { color: var(--green); }
.timeline li.active .text { color: var(--yellow); }
.timeline li.active::before {
    content: '';
    width: 8px; height: 8px;
    background: var(--yellow);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

/* Filters */
.filters { display: flex; gap: 8px; }
.btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.btn.active { background: var(--blue); border-color: var(--blue); color: white; }
.btn:hover { border-color: var(--blue); }

/* Stock Grid */
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.stock-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}
.stock-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.stock-card.top { border-color: var(--yellow); background: linear-gradient(135deg, var(--bg-card), rgba(255,193,7,0.05)); }
.stock-card .header { display: flex; justify-content: space-between; margin-bottom: 10px; padding: 0; border: none; }
.stock-card .name { font-weight: 600; }
.stock-card .code { font-size: 12px; color: var(--text-secondary); }
.stock-card .price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.stock-card .price { font-size: 20px; font-weight: bold; font-family: monospace; }
.stock-card .change { font-size: 13px; color: var(--green); }
.stock-card .metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 12px; }
.stock-card .metric { text-align: center; padding: 6px; background: var(--bg-panel); border-radius: 6px; }
.stock-card .metric-label { color: var(--text-secondary); font-size: 10px; }
.stock-card .metric-value { font-weight: 600; margin-top: 2px; }

/* Criteria List */
.criteria-list { list-style: none; }
.criteria-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.criteria-list li:last-child { border-bottom: none; }
.criteria-list .dot { width: 8px; height: 8px; border-radius: 50%; }
.criteria-list .dot.blue { background: var(--blue); }
.criteria-list .dot.green { background: var(--green); }
.criteria-list .dot.yellow { background: var(--yellow); }
.criteria-list .dot.purple { background: #a855f7; }
.criteria-list .dot.orange { background: #ff7043; }
.criteria-list .dot.cyan { background: #00d4ff; }
.criteria-list .dot.red { background: var(--red); }
.criteria-list .check { margin-left: auto; color: var(--green); font-weight: bold; }
.criteria-list .note { margin-left: auto; color: var(--text-secondary); font-size: 11px; }

/* Actions */
.actions { display: flex; flex-direction: column; gap: 10px; }
.btn-primary, .btn-secondary {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
.btn-primary { background: var(--green); color: #000; }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }

/* Loading */
.loading { text-align: center; padding: 40px; color: var(--text-secondary); }

/* Responsive */
@media (max-width: 1200px) {
    .content { grid-template-columns: 1fr; }
    .sidebar.right { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .overview { grid-template-columns: repeat(2, 1fr); }
    .header { flex-direction: column; gap: 15px; }
}
