@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    --bg: #060a13;
    --bg2: #0b1120;
    --card: #0f1729;
    --card-hover: #162035;
    --border: #1a2744;
    --border-light: #243356;
    --text: #e8edf5;
    --text-dim: #5a6b8a;
    --green: #00e68a;
    --green-glow: rgba(0, 230, 138, 0.15);
    --green-bg: rgba(0, 230, 138, 0.08);
    --red: #ff4d6a;
    --red-glow: rgba(255, 77, 106, 0.15);
    --red-bg: rgba(255, 77, 106, 0.08);
    --blue: #4d8dff;
    --blue-glow: rgba(77, 141, 255, 0.2);
    --purple: #a78bfa;
    --gold: #fbbf24;
    --gold-bg: rgba(251, 191, 36, 0.08);
    --cyan: #22d3ee;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px;
}

.green { color: var(--green) !important; }
.red { color: var(--red) !important; }
.blue { color: var(--blue) !important; }

/* Background effects */
.bg-grid {
    position: fixed; inset: 0;
    background-image: 
        linear-gradient(rgba(77,141,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77,141,255,0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: 0; pointer-events: none;
}
.bg-glow {
    position: fixed; top: -300px; left: 50%; transform: translateX(-50%);
    width: 1000px; height: 1000px;
    background: radial-gradient(circle, rgba(77,141,255,0.06) 0%, rgba(167,139,250,0.03) 40%, transparent 70%);
    z-index: 0; animation: pulse 10s ease-in-out infinite; pointer-events: none;
}
@keyframes pulse {
    0%,100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.container { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 24px; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gradientMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes profitPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(0,230,138,0.06), 0 4px 24px rgba(0,0,0,0.2); }
    50% { box-shadow: 0 0 50px rgba(0,230,138,0.1), 0 4px 24px rgba(0,0,0,0.2); }
}
@keyframes floatUp {
    0% { transform: translateY(100vh); opacity: 0; }
    10% { opacity: 1; } 90% { opacity: 1; }
    100% { transform: translateY(-100px); opacity: 0; }
}
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.anim-fade { animation: fadeInUp 0.6s ease-out both; }
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }

.page-content { animation: pageIn 0.5s ease-out; }

.particle {
    position: fixed; width: 2px; height: 2px;
    background: rgba(77,141,255,0.25); border-radius: 50%;
    animation: floatUp linear infinite; z-index: 0; pointer-events: none;
}

/* Page Header */
.page-header {
    text-align: center; padding: 32px 0 28px;
    animation: fadeIn 0.6s ease-out;
}
.page-header h1 {
    font-size: 2rem; font-weight: 900; letter-spacing: -1px;
    background: linear-gradient(135deg, #4d8dff, #a78bfa, #ff4d94, #4d8dff);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: gradientMove 6s ease infinite;
    margin-bottom: 6px;
}
.page-header p { color: var(--text-dim); font-size: 0.95rem; }

/* Navigation - Desktop */
.nav-desktop {
    display: none; position: sticky; top: 0; z-index: 100;
    background: rgba(6, 10, 19, 0.92); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); padding: 0 24px;
}
.nav-desktop-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; gap: 0; height: 56px;
}
.nav-desktop .nav-brand {
    font-weight: 800; font-size: 1.05rem; margin-left: 28px;
    background: linear-gradient(135deg, #4d8dff, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-desktop a {
    text-decoration: none; color: var(--text-dim); font-size: 0.85rem;
    font-weight: 600; padding: 16px 18px; position: relative;
    transition: color 0.2s;
}
.nav-desktop a:hover { color: var(--text); }
.nav-desktop a.active {
    color: var(--blue);
}
.nav-desktop a.active::after {
    content: ''; position: absolute; bottom: 0; left: 18px; right: 18px;
    height: 2px; background: var(--blue); border-radius: 2px 2px 0 0;
}

/* Navigation - Mobile (Bottom Tab Bar) */
.nav-mobile {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: rgba(6, 10, 19, 0.95); backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}
.nav-mobile a {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: var(--text-dim); font-size: 0.65rem;
    font-weight: 600; gap: 3px; padding: 6px 0; transition: color 0.2s;
}
.nav-mobile a .nav-icon { font-size: 1.3rem; }
.nav-mobile a:hover { color: var(--text); }
.nav-mobile a.active { color: var(--blue); }

@media (min-width: 769px) {
    .nav-desktop { display: block; }
    .nav-mobile { display: none; }
    body { padding-bottom: 0; }
}

/* Cards */
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: 18px;
    padding: 24px; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.2); }

