/* ═══════════════════════════════════════════════════════════════════════
   TBC BiS Guide — Mobile-First Dark Theme
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    /* WoW Class Colors */
    --warrior: #C79C6E;
    --paladin: #F58CBA;
    --hunter: #ABD473;
    --rogue: #FFF569;
    --priest: #FFFFFF;
    --shaman: #0070DE;
    --mage: #69CCF0;
    --warlock: #9482C9;
    --druid: #FF7D0A;

    /* Item Quality Colors */
    --quality-poor: #9d9d9d;
    --quality-common: #ffffff;
    --quality-uncommon: #1eff00;
    --quality-rare: #0070dd;
    --quality-epic: #a335ee;
    --quality-legendary: #ff8000;

    /* UI Colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2333;
    --bg-card-hover: #242d3d;
    --bg-modal: #1c2333;
    --border: #30363d;
    --border-light: #3d444d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #656d76;
    --accent: #f0b232;
    --accent-dim: rgba(240, 178, 50, 0.15);
    --bis-badge: #2ea043;
    --alt-badge: #6e7681;
    --danger: #f85149;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 100px;
}

/* ─── Header ──────────────────────────────────────────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(13,17,23,0.95) 100%);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.back-btn:active {
    transform: scale(0.9);
    background: var(--bg-card-hover);
}

.header-home-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.header-home-link:hover .header-title h1 {
    color: var(--accent, #e2b53a);
}

.header-title {
    flex: 1;
    min-width: 0;
}

.header-title h1 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.header-logo {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ─── Steps ───────────────────────────────────────────────────────── */
.step {
    padding: 16px;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ─── Context Hints ───────────────────────────────────────────────── */
.ctx-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    background: rgba(240, 178, 50, 0.06);
    border: 1px solid rgba(240, 178, 50, 0.15);
    border-radius: var(--radius);
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--text-secondary);
    animation: fadeIn 0.3s ease;
    transition: opacity 0.2s ease;
}

.ctx-hint-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.ctx-hint-body {
    flex: 1;
    min-width: 0;
}

.ctx-hint-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.ctx-hint-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 2px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.ctx-hint-dismiss:hover {
    opacity: 1;
}

/* ─── Class Grid ──────────────────────────────────────────────────── */
.class-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.class-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
}

.class-card:active {
    transform: scale(0.95);
}

.class-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.class-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid;
    transition: var(--transition);
    overflow: hidden;
}

.class-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.class-icon.warrior { border-color: var(--warrior); background: rgba(199,156,110,0.15); }
.class-icon.paladin { border-color: var(--paladin); background: rgba(245,140,186,0.15); }
.class-icon.hunter { border-color: var(--hunter); background: rgba(171,212,115,0.15); }
.class-icon.rogue { border-color: var(--rogue); background: rgba(255,245,105,0.15); }
.class-icon.priest { border-color: var(--priest); background: rgba(255,255,255,0.1); }
.class-icon.shaman { border-color: var(--shaman); background: rgba(0,112,222,0.15); }
.class-icon.mage { border-color: var(--mage); background: rgba(105,204,240,0.15); }
.class-icon.warlock { border-color: var(--warlock); background: rgba(148,130,201,0.15); }
.class-icon.druid { border-color: var(--druid); background: rgba(255,125,10,0.15); }

.class-card[data-class="Warrior"] span { color: var(--warrior); }
.class-card[data-class="Paladin"] span { color: var(--paladin); }
.class-card[data-class="Hunter"] span { color: var(--hunter); }
.class-card[data-class="Rogue"] span { color: var(--rogue); }
.class-card[data-class="Priest"] span { color: var(--priest); }
.class-card[data-class="Shaman"] span { color: var(--shaman); }
.class-card[data-class="Mage"] span { color: var(--mage); }
.class-card[data-class="Warlock"] span { color: var(--warlock); }
.class-card[data-class="Druid"] span { color: var(--druid); }

/* ─── Spec Grid ───────────────────────────────────────────────────── */
.spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.spec-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-family: inherit;
    text-align: left;
    text-decoration: none;
}

