:root {
    --bg: #0b1220;
    --surface: #121a2b;
    --surface-alt: #182235;
    --border: #27324a;
    --text: #e8eefc;
    --text-muted: #9fb0d1;
    --primary: #6fb1ff;
    --primary-hover: #90c2ff;
    --success: #63d297;
    --warning: #f0c36d;
    --danger: #ef7373;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --container: 1200px;
}

/* ========================================
   Base / Reset
======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

    a:hover {
        color: var(--primary-hover);
        text-decoration: none;
    }

    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

/* ========================================
   Typography
======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.75rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    letter-spacing: -0.015em;
}

h3 {
    font-size: 1.2rem;
}

h4 {
    font-size: 1rem;
}

p {
    margin: 0 0 1rem;
}

small {
    font-size: 0.85em;
}

code,
pre {
    font-family: "Cascadia Code", "Consolas", "Courier New", monospace;
}

/* ========================================
   Structural defaults
======================================== */

main {
    display: block;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ========================================
   Cards / Panels
======================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

    .card + .card {
        margin-top: 1rem;
    }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.card-subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ========================================
   Buttons
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

    .btn:hover {
        text-decoration: none;
    }

    .btn:active {
        transform: translateY(1px);
    }

.btn-primary {
    background: var(--primary);
    color: #08111f;
    border-color: var(--primary);
}

    .btn-primary:hover {
        background: var(--primary-hover);
        border-color: var(--primary-hover);
        color: #08111f;
    }

.btn-secondary {
    background: var(--surface-alt);
    color: var(--text);
    border-color: var(--border);
}

    .btn-secondary:hover {
        background: #202c44;
        border-color: #31415f;
        color: var(--text);
    }

.btn-danger {
    background: rgba(239, 115, 115, 0.14);
    color: var(--danger);
    border-color: rgba(239, 115, 115, 0.35);
}

    .btn-danger:hover {
        background: rgba(239, 115, 115, 0.2);
        color: #ff9c9c;
    }

.btn-sm {
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.btn-block,
.w-100 {
    width: 100%;
}

/* ========================================
   Alerts / Notices
======================================== */

.alert {
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.alert-info {
    background: rgba(111, 177, 255, 0.08);
    border-color: rgba(111, 177, 255, 0.25);
    color: var(--text);
}

.alert-success {
    background: rgba(99, 210, 151, 0.08);
    border-color: rgba(99, 210, 151, 0.25);
    color: var(--text);
}

.alert-warning {
    background: rgba(240, 195, 109, 0.08);
    border-color: rgba(240, 195, 109, 0.25);
    color: var(--text);
}

.alert-danger {
    background: rgba(239, 115, 115, 0.08);
    border-color: rgba(239, 115, 115, 0.25);
    color: var(--text);
}

/* ========================================
   Lists
======================================== */

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

.definition-list {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.75rem 1rem;
}

    .definition-list dt {
        color: var(--text-muted);
        font-weight: 500;
    }

    .definition-list dd {
        margin: 0;
    }

/* ========================================
   Badges
======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
}

.badge-success {
    color: var(--success);
    border-color: rgba(99, 210, 151, 0.35);
    background: rgba(99, 210, 151, 0.08);
}

.badge-warning {
    color: var(--warning);
    border-color: rgba(240, 195, 109, 0.35);
    background: rgba(240, 195, 109, 0.08);
}

.badge-danger {
    color: var(--danger);
    border-color: rgba(239, 115, 115, 0.35);
    background: rgba(239, 115, 115, 0.08);
}

/* ========================================
   Empty / helper blocks
======================================== */

.empty-state {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

/* ========================================
   Responsive
======================================== */

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1rem;
    }

    .definition-list {
        grid-template-columns: 1fr;
    }
}
