:root {
    --bg: #0b0c10;
    --panel: #111318;
    --panel-2: #0f1116;
    --text: #d1d5db;
    --muted: #9aa0a6;
    --accent: #2f81f7;
    --success: #238636;
    --danger: #da3633;
    --radius: 16px;
    --shadow: 0 6px 18px rgba(0, 0, 0, .35);
    --font-main: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.5;
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #1f232b;
    padding: 16px 0;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #f0f6fc;
    letter-spacing: -0.5px;
}

.back-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}

main {
    padding: 30px 0;
}


/* Market Indicators */
.market-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.indicator-card {
    background: var(--panel-2);
    border: 1px solid #1f232b;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    transition: all 0.2s;
}

.indicator-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.indicator-label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.indicator-value {
    font-size: 18px;
    font-weight: 700;
    color: #f0f6fc;
}

/* Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--panel);
    border: 1px solid #1f232b;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

.chart-container {
    background: var(--panel);
    border: 1px solid #1f232b;
    border-radius: var(--radius);
    padding: 24px;
    height: 400px;
    position: relative;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #f0f6fc;
}

/* Transactions List */
.transactions-section {
    background: var(--panel);
    border: 1px solid #1f232b;
    border-radius: var(--radius);
    overflow: hidden;
}

.section-header {
    padding: 20px 24px;
    border-bottom: 1px solid #1f232b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header .actions {
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #f0f6fc;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2a73dd;
}

.transaction-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #1f232b;
    transition: background 0.1s;
}

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

.transaction-item:hover {
    background: var(--panel-2);
}

.t-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.t-title {
    font-weight: 500;
    color: #f0f6fc;
}

.t-meta {
    font-size: 12px;
    color: var(--muted);
}

.t-value {
    font-weight: 600;
    text-align: right;
}

.t-amount {
    color: #f0f6fc;
}

.t-type {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
}

.type-buy {
    background: rgba(35, 134, 54, 0.2);
    color: #3fb950;
}

.type-sell {
    background: rgba(218, 54, 51, 0.2);
    color: #f85149;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--panel);
    border: 1px solid #30363d;
    border-radius: var(--radius);
    width: 100%;
    max-width: 450px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #f0f6fc;
}

.close-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
}

.close-btn:hover {
    color: #f0f6fc;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.form-control {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 10px;
    color: #f0f6fc;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--accent);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.modal-footer {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #30363d;
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary:hover {
    border-color: #8b949e;
}