/* Custom Fonts locales (fichiers WOFF2 embarqués, indépendants du navigateur et de la connexion) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/inter.woff2') format('woff2');
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/outfit.woff2') format('woff2');
}

:root {
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;

    --color-background: #0c0d0c;
    --color-foreground: #f2f4f3;
    --color-surface: #131615;
    --color-surface-light: #1b1f1d;
    --color-border: #262c29;

    --color-accent: #34d399;
    --color-accent-light: #6ee7b7;

    --color-rarity-c: #b8f2d5;
    --color-rarity-pc: #b1cff2;
    --color-rarity-r: #c6a7f2;
    --color-rarity-sr: #ed6fa3;
    --color-rarity-ur: #fa9931;
    --color-rarity-l: #ffe144;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-background);
    color: var(--color-foreground);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-surface);
}
::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

/* Glow effects matching WikiMasters official */
.glow-c { box-shadow: 0 0 6px #b8f2d538, 0 0 10px #b8f2d524; }
.glow-pc { box-shadow: 0 0 8px #b1cff23d, 0 0 14px #b1cff229; }
.glow-r { box-shadow: 0 0 10px #c6a7f242, 0 0 18px #c6a7f22e; }
.glow-sr { box-shadow: 0 0 12px #ed6fa347, 0 0 22px #ed6fa32e; }
.glow-ur { box-shadow: 0 0 14px #fa99314d, 0 0 24px #fa99312e; }
.glow-l { box-shadow: 0 0 16px #ffe1445c, 0 0 28px #fa993133; }

/* Legendary Shimmer Sheen */
@keyframes legendary-shimmer-slide {
    0% { transform: translate(0); }
    to { transform: translate(-50%); }
}

.legendary-shimmer-sheen {
    mix-blend-mode: soft-light;
    will-change: transform;
    background-image: linear-gradient(90deg, #0000 0% 25%, #fff2c821 40%, #ffda961c 50%, #fff2c821 60%, #0000 75% 100%);
    background-repeat: repeat-x;
    background-size: 50% 100%;
    width: 200%;
    height: 100%;
    animation: 3s linear infinite legendary-shimmer-slide;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 28;
}

/* TOP NAVIGATION (Sticky, ultra-compact on mobile, spacious on desktop) */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 13, 12, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border);
    padding: 10px 16px 8px 16px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.nav-brand-text {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.nav-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
}

/* Actions Group (Discord + WikiBidous) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Discord Chip */
.discord-chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(88, 101, 242, 0.12);
    border: 1px solid rgba(88, 101, 242, 0.35);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
    outline: none;
}

.discord-chip:hover {
    background: rgba(88, 101, 242, 0.22);
    border-color: #5865F2;
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.35);
}

.discord-chip.copied {
    background: rgba(52, 211, 153, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

.discord-icon {
    width: 16px;
    height: 16px;
    color: #7289da;
    flex-shrink: 0;
    transition: color 0.2s;
}

.discord-chip.copied .discord-icon {
    color: var(--color-accent);
}

.discord-tag {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* WikiBidous Badge */
.nav-wikibidous {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.28);
    color: #facc15;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s ease;
    user-select: none;
    font-variant-numeric: tabular-nums;
}

.nav-wikibidous:hover {
    background: rgba(250, 204, 21, 0.14);
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.2);
}

.wb-icon {
    width: 16px;
    height: 16px;
    color: #facc15;
    flex-shrink: 0;
}

.wb-val {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 800;
    color: #facc15;
    letter-spacing: -0.01em;
}

/* Search Box */
.nav-search {
    position: relative;
    flex: 1;
    max-width: 460px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(242, 244, 243, 0.4);
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 8px 34px 8px 36px;
    color: #fff;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--color-accent);
    background: var(--color-surface-light);
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.15);
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(242, 244, 243, 0.4);
    cursor: pointer;
    padding: 3px;
    font-size: 13px;
    display: none;
    line-height: 1;
}

.search-clear-btn:hover {
    color: #fff;
}

/* Responsive Grid on Mobile */
@media (max-width: 720px) {
    .top-nav {
        padding: 8px 12px 6px 12px;
    }

    .nav-container {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 8px;
        align-items: center;
    }

    .nav-brand {
        grid-column: 1;
        grid-row: 1;
    }

    .nav-actions {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        gap: 6px;
    }

    .nav-search {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
    }

    .search-input {
        padding: 8px 34px 8px 36px;
        font-size: 13px;
    }

    .discord-chip {
        padding: 5px 9px;
        font-size: 11.5px;
        gap: 4px;
    }

    .discord-icon {
        width: 14px;
        height: 14px;
    }

    .discord-tag {
        font-size: 11px;
    }

    .nav-wikibidous {
        padding: 5px 9px;
        gap: 4px;
    }

    .wb-icon {
        width: 14px;
        height: 14px;
    }

    .wb-val {
        font-size: 12px;
    }
}

/* Rarity Ribbon (Swipeable / 1 single row) */
.rarity-ribbon-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 8px;
}

.rarity-ribbon {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.rarity-ribbon::-webkit-scrollbar {
    display: none;
}

.rarity-btn {
    appearance: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-foreground);
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    transition: all 0.18s;
}

.rarity-btn:hover {
    background: var(--color-surface-light);
    border-color: rgba(200, 208, 203, 0.25);
}

.rarity-btn.active {
    border-color: var(--active-color, var(--color-accent));
    background: rgba(52, 211, 153, 0.12);
    color: #fff;
}

.rarity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.rarity-btn .count-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 0 5px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
}

/* MAIN CONTENT */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 14px 40px 14px;
}

/* Status Text */
.status-wrap {
    padding: 4px 2px 10px 2px;
}

.status-text {
    font-size: 12px;
    color: rgba(242, 244, 243, 0.45);
}

.status-text strong {
    color: #fff;
}

/* Account Filter Bar (Principal vs Doubles comptes) */
.account-filter-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.account-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.account-filter-tabs::-webkit-scrollbar {
    display: none;
}

.account-tab {
    appearance: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: rgba(242, 244, 243, 0.7);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s;
    user-select: none;
}

.account-tab:hover {
    background: var(--color-surface-light);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.account-tab.active {
    background: rgba(52, 211, 153, 0.15);
    border-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

.account-tab-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.dot-main {
    background-color: #34d399;
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

.dot-secondary {
    background-color: #a78bfa;
    box-shadow: 0 0 6px rgba(167, 139, 250, 0.6);
}

.account-pill {
    background: rgba(255, 255, 255, 0.08);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    color: rgba(242, 244, 243, 0.85);
}

.account-tab.active .account-pill {
    background: rgba(52, 211, 153, 0.25);
    color: #fff;
}

/* Actions & Filtre Doublons */
.account-filter-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.duplicates-tab {
    appearance: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: rgba(242, 244, 243, 0.75);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
}

.duplicates-tab:hover {
    background: var(--color-surface-light);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.duplicates-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.duplicates-tab:hover .duplicates-icon {
    opacity: 1;
    transform: scale(1.08);
}

.duplicates-tab.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #fbbf24;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.22);
}

.duplicates-tab.active .duplicates-icon {
    opacity: 1;
    stroke: #fbbf24;
}

.duplicates-tab.active .account-pill {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* Modal Accounts Section */
.modal-accounts-box {
    margin-top: 6px;
    padding: 12px;
    background: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.modal-section-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(242, 244, 243, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.modal-accounts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-acc-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.modal-acc-item.is-main {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #6ee7b7;
}

.modal-acc-item.is-secondary {
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: #c4b5fd;
}

.acc-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.modal-acc-item.is-main .acc-indicator {
    background-color: #34d399;
}

.modal-acc-item.is-secondary .acc-indicator {
    background-color: #a78bfa;
}

.acc-qty {
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.25);
    padding: 0 5px;
    border-radius: 4px;
    font-size: 11px;
}

/* CARDS GRID (Responsive: 2 cols on mobile, 4-7 on desktop) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    min-height: 300px;
}

@media (min-width: 560px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
        gap: 14px;
    }
}

@media (min-width: 900px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 18px;
    }
}

/* THE CARD (Exact Match to WikiMasters Card) */
.wm-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 56 / 80;
    background-color: #151817;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.wm-card:hover {
    transform: translateY(-4px) scale(1.03);
    z-index: 10;
}

/* Texture scaled 1.8x fills the whole card */
.wm-card-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.8);
    pointer-events: none;
    z-index: 1;
}

.wm-card-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 50%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* Top 45% Image area */
.wm-card-image-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background-color: rgba(0, 0, 0, 0.22);
    overflow: hidden;
    z-index: 5;
}

.wm-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wm-card-fallback-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
}

.wm-card-fallback-thumb img {
    width: 48%;
    max-height: 65%;
    object-fit: contain;
    opacity: 0.6;
}

.wm-card-image-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    pointer-events: none;
}

