/* ── Encyclopedia Styles ──────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
}

::selection {
    background: #2d1b69;
    color: #fff;
}

body {
    background: #0a0a1a;
    color: #ccc;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────────── */

.header {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px 24px;
    text-align: center;
}

.back-link {
    display: inline-block;
    color: #8888cc;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #aaaaff;
}

.header h1 {
    font-size: 36px;
    color: #fff;
    letter-spacing: 4px;
    text-shadow:
        0 0 10px rgba(100, 100, 255, 0.5),
        0 0 30px rgba(100, 100, 255, 0.25),
        0 0 60px rgba(100, 100, 255, 0.12);
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
    font-size: 13px;
    letter-spacing: 2px;
}

/* ── Navigation ─────────────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0d0d22;
    border-bottom: 1px solid #1a1a3a;
    padding: 12px 24px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.nav a {
    color: #8888cc;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 1px;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav a:hover {
    color: #ccccff;
}

/* ── Main Content ───────────────────────────────────────────────── */

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

/* ── Sections ───────────────────────────────────────────────────── */

section {
    margin-bottom: 48px;
}

section h2 {
    font-size: 22px;
    color: #aaaaff;
    border-left: 4px solid #4444aa;
    padding-left: 12px;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

section > p {
    color: #888;
    max-width: 700px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.7;
}

/* ── Card Grid ──────────────────────────────────────────────────── */

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Card ────────────────────────────────────────────────────────── */

.card {
    background: #12122a;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 14px;
    border-left: 3px solid #333;
    transition: filter 0.2s;
}

.card:hover {
    filter: brightness(1.15);
}

/* Category border colors */
.card.border-blue    { border-left-color: #2266cc; }
.card.border-cyan    { border-left-color: #22aacc; }
.card.border-yellow  { border-left-color: #ccaa22; }
.card.border-red     { border-left-color: #cc3333; }
.card.border-green   { border-left-color: #33aa33; }
.card.border-purple  { border-left-color: #8833aa; }
.card.border-orange  { border-left-color: #cc6622; }
.card.border-white   { border-left-color: #888; }

/* ── Card Canvas Preview ────────────────────────────────────────── */

.card canvas {
    width: 64px;
    height: 64px;
    display: block;
    flex-shrink: 0;
    image-rendering: auto;
    border-radius: 4px;
    background: #0a0a18;
}

/* ── Card Info ───────────────────────────────────────────────────── */

.card-info {
    flex: 1;
    min-width: 0;
}

.card h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.card .trait {
    color: #777;
    font-style: italic;
    font-size: 12px;
    margin-bottom: 6px;
}

.card .description {
    color: #999;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ── Tags / Badges ──────────────────────────────────────────────── */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.tag {
    display: inline-block;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

.tag.blue    { background: #1a3366; color: #6699dd; }
.tag.cyan    { background: #1a4455; color: #66ccdd; }
.tag.yellow  { background: #443311; color: #ccaa44; }
.tag.red     { background: #441111; color: #dd6666; }
.tag.green   { background: #114411; color: #66cc66; }
.tag.purple  { background: #331144; color: #aa66dd; }
.tag.orange  { background: #442211; color: #cc8844; }
.tag.white   { background: #222233; color: #aaaaaa; }

.points {
    display: inline-block;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    background: #1a3322;
    color: #44dd66;
}

.unlock {
    display: inline-block;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    background: #221133;
    color: #9966cc;
}

/* ── Stats Grid ─────────────────────────────────────────────────── */

.stats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    font-size: 12px;
    margin-top: 6px;
}

.stats .label {
    color: #666;
}

.stats .value {
    color: #ddd;
}

/* ── Tip Blocks ─────────────────────────────────────────────────── */

.tip-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip {
    background: #10102a;
    border-left: 3px solid #4444aa;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #bbb;
    line-height: 1.6;
}

.tip strong {
    color: #aaaaff;
}

/* ── Combo Tier Table ───────────────────────────────────────────── */

.combo-table {
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}

.combo-table th,
.combo-table td {
    padding: 6px 14px;
    text-align: left;
    border-bottom: 1px solid #1a1a3a;
}

.combo-table th {
    color: #888;
    font-weight: normal;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.combo-table td {
    color: #ddd;
}

/* ── Upgrade List ───────────────────────────────────────────────── */

.upgrade-card {
    background: #12122a;
    border-radius: 8px;
    padding: 14px 16px;
    border-left: 3px solid #44aa44;
}

.upgrade-card h3 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 2px;
}

.upgrade-card .upgrade-desc {
    color: #888;
    font-size: 12px;
    margin-bottom: 6px;
}

.upgrade-card .upgrade-meta {
    font-size: 11px;
    color: #666;
}

.upgrade-card .upgrade-meta span {
    color: #aaa;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 700px) {
    .header h1 {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .nav {
        gap: 12px;
        padding: 10px 12px;
    }

    .nav a {
        font-size: 12px;
    }

    main {
        padding: 16px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 12px;
    }

    section h2 {
        font-size: 18px;
    }
}