.section-title {
    font-size: 1.1rem; font-weight: 800; margin-bottom: 16px;
    letter-spacing: -0.3px; display: flex; align-items: center; gap: 8px;
}
.section-divider {
    height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 8px 0 24px;
}

/* Portfolio cards */
.portfolio-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.portfolio-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 18px;
    padding: 24px 28px; position: relative; overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.portfolio-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.portfolio-card.realized::before { background: linear-gradient(90deg, var(--blue), var(--purple)); }
.portfolio-card.unrealized::before { background: linear-gradient(90deg, var(--green), var(--cyan)); }
.portfolio-card .label { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.portfolio-card .big-val { font-size: 2.2rem; font-weight: 900; letter-spacing: -1px; }
.portfolio-card .sub-val { font-size: 0.82rem; color: var(--text-dim); margin-top: 6px; }

/* Top Stats Bar */
.top-stats {
    display: flex; gap: 0; justify-content: center; margin-bottom: 28px;
    background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
}
.top-stat {
    flex: 1; text-align: center; padding: 20px 24px;
    border-left: 1px solid var(--border); transition: background 0.3s;
}
.top-stat:last-child { border-left: none; }
.top-stat:hover { background: var(--card-hover); }
.top-stat .label { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.top-stat .value { font-size: 1.5rem; font-weight: 800; }
.top-stat .sub { font-size: 0.75rem; margin-top: 4px; font-weight: 500; }

/* Month Selector */
.month-selector { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; }
.month-btn {
    background: var(--card); border: 1px solid var(--border); color: var(--text-dim);
    padding: 10px 20px; border-radius: 12px; cursor: pointer; font-family: inherit;
    font-size: 0.85rem; font-weight: 600; transition: all 0.3s;
}
.month-btn:hover { border-color: var(--blue); color: var(--text); background: var(--card-hover); }
.month-btn.active {
    background: linear-gradient(135deg, rgba(77,141,255,0.15), rgba(167,139,250,0.1));
    border-color: var(--blue); color: var(--blue);
}

/* Calendar */
.calendar-wrapper { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px; margin-bottom: 28px; }
.calendar-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.calendar-header div { text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--text-dim); padding: 8px 0; text-transform: uppercase; letter-spacing: 1px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day {
    aspect-ratio: 1; border-radius: 12px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; font-size: 0.85rem;
    position: relative; transition: all 0.2s ease; border: 1px solid transparent;
    min-height: 74px; gap: 2px;
}
.cal-day.empty { opacity: 0; pointer-events: none; }
.cal-day.has-data { cursor: pointer; }
.cal-day.positive { border-color: rgba(0,230,138,0.15); }
.cal-day.positive.intensity-1 { background: rgba(0,230,138,0.04); }
.cal-day.positive.intensity-2 { background: rgba(0,230,138,0.08); }
.cal-day.positive.intensity-3 { background: rgba(0,230,138,0.14); border-color: rgba(0,230,138,0.25); }
.cal-day.negative { border-color: rgba(255,77,106,0.15); }
.cal-day.negative.intensity-1 { background: rgba(255,77,106,0.04); }
.cal-day.negative.intensity-2 { background: rgba(255,77,106,0.08); }
.cal-day.negative.intensity-3 { background: rgba(255,77,106,0.14); border-color: rgba(255,77,106,0.25); }
.cal-day.no-data { background: rgba(90,107,138,0.02); }
.cal-day.zero { background: rgba(90,107,138,0.04); border-color: rgba(90,107,138,0.1); }
.cal-day.today { box-shadow: 0 0 0 2px var(--blue), 0 0 16px rgba(77,141,255,0.12); }
.cal-day:hover.has-data { transform: scale(1.06); z-index: 2; box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.cal-day .day-num { font-weight: 600; font-size: 0.82rem; color: var(--text); line-height: 1; }
.cal-day.has-data .day-num { font-weight: 700; }
.cal-day:not(.has-data) .day-num { color: var(--text-dim); font-weight: 400; opacity: 0.5; }
.cal-day .day-pnl { font-weight: 700; font-size: 0.68rem; line-height: 1; }
.cal-day .day-pnl.green { color: var(--green); }
.cal-day .day-pnl.red { color: var(--red); }
.cal-day .day-pnl.dim { color: var(--text-dim); font-weight: 400; font-size: 0.6rem; }
.cal-day .tooltip {
    display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: #1a2744; border: 1px solid var(--border-light); border-radius: 10px;
    padding: 10px 14px; font-size: 0.78rem; white-space: nowrap; z-index: 100;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4); pointer-events: none;
}
.cal-day .tooltip::after {
    content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: #1a2744;
}
.cal-day:hover .tooltip { display: block; }

/* Cumulative bar */
.cumulative-bar { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.cumulative-bar .cum-label { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 8px; font-weight: 600; }
.cum-track { height: 6px; background: rgba(90,107,138,0.1); border-radius: 3px; overflow: hidden; }
.cum-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.cum-values { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--text-dim); }

/* Stats Cards */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px; margin-bottom: 28px;
}
.stat-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    padding: 22px; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.stat-card::after {
    content: ''; position: absolute; inset: 0; border-radius: 16px;
    background: linear-gradient(135deg, transparent 60%, rgba(77,141,255,0.03));
    pointer-events: none;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(77,141,255,0.3); box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.stat-card .icon { font-size: 1.5rem; margin-bottom: 8px; }
.stat-card .label { color: var(--text-dim); font-size: 0.78rem; margin-bottom: 8px; font-weight: 500; }
.stat-card .value { font-size: 1.7rem; font-weight: 800; }
.stat-card .sub { color: var(--text-dim); font-size: 0.72rem; margin-top: 6px; }

/* Win Rate Bar */
.winrate-bar { margin-top: 10px; height: 5px; background: var(--red-bg); border-radius: 3px; overflow: hidden; }
.winrate-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width 1.5s ease; }

/* Position Cards */
.pos-card {
    border-radius: 18px; padding: 24px; position: relative; overflow: hidden;
    border: 1px solid var(--border); background: var(--card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pos-card:hover { transform: translateY(-4px); }
.pos-card.pos-profit {
    border-color: rgba(0,230,138,0.25);
    background: linear-gradient(135deg, rgba(0,230,138,0.04) 0%, var(--card) 40%, rgba(34,211,238,0.03) 100%);
    box-shadow: 0 0 40px rgba(0,230,138,0.06), 0 4px 24px rgba(0,0,0,0.2);
    animation: profitPulse 4s ease-in-out infinite;
}
.pos-card.pos-profit:hover { box-shadow: 0 0 60px rgba(0,230,138,0.1), 0 8px 32px rgba(0,0,0,0.3); }
.pos-card.pos-loss {
    border-color: rgba(255,77,106,0.2);
    background: linear-gradient(135deg, rgba(255,77,106,0.04) 0%, var(--card) 40%);
    box-shadow: 0 0 40px rgba(255,77,106,0.04), 0 4px 24px rgba(0,0,0,0.2);
}
.pos-card.pos-loss:hover { box-shadow: 0 0 60px rgba(255,77,106,0.08), 0 8px 32px rgba(0,0,0,0.3); }
.pos-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.pos-card.pos-profit::before { background: linear-gradient(90deg, var(--green), var(--cyan)); }
.pos-card.pos-loss::before { background: linear-gradient(90deg, var(--red), #ff7eb3); }
.pos-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.pos-pair { font-size: 1.3rem; font-weight: 800; }
.pos-badges { display: flex; gap: 6px; }
.pos-badge { padding: 4px 10px; border-radius: 8px; font-size: 0.7rem; font-weight: 700; background: rgba(90,107,138,0.12); color: var(--text-dim); }
.pos-badge.long { background: var(--green-glow); color: var(--green); }
.pos-badge.short { background: var(--red-glow); color: var(--red); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.pos-item .pos-label { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 3px; font-weight: 500; }
.pos-item .pos-val { font-size: 1rem; font-weight: 700; }
.pos-pnl-big { font-size: 2.2rem; font-weight: 900; letter-spacing: -1px; }
.pos-pnl-big.green { text-shadow: 0 0 30px rgba(0,230,138,0.3); }
.pos-pnl-big.red { text-shadow: 0 0 30px rgba(255,77,106,0.3); }
.pos-roi { font-size: 1.15rem; font-weight: 700; margin-top: 4px; }
.pos-tpsl {
    margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
    display: flex; gap: 24px; font-size: 0.85rem; flex-wrap: wrap;
}
.pos-tpsl span { background: rgba(255,255,255,0.03); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); }
.live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--green);
    display: inline-block; margin-left: 8px; box-shadow: 0 0 8px var(--green);
    animation: blink 1.5s infinite;
}

/* Trades Table */
.trades-wrapper {
    background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; margin-bottom: 28px;
}
.trades-table { width: 100%; border-collapse: collapse; }
.trades-table th {
    background: rgba(77,141,255,0.04); padding: 14px 16px; text-align: right;
    font-size: 0.72rem; font-weight: 700; color: var(--text-dim);
    border-bottom: 1px solid var(--border); white-space: nowrap;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.trades-table td {
    padding: 13px 16px; font-size: 0.85rem;
    border-bottom: 1px solid rgba(26,39,68,0.5); white-space: nowrap;
}
.trades-table tr { transition: background 0.2s; }
.trades-table tr:hover td { background: var(--card-hover); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.7rem; font-weight: 700; }
.badge-long { background: var(--green-glow); color: var(--green); }
.badge-short { background: var(--red-glow); color: var(--red); }

/* Streak */
.streak-section { margin-bottom: 28px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 24px 28px; }
.streak-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.streak-counters { display: flex; gap: 16px; }
.streak-counter { padding: 8px 16px; border-radius: 10px; font-size: 0.82rem; font-weight: 700; }
.streak-counter.current { background: var(--blue-glow); color: var(--blue); }
.streak-counter.best { background: var(--green-glow); color: var(--green); }
.streak-counter.worst { background: var(--red-glow); color: var(--red); }
.streak-bar { display: flex; gap: 5px; flex-wrap: wrap; }
.streak-dot {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800; transition: transform 0.2s;
}
.streak-dot:hover { transform: scale(1.15); }
.streak-win { background: var(--green-glow); color: var(--green); border: 1px solid rgba(0,230,138,0.2); }
.streak-loss { background: var(--red-glow); color: var(--red); border: 1px solid rgba(255,77,106,0.2); }

/* SVG Charts */
.equity-svg { width: 100%; height: 200px; }
.equity-svg .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.equity-svg .area { opacity: 0.12; }
.equity-svg .grid-line { stroke: var(--border); stroke-width: 0.5; stroke-dasharray: 4 4; }
.equity-svg .dot { r: 3.5; stroke-width: 2; cursor: pointer; transition: r 0.2s; }
.equity-svg .dot:hover { r: 6; }
.equity-svg .axis-label { fill: var(--text-dim); font-size: 10px; font-family: Inter, sans-serif; }
.equity-svg .zero-line { stroke: var(--text-dim); stroke-width: 0.5; stroke-dasharray: 6 3; opacity: 0.4; }
.bar-svg { width: 100%; height: 180px; }
.bar-svg .bar { rx: 3; ry: 3; cursor: pointer; transition: opacity 0.2s; }
.bar-svg .bar:hover { opacity: 0.75; }
.bar-svg .bar-label { fill: var(--text-dim); font-size: 9px; font-family: Inter, sans-serif; text-anchor: middle; }
.bar-svg .bar-val { font-size: 8px; font-family: Inter, sans-serif; font-weight: 700; text-anchor: middle; }

/* Advanced Stats */
.adv-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px; margin-bottom: 28px;
}
.adv-stat {
    background: var(--card); border: 1px solid var(--border); border-radius: 14px;
    padding: 18px; text-align: center; transition: transform 0.3s, border-color 0.3s;
}
.adv-stat:hover { transform: translateY(-2px); border-color: var(--blue); }
.adv-stat .adv-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 6px; }
.adv-stat .adv-value { font-size: 1.4rem; font-weight: 800; }

/* Progress bars */
.progress-track { height: 8px; background: rgba(90,107,138,0.1); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 1.5s ease; }

/* Discipline */
.discipline-wrapper { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 24px 28px; margin-bottom: 28px; text-align: center; }
.discipline-ring-container { display: inline-block; position: relative; width: 160px; height: 160px; margin: 12px 0; }
.discipline-ring { transform: rotate(-90deg); }
.discipline-ring .bg-ring { fill: none; stroke: var(--border); stroke-width: 10; }
.discipline-ring .fg-ring { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.5s ease, stroke 0.5s; }
.discipline-score-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2.4rem; font-weight: 900; }
.discipline-factors { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.discipline-factor { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; font-size: 0.75rem; display: flex; align-items: center; gap: 6px; }
.factor-ok { color: var(--green); }
.factor-warn { color: var(--gold); }
.factor-bad { color: var(--red); }

/* Rules */
.rules-banner {
    background: linear-gradient(135deg, rgba(251,191,36,0.05), rgba(255,77,106,0.03));
    border: 1px solid rgba(251,191,36,0.15); border-radius: 16px;
    padding: 18px 24px; margin-bottom: 28px;
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.rules-banner .rule-title { font-weight: 800; color: var(--gold); font-size: 0.9rem; margin-left: 14px; }
.rules-banner .rule {
    background: rgba(0,0,0,0.3); padding: 6px 14px; border-radius: 8px;
    font-size: 0.75rem; color: var(--text-dim); border: 1px solid var(--border); font-weight: 500;
}

/* Goal Tracker */
.goal-wrapper {
    background: linear-gradient(135deg, rgba(77,141,255,0.04), rgba(167,139,250,0.04));
    border: 1px solid var(--border); border-radius: 18px; padding: 24px 28px; margin-bottom: 28px;
}
.goal-bar-track { height: 12px; background: rgba(90,107,138,0.1); border-radius: 6px; overflow: hidden; position: relative; margin: 14px 0 8px; }
.goal-bar-fill { height: 100%; border-radius: 6px; transition: width 1.5s ease; position: relative; }
.goal-bar-fill::after { content: ''; position: absolute; right: 0; top: -2px; bottom: -2px; width: 4px; background: white; border-radius: 2px; box-shadow: 0 0 8px rgba(255,255,255,0.5); }
.goal-info { display: flex; justify-content: space-between; font-size: 0.82rem; }
.goal-milestones { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.goal-milestone { font-size: 0.72rem; padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-dim); }
.goal-milestone.reached { background: var(--green-glow); color: var(--green); border-color: rgba(0,230,138,0.2); }

/* Footer */
.footer {
    text-align: center; padding: 40px 0 20px; color: var(--text-dim);
    font-size: 0.75rem; border-top: 1px solid var(--border); margin-top: 20px;
}

/* Mobile */
@media (max-width: 768px) {
    .container { padding: 14px; }
    .page-header h1 { font-size: 1.6rem; }
    .page-header { padding: 20px 0 18px; }
    .portfolio-summary { grid-template-columns: 1fr; gap: 12px; }
    .portfolio-card { padding: 20px; }
    .portfolio-card .big-val { font-size: 1.6rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 16px; }
    .stat-card .value { font-size: 1.3rem; }
    .top-stats { flex-direction: column; }
    .top-stat { border-left: none; border-bottom: 1px solid var(--border); padding: 16px; }
    .top-stat:last-child { border-bottom: none; }
    .trades-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .cal-day { min-height: 58px; border-radius: 10px; }
    .cal-day .day-num { font-size: 0.78rem; }
    .cal-day .day-pnl { font-size: 0.6rem; }
    .calendar-wrapper { padding: 16px; }
    .calendar-grid { gap: 4px; }
    .streak-dot { width: 30px; height: 30px; }
    .pos-card { padding: 20px; }
    .pos-pnl-big { font-size: 1.7rem; }
    .pos-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .adv-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .equity-svg { height: 160px; }
    .bar-svg { height: 150px; }
}
@media (max-width: 400px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .cal-day { min-height: 48px; }
}
