/* BlueTrader v2 — 모바일 최적화 UI */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #1a1a2e; color: #eaeaea; padding: 12px 12px 70px; min-height: 100vh; }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #333; margin-bottom: 10px; }
.header h1 { font-size: 1rem; color: #4fc3f7; }
.header .status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.header .status-dot.connected { background: #4caf50; animation: pulse 2s infinite; }
.header .status-dot.disconnected { background: #f44336; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* Cards */
.card { background: #16213e; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.card-title { font-size: 0.75rem; color: #888; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.card-accent { border-top: 2px solid #4fc3f7; }

/* Account selector */
.account-tabs { display: flex; gap: 4px; margin-bottom: 10px; overflow-x: auto; padding-bottom: 4px; }
.account-tab { padding: 6px 12px; background: #2a2a4e; border-radius: 6px; font-size: 0.72rem; white-space: nowrap; cursor: pointer; border: none; color: #aaa; transition: all 0.2s; }
.account-tab.active { background: #4fc3f7; color: #000; font-weight: bold; }

/* Summary grid */
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.summary-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.summary-item { background: #0d1117; border-radius: 6px; padding: 10px; text-align: center; }
.summary-item .value { font-size: 1.1rem; font-weight: bold; margin-top: 2px; }
.summary-item .label { font-size: 0.65rem; color: #888; }

/* Colors */
.positive { color: #4caf50; }
.negative { color: #f44336; }
.neutral { color: #888; }

/* Position row */
.position-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #222; }
.position-row:last-child { border: none; }
.position-info { flex: 1; }
.position-symbol { font-size: 0.82rem; font-weight: bold; }
.position-meta { font-size: 0.65rem; color: #888; margin-top: 2px; }
.position-pnl { text-align: right; font-size: 0.85rem; font-weight: bold; }

/* Badges */
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; border-radius: 3px; font-size: 0.6rem; font-weight: bold; }
.badge-long { background: #4caf50; color: #fff; }
.badge-short { background: #f44336; color: #fff; }
.badge-dca { background: #ff9800; color: #000; margin-left: 3px; }
.badge-trail { background: #9c27b0; color: #fff; margin-left: 3px; }

/* Trade row */
.trade-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #222; font-size: 0.75rem; }
.trade-row:last-child { border: none; }

/* Progress bar (DCA) */
.progress-bar { height: 3px; background: #333; border-radius: 2px; margin-top: 3px; width: 100%; }
.progress-fill { height: 100%; border-radius: 2px; transition: width 0.3s; }

/* Tab bar */
.tab-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #0d1117; border-top: 1px solid #333; display: flex; z-index: 100; }
.tab-bar button { flex: 1; padding: 10px 0; background: none; border: none; color: #888; font-size: 0.7rem; cursor: pointer; transition: color 0.2s; }
.tab-bar button.active { color: #4fc3f7; border-top: 2px solid #4fc3f7; }

/* Tab content */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Buttons */
.btn { padding: 8px 16px; border: none; border-radius: 6px; font-size: 0.8rem; font-weight: bold; cursor: pointer; transition: opacity 0.2s; }
.btn:active { opacity: 0.7; }
.btn-primary { background: #4fc3f7; color: #000; }
.btn-danger { background: #f44336; color: #fff; width: 100%; padding: 12px; font-size: 0.9rem; margin-top: 10px; }
.btn-outline { background: none; border: 1px solid #4fc3f7; color: #4fc3f7; }

/* Filter buttons */
.filter-bar { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-btn { padding: 6px 12px; background: #2a2a4e; border: 1px solid #333; border-radius: 6px; font-size: 0.7rem; color: #aaa; cursor: pointer; }
.filter-btn.active { background: #4fc3f7; color: #000; border-color: #4fc3f7; }

/* Chart */
.chart-container { position: relative; height: 200px; margin-bottom: 10px; }

/* Login */
.login-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 80vh; }
.login-input { width: 200px; padding: 12px; border-radius: 8px; border: 1px solid #333; background: #16213e; color: #eaeaea; font-size: 1rem; text-align: center; }

/* Coin PnL */
.coin-pnl-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #222; font-size: 0.75rem; }
.coin-pnl-row:last-child { border: none; }
.coin-pnl-bar { height: 4px; border-radius: 2px; margin-top: 3px; }

/* Empty state */
.empty-state { text-align: center; padding: 20px; color: #555; font-size: 0.8rem; }

/* Responsive */
@media (min-width: 600px) {
  body { max-width: 480px; margin: 0 auto; }
}