/* Rarity Badge (top-left) */
.wm-card-rarity-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 800;
    color: #0d1117;
    z-index: 20;
    line-height: 1.25;
}

/* Copies badge (top-right) */
.wm-card-top-right {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 20;
}

.wm-card-copies-badge {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 5px;
}

/* Bottom 55% Content */
.wm-card-content {
    position: absolute;
    top: 45%;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    z-index: 10;
}

.wm-card-title {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.22;
    color: #0d1117;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wm-card-category {
    font-size: 9px;
    color: rgba(13, 17, 23, 0.85);
    font-weight: 500;
    line-height: 1.22;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bottom Stats Bar (ATK / DEF) */
.wm-card-stats {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    padding-top: 4px;
}

.wm-stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 800;
    color: #0d1117;
}

.wm-stat-icon {
    width: 12px;
    height: 12px;
    display: inline-block;
    flex-shrink: 0;
}

.wm-stat.atk .wm-stat-icon { color: #991b1b; }
.wm-stat.def .wm-stat-icon { color: #1e40af; }

/* Infinite Scroll Sentinel */
.sentinel {
    padding: 30px 0 60px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sentinel-loader {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(242, 244, 243, 0.6);
    font-size: 13px;
}

.sentinel-end {
    color: rgba(242, 244, 243, 0.4);
    font-size: 12px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(52, 211, 153, 0.2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Floating Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-surface-light);
    border: 1px solid var(--color-border);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--color-surface);
    border-color: var(--color-accent);
}

.scroll-top-btn svg {
    width: 20px;
    height: 20px;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(242, 244, 243, 0.5);
}

.empty-state h3 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 6px;
}

/* Modal View */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: #131615;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 22px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: scale(0.96) translateY(10px);
    transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 10;
}
.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.modal-content {
    display: flex;
    gap: 24px;
}

@media (max-width: 600px) {
    .modal-content {
        flex-direction: column;
        align-items: center;
    }
}

.modal-card-preview {
    width: 220px;
    flex-shrink: 0;
}

.modal-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.modal-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-rarity-badge {
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    color: #0d1117;
}

.modal-category {
    font-size: 13px;
    color: rgba(242, 244, 243, 0.65);
}

.modal-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 4px 0;
}

.stat-box {
    background: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.stat-box .val {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.stat-box.atk .val { color: #f87171; }
.stat-box.def .val { color: #60a5fa; }

.stat-box .lbl {
    font-size: 10px;
    color: rgba(242, 244, 243, 0.4);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.modal-meta-list {
    font-size: 12.5px;
    color: rgba(242, 244, 243, 0.6);
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
}

.modal-meta-list strong {
    color: #fff;
}

.wiki-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(52, 211, 153, 0.14);
    color: var(--color-accent);
    border: 1px solid rgba(52, 211, 153, 0.35);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 4px;
}

.wiki-link-btn:hover {
    background: rgba(52, 211, 153, 0.24);
    border-color: var(--color-accent);
}
