:root {
    --bg: #05070d;
    --bg-2: #090d16;
    --panel: rgba(12, 18, 30, 0.78);
    --panel-2: rgba(16, 23, 38, 0.86);
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f4f7fb;
    --muted: #9aa8bc;
    --green: #5ee071;
    --green-2: #7cff9b;
    --blue: #4b8dff;
    --cyan: #38e8ff;
    --yellow: #ffcc33;
    --red: #ff5f6d;
    --purple: #9d6cff;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(75, 141, 255, 0.22), transparent 32%),
        radial-gradient(circle at 80% 5%, rgba(94, 224, 113, 0.16), transparent 30%),
        radial-gradient(circle at 80% 90%, rgba(157, 108, 255, 0.18), transparent 35%),
        linear-gradient(135deg, #03050a 0%, #070b13 46%, #02030a 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 82%);
}

a {
    color: inherit;
    text-decoration: none;
}

.trade-page {
    width: min(1440px, calc(100% - 36px));
    margin: 0 auto;
    padding: 28px 0 54px;
    position: relative;
    z-index: 2;
}

.trade-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(94,224,113,0.95), rgba(56,232,255,0.85));
    color: #04100a;
    font-weight: 900;
    box-shadow: 0 0 34px rgba(94, 224, 113, 0.26);
}

.brand strong {
    display: block;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.brand span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    color: var(--muted);
    padding: 11px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255,255,255,0.05);
}

.hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 22px;
    margin-bottom: 22px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
        rgba(10, 15, 26, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    padding: 34px;
    min-height: 360px;
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    right: -180px;
    top: -190px;
    background: radial-gradient(circle, rgba(94,224,113,0.24), transparent 62%);
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--green-2);
    background: rgba(94, 224, 113, 0.09);
    border: 1px solid rgba(94, 224, 113, 0.22);
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 22px;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 16px var(--green);
}

h1 {
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.92;
    letter-spacing: -0.07em;
    margin: 0 0 18px;
}

.hero-card p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    max-width: 720px;
    margin: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 15px 22px;
    font-size: 15px;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, border .2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green), var(--cyan));
    color: #04100a;
    box-shadow: 0 12px 36px rgba(94, 224, 113, 0.22);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
}

.btn:hover {
    transform: translateY(-2px);
}

.mini-terminal {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(56,232,255,0.08), rgba(94,224,113,0.04)),
        rgba(6, 10, 18, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.terminal-top {
    height: 52px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--red);
}

.dot:nth-child(2) {
    background: var(--yellow);
}

.dot:nth-child(3) {
    background: var(--green);
}

.terminal-body {
    padding: 28px;
}

.terminal-line {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: var(--muted);
    font-size: 14px;
}

.terminal-line:last-child {
    border-bottom: 0;
}

.terminal-line strong {
    color: var(--text);
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 18px;
    align-items: stretch;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025)),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.profile-panel {
    padding: 26px;
}

.profile-circle {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    margin: 0 auto 22px;
    padding: 5px;
    background: conic-gradient(var(--green) var(--score, 0%), rgba(255,255,255,0.10) 0);
}

.profile-inner {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.16), transparent 42%),
        #101724;
    font-size: 34px;
    font-weight: 900;
}

.profile-panel h2 {
    text-align: center;
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.profile-panel .subtitle {
    text-align: center;
    color: var(--muted);
    margin: 8px 0 24px;
    font-size: 14px;
}

.profile-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 12px;
}

.profile-item strong {
    color: var(--text);
    font-weight: 800;
}

.quote {
    margin-top: 34px;
    border-top: 1px solid var(--line);
    padding-top: 28px;
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}

.quote-mark {
    color: var(--green);
    font-size: 42px;
    line-height: 0;
    display: block;
    margin-bottom: 10px;
}

.main-panel {
    padding: 26px;
}

.top-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: center;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.score-ring {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    margin: 0 auto;
    padding: 18px;
    background: conic-gradient(
        var(--green) 0 var(--score, 0%),
        rgba(255,255,255,0.09) var(--score, 0%) 100%
    );
    box-shadow: inset 0 0 34px rgba(0,0,0,0.28), 0 0 50px rgba(94,224,113,0.10);
}

.score-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    display: grid;
    place-items: center;
    text-align: center;
    background:
        radial-gradient(circle at 40% 20%, rgba(255,255,255,0.12), transparent 45%),
        #080d15;
    border: 1px solid rgba(255,255,255,0.07);
}

.score-number {
    font-size: 72px;
    font-weight: 950;
    letter-spacing: -0.08em;
    line-height: 1;
}