.spec-card:active { transform: scale(0.97); }
.spec-card:hover { background: var(--bg-card-hover); border-color: var(--border-light); }

.spec-emoji {
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.spec-emoji img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.spec-info { flex: 1; }
.spec-name { font-size: 1rem; font-weight: 700; }
.spec-role { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

.spec-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ─── Phase Tabs ──────────────────────────────────────────────────── */
.phase-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Let hints span the full grid width */
.phase-tabs > .ctx-hint {
    grid-column: 1 / -1;
}

.phase-btn {
    padding: 16px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-family: inherit;
    text-align: center;
    text-decoration: none;
}

.phase-btn:active { transform: scale(0.95); }
.phase-btn:hover { background: var(--bg-card-hover); }

.phase-btn .phase-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.phase-btn .phase-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Phase Switcher (inline in BiS view) ─────────────────────────── */
.phase-switcher {
    display: flex;
    gap: 6px;
    padding: 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 10px;
}
.phase-switcher::-webkit-scrollbar { display: none; }

.phase-switcher .ps-tab {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-family: inherit;
    white-space: nowrap;
    min-width: 56px;
    text-decoration: none;
}
.phase-switcher .ps-tab:hover { background: var(--bg-card-hover); }
.phase-switcher .ps-tab:active { transform: scale(0.95); }

.phase-switcher .ps-tab.active {
    border-color: var(--accent);
    background: rgba(240, 178, 50, 0.12);
    color: var(--accent);
}

.phase-switcher .ps-tab .ps-num {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
}
.phase-switcher .ps-tab.active .ps-num {
    color: var(--accent);
}

.phase-switcher .ps-tab .ps-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-top: 1px;
    opacity: 0.7;
}
.phase-switcher .ps-tab.active .ps-label {
    opacity: 1;
}

/* ─── Share Build Bar ─────────────────────────────────────────────── */
.share-build-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 6px;
    flex-wrap: wrap;
}
.share-build-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: linear-gradient(135deg, rgba(76,175,80,0.18), rgba(76,175,80,0.08));
    border: 1px solid rgba(76,175,80,0.35);
    border-radius: 8px;
    color: #8fd694;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.share-build-btn:hover {
    background: linear-gradient(135deg, rgba(76,175,80,0.30), rgba(76,175,80,0.15));
    border-color: rgba(76,175,80,0.55);
    color: #a8e6ac;
}
.share-build-btn:active { transform: scale(0.96); }
.share-build-btn svg { flex-shrink: 0; }

.share-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: linear-gradient(135deg, rgba(244,67,54,0.12), rgba(244,67,54,0.04));
    border: 1px solid rgba(244,67,54,0.30);
    border-radius: 8px;
    color: #ef9a9a;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}
.share-reset-btn:hover {
    background: linear-gradient(135deg, rgba(244,67,54,0.22), rgba(244,67,54,0.10));
    border-color: rgba(244,67,54,0.50);
    color: #ffab91;
}
.share-reset-btn:active { transform: scale(0.96); }

/* Toast notification */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30,30,30,0.95);
    border: 1px solid rgba(76,175,80,0.5);
    color: #8fd694;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .3s;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── GearScore Summary ──────────────────────────────────────────── */
.gs-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(240,178,50,0.08), rgba(240,178,50,0.02));
    border: 1px solid rgba(240,178,50,0.2);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.gs-stat {
    text-align: center;
}

.gs-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.gs-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
    margin-top: 2px;
}

.gs-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* ─── SEO Description ────────────────────────────────────────────── */
.seo-description {
    margin-top: 12px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    overflow: hidden;
}

