/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
    background-color: #020617;
    color: #e5e7eb;
    line-height: 1.5;
}

/* ===== Layout ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: radial-gradient(circle at top left, #1d4ed8 0, #020617 55%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.logo-text {
    font-weight: 600;
    font-size: 16px;
    color: #e5e7eb;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 14px;
    color: #cbd5f5;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background-color: rgba(15, 23, 42, 0.6);
    color: #fff;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    text-decoration: none;
    color: #e5e7eb;
    font-size: 13px;
}

.user-name {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-badge {
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

/* Main */
.site-main {
    max-width: 1120px;
    margin: 20px auto 40px;
    padding: 0 16px;
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    background: #020617;
    padding: 14px 16px 18px;
    color: #64748b;
    font-size: 12px;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.footer-logo {
    font-weight: 600;
    color: #e5e7eb;
}

.footer-text {
    opacity: 0.8;
}

.footer-meta {
    margin-left: auto;
    opacity: 0.7;
}

/* ===== Typography & Utils ===== */
h1, h2, h3, h4 {
    margin: 0;
    font-weight: 600;
    color: #e5e7eb;
}

p {
    margin: 0 0 8px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
}

.page-subtitle {
    font-size: 13px;
    color: #9ca3af;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #22d3ee);
    color: #0b1120;
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-0.5px);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #e5e7eb;
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 1);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #e5e7eb;
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.8);
}

/* ===== Tabs / Pills ===== */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tab-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid transparent;
    color: #9ca3af;
    background: rgba(15, 23, 42, 0.7);
}

.tab-pill.active {
    background: linear-gradient(135deg, #1d4ed8, #22c55e);
    color: #f9fafb;
}

.tab-pill:hover {
    border-color: rgba(148, 163, 184, 0.7);
}

/* ===== Cards ===== */
.card {
    border-radius: 16px;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(30, 64, 175, 0.7);
    padding: 16px 18px;
}

.card-muted {
    border-color: rgba(30, 64, 175, 0.3);
    background: rgba(15, 23, 42, 0.96);
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}

.badge-category {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #e5e7eb;
}

.badge-market {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #7dd3fc;
}

.badge-chip {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

/* ===== Alerts ===== */
.alert {
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #fecaca;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
}

.alert-info {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.6);
    color: #bfdbfe;
}

.alert-secondary {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.5);
}

/* ===== Tables ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
}

.table th,
.table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.table thead th {
    background: rgba(15, 23, 42, 0.95);
    font-weight: 500;
    color: #9ca3af;
}

.table-striped tbody tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.8);
}

.table-striped tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.9);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 10px;
}

.form-control {
    width: 100%;
    padding: 8px 9px;
    border-radius: 10px;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: #020617;
    color: #e5e7eb;
    font-size: 13px;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
}

/* ===== Links ===== */
a {
    color: #93c5fd;
}

a:hover {
    color: #bfdbfe;
}

/* ===== Comments / Post body ===== */
.post-body pre,
.comment-body pre {
    font-family: inherit;
    font-size: 13px;
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 6px;
    }
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
    .site-main {
        margin-top: 14px;
    }
}
.markdown-body {
    font-size: 13px;
    line-height: 1.6;
}

.markdown-body code {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 12px;
}

.markdown-body a {
    text-decoration: underline;
    text-decoration-color: rgba(129, 140, 248, 0.8);
}