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

:root {
    --bg: #0a0a0f;
    --card: #12121a;
    --primary: #00ff88;
    --danger: #ff4757;
    --warning: #ffa502;
    --text: #ffffff;
    --text-muted: #8b8b9f;
    --border: #2a2a3a;
}

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

.container {
    max-width: 480px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* Cards */
.card {
    background: var(--card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

/* Portfolio Card */
.portfolio .balance-section {
    text-align: center;
    margin-bottom: 16px;
}

.balance-section .label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.balance {
    display: block;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 4px;
}

.pnl {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.pnl.negative {
    color: var(--danger);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #00d4ff);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: space-around;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Chart */
.chart-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

/* Trades */
.trades-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.trades-list {
    max-height: 400px;
    overflow-y: auto;
}

.trade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.trade-item:last-child {
    border-bottom: none;
}

.trade-info {
    flex: 1;
}

.trade-market {
    font-weight: 600;
    font-size: 14px;
}

.trade-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.trade-pnl {
    font-weight: 700;
    font-size: 16px;
}

.trade-pnl.positive {
    color: var(--primary);
}

.trade-pnl.negative {
    color: var(--danger);
}

/* Status Bar */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Responsive */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
    }
}