.seo-desc-inner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.seo-desc-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.seo-desc-text {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

/* ─── Paperdoll Overview ─────────────────────────────────────────── */
.paperdoll {
    position: relative;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: auto auto;
    gap: 4px;
    padding: 10px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.pd-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 4px 2px;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
}

.pd-slot:active { transform: scale(0.9); }
.pd-slot:hover { background: var(--bg-card-hover); }

.pd-slot-icon {
    width: 36px;
    height: 36px;
    border-radius: 5px;
    border: 2px solid var(--border-light);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: var(--transition);
}

.pd-slot-icon.q-epic { border-color: var(--quality-epic); }
.pd-slot-icon.q-rare { border-color: var(--quality-rare); }
.pd-slot-icon.q-uncommon { border-color: var(--quality-uncommon); }
.pd-slot-icon.q-legendary { border-color: var(--quality-legendary); }
.pd-slot-icon.q-common { border-color: var(--quality-common); }

.pd-slot-label {
    font-size: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Enchant dot on paperdoll */
.pd-slot .pd-enchant-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ea043;
    border: 1px solid var(--bg-card);
}

/* Custom-dot på paperdoll — visar att ett item är user-valt */
.pd-slot .pd-custom-dot {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    border: 1px solid var(--bg-card);
}

/* Paperdoll-slot med override — subtil accent-border */
.pd-slot.pd-slot-overridden img {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-radius: 4px;
}

/* Paperdoll-slot som är inaktiv pga weapon mode */
.pd-slot.pd-slot-dimmed {
    opacity: 0.3;
    pointer-events: none;
}
.pd-slot .pd-dimmed-x {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #f85149;
    font-weight: 700;
    text-shadow: 0 0 4px #000;
}

/* Slot-grupper som är inaktiva pga weapon mode toggle */
.slot-group-inactive-wrap {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(60%);
    position: relative;
}
.slot-group-inactive-wrap::after {
    content: 'Not used in current weapon mode';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    pointer-events: none;
}

/* Gem dots on paperdoll */
.pd-slot .pd-gem-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
}

.pd-gem-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    border: 1px solid var(--bg-card);
}