.score-number span {
    display: block;
    color: var(--muted);
    font-size: 18px;
    letter-spacing: 0;
    font-weight: 600;
    margin-top: 4px;
}

.score-label {
    color: var(--green);
    margin-top: 10px;
    font-weight: 800;
}

.metric-bars {
    display: grid;
    gap: 20px;
}

.metric-bars h3,
.side-panel h3,
.form-panel h3,
.history-panel h3 {
    margin: 0 0 18px;
    font-size: 18px;
    letter-spacing: -0.03em;
}

.bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 54px;
    gap: 14px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

.bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--cyan));
    box-shadow: 0 0 22px rgba(94,224,113,0.22);
}

.bar-value {
    text-align: right;
    color: var(--text);
    font-weight: 800;
}

.belt-card {
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    background: rgba(255,255,255,0.035);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.timeline-step {
    position: relative;
    padding: 18px 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
}

.timeline-step strong {
    display: block;
    font-size: 14px;
}

.timeline-step span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.timeline-step.active {
    border-color: rgba(94,224,113,0.45);
    background: rgba(94,224,113,0.08);
}

.side-panel {
    padding: 26px;
}

.readiness {
    display: grid;
    grid-template-columns: 116px 1fr;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.035);
    margin-bottom: 18px;
}

.mini-ring {
    width: 106px;
    height: 106px;
    border-radius: 50%;
    padding: 10px;
    background: conic-gradient(var(--yellow) 0 var(--winrate, 0%), rgba(255,255,255,0.09) var(--winrate, 0%) 100%);
}

.mini-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    display: grid;
    place-items: center;
    background: #080d15;
    font-weight: 900;
    font-size: 24px;
}

.readiness strong {
    font-size: 26px;
    display: block;
}

.readiness span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.attribute-list {
    display: grid;
    gap: 12px;
}

.attribute {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.attribute:last-child {
    border-bottom: 0;
}

.attribute small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

.stars {
    color: var(--yellow);
    letter-spacing: 2px;
    white-space: nowrap;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
        rgba(10, 15, 26, 0.78);
    backdrop-filter: blur(18px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(94,224,113,0.10);
    color: var(--green);
    border: 1px solid rgba(94,224,113,0.18);
    font-size: 23px;
}

.stat-card strong {
    display: block;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
}

.lower-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
    margin-top: 18px;
}

.form-panel,
.history-panel {
    padding: 26px;
}

.trade-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.11);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
        rgba(4, 8, 15, 0.75);
    color: var(--text);
    border-radius: 17px;
    padding: 15px 16px;
    outline: none;
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

select option {
    background: #080d15;
    color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(94,224,113,0.55);
    box-shadow: 0 0 0 4px rgba(94,224,113,0.08);
}

.form-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-top: 6px;
}

.disclaimer {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.save-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 17px;
    background: rgba(94,224,113,0.10);
    border: 1px solid rgba(94,224,113,0.24);
    color: var(--green-2);
    font-weight: 800;
}

.setup-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.setup-card {
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.035);
    border-radius: 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.setup-card strong {
    display: block;
    font-size: 15px;
}

.setup-card span {
    color: var(--muted);
    font-size: 13px;
}

.trade-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.trade-table th,
.trade-table td {
    padding: 13px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 13px;
}

.trade-table th {
    color: var(--muted);
    font-weight: 700;
}

.trade-table td {
    color: var(--text);
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.08);
}

.pill.win {
    color: var(--green);
    background: rgba(94,224,113,0.10);
    border-color: rgba(94,224,113,0.20);
}

.pill.loss {
    color: var(--red);
    background: rgba(255,95,109,0.10);
    border-color: rgba(255,95,109,0.20);
}

.pill.be {
    color: var(--yellow);
    background: rgba(255,204,51,0.10);
    border-color: rgba(255,204,51,0.20);
}

.positive {
    color: var(--green);
}

.negative {
    color: var(--red);
}

.empty-state {
    padding: 26px;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(255,255,255,0.18);
    color: var(--muted);
    text-align: center;
    background: rgba(255,255,255,0.025);
}

@media (max-width: 1180px) {
    .hero,
    .dashboard-shell,
    .lower-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-shell {
        gap: 18px;
    }

    .profile-panel {
        display: none;
    }

    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .trade-page {
        width: min(100% - 24px, 1440px);
        padding-top: 18px;
    }

    .trade-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .hero-card {
        padding: 24px;
    }

    .top-grid,
    .trade-form,
    .stats-strip,
    .timeline {
        grid-template-columns: 1fr;
    }

    .score-ring {
        width: 210px;
        height: 210px;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .trade-table {
        min-width: 720px;
    }

    .table-scroll {
        overflow-x: auto;
    }
}