.pd-gem-dot.red    { background: #e53935; }
.pd-gem-dot.blue   { background: #1e88e5; }
.pd-gem-dot.yellow { background: #fdd835; }
.pd-gem-dot.meta   { background: #90a4ae; }
.pd-gem-dot.green  { background: #43a047; }
.pd-gem-dot.orange { background: #fb8c00; }
.pd-gem-dot.purple { background: #8e24aa; }

/* ─── Profession Filter ───────────────────────────────────────────── */
.profession-filter {
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
}

.profession-filter.hidden {
    display: none;
}

.prof-filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.prof-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.prof-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: line-through;
    opacity: 0.55;
}

.prof-chip.active {
    background: rgba(46, 160, 67, 0.12);
    border-color: rgba(46, 160, 67, 0.4);
    color: var(--text-primary);
    text-decoration: none;
    opacity: 1;
}

.prof-chip:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.prof-chip.active:hover {
    background: rgba(46, 160, 67, 0.18);
}

.prof-chip-icon {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

.prof-chip:not(.active) .prof-chip-icon {
    filter: grayscale(100%) brightness(0.6);
}

.pvp-rating-chip .prof-chip-pvp-icon {
    font-size: 14px;
    line-height: 1;
}

.pvp-rating-chip:not(.active) .prof-chip-pvp-icon {
    filter: grayscale(100%);
    opacity: 0.5;
}

/* ─── Slot List ───────────────────────────────────────────────────── */
.slot-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slot-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.slot-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.slot-header:active { background: var(--bg-card-hover); }

.slot-icon {
    min-width: 36px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.slot-icon img:not(.gem-row-img) {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid var(--border-light);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.slot-icon img.q-epic { border-color: var(--quality-epic); }
.slot-icon img.q-rare { border-color: var(--quality-rare); }
.slot-icon img.q-uncommon { border-color: var(--quality-uncommon); }
.slot-icon img.q-legendary { border-color: var(--quality-legendary); }

/* Enchant indicator on slot icon */
.slot-icon .enchant-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2ea043;
    border: 2px solid var(--bg-card);
    z-index: 1;
}

.slot-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.slot-name {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    line-height: 1;
    margin: 0;
    font-weight: normal;
}

.slot-bis-item {
    flex: 1;
    min-width: 0;
}

.slot-bis-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Source hint below item name */
.slot-source {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    margin-top: 1px;
}

.slot-source .src-icon {
    margin-right: 3px;
}

.slot-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    align-self: center;
}

.slot-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 4px;
    flex-shrink: 0;
}

.slot-badge.bis { background: var(--bis-badge); color: #fff; }
.slot-badge.alt { background: var(--alt-badge); color: #fff; }

/* ─── Item Selection UI ───────────────────────────────────────────── */

/* Slot with a user-chosen override — subtle left accent */
.slot-overridden > .slot-header {
    border-left: 3px solid var(--accent);
    padding-left: 5px;
}

/* "Custom" label next to slot name */
.slot-custom-tag {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    background: rgba(255, 200, 100, 0.12);
    border: 1px solid rgba(255, 200, 100, 0.3);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 5px;
    vertical-align: middle;
}

/* Reset-knapp (✕) — visas bara när ett override är aktivt */
.slot-reset-btn {
    background: none;
    border: 1px solid rgba(248, 81, 73, 0.4);
    color: #f85149;
    border-radius: 4px;
    font-size: 0.65rem;
    padding: 3px 7px;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
}
.slot-reset-btn:hover {
    background: rgba(248, 81, 73, 0.15);
    border-color: #f85149;
}

/* Alt-item markerad som aktivt vald */
.alt-item-active {
    background: rgba(255, 200, 100, 0.07);
}

/* "Välj"-knapp på varje alt-rad */
.alt-select-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-secondary);
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.alt-select-btn:hover {
    background: rgba(255, 200, 100, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}
.alt-select-btn.active {
    background: rgba(255, 200, 100, 0.18);
    border-color: var(--accent);
    color: var(--accent);
    cursor: default;
}

/* "BiS"-etikett bredvid itemnamn i alt-listan (visas när override är aktivt) */
.alt-bis-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bis-badge, #4caf50);
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 5px;
    vertical-align: middle;
}

/* ─── Category / Weapon Section Headers ───────────────────────────── */
.weapon-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px 6px;
    margin-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
}

/* Weapon mode toggle (DW / 2H) */
.weapon-toggle {
    display: flex;
    gap: 6px;
    margin-left: auto;
}
.weapon-toggle-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.weapon-toggle-btn:hover {
    background: rgba(255, 200, 100, 0.12);
    border-color: var(--accent);
    color: var(--accent);
}
.weapon-toggle-btn.active {
    background: rgba(255, 200, 100, 0.18);
    border-color: var(--accent);
    color: var(--accent);
    cursor: default;
}

.weapon-section-header.first-category {
    margin-top: 0;
    border-top: none;
}

.weapon-section-icon {
    font-size: 1rem;
}

.weapon-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.weapon-section-note {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-style: italic;
}

/* "Same as Main Hand" note for auto-generated OH */
.slot-clone-note {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1px;
}

/* ─── Sim Stats Panel ─────────────────────────────────────────────── */
.sim-panel {
    margin-top: 16px;
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.sim-panel-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    margin-bottom: 12px;
}

.sim-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 16px;
}

/* Tank stats need a single-column layout since Defense row is wide */
.sim-stat-grid.sim-stat-grid--tank {
    grid-template-columns: 1fr;
}

.sim-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.8rem;
}

.sim-stat-row:last-child { border-bottom: none; }

.sim-stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.sim-stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Crit-immunity badges for tank defense display */
.sim-crit-immune {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    background: rgba(80, 200, 100, 0.18);
    border: 1px solid rgba(80, 200, 100, 0.45);
    border-radius: 4px;
    color: #6ddf88;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.sim-not-crit-immune {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    background: rgba(220, 80, 60, 0.18);
    border: 1px solid rgba(220, 80, 60, 0.40);
    border-radius: 4px;
    color: #e07070;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.sim-stat-loading {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    padding: 8px 0;
}

/* Random enchant note under stats grid */
.sim-enchant-note {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
    padding: 7px 10px;
    background: rgba(100, 65, 165, 0.15);
    border: 1px solid rgba(140, 100, 210, 0.25);
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
}
.sim-enchant-icon { font-size: 0.9rem; }
.sim-enchant-detail {
    width: 100%;
    color: var(--text-muted);
    font-size: 0.68rem;
    margin-top: 2px;
}

.sim-panel-subtitle {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin-left: 4px;
}

/* ── DPS Sim section ── */
.sim-dps-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sim-dps-btn {
    width: 100%;
    background: #238636;
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 11px 0;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.sim-dps-btn:hover:not(:disabled) { background: #2ea043; }
.sim-dps-btn:disabled { background: #21262d; color: #484f58; cursor: not-allowed; }

.sim-dps-bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}
.sim-dps-fill {
    height: 100%;
    background: #238636;
    width: 0%;
    transition: width 0.2s;
    border-radius: 2px;
}
.sim-dps-status {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 5px;
}

.sim-dps-result {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.sim-dps-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.sim-dps-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.sim-dps-stdev {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sim-disclaimer {
    margin: 10px 0 0;
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.45;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
}

/* Item notes / gearing tips */
.item-note {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 3px;
    padding: 3px 6px;
    background: rgba(240, 178, 50, 0.05);
    border-left: 2px solid rgba(240, 178, 50, 0.25);
    border-radius: 2px;
}
.item-note-icon {
    flex-shrink: 0;
    font-style: normal;
    font-size: 0.65rem;
}

/* ─── Gem row below item icons ────────────────────────────────────── */
.slot-icon-wrap {
    display: inline-block;
}

.gem-row {
    display: flex;
    gap: 1px;
    justify-content: center;
    margin-top: 2px;
}

.gem-row-link {
    display: inline-block;
    line-height: 0;
    cursor: pointer;
    text-decoration: none !important;
    border: none !important;
}

.gem-row-img {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.25);
    display: block;
    transition: transform 0.1s ease;
}

.gem-row-link:hover .gem-row-img {
    transform: scale(1.3);
    border-color: rgba(255,255,255,0.6);
}

.gem-row-img.gem-icon-meta {
    border-color: rgba(255,215,0,0.5);
}

/* ─── Enchant inline display ──────────────────────────────────────── */
.slot-enchant {
    font-size: 0.72rem;
    margin-top: 1px;
}

.slot-enchant a {
    color: var(--quality-uncommon);
    text-decoration: none;
}

.slot-enchant a:hover {
    text-decoration: underline;
}

/* Alt count pill */
.slot-alt-count {
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

.slot-expand {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition);
    font-size: 0.7rem;
}

.slot-group.open .slot-expand { transform: rotate(180deg); }

.slot-alts {
    display: none;
    border-top: 1px solid var(--border);
}

.slot-group.open .slot-alts { display: block; }

.alt-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 14px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(48,54,61,0.5);
}

.alt-item:last-child { border-bottom: none; }
.alt-item:active { background: var(--bg-card-hover); }

.alt-icon {
    width: 26px;
    height: 26px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.alt-icon.q-epic { border-color: var(--quality-epic); }
.alt-icon.q-rare { border-color: var(--quality-rare); }
.alt-icon.q-uncommon { border-color: var(--quality-uncommon); }
.alt-icon.q-legendary { border-color: var(--quality-legendary); }
.alt-icon.q-common { border-color: var(--quality-common); }

.alt-rank-num {
    font-size: 0.7rem;
    color: var(--text-muted);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.alt-name {
    flex: 1;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeOverlay 0.2s ease;
}

@keyframes fadeOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    width: 100%;
    max-width: 480px;
    max-height: 80dvh;
    background: var(--bg-modal);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-header .modal-title {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: inherit;
}

.modal-close:active { transform: scale(0.9); }

.modal-body {
    padding: 16px 20px 32px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-section {
    margin-bottom: 16px;
}

.modal-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.modal-row-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.modal-row-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.modal-row-value {
    font-size: 0.85rem;
    font-weight: 600;
}

.modal-gs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-gs-box {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.modal-gs-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.modal-gs-val {
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 4px;
}

.modal-enchant-item,
.modal-gem-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-size: 0.82rem;
}

.modal-gem-icon { font-size: 0.9rem; }

.modal-gem-icon img,
.modal-enchant-item img {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
}

.modal-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid var(--quality-epic);
    margin-right: 10px;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Wowhead tooltip integration */
.wowhead-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted var(--text-muted);
}

/* Wowhead icon cleanup — hide any auto-injected icons (safety net) */
.slot-bis-name .iconsmall,
.slot-bis-name .iconmedium,
.alt-name .iconsmall,
.alt-name .iconmedium,
.ge-item-name .iconsmall,
.ge-item-name .iconmedium { display: none; }

/* But show icons inside the modal */
.modal-body .iconsmall { display: inline-block; margin-right: 4px; vertical-align: middle; }

/* Icon links — wrapping item icons in <span> for click → modal */
.icon-link {
    display: inline-flex;
    text-decoration: none !important;
    border: none !important;
    line-height: 0;
    cursor: pointer;
}
.icon-link:hover img {
    filter: brightness(1.2);
    transform: scale(1.05);
    transition: all 0.15s ease;
}

/* Item name links — <a data-wh-item> → open modal on click, hover tooltip from Wowhead */
a[data-wh-item] {
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px dotted currentColor;
}
a[data-wh-item]:hover {
    opacity: 0.85;
}

/* Wowhead button at the bottom of the modal */
.modal-wowhead-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.15s, border-color 0.15s;
}
.modal-wowhead-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent);
}
.modal-wowhead-icon {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    opacity: 0.8;
}

/* Hide any Wowhead-injected icons/elements in icon areas (safety net) */
.slot-icon-wrap .iconsmall,
.slot-icon-wrap .iconmedium,
.slot-icon-wrap .icontiny,
.slot-icon .iconsmall,
.slot-icon .iconmedium,
.pd-slot .iconsmall,
.pd-slot .iconmedium,
.icon-link + .iconsmall,
.icon-link + .iconmedium { display: none !important; }

/* Hide Wowhead <ins> tags inside icon areas */
.slot-icon-wrap ins,
.icon-link ins { display: none !important; }

/* Override wowhead link colors inside our cards */
.slot-bis-name a, .slot-bis-name .wh-item-link,
.alt-name a, .alt-name .wh-item-link {
    color: inherit !important;
    text-decoration: none !important;
    border: none !important;
}

/* PvP badge on spec card */
.spec-pvp-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #c41e3a;
    color: #fff;
}

.spec-card.is-pvp {
    border-color: rgba(196, 30, 58, 0.4);
}

.spec-card.is-pvp:hover {
    border-color: rgba(196, 30, 58, 0.7);
    background: rgba(196, 30, 58, 0.08);
}

/* PvP indicator in header */
.pvp-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #c41e3a;
    color: #fff;
    vertical-align: middle;
    margin-left: 6px;
}

/* ─── Ad Slots ────────────────────────────────────────────────────── */
.ad-slot {
    padding: 16px;
    display: none; /* Hidden until AdSense code is added */
}

.ad-placeholder {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Quality Colors for Items ────────────────────────────────────── */
.q-epic { color: var(--quality-epic); }
.q-rare { color: var(--quality-rare); }
.q-uncommon { color: var(--quality-uncommon); }
.q-legendary { color: var(--quality-legendary); }
.q-common { color: var(--quality-common); }

/* ─── Desktop Enhancements ────────────────────────────────────────── */
@media (min-width: 520px) {
    #app {
        max-width: 520px;
    }

    .class-grid {
        gap: 14px;
    }

    .class-card {
        padding: 24px 16px;
    }

    .modal {
        max-width: 520px;
        border-radius: 20px;
        margin-bottom: 40px;
        max-height: 75vh;
    }

    .modal-overlay {
        align-items: center;
    }
}

@media (min-width: 768px) {
    #app {
        max-width: 600px;
        margin-top: 20px;
    }

    .phase-tabs {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ─── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─── Loading shimmer ─────────────────────────────────────────────── */
.shimmer {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── PvP Divider (spec list) ─────────────────────────────────────── */
.pvp-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #c41e3a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.pvp-divider::before,
.pvp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(196, 30, 58, 0.3);
}

/* ─── PvP Info Banner ─────────────────────────────────────────────── */
.pvp-info-banner {
    padding: 12px 14px;
    background: rgba(196, 30, 58, 0.06);
    border: 1px solid rgba(196, 30, 58, 0.2);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.pvp-banner-title {
    font-size: 0.82rem;
    color: #c41e3a;
    margin-bottom: 4px;
}

.pvp-banner-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pvp-banner-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pvp-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ─── PvP Popularity Badge ────────────────────────────────────────── */
.pvp-pop-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.pvp-tier-gold {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.pvp-tier-strong {
    background: rgba(192, 192, 192, 0.12);
    color: #c0c0c0;
    border: 1px solid rgba(192, 192, 192, 0.25);
}

.pvp-tier-viable {
    background: rgba(205, 127, 50, 0.12);
    color: #cd7f32;
    border: 1px solid rgba(205, 127, 50, 0.25);
}

.pvp-tier-niche {
    background: rgba(110, 118, 129, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(110, 118, 129, 0.2);
}

/* ─── PvE Flex Badge ──────────────────────────────────────────────── */
.pvp-pve-flex-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(46, 160, 67, 0.12);
    color: #2ea043;
    border: 1px solid rgba(46, 160, 67, 0.25);
    white-space: nowrap;
}

/* ─── Rating Gate Badge ───────────────────────────────────────────── */
.pvp-rating-gate {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.25);
    white-space: nowrap;
}

/* ─── PvP Meta Row (inline badges below item name) ────────────────── */
.pvp-meta-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════════════ */
.site-footer {
    margin-top: 40px;
    padding: 20px 16px 24px;
    border-top: 1px solid rgba(255,255,255,.08);
    text-align: center;
    font-size: .78rem;
    color: rgba(255,255,255,.4);
    line-height: 1.6;
}
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-links { margin-bottom: 6px; }
.footer-link {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    transition: color .15s;
}
.footer-link:hover { color: var(--accent, #e8b827); }
.footer-sep { margin: 0 6px; opacity: .4; }
.footer-credits { margin-bottom: 4px; }
.footer-credits a {
    color: rgba(255,255,255,.55);
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,.2);
    transition: color .15s;
}
.footer-credits a:hover { color: var(--accent, #e8b827); }
.footer-copy { opacity: .6; }

/* ═══════════════════════════════════════════════════════════════════════
   Static Pages (About / Privacy)
   ═══════════════════════════════════════════════════════════════════════ */
.static-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 8px 0 32px;
    color: rgba(255,255,255,.85);
    line-height: 1.7;
    font-size: .95rem;
}
.static-page h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #fff;
}
.static-page h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 24px 0 8px;
    color: rgba(255,255,255,.9);
}
.static-page p { margin: 0 0 12px; }
.static-page a {
    color: var(--accent, #e8b827);
    text-decoration: underline;
    text-decoration-color: rgba(232,184,39,.3);
}
.static-page a:hover { text-decoration-color: var(--accent, #e8b827); }
.static-page ul {
    margin: 0 0 12px 20px;
    padding: 0;
}
.static-page li { margin-bottom: 4px; }
.static-page .credits-list {
    list-style: none;
    margin-left: 0;
    padding: 0;
}
.static-page .credits-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.static-page .credits-list li:last-child { border-bottom: none; }
.static-page .credit-name {
    font-weight: 600;
    color: #fff;
}
.static-page .credit-desc {
    display: block;
    font-size: .85rem;
    color: rgba(255,255,255,.55);
    margin-top: 2px;
}

/* ═══ Share Build Bar ═══════════════════════════════════════════════ */
.share-build-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px;
    flex-wrap: wrap;
}
.share-build-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(88,101,242,.25), rgba(88,101,242,.10));
    color: #c8cdf8;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}
.share-build-btn:hover {
    background: linear-gradient(135deg, rgba(88,101,242,.45), rgba(88,101,242,.25));
    border-color: rgba(88,101,242,.5);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88,101,242,.25);
}
.share-build-btn:active { transform: scale(.97); }
.share-build-btn svg { flex-shrink: 0; }

.share-reset-btn {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.55);
    font-size: .8rem;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}
.share-reset-btn:hover {
    background: rgba(255,80,80,.15);
    border-color: rgba(255,80,80,.3);
    color: #ff9090;
}

/* Toast notification */
.share-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30,200,100,.92);
    color: #fff;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all .3s ease;
    z-index: 9999;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
    backdrop-filter: blur(8px);
}
.share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
