/* ═══════════════════════════════════════════════════════
   d3guides.de — Dark Diablo Theme
   ═══════════════════════════════════════════════════════ */

/* Local Fonts (DSGVO-konform, kein Google Fonts) */
@font-face {
    font-family: 'Alegreya Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/alegreya-sans-400.ttf') format('truetype');
}
@font-face {
    font-family: 'Alegreya Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/alegreya-sans-500.ttf') format('truetype');
}
@font-face {
    font-family: 'Alegreya Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/alegreya-sans-700.ttf') format('truetype');
}
@font-face {
    font-family: 'Alegreya Sans';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/assets/fonts/alegreya-sans-800.ttf') format('truetype');
}

:root {
    --bg-primary: #15161a;
    --bg-secondary: #1a1b20;
    --bg-card: #1A1B1F;
    --text-primary: #e0ddd5;
    --text-secondary: #a09d94;
    --text-heading: #ffffff;
    --accent-red: #a50905;
    --accent-orange: #d40b06;
    --accent-gold: #c4a24e;
    --border-color: #2a2a35;
    --nav-bg: #15161a;
    --link-color: #c4a24e;
    --success: #27ae60;
    --danger: #e74c3c;

    /* Quality Colors */
    --quality-normal: #ffffff;
    --quality-magic: #6969ff;
    --quality-rare: #ffff00;
    --quality-legendary: #bf642f;
    --quality-set: #00ff00;
    --quality-ancient: #ffd700;
    --quality-primal: #ff0000;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Alegreya Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 150ms;
}

a:hover {
    color: #dbb86a;
}

img {
    max-width: 100%;
    height: auto;
}

/* ─── Container ─────────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

main.container {
    flex: 1;
    width: 100%;
    padding-top: 88px;
    padding-bottom: 2rem;
}

/* ─── Navigation ────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid #252830;
    z-index: 1000;
}

.nav__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: 64px;
}

.nav__logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav__logo:hover {
    color: #dbb86a;
}

/* Language Switcher */
.nav__lang {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.75rem;
    font-size: 0.78rem;
}

.nav__lang-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.2rem 0.3rem;
    border-radius: 3px;
    transition: color 150ms;
}

.nav__lang-link:hover { color: #fff; }
.nav__lang-link--active { color: var(--accent-gold); }
.nav__lang-sep { color: #444; font-size: 0.7rem; }

.nav__badge-wip {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-red);
    background: rgba(165, 9, 5, 0.15);
    border: 1px solid rgba(165, 9, 5, 0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 0.3rem;
}

.nav__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.nav__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.nav__link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: color 150ms, border-color 150ms;
}

.nav__link:hover {
    color: #fff;
}

.nav__link--active {
    color: #fff;
    border-bottom-color: var(--accent-red);
}

.nav__search {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav__search-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: var(--text-primary);
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    width: 140px;
    outline: none;
    transition: border-color 0.2s, width 0.3s;
}

.nav__search-input:focus {
    border-color: var(--accent-red);
    width: 180px;
}

.nav__search-input--error {
    border-color: var(--danger);
    animation: shake 0.3s;
}

.nav__search-btn {
    background: var(--accent-red);
    border: 1px solid var(--accent-red);
    border-radius: 0 4px 4px 0;
    color: #fff;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.nav__search-btn:hover {
    background: var(--accent-orange);
}

/* Hamburger */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle--active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__toggle--active span:nth-child(2) {
    opacity: 0;
}

.nav__toggle--active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── Hero Section ──────────────────────────────────── */
.hero {
    text-align: center;
    padding: 3rem 2rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid #252830;
    border-radius: 4px;
    margin-bottom: 2.5rem;
}

.hero__title {
    font-size: 2.25rem;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    font-weight: 700;
}

.hero__text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto 1.75rem;
    line-height: 1.6;
}

/* ─── Buttons ───────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: background 150ms, transform 100ms;
}

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

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background: var(--accent-red);
    color: #fff;
}

.btn--primary:hover {
    background: var(--accent-orange);
    color: #fff;
}

/* ─── Sections ──────────────────────────────────────── */
.section {
    margin-bottom: 3rem;
}

.section__title {
    font-size: 1.75rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.section__subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ─── Class Grid ────────────────────────────────────── */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.class-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid #252830;
    border-radius: 4px;
    text-align: center;
    transition: transform 250ms, border-color 250ms, box-shadow 250ms;
}

.class-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-gold);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

.class-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    background-size: cover;
    background-position: center;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
}

.class-card__icon--barbarian { background-image: url('/assets/img/classes/barbarian.png'); }
.class-card__icon--crusader { background-image: url('/assets/img/classes/crusader.png'); }
.class-card__icon--demon-hunter { background-image: url('/assets/img/classes/demonhunter.png'); }
.class-card__icon--monk { background-image: url('/assets/img/classes/monk.png'); }
.class-card__icon--necromancer { background-image: url('/assets/img/classes/necromancer.png'); }
.class-card__icon--witch-doctor { background-image: url('/assets/img/classes/witchdoctor.png'); }
.class-card__icon--wizard { background-image: url('/assets/img/classes/wizard.png'); }

/* Standalone class icon (used outside class-card context) */
.class-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    background-size: cover;
    background-position: center;
    vertical-align: middle;
}
.class-icon--barbarian { background-image: url('/assets/img/classes/barbarian.png'); }
.class-icon--crusader { background-image: url('/assets/img/classes/crusader.png'); }
.class-icon--demon-hunter { background-image: url('/assets/img/classes/demonhunter.png'); }
.class-icon--monk { background-image: url('/assets/img/classes/monk.png'); }
.class-icon--necromancer { background-image: url('/assets/img/classes/necromancer.png'); }
.class-icon--witch-doctor { background-image: url('/assets/img/classes/witchdoctor.png'); }
.class-icon--wizard { background-image: url('/assets/img/classes/wizard.png'); }

.class-card__name {
    font-size: 1.2rem;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

.class-card__en {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.class-card__desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

.class-card--large {
    padding: 2rem;
}

/* ─── Class Header (Detail Page) ────────────────────── */
.class-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.class-header__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    background-size: cover;
    background-position: center;
    border: 3px solid var(--accent-gold);
    flex-shrink: 0;
}

.class-header__name {
    font-size: 2rem;
    color: var(--text-heading);
}

.class-header__en {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ─── Skill Grid ────────────────────────────────────── */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.skill-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid #252830;
    border-radius: 4px;
    transition: border-color 250ms;
}

.skill-card:hover {
    border-color: var(--accent-gold);
}

.skill-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    flex-shrink: 0;
}

.skill-card__name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ─── Feature Grid ──────────────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid #252830;
    border-radius: 4px;
    transition: border-color 250ms;
}

.feature-card:hover {
    border-color: var(--accent-gold);
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card__title {
    font-size: 1.1rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.feature-card__text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.feature-card__link {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ─── Error Page ────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page__title {
    font-size: 6rem;
    color: var(--accent-red);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.error-page__subtitle {
    font-size: 1.5rem;
    color: var(--text-heading);
    margin-bottom: 1rem;
}

.error-page__text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Footer ────────────────────────────────────────── */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid #252830;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer__columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer__col-title {
    color: var(--text-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.footer__col-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer__col-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color 150ms;
}

.footer__col-links a:hover {
    color: var(--text-primary);
}

.footer__search {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.footer__search-input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #252830;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.825rem;
    font-family: inherit;
}

.footer__search-input:focus {
    outline: none;
    border-color: var(--accent-gold, #c4a24e);
}

.footer__search-btn {
    padding: 0.4rem 0.7rem;
    background: var(--accent-gold, #c4a24e);
    color: #0d0d1a;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.footer__search-btn:hover {
    background: #d4b35e;
}

.footer__bottom {
    border-top: 1px solid #252830;
    padding-top: 1.5rem;
    text-align: center;
}

.footer__copy {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.footer__disclaimer {
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ─── Utilities ─────────────────────────────────────── */
.text-muted {
    color: var(--text-secondary);
}

/* ─── Animations ────────────────────────────────────── */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }

    .nav__inner {
        display: flex;
        flex-wrap: wrap;
    }

    .nav__links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid #252830;
        gap: 0.5rem;
        z-index: 999;
    }

    .nav__links.nav__menu--open {
        display: flex;
    }

    .nav__right {
        margin-left: auto;
    }

    .nav__link {
        padding: 0.75rem 0;
        width: 100%;
    }

    .nav__search {
        width: 100%;
    }

    .nav__search-input {
        flex: 1;
        width: auto;
    }

    .nav__search-input:focus {
        width: auto;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .hero__text {
        font-size: 1rem;
    }

    .class-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

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

    .skill-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .class-header {
        flex-direction: column;
        text-align: center;
    }

    .footer__columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .class-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* ═══════════════════════════════════════════════════════
   Component Styles — Extended
   ═══════════════════════════════════════════════════════ */

/* ─── 1. Tier Badges ───────────────────────────────────── */
.tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    flex-shrink: 0;
}

.tier-badge--s {
    background: var(--accent-red);
    box-shadow: 0 0 8px rgba(233, 69, 96, 0.4);
}

.tier-badge--a {
    background: var(--accent-orange);
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.4);
}

.tier-badge--b {
    background: var(--accent-gold);
    color: #1a1a2e;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.tier-badge--c {
    background: #4da6ff;
    box-shadow: 0 0 8px rgba(77, 166, 255, 0.3);
}

.tier-badge--d {
    background: #666;
}

/* ─── 2. Build Cards ──────────────────────────────────── */
.build-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.build-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-red);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.15);
}

.build-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.build-card__class-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    object-fit: cover;
}

.build-card__title-group {
    flex: 1;
    min-width: 0;
}

.build-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.build-card__class-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.build-card__skills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
}

.build-card__skill-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    object-fit: cover;
    transition: border-color 0.2s, transform 0.15s;
}

.build-card__skill-icon:hover {
    border-color: var(--accent-orange);
    transform: scale(1.1);
}

.build-card__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.build-card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.build-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem 1rem;
}

/* ─── 3. Build Card Grid ──────────────────────────────── */
.build-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.25rem;
}

/* ─── 4. Tab Navigation ──────────────────────────────── */
.tab-nav {
    display: flex;
    align-items: stretch;
    border-bottom: 2px solid var(--border-color);
    gap: 0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-nav__item {
    position: relative;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s;
}

.tab-nav__item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.2s;
}

.tab-nav__item:hover {
    color: var(--text-heading);
}

.tab-nav__item--active {
    color: var(--text-heading);
}

.tab-nav__item--active::after {
    background: var(--accent-red);
}

.tab-panel {
    display: none;
}

.tab-panel--active {
    display: block;
    animation: tabFadeIn 0.25s ease;
}

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

/* ─── 5. Filter Bar ──────────────────────────────────── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.filter-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23a0a0b0' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 10px;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--accent-red);
}

.filter-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.filter-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.filter-input:focus {
    border-color: var(--accent-red);
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.filter-btn:hover {
    border-color: var(--accent-red);
    background: var(--bg-secondary);
}

.filter-btn--active {
    border-color: var(--accent-red);
    background: rgba(233, 69, 96, 0.15);
    color: var(--accent-red);
}

.class-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.class-filter__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.class-filter__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.class-filter__item .class-card__icon {
    width: 20px;
    height: 20px;
    margin-bottom: 0;
    border-width: 1px;
}

.class-filter__item:hover {
    border-color: var(--text-secondary);
    transform: scale(1.1);
}

.class-filter__item--active {
    border-color: var(--accent-red);
    background: rgba(233, 69, 96, 0.12);
    color: var(--accent-red);
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.3);
}

/* ─── 6. Equipment Grid ──────────────────────────────── */
.equip-grid {
    display: grid;
    grid-template-columns: repeat(5, 80px);
    grid-template-rows: repeat(5, 80px);
    gap: 8px;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}

/* Slot placement mimicking D3's character sheet */
.equip-grid .equip-slot[data-slot="head"]       { grid-column: 3; grid-row: 1; }
.equip-grid .equip-slot[data-slot="shoulders"]   { grid-column: 2; grid-row: 1; }
.equip-grid .equip-slot[data-slot="amulet"]      { grid-column: 4; grid-row: 1; }
.equip-grid .equip-slot[data-slot="chest"]       { grid-column: 3; grid-row: 2; }
.equip-grid .equip-slot[data-slot="gloves"]      { grid-column: 5; grid-row: 2; }
.equip-grid .equip-slot[data-slot="bracers"]     { grid-column: 1; grid-row: 2; }
.equip-grid .equip-slot[data-slot="belt"]        { grid-column: 3; grid-row: 3; }
.equip-grid .equip-slot[data-slot="ring1"]       { grid-column: 1; grid-row: 3; }
.equip-grid .equip-slot[data-slot="ring2"]       { grid-column: 5; grid-row: 3; }
.equip-grid .equip-slot[data-slot="pants"]       { grid-column: 3; grid-row: 4; }
.equip-grid .equip-slot[data-slot="boots"]       { grid-column: 3; grid-row: 5; }
.equip-grid .equip-slot[data-slot="mainhand"]    { grid-column: 1; grid-row: 4 / span 2; }
.equip-grid .equip-slot[data-slot="offhand"]     { grid-column: 5; grid-row: 4 / span 2; }

.equip-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative;
}

.equip-slot:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(233, 69, 96, 0.2);
}

.equip-slot--empty {
    border-style: dashed;
    opacity: 0.6;
}

.equip-slot--empty:hover {
    opacity: 1;
    border-color: var(--text-secondary);
}

/* Quality-colored borders */
.equip-slot--normal    { border-color: var(--quality-normal); }
.equip-slot--magic     { border-color: var(--quality-magic); }
.equip-slot--rare      { border-color: var(--quality-rare); }
.equip-slot--legendary { border-color: var(--quality-legendary); box-shadow: 0 0 8px rgba(191, 100, 47, 0.3); }
.equip-slot--set       { border-color: var(--quality-set); box-shadow: 0 0 8px rgba(0, 255, 0, 0.2); }
.equip-slot--ancient   { border-color: var(--quality-ancient); box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
.equip-slot--primal    { border-color: var(--quality-primal); box-shadow: 0 0 12px rgba(255, 0, 0, 0.4); }

.equip-slot__icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.equip-slot__name {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.equip-slot__label {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0 4px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── 7. Kanai's Cube ────────────────────────────────── */
.kanai-cube {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}

.kanai-cube::before {
    content: "Kanais Wurfel";
    position: absolute;
    top: -0.6rem;
    left: 1.5rem;
    background: var(--bg-secondary);
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kanai-cube__slot {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--accent-gold);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
    position: relative;
}

.kanai-cube__slot:hover {
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.4);
    transform: scale(1.08);
}

.kanai-cube__slot-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kanai-cube__slot-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.kanai-cube__label {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kanai-cube__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.kanai-cube__wrapper .kanai-cube__slot {
    flex-shrink: 0;
}

/* ─── 8. Modals ──────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay--visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.25s ease;
    margin: 1rem;
}

.modal-overlay--visible .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-heading);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
}

.modal-close:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* ─── 9. Tooltips ────────────────────────────────────── */
.tooltip {
    position: absolute;
    z-index: 3000;
    min-width: 200px;
    max-width: 320px;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
}

.tooltip--visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip--legendary { border-color: var(--quality-legendary); }
.tooltip--set       { border-color: var(--quality-set); }
.tooltip--rare      { border-color: var(--quality-rare); }
.tooltip--magic     { border-color: var(--quality-magic); }
.tooltip--ancient   { border-color: var(--quality-ancient); }
.tooltip--primal    { border-color: var(--quality-primal); }

.tooltip__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.tooltip__title--legendary { color: var(--quality-legendary); }
.tooltip__title--set       { color: var(--quality-set); }
.tooltip__title--rare      { color: var(--quality-rare); }
.tooltip__title--magic     { color: var(--quality-magic); }
.tooltip__title--ancient   { color: var(--quality-ancient); }
.tooltip__title--primal    { color: var(--quality-primal); }
.tooltip__title--normal    { color: var(--quality-normal); }

.tooltip__type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.tooltip__divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

.tooltip__desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tooltip__stat {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.tooltip__flavor {
    font-size: 0.78rem;
    color: var(--accent-orange);
    font-style: italic;
    margin-top: 0.4rem;
}

/* ─── 10. Pagination ─────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 2rem 0;
}

.pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    text-decoration: none;
}

.pagination__item:hover {
    border-color: var(--accent-red);
    color: var(--text-heading);
}

.pagination__item--active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
    font-weight: 600;
}

.pagination__item--disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ─── 11. Profile Cards ──────────────────────────────── */
.profile-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.profile-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 3px solid var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-red);
    flex-shrink: 0;
}

.profile-card__info {
    flex: 1;
}

.profile-card__battletag {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

.profile-card__details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.profile-card__detail {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-card__detail-value {
    color: var(--accent-gold);
    font-weight: 600;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.hero-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.hero-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-red);
    box-shadow: 0 6px 18px rgba(233, 69, 96, 0.12);
    color: var(--text-primary);
}

.hero-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    object-fit: cover;
}

.hero-card__info {
    flex: 1;
    min-width: 0;
}

.hero-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-card__class {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.hero-card__level {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.hero-card__last-played {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

/* ─── 12. Tier List ──────────────────────────────────── */
.tier-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tier-row {
    display: flex;
    align-items: stretch;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    min-height: 80px;
}

.tier-row__label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}

.tier-row__label--s { background: var(--accent-red); }
.tier-row__label--a { background: var(--accent-orange); }
.tier-row__label--b { background: var(--accent-gold); color: #1a1a2e; }
.tier-row__label--c { background: #4da6ff; }
.tier-row__label--d { background: #666; }

.tier-row__builds {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.tier-row__builds::-webkit-scrollbar {
    height: 4px;
}

.tier-row__builds::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.tier-row__build-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}

.tier-row__build-item:hover {
    border-color: var(--accent-red);
    background: rgba(233, 69, 96, 0.08);
    color: var(--text-heading);
}

.tier-row__build-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.tier-row__build-name {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ─── 13. Set Cards ──────────────────────────────────── */
.set-card {
    background: var(--bg-card);
    border: 1px solid var(--quality-set);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.set-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.1);
}

.set-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--quality-set);
    margin-bottom: 0.75rem;
}

.set-card__class {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.set-card__bonuses {
    list-style: none;
    margin-bottom: 1rem;
}

.set-card__bonus {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    line-height: 1.5;
}

.set-card__bonus:last-child {
    border-bottom: none;
}

.set-card__bonus-count {
    display: inline-block;
    font-weight: 700;
    color: var(--quality-set);
    min-width: 2.5rem;
}

.set-card__bonus-text {
    color: var(--text-primary);
}

.set-card__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.set-card__item {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(0, 255, 0, 0.08);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 4px;
    color: var(--quality-set);
}

/* ─── 14. Class Accent Colors ────────────────────────── */
.class-accent--barbarian    { --class-color: #c0392b; }
.class-accent--crusader     { --class-color: #f1c40f; }
.class-accent--demon-hunter { --class-color: #9b59b6; }
.class-accent--monk         { --class-color: #f39c12; }
.class-accent--necromancer  { --class-color: #1abc9c; }
.class-accent--witch-doctor { --class-color: #27ae60; }
.class-accent--wizard       { --class-color: #3498db; }

.class-accent--barbarian .build-card__class-icon,
.class-accent--crusader .build-card__class-icon,
.class-accent--demon-hunter .build-card__class-icon,
.class-accent--monk .build-card__class-icon,
.class-accent--necromancer .build-card__class-icon,
.class-accent--witch-doctor .build-card__class-icon,
.class-accent--wizard .build-card__class-icon {
    border-color: var(--class-color);
}

[class*="class-accent--"] .build-card:hover {
    border-color: var(--class-color);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--class-color) 20%, transparent);
}

/* ─── 15. Build Detail Page ──────────────────────────── */
.build-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.build-header__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 3px solid var(--class-color, var(--accent-red));
    flex-shrink: 0;
    object-fit: cover;
}

.build-header__info {
    flex: 1;
}

.build-header__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.build-header__subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.build-header__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.build-stats {
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.build-stats__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
}

.build-stats__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.build-stats__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.build-stats__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.build-gameplay {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.build-gameplay__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
}

.build-gameplay__text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.build-gameplay__text p {
    margin-bottom: 0.75rem;
}

.build-gameplay__text p:last-child {
    margin-bottom: 0;
}

.build-skills-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.build-skill-slot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.2s;
}

.build-skill-slot:hover {
    border-color: var(--accent-orange);
}

.build-skill-slot__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    object-fit: cover;
}

.build-skill-slot__info {
    flex: 1;
    min-width: 0;
}

.build-skill-slot__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.build-skill-slot__rune {
    font-size: 0.75rem;
    color: var(--accent-orange);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.build-passives-display {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.build-passive-slot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    flex: 1;
    min-width: 180px;
    transition: border-color 0.2s;
}

.build-passive-slot:hover {
    border-color: var(--accent-orange);
}

.build-passive-slot__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    object-fit: cover;
}

.build-passive-slot__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gem-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.gem-slot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.2s;
}

.gem-slot:hover {
    border-color: var(--accent-gold);
}

.gem-slot__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    flex-shrink: 0;
    object-fit: contain;
}

.gem-slot__name {
    font-size: 0.85rem;
    color: var(--text-heading);
    font-weight: 500;
}

.gem-slot__rank {
    font-size: 0.75rem;
    color: var(--accent-gold);
}

/* ─── 16. Search Box ─────────────────────────────────── */
.search-box {
    position: relative;
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.search-box__input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box__input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.search-box__input:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.search-box__icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

.search-box__clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    display: none;
    transition: color 0.15s;
}

.search-box__clear:hover {
    color: var(--accent-red);
}

.search-box__input:not(:placeholder-shown) ~ .search-box__clear {
    display: block;
}

/* ─── 17. Badges ─────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.badge--season {
    background: rgba(243, 156, 18, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.badge--leveling {
    background: rgba(77, 166, 255, 0.15);
    color: var(--link-color);
    border: 1px solid rgba(77, 166, 255, 0.3);
}

.badge--endgame {
    background: rgba(233, 69, 96, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(233, 69, 96, 0.3);
}

.badge--new {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.badge--updated {
    background: rgba(255, 215, 0, 0.12);
    color: var(--accent-gold);
    border: 1px solid rgba(255, 215, 0, 0.25);
}

/* ─── 18. Responsive — New Components ────────────────── */
@media (max-width: 768px) {
    /* Build Grid */
    .build-grid {
        grid-template-columns: 1fr;
    }

    /* Build Card Skills row */
    .build-card__skills {
        gap: 0.35rem;
    }

    .build-card__skill-icon {
        width: 30px;
        height: 30px;
    }

    /* Filter Bar */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select,
    .filter-input {
        width: 100%;
    }

    .class-filter {
        justify-content: center;
    }

    .class-filter__item {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Equipment Grid */
    .equip-grid {
        grid-template-columns: repeat(5, 60px);
        grid-template-rows: repeat(5, 60px);
        gap: 6px;
        padding: 1rem;
    }

    .equip-slot__icon {
        width: 36px;
        height: 36px;
    }

    .equip-slot__name {
        display: none;
    }

    .equip-slot__label {
        display: none;
    }

    /* Kanai's Cube */
    .kanai-cube {
        gap: 1rem;
        padding: 1.5rem 1rem;
    }

    .kanai-cube__slot {
        width: 64px;
        height: 64px;
    }

    .kanai-cube__slot-icon {
        width: 30px;
        height: 30px;
    }

    /* Modal */
    .modal-content {
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
        margin: 0;
        margin-top: auto;
        align-self: flex-end;
        max-width: 100%;
    }

    .modal-overlay {
        align-items: flex-end;
    }

    /* Profile */
    .profile-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .profile-card__details {
        justify-content: center;
    }

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

    /* Tier List */
    .tier-row__label {
        width: 44px;
        font-size: 1.2rem;
    }

    .tier-row__builds {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .tier-row__build-item {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    .tier-row__build-icon {
        width: 26px;
        height: 26px;
    }

    /* Build Detail Skills */
    .build-skills-display {
        grid-template-columns: 1fr;
    }

    .build-passives-display {
        flex-direction: column;
    }

    .build-passive-slot {
        min-width: 0;
    }

    /* Build Header */
    .build-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }

    .build-header__badges {
        justify-content: center;
    }

    /* Tab Nav */
    .tab-nav__item {
        padding: 0.6rem 0.85rem;
        font-size: 0.82rem;
    }

    /* Pagination */
    .pagination {
        gap: 0.25rem;
    }

    .pagination__item {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Search Box */
    .search-box__input {
        font-size: 0.9rem;
        padding: 0.75rem 1rem 0.75rem 2.5rem;
    }
}

@media (max-width: 480px) {
    /* Build Card */
    .build-card__header {
        padding: 0.75rem 1rem;
    }

    .build-card__class-icon {
        width: 36px;
        height: 36px;
    }

    .build-card__title {
        font-size: 0.9rem;
    }

    .build-card__meta {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.4rem 1rem;
    }

    /* Equipment Grid */
    .equip-grid {
        grid-template-columns: repeat(5, 50px);
        grid-template-rows: repeat(5, 50px);
        gap: 4px;
        padding: 0.75rem;
    }

    .equip-slot__icon {
        width: 28px;
        height: 28px;
    }

    /* Kanai's Cube */
    .kanai-cube__slot {
        width: 54px;
        height: 54px;
    }

    .kanai-cube__slot-icon {
        width: 24px;
        height: 24px;
    }

    .kanai-cube__label {
        font-size: 0.6rem;
    }

    /* Profile */
    .profile-card__battletag {
        font-size: 1.15rem;
    }

    .profile-card__details {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Tier List */
    .tier-row__label {
        width: 36px;
        font-size: 1rem;
    }

    .tier-row__build-name {
        font-size: 0.75rem;
    }

    .tier-row__build-icon {
        width: 22px;
        height: 22px;
    }

    /* Build Skills */
    .build-skill-slot {
        padding: 0.65rem 0.75rem;
    }

    .build-skill-slot__icon {
        width: 36px;
        height: 36px;
    }

    /* Pagination */
    .pagination__item {
        min-width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    /* Gem grid */
    .gem-slot {
        padding: 0.5rem 0.75rem;
    }

    .gem-slot__icon {
        width: 26px;
        height: 26px;
    }

    .gem-slot__name {
        font-size: 0.78rem;
    }

    /* Set Card */
    .set-card {
        padding: 1rem;
    }

    .set-card__name {
        font-size: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════
   Missing Component Styles
   ═══════════════════════════════════════════════════════ */

/* ─── Item Quality Text Colors ────────────────────────── */
.quality-normal    { color: var(--quality-normal); }
.quality-magic     { color: var(--quality-magic); }
.quality-rare      { color: var(--quality-rare); }
.quality-legendary { color: var(--quality-legendary); }
.quality-set       { color: var(--quality-set); }

/* ─── Item Grid & Cards ──────────────────────────────── */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.item-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.2s, transform 0.15s;
}

.item-card:hover {
    border-color: var(--accent-orange);
    transform: translateY(-2px);
}

.item-card__icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-card__icon-placeholder {
    width: 64px;
    height: 64px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
}

.item-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.item-card__name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card__type {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.item-card__set {
    font-size: 0.72rem;
    color: var(--quality-set);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card__level {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ─── Filter Bar Extras ──────────────────────────────── */
.filter-bar__form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.filter-bar__group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-bar__group--submit {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.5rem;
    margin-left: auto;
}

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

/* ─── Button Variants ────────────────────────────────── */
.btn--sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
}

.btn--ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn--ghost:hover {
    border-color: var(--accent-red);
    color: var(--text-heading);
    background: rgba(233, 69, 96, 0.08);
}

/* ─── Section Extras ─────────────────────────────────── */
.section__text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.section__count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ─── Empty State ────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 4px;
}

/* ─── Pagination Link Variant (items.php) ────────────── */
.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    text-decoration: none;
}

.pagination__link:hover {
    border-color: var(--accent-red);
    color: var(--text-heading);
}

.pagination__link--active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
    font-weight: 600;
}

.pagination__link--prev,
.pagination__link--next {
    font-size: 0.8rem;
}

.pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ─── Build Card Extras ──────────────────────────────── */
.build-card__class {
    font-size: 0.8rem;
}

.build-card__author,
.build-card__views,
.build-card__date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ─── Build Header Meta ──────────────────────────────── */
.build-header__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

/* ─── Skill Card Detailed ────────────────────────────── */
.skill-card--detailed {
    flex-direction: row;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.skill-card__info {
    flex: 1;
    min-width: 0;
}

.skill-card__desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.5;
}

.skill-card__rune {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(243, 156, 18, 0.08);
    border-left: 3px solid var(--accent-orange);
    border-radius: 0 6px 6px 0;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.skill-card__rune em {
    color: var(--accent-orange);
    display: block;
    margin-bottom: 0.25rem;
}

/* ─── Tier Row Label Colors ──────────────────────────── */
/* The tier-list.php uses .tier-badge inside .tier-row__label,
   but the label itself needs the background color */
.tier-row .tier-row__label:has(.tier-badge--s) { background: var(--accent-red); }
.tier-row .tier-row__label:has(.tier-badge--a) { background: var(--accent-orange); }
.tier-row .tier-row__label:has(.tier-badge--b) { background: var(--accent-gold); color: #1a1a2e; }
.tier-row .tier-row__label:has(.tier-badge--c) { background: #4da6ff; }
.tier-row .tier-row__label:has(.tier-badge--d) { background: #666; }

/* Also style the tier-badge inside tier-row__label to be transparent (label IS the badge) */
.tier-row__label .tier-badge {
    background: transparent;
    box-shadow: none;
    width: auto;
    height: auto;
    font-size: 1.5rem;
    color: inherit;
}

/* ─── Build Card in Tier Row ─────────────────────────── */
.tier-row__builds .build-card {
    flex-shrink: 0;
    min-width: 200px;
    max-width: 280px;
}

/* ═══════════════════════════════════════════════════════
   Build Planner — d4guides-quality Rebuild
   ═══════════════════════════════════════════════════════ */

/* ─── Class Selection ───────────────────────────────── */
.class-selection__title {
    font-size: 1.25rem;
    color: var(--text-heading);
    margin-bottom: 1rem;
}

.class-grid--planner {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.class-card--selectable {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.class-card--selectable:hover {
    border-color: var(--accent-red);
}

/* ─── Build Editor Header ───────────────────────────── */
.build-editor__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 0;
}

.build-editor__icon {
    flex-shrink: 0;
}

.build-editor__class-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.build-editor__class-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.build-editor__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.build-editor__name-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-heading);
    padding: 0.25rem 0;
    font-size: 1.15rem;
    font-weight: 700;
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
}

.build-editor__name-input:hover,
.build-editor__name-input:focus {
    border-bottom-color: var(--accent-red);
}

.build-editor__name-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
    font-weight: 400;
}

.build-editor__class-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.build-editor__class-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.build-editor__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.build-editor__name-input--error {
    border-color: #e94560 !important;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Visibility selector */
.build-visibility {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    padding: 2px;
}

.visibility-opt {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.visibility-opt:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.visibility-opt--active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.1);
}

.btn--danger {
    color: #e94560;
}

.btn--danger:hover {
    color: #ff6b85;
    background: rgba(233,69,96,0.1);
}

.btn--xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
}

/* ─── Tab Navigation ────────────────────────────────── */
.build-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0.5rem 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.build-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    font-family: inherit;
    position: relative;
}

.build-tabs__tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.build-tabs__tab--active {
    color: var(--accent-red);
    background: var(--bg-primary);
}

.build-tabs__tab--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-red);
    border-radius: 2px 2px 0 0;
}

.build-tabs__tab svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.build-tabs__tab--active svg {
    opacity: 1;
    stroke: var(--accent-red);
}

/* ─── Tab Panels ────────────────────────────────────── */
.build-tab-panel {
    display: none;
}

.build-tab-panel--active {
    display: block;
}

/* ─── Build Sections ────────────────────────────────── */
.build-section {
    margin-bottom: 2rem;
}

.build-section__title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* ─── Skill Slots ───────────────────────────────────── */
.skill-grid--active {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.skill-grid--passive {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.skill-slot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.skill-slot:hover {
    border-color: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.skill-slot--assigned {
    border-color: var(--accent-orange);
}

.skill-slot__icon-wrap {
    flex-shrink: 0;
}

.skill-slot__icon {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-slot__icon--empty {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
}

.skill-slot__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.skill-slot__plus {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.skill-slot__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.skill-slot__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skill-slot__rune {
    min-height: 1.2rem;
}

.skill-slot__rune-hint {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.skill-slot__rune-name {
    font-size: 0.7rem;
    color: var(--accent-orange);
    font-weight: 600;
}

.skill-slot__rune select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--accent-orange);
    padding: 0.15rem 0.35rem;
    font-size: 0.72rem;
    outline: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
}

.skill-slot__rune select:focus {
    border-color: var(--accent-orange);
}

/* ─── Gear Layout (Paper Doll — d4guides pattern) ──── */
.gear-layout {
    display: grid;
    grid-template-columns: 1fr 200px 1fr;
    gap: 1rem;
    padding: 1.5rem 0;
}

.gear-layout__column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gear-layout__center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gear-layout__silhouette {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.gear-layout__silhouette-inner {
    opacity: 0.6;
    transition: opacity 0.3s;
}

.gear-layout__silhouette:hover .gear-layout__silhouette-inner {
    opacity: 0.9;
}

.gear-layout__silhouette-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── Gear Slot (d4guides pattern) ──────────────────── */
.gear-slot {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gear-slot:hover {
    border-color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gear-slot--equipped {
    border-color: var(--accent-gold);
}

.gear-slot--legendary { border-color: var(--quality-legendary); box-shadow: 0 0 8px rgba(191, 100, 47, 0.25); }
.gear-slot--set       { border-color: var(--quality-set); box-shadow: 0 0 8px rgba(0, 255, 0, 0.15); }
.gear-slot--rare      { border-color: var(--quality-rare); }
.gear-slot--magic     { border-color: var(--quality-magic); }
.gear-slot--ancient   { border-color: var(--quality-ancient); box-shadow: 0 0 10px rgba(255, 215, 0, 0.25); }

.gear-slot__icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s;
}

.gear-slot:hover .gear-slot__icon {
    border-color: var(--accent-orange);
}

.gear-slot__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gear-slot__plus {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.gear-slot__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.gear-slot__name {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

.gear-slot__item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gear-slot__item-name--empty {
    color: var(--text-secondary);
    opacity: 0.5;
    font-weight: 400;
}

/* Item quality name colors */
.gear-slot__item-name--legendary { color: var(--quality-legendary); }
.gear-slot__item-name--set       { color: var(--quality-set); }
.gear-slot__item-name--rare      { color: var(--quality-rare); }
.gear-slot__item-name--magic     { color: var(--quality-magic); }
.gear-slot__item-name--ancient   { color: var(--quality-ancient); }
.gear-slot__item-name--primal    { color: var(--quality-primal); }

/* ─── Kanai's Cube Layout ───────────────────────────── */
.cube-layout {
    text-align: center;
    padding: 2rem 1rem;
}

.cube-layout__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.cube-layout__desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cube-layout__slots {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.cube-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.cube-slot:hover {
    transform: scale(1.05);
}

.cube-slot__diamond {
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--accent-gold);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.cube-slot:hover .cube-slot__diamond {
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.3);
}

.cube-slot__diamond-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cube-slot__diamond-inner img {
    width: 56px;
    height: auto;
    max-height: 56px;
    object-fit: contain;
}

.cube-slot__plus {
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-weight: 300;
    opacity: 0.6;
}

.cube-slot__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cube-slot__item-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    max-width: 120px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cube-slot__item-name--legendary { color: var(--quality-legendary); }
.cube-slot__item-name--set       { color: var(--quality-set); }

/* ─── Gem Slots ─────────────────────────────────────── */
.gem-grid--legendary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.gem-slot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.gem-slot:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gem-slot__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s;
}

.gem-slot:hover .gem-slot__icon {
    border-color: var(--accent-gold);
}

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

.gem-slot__plus {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.gem-slot__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.gem-slot__name {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

.gem-slot__item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gem-slot__item-name--legendary { color: var(--quality-legendary); }

/* Regular Gems */
.gem-regular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gem-regular {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gem-regular__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gem-regular__select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s;
}

.gem-regular__select:focus {
    border-color: var(--accent-gold);
}

/* ─── Build Share ───────────────────────────────────── */
.build-share {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.build-share__inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.build-share__inner svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.build-share__input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    font-family: inherit;
}

.build-share__input:focus {
    border-color: var(--accent-red);
}

/* ─── Modal (d4guides-quality) ──────────────────────── */
.modal {
    background: #1e1f27;
    border: 1px solid #2a2b35;
    border-radius: 8px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.7);
    max-width: 540px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.2s ease;
    overflow: visible;
}

.modal-overlay[style*="flex"] .modal,
.modal-overlay:not([style*="none"]) .modal {
    transform: scale(1) translateY(0);
}

.modal__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    height: 52px;
    background: #1e1f27;
    border-bottom: 1px solid #2a2b35;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.modal__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal__search {
    flex: 1;
    background: transparent;
    border: 1px solid #444;
    border-radius: 4px;
    color: #ccc;
    padding: 0 10px;
    height: 30px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    min-width: 0;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.modal__search::placeholder {
    color: #555;
}

.modal__search:focus {
    border-color: #555;
}

.modal__filter-select {
    background: transparent;
    border: 1px solid #444;
    border-radius: 4px;
    color: #999;
    padding: 0 12px;
    height: 30px;
    font-size: 12px;
    font-weight: 500;
    outline: none;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s, border-color 0.2s;
}

.modal__filter-select:hover {
    color: #ddd;
    border-color: #666;
}

.modal__filter-select option {
    background: #1e1f27;
}

.modal__close {
    background: transparent;
    border: none;
    color: #666;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 6px;
    min-width: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.modal__close:hover {
    color: #ccc;
}

.modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.modal__body::-webkit-scrollbar {
    width: 6px;
}

.modal__body::-webkit-scrollbar-track {
    background: #16171c;
}

.modal__body::-webkit-scrollbar-thumb {
    background: #3a3b45;
    border-radius: 3px;
}

.modal__loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-size: 0.9rem;
}

.modal__empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-size: 0.9rem;
}

.modal__hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.78rem;
    padding: 0.75rem;
    border-top: 1px solid #2a2b35;
}

.modal__grid {
    display: flex;
    flex-direction: column;
}

/* Skill item in modal (d4guides row-style) */
.modal__skill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 0;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid #2a2b35;
    background: transparent;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    font-family: inherit;
    transition: background 0.15s;
}

.modal__skill-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.modal__skill-icon {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: cover;
}

.modal__skill-icon-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    flex-shrink: 0;
}

.modal__skill-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.modal__skill-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal__skill-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Item entry in modal (d4guides row-style) */
.modal__item-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 0;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid #2a2b35;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s;
}

.modal__item-entry:hover {
    background: #26272d;
}

.modal__item-entry--selected {
    background: rgba(255, 255, 255, 0.04);
}

.modal__item-entry--selected .modal__item-icon {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.modal__item-entry--selected .modal__item-icon img {
    display: none;
}

.modal__item-entry--selected .modal__item-icon::after {
    content: '✓';
    font-size: 1rem;
    font-weight: 700;
    color: #999;
}

.modal__item-icon {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: contain;
}

.modal__item-icon-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    flex-shrink: 0;
}

.modal__item-name {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal__item-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 1px;
    line-height: 1.3;
}

/* Quality colors for modal items */
.quality-normal    { color: var(--quality-normal); }
.quality-magic     { color: var(--quality-magic); }
.quality-rare      { color: var(--quality-rare); }
.quality-legendary { color: var(--quality-legendary); }
.quality-set       { color: var(--quality-set); }
.quality-ancient   { color: var(--quality-ancient); }
.quality-primal    { color: var(--quality-primal); }

/* ─── Responsive: Build Planner ─────────────────────── */
@media (max-width: 768px) {
    .item-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar__form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar__group--submit {
        margin-left: 0;
    }

    .build-editor__header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .build-editor__actions {
        justify-content: flex-end;
    }

    .build-tabs__tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
    }

    .skill-grid--active {
        grid-template-columns: 1fr;
    }

    .skill-grid--passive {
        grid-template-columns: repeat(2, 1fr);
    }

    .gear-layout {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .gear-layout__center {
        order: -1;
    }

    .gear-layout__silhouette {
        padding: 0.5rem;
    }

    .gear-layout__silhouette svg {
        width: 60px;
        height: 100px;
    }

    .cube-layout__slots {
        gap: 1.5rem;
    }

    .gem-grid--legendary {
        grid-template-columns: 1fr;
    }

    .gem-regular-grid {
        grid-template-columns: 1fr;
    }

    .build-share__inner {
        flex-direction: column;
    }

    .build-share__input {
        width: 100%;
    }

    .modal {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        margin: 0;
        margin-top: auto;
        max-height: 90vh;
    }

    .tier-row__builds .build-card {
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .skill-grid--passive {
        grid-template-columns: 1fr;
    }

    .build-tabs {
        gap: 0;
    }

    .build-tabs__tab {
        flex: 1;
        justify-content: center;
        font-size: 0.72rem;
        padding: 0.5rem 0.25rem;
    }

    .build-tabs__tab svg {
        display: none;
    }

    .cube-layout__slots {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }
}

/* ─── Rune Pills ────────────────────────────────────── */
.rune-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.rune-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.rune-pill:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.rune-pill--active {
    border-color: var(--accent-orange);
    background: rgba(243, 156, 18, 0.15);
    color: var(--accent-orange);
    font-weight: 600;
}

/* ─── Planner Toast Notifications ───────────────────── */
.planner-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 0.65rem 1.25rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.planner-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.planner-toast--success {
    background: var(--success);
    color: #fff;
}

.planner-toast--error {
    background: var(--danger);
    color: #fff;
}

.planner-toast--info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* ─── Modal: Extra item/skill sub-elements ──────────── */
.modal__item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.modal__item-set {
    font-size: 0.72rem;
    color: var(--quality-set);
    font-weight: 600;
}

.modal__item-type {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.modal__skill-rune-count {
    font-size: 0.68rem;
    color: var(--accent-orange);
    opacity: 0.8;
}

/* ─── Tooltip: Planner variant ──────────────────────── */
.tooltip--planner {
    pointer-events: none;
    opacity: 1;
    transform: none;
}

.tooltip__rune {
    font-size: 0.82rem;
    color: var(--accent-orange);
    font-weight: 600;
}

/* ─── D3 Ingame Tooltip (Blizzard-Style) ──────────── */
.d3-tooltip {
    position: fixed;
    z-index: 99999;
    background: linear-gradient(180deg, #1c1a14 0%, #0e0c08 100%);
    border: 2px solid #4a3d2a;
    border-radius: 2px;
    padding: 0;
    min-width: 300px;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    font-size: 13px;
    line-height: 1.5;
    color: #c8c0b0;
}

/* Quality border */
.d3-tooltip--legendary { border-color: #bf642f; }
.d3-tooltip--set { border-color: #00ff00; }
.d3-tooltip--rare { border-color: #ffff00; }
.d3-tooltip--magic { border-color: #6969ff; }
.d3-tooltip--normal { border-color: #555; }
.d3-tooltip--orange { border-color: #bf642f; }
.d3-tooltip--green { border-color: #00ff00; }

/* Item name banner */
.d3-tooltip__header {
    text-align: center;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid #333;
}

.d3-tooltip__name {
    font-size: 16px;
    font-weight: 700;
    display: block;
}

.d3-tooltip__name--legendary, .d3-tooltip__name--orange { color: #bf642f; }
.d3-tooltip__name--set, .d3-tooltip__name--green { color: #00ff00; }
.d3-tooltip__name--rare, .d3-tooltip__name--yellow { color: #ffff00; }
.d3-tooltip__name--magic, .d3-tooltip__name--blue { color: #6969ff; }
.d3-tooltip__name--skill { color: #fff; }

/* Icon + type row (under name) */
.d3-tooltip__icon-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
}

.d3-tooltip__icon {
    flex-shrink: 0;
    border: 1px solid #3a3020;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px;
}

.d3-tooltip__icon img {
    display: block;
    width: auto;
    height: auto;
    max-width: 64px;
    max-height: 96px;
}

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

.d3-tooltip__type {
    font-size: 12px;
    color: #bf642f;
    margin-bottom: 2px;
}

.d3-tooltip__slot {
    font-size: 11px;
    color: #808080;
    float: right;
}

/* Big stat (Armor / DPS) */
.d3-tooltip__armor, .d3-tooltip__dps {
    margin-top: 6px;
}

.d3-tooltip__armor-value, .d3-tooltip__dps-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    display: block;
}

.d3-tooltip__armor-label, .d3-tooltip__dps-label {
    font-size: 11px;
    color: #808080;
    text-transform: capitalize;
}

/* Body */
.d3-tooltip__body {
    padding: 8px 12px;
}

/* Attributes */
.d3-tooltip__attrs { margin: 4px 0; }

.d3-tooltip__attr {
    font-size: 12px;
    margin: 3px 0;
    line-height: 1.4;
}

.d3-tooltip__attr-label {
    font-size: 12px;
    font-weight: 700;
    color: #808080;
    margin: 8px 0 2px;
}

.d3-tooltip__divider {
    border: none;
    border-top: 1px solid #2a2518;
    margin: 8px 0;
}

/* Level + Account Bound */
.d3-tooltip__level {
    font-size: 11px;
    color: #808080;
    margin-top: 6px;
}

/* Flavor text */
.d3-tooltip__gem-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
}

.d3-tooltip__gem-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

.d3-tooltip__gem-icon--leg {
    width: 20px;
    height: 20px;
    background: #bf642f;
    border-radius: 50%;
}

.d3-tooltip__gem-legendary {
    padding: 4px 0;
}

.d3-tooltip__gem-effect {
    font-size: 11px;
    color: #a89060;
    line-height: 1.4;
    padding: 2px 0 0 28px;
}

.d3-tooltip__flavor {
    font-style: italic;
    color: #8a7340;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid #2a2518;
}

/* Set info */
.d3-tooltip__set-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #2a2518;
    font-size: 12px;
}

.d3-tooltip__set-info strong { color: #00ff00; }

/* D3 color classes from Blizzard API HTML */
.d3-color-gold { color: #ffd700; }
.d3-color-green { color: #00ff00; }
.d3-color-ff00ff00 { color: #00ff00; }
.d3-color-ffc7b377 { color: #c7b377; }
.d3-color-ff6969ff { color: #6969ff; }
.d3-color-ffff8000 { color: #ff8000; }

/* Skill tooltip specifics */
.d3-tooltip__skill-desc { padding: 10px 12px; }
.d3-tooltip__skill-desc p { margin: 4px 0; }
.d3-tooltip__rune-info { padding: 8px 12px; border-top: 1px solid #333; background: rgba(255,255,255,0.03); }
.d3-tooltip__rune-name { color: #ffd700; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.d3-tooltip__rune-desc p { margin: 2px 0; font-size: 12px; }

/* Loading state */
.d3-tooltip__loading { padding: 20px; text-align: center; color: #666; }

/* ─── Auth Pages ────────────────────────────────────── */
.auth-page {
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid #252830;
    border-radius: 4px;
    padding: 2rem;
}

.auth-card__title {
    font-size: 1.5rem;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-card__error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.auth-form__group {
    margin-bottom: 1.25rem;
}

.auth-form__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.auth-form__input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 150ms;
    box-sizing: border-box;
}

.auth-form__input:focus {
    border-color: var(--accent-gold);
}

.auth-form__hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

.auth-form__submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
}

.auth-card__footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Nav auth buttons */
.nav__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0.5rem;
}

.nav__actions .nav__action-link {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.15s;
}

.nav__actions .nav__action-link:hover {
    color: var(--text-primary);
}

.btn--secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn--secondary:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.25);
}

/* ─── Auth Modals ──────────────────────────────────── */
.modal--auth {
    max-width: 420px;
}

.auth-modal-body {
    padding: 1.5rem;
}

.auth-modal__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.auth-modal__divider::before,
.auth-modal__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Auth Modal (d4guides-Style) */
.auth-modal__tabs {
    display: flex;
    gap: 0;
    flex: 1;
}

.auth-modal__tab {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #777;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s, border-color 0.2s;
}

.auth-modal__tab:hover { color: #bbb; }

.auth-modal__tab--active {
    color: #fff;
    border-bottom-color: var(--accent-red);
}

.auth-modal__error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.auth-modal__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-modal__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-modal__label {
    font-size: 0.8rem;
    color: #999;
    font-weight: 500;
}

.auth-modal__input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: #12131a;
    border: 1px solid #2a2b35;
    border-radius: 6px;
    color: #e0ddd5;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.auth-modal__input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 2px rgba(165, 9, 5, 0.2);
}

.auth-modal__submit {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.65rem;
    font-size: 0.9rem;
}

/* OAuth Divider */
.auth-modal__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.auth-modal__divider::before,
.auth-modal__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* OAuth Buttons */
.auth-modal__oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn--oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    cursor: pointer;
    transition: all 150ms;
    text-decoration: none;
    line-height: 1;
}

.btn--oauth:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn--oauth img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.btn--battlenet {
    background: #0074e0;
    border-color: #005bb5;
}

.btn--battlenet:hover {
    background: #0082fc;
    color: #fff;
}

/* Benefits */
.auth-modal__benefits {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #2a2b35;
    text-align: center;
}

.auth-modal__benefits-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.auth-modal__benefits-list {
    display: inline-flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: left;
}

.auth-modal__benefit {
    font-size: 0.85rem;
    color: #b5b2a9;
    line-height: 1.5;
}

.auth-modal__benefit::first-letter {
    color: var(--accent-gold);
}

/* ─── Profile ──────────────────────────────────────── */
.profile {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Profile Header Card */
.profile__header {
    display: flex;
    gap: 1.75rem;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(26, 27, 32, 0.95) 0%, rgba(20, 21, 26, 0.95) 100%);
    border: 1px solid #2a2b35;
    border-radius: 8px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.profile__header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), #a37e2c, var(--accent-gold));
    opacity: 0.7;
}

/* Avatar */
.profile__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c4a24e 0%, #a37e2c 50%, #c4a24e 100%);
    color: #0a0a0f;
    font-size: 2.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(196, 162, 78, 0.2), 0 0 0 3px rgba(196, 162, 78, 0.1);
    letter-spacing: -0.02em;
}

/* Profile Info */
.profile__info {
    flex: 1;
    min-width: 0;
}

.profile__name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.2rem;
    letter-spacing: -0.01em;
}

.profile__username {
    color: var(--accent-gold);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

/* Stats row */
.profile__stats {
    display: flex;
    gap: 0;
    margin-top: 0.85rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.profile__stats > span {
    padding: 0 1.25rem;
    border-right: 1px solid #2a2b35;
    line-height: 1.2;
}

.profile__stats > span:first-child {
    padding-left: 0;
}

.profile__stats > span:last-child {
    border-right: none;
}

.profile__stat-value {
    font-weight: 700;
    color: #fff;
    font-size: 1.15rem;
    display: block;
}

.profile__member-since {
    display: block;
    font-size: 0.775rem;
    color: var(--text-secondary);
    margin-top: 0.65rem;
    opacity: 0.7;
}

.profile__actions {
    flex-shrink: 0;
    align-self: flex-start;
}

/* Profile Tabs */
.profile__tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #2a2b35;
    margin-bottom: 2rem;
}

.profile__tab {
    padding: 0.85rem 1.5rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    transition: color 150ms ease, border-color 150ms ease;
    position: relative;
}

.profile__tab:hover {
    color: #fff;
}

.profile__tab--active {
    color: #fff;
    border-bottom-color: var(--accent-gold);
}

/* Settings form */
.settings-form {
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid #2a2b35;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-form__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #2a2b35;
}

.settings-form__group {
    margin-bottom: 1.25rem;
}

.settings-form__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.45rem;
}

.settings-form__input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #1a1b20;
    border: 1px solid #2a2b35;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.925rem;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.settings-form__input:focus {
    border-color: var(--accent-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(196, 162, 78, 0.1);
}

.settings-form__input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.settings-form__success {
    color: #22c55e;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    padding: 0.65rem 0.85rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 6px;
}

.settings-form__error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    padding: 0.65rem 0.85rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
}

/* Build manage actions */
.build-card--managed {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.build-card--managed .build-card__link {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.build-manage {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    border-top: 1px solid #252830;
    background: rgba(0, 0, 0, 0.1);
}

.build-manage__btn {
    font-size: 0.775rem;
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    border: 1px solid #2a2b35;
    color: var(--text-secondary);
    transition: all 150ms ease;
    text-decoration: none;
    font-family: inherit;
    font-weight: 500;
}

.build-manage__btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(196, 162, 78, 0.08);
}

.build-manage__btn--delete:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid #2a2b35;
    border-radius: 8px;
}

.empty-state__icon {
    font-size: 3rem;
    color: #2a2b35;
    margin-bottom: 1rem;
    display: block;
}

.empty-state__text {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Profile responsive */
@media (max-width: 640px) {
    .profile__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }
    .profile__avatar { width: 80px; height: 80px; font-size: 1.75rem; }
    .profile__name { font-size: 1.35rem; }
    .profile__stats { justify-content: center; flex-wrap: wrap; }
    .profile__stats > span { padding: 0 0.85rem; }
    .profile__actions { align-self: center; }
    .profile__tab { padding: 0.75rem 1rem; font-size: 0.85rem; }
    .settings-form { padding: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════
   Hero Detail Page — Diablo 3 Style
   ═══════════════════════════════════════════════════════ */

/* Breadcrumb */
.hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}

.hero-breadcrumb a {
    color: var(--accent-gold);
    text-decoration: none;
}

.hero-breadcrumb a:hover { text-decoration: underline; }

.hero-breadcrumb__sep {
    color: var(--text-secondary);
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(10, 10, 18, 0.95) 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background: radial-gradient(ellipse at 20% 50%, currentColor, transparent 70%);
    pointer-events: none;
}

.hero-banner--barbarian { color: #c83030; }
.hero-banner--crusader { color: #e8d898; }
.hero-banner--demon-hunter { color: #7b3fa0; }
.hero-banner--monk { color: #f5dc6c; }
.hero-banner--necromancer { color: #00e6d0; }
.hero-banner--witch-doctor { color: #69cc47; }
.hero-banner--wizard { color: #69a5f5; }

.hero-banner__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.hero-banner__icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.hero-banner__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-banner__info { flex: 1; min-width: 200px; }

.hero-banner__name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.hero-banner__meta {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}

.hero-banner__class {
    font-size: 1rem;
    font-weight: 600;
    color: currentColor;
}

.hero-banner__level,
.hero-banner__paragon {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hero-banner__paragon {
    color: var(--accent-gold);
    font-weight: 600;
}

.hero-banner__tags {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.hero-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-tag--season { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.hero-tag--hardcore { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.hero-tag--dead { background: rgba(160, 160, 160, 0.15); color: #999; }

/* Hero Stat Pills (in banner) */
.hero-banner__stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    min-width: 90px;
}

.hero-stat-pill__label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.hero-stat-pill__value {
    font-size: 1.1rem;
    font-weight: 700;
}

.hero-stat-pill__value--dmg   { color: #ef4444; }
.hero-stat-pill__value--tough { color: #3b82f6; }
.hero-stat-pill__value--heal  { color: #22c55e; }

/* Section Titles */
.hero-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(196, 162, 78, 0.2);
}

.hero-section {
    margin-bottom: 2rem;
}

/* Main Content Layout: Equipment + Stats side by side */
.hero-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.hero-content__gear { min-width: 0; }

/* Stats Panel */
.hero-stats-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.stats-group {
    margin-bottom: 1rem;
}

.stats-group:last-child { margin-bottom: 0; }

.stats-group__title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-gold);
    margin: 0 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.825rem;
}

.stats-row__label { color: var(--text-secondary); }
.stats-row__value { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Kanai's Cube name under slot */
.kanai-cube__name {
    font-size: 0.72rem;
    color: var(--quality-legendary);
    text-align: center;
    margin-top: 0.25rem;
    max-width: 110px;
    line-height: 1.3;
    word-break: break-word;
}

/* Active Skills Bar */
.hero-skills-bar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.hero-skill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 200ms;
}

.hero-skill:hover { border-color: var(--accent-gold); }

.hero-skill__icon {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-skill__icon--empty {
    background: rgba(255, 255, 255, 0.03);
}

.hero-skill__info { min-width: 0; }

.hero-skill__name {
    display: block;
    font-size: 0.875rem;
    color: #fff;
    font-weight: 600;
}

.hero-skill__rune {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-orange);
    margin-top: 0.15rem;
}

/* Passive Skills */
.hero-passives {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hero-passive {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.hero-passive__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    transition: border-color 200ms, box-shadow 200ms;
}

.hero-passive:hover .hero-passive__icon {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(196, 162, 78, 0.3);
}

.hero-passive__name {
    font-size: 0.78rem;
    color: var(--text-secondary);
    max-width: 80px;
    line-height: 1.3;
}

/* ─── Hero Detail Responsive ──────────────────────────── */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-banner__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-banner__stats {
        width: 100%;
    }

    .hero-stat-pill {
        flex: 1;
        min-width: 80px;
    }

    .hero-skills-bar {
        grid-template-columns: 1fr;
    }

    .hero-banner__name {
        font-size: 1.35rem;
    }

    .kanai-cube {
        flex-wrap: wrap;
    }
}

@media (max-width: 500px) {
    .hero-banner {
        padding: 1.25rem;
    }

    .hero-banner__icon {
        width: 60px;
        height: 60px;
    }

    .equip-grid {
        grid-template-columns: repeat(5, 64px);
        grid-template-rows: repeat(5, 64px);
        gap: 4px;
        padding: 1rem;
    }

    .equip-slot__icon {
        width: 40px;
        height: 40px;
    }

    .equip-slot__name {
        display: none;
    }

    .equip-slot__label {
        font-size: 0.5rem;
    }
}

/* ═══════════════════════════════════════════════════════
   Seasons
   ═══════════════════════════════════════════════════════ */

.season-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.season-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 200ms, box-shadow 200ms;
}

.season-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 2px 12px rgba(196, 162, 78, 0.15);
}

.season-card--current {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, var(--bg-card) 100%);
}

.season-card__number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-gold);
    min-width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.season-card--current .season-card__number {
    color: #3b82f6;
}

.season-card__info {
    min-width: 0;
    flex: 1;
}

.season-card__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.season-card__name-en {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.season-card__dates {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.season-card__theme {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    line-height: 1.4;
}

/* Season Detail */
.season-detail__header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.season-detail__number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
}

.season-detail__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.season-detail__subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.season-detail__meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.season-detail__date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.season-detail__date strong {
    color: var(--text-primary);
}

.season-detail__theme {
    margin-bottom: 2rem;
}

.season-detail__theme p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.season-detail__nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 640px) {
    .season-grid {
        grid-template-columns: 1fr;
    }

    .season-detail__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .season-detail__meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ═══════════════════════════════════════════════════════
   Season 38: Ätherische Erinnerung
   ═══════════════════════════════════════════════════════ */

/* Hero Banner */
.s38-hero {
    position: relative;
    padding: 5rem 2rem 4rem;
    margin: -1rem -1rem 2rem;
    overflow: hidden;
    text-align: center;
}

.s38-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 30%, rgba(196, 162, 78, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 20% 80%, rgba(139, 69, 19, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 70%, rgba(165, 9, 5, 0.05) 0%, transparent 60%),
        linear-gradient(180deg, #0a0a12 0%, #0d0d1a 40%, #12101e 100%);
    z-index: 0;
}

.s38-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='rgba(196,162,78,0.03)' stroke-width='0.5'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.s38-hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.s38-hero__badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(196, 162, 78, 0.12);
    border: 1px solid rgba(196, 162, 78, 0.3);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    animation: s38FadeDown 0.6s ease both;
}

.s38-hero__title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 0.5rem;
    animation: s38FadeDown 0.6s 0.1s ease both;
}

.s38-hero__season-num {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    margin-bottom: 0.4rem;
}

.s38-hero__subtitle {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
    animation: s38FadeDown 0.6s 0.2s ease both;
}

.s38-hero__tagline {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 550px;
    margin: 0 auto 2rem;
    animation: s38FadeDown 0.6s 0.3s ease both;
}

.s38-hero__meta {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    animation: s38FadeDown 0.6s 0.4s ease both;
}

.s38-hero__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.s38-hero__date-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.s38-hero__date-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-top: 0.15rem;
}

.s38-hero__cta {
    animation: s38FadeDown 0.6s 0.5s ease both;
    font-size: 0.95rem;
    padding: 0.65rem 2rem;
}

@keyframes s38FadeDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* TOC */
.s38-toc {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem 0;
    margin-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.s38-toc__link {
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 150ms;
}

.s38-toc__link:hover {
    color: var(--accent-gold);
    background: rgba(196, 162, 78, 0.08);
}

/* Section Titles */
.s38-section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.s38-section-title__icon {
    color: var(--accent-gold);
    font-size: 1.1rem;
}

/* Features Grid */
.s38-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.s38-feature {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 200ms;
}

.s38-feature:hover {
    border-color: rgba(196, 162, 78, 0.3);
}

.s38-feature__icon {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
}

.s38-feature__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.35rem;
}

.s38-feature__text {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Class Weapons Grid */
.s38-class-weapons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.s38-class-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.25rem;
    transition: border-color 200ms;
}

.s38-class-group:hover {
    border-color: rgba(196, 162, 78, 0.25);
}

.s38-class-group__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.s38-class-group__icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.s38-class-group__name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.s38-class-group__items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.s38-ethereal-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--quality-ancient);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.s38-ethereal-item:last-child {
    border-bottom: none;
}

.s38-ethereal-item__diamond {
    color: var(--accent-gold);
    font-size: 0.6rem;
    flex-shrink: 0;
}

/* Haedrig's Geschenk */
.s38-sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.s38-set-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 200ms, box-shadow 200ms;
}

.s38-set-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 2px 12px rgba(196, 162, 78, 0.12);
}

.s38-set-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    flex-shrink: 0;
}

.s38-set-card__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.s38-set-card__class {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.s38-set-card__set {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--quality-set);
}

.s38-set-card__en {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Achievements */
.s38-achievements {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.s38-achievement {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.s38-achievement__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(196, 162, 78, 0.1);
    border: 1px solid rgba(196, 162, 78, 0.25);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.s38-achievement__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.2rem;
}

.s38-achievement__desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

/* Rewards */
.s38-rewards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.s38-reward {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    transition: border-color 200ms;
}

.s38-reward:hover {
    border-color: rgba(196, 162, 78, 0.3);
}

.s38-reward--highlight {
    border-color: var(--accent-gold);
    background: linear-gradient(180deg, rgba(196, 162, 78, 0.06) 0%, var(--bg-card) 100%);
    box-shadow: 0 0 20px rgba(196, 162, 78, 0.08);
}

.s38-reward__icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.s38-reward__title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.4rem;
}

.s38-reward__text {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .s38-hero {
        padding: 3rem 1rem 2.5rem;
    }

    .s38-hero__title {
        font-size: 1.8rem;
    }

    .s38-features,
    .s38-class-weapons,
    .s38-sets-grid,
    .s38-achievements,
    .s38-rewards {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   Builds Page — List Layout (d4guides.gg Style)
   ═══════════════════════════════════════════════════════ */

/* Class Filter Bar */
.builds-class-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.builds-class-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 150ms;
    white-space: nowrap;
}

.builds-class-btn:hover {
    border-color: var(--accent-gold);
    color: #fff;
}

.builds-class-btn--active {
    border-color: var(--accent-gold);
    background: rgba(196, 162, 78, 0.1);
    color: var(--accent-gold);
}

.builds-class-btn__icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.builds-class-btn__name {
    display: inline;
}

/* Filter Row */
.builds-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.builds-filters__form {
    display: flex;
    gap: 0.5rem;
}

.builds-filters__count {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Build List (vertical) */
.builds-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.build-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 180ms, box-shadow 180ms, transform 100ms;
}

.build-row:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 2px 12px rgba(196, 162, 78, 0.1);
    transform: translateX(2px);
}

/* Class Icon */
.build-row__class-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.build-row__class-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Build Info */
.build-row__info {
    flex: 1;
    min-width: 0;
}

.build-row__top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.build-row__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.build-row__badges {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.build-row__sub {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    min-width: 0;
}

.build-row__class {
    font-weight: 600;
    flex-shrink: 0;
}

.build-row__desc {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Skill Icons */
.build-row__skills {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.build-row__skill-icon {
    width: 28px;
    height: 28px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Meta Info */
.build-row__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    flex-shrink: 0;
    min-width: 80px;
}

.build-row__views {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.build-row__date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Empty State */
.builds-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.builds-empty p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .builds-class-btn__name {
        display: none;
    }

    .builds-class-btn {
        padding: 0.4rem;
    }

    .builds-class-btn__icon {
        width: 28px;
        height: 28px;
    }

    .build-row {
        flex-wrap: wrap;
        gap: 0.6rem;
        padding: 0.75rem;
    }

    .build-row__skills {
        order: 3;
        width: 100%;
    }

    .build-row__meta {
        flex-direction: row;
        gap: 0.75rem;
        order: 4;
        width: 100%;
        min-width: 0;
    }

    .build-row__desc {
        display: none;
    }
}

@media (max-width: 480px) {
    .build-row__class-icon {
        width: 36px;
        height: 36px;
    }

    .build-row__title {
        font-size: 0.85rem;
    }
}

/* Build Detail — Equipment List */
.build-equip-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.5rem;
}

.build-equip-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: border-color 200ms;
    cursor: default;
}

.build-equip-item:hover {
    border-color: var(--accent-gold);
}

.build-equip-item__icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.build-equip-item__icon img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 3px;
}

.build-equip-item__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.build-equip-item__slot {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.build-equip-item__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════
   Build Detail Page (d4guides.gg Style)
   ═══════════════════════════════════════════════════════ */

/* Header */
.bd-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.bd-header__icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.bd-header__icon img { width: 100%; height: 100%; object-fit: cover; }

.bd-header__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.bd-header__meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.bd-header__class { font-weight: 700; }
.bd-header__sep { opacity: 0.4; }

.bd-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

/* Overview 2-column layout */
.bd-overview {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    margin-top: 1rem;
}

.bd-section { margin-bottom: 1.5rem; }

.bd-section__title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-gold);
    margin: 0 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(196, 162, 78, 0.15);
}

.bd-section__subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 0.75rem 0 0.4rem;
}

/* Active Skills — 3er Grid */
.bd-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.bd-skills {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bd-skill {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.7rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: border-color 150ms;
    cursor: default;
}

.bd-skill:hover { border-color: var(--accent-gold); }

.bd-skill__icon {
    width: 36px;
    height: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.bd-skill__info { min-width: 0; }

.bd-skill__name {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}

.bd-skill__rune {
    display: block;
    font-size: 0.72rem;
    color: var(--accent-orange);
    margin-top: 0.1rem;
}

/* Passive Skills */
.bd-passives {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.bd-passive {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.65rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: default;
    transition: border-color 150ms;
}

.bd-passive:hover { border-color: var(--accent-gold); }

.bd-passive__icon {
    width: 28px;
    height: auto;
    border-radius: 50%;
    flex-shrink: 0;
}

.bd-passive__name {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Kanai's Cube */
.bd-cube {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bd-cube-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.7rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: default;
    transition: border-color 150ms;
}

.bd-cube-item:hover { border-color: var(--accent-gold); }

.bd-cube-item__icon {
    width: 32px;
    height: auto;
    border-radius: 3px;
    flex-shrink: 0;
}

.bd-cube-item__info { min-width: 0; }

.bd-cube-item__label {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.bd-cube-item__name {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
}

/* Kanai Row (3 nebeneinander) */
.bd-cube-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.bd-cube-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: default;
    transition: border-color 150ms;
}

.bd-cube-card:hover { border-color: var(--accent-gold); }

.bd-cube-card__icon {
    width: 36px;
    height: 48px;
    object-fit: contain;
    object-position: bottom;
    border-radius: 4px;
    margin-bottom: 0.3rem;
}

.bd-cube-card__label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.1rem;
}

.bd-cube-card__name {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Stat Priority */
.bd-stat-prio {
    margin: 0;
    padding-left: 1.2rem;
    list-style: decimal;
}

.bd-stat-prio li {
    font-size: 0.85rem;
    color: var(--text-primary);
    padding: 0.25rem 0;
}

/* ═══ Equipment Two-Column Layout (d4guides-Style) ═══ */
.bd-equipment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0.5rem 0;
}

.bd-equipment-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual gear slot */
.bd-gear-slot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: background 150ms, border-color 150ms;
    cursor: default;
}

.bd-gear-slot:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.bd-gear-slot--empty {
    opacity: 0.4;
}

.bd-gear-slot--empty .bd-gear-slot__icon {
    border-style: dashed;
}

/* Planner: gear slots are clickable */
.gear-slot.bd-gear-slot {
    cursor: pointer;
}

/* Right column: text left, icon right */
.bd-equipment-col--right .bd-gear-slot {
    flex-direction: row;
}

.bd-equipment-col--right .bd-gear-slot__info {
    text-align: right;
}

/* Icon container */
.bd-gear-slot__icon {
    position: relative;
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.bd-gear-slot__icon img {
    width: 42px;
    height: auto;
    max-height: 50px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

/* Info section */
.bd-gear-slot__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bd-gear-slot__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.bd-gear-slot__name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Quality icon borders + glow (reused from before, also used in build-planner) */
.bd-pd-icon--normal    { border-color: rgba(255,255,255,0.15); }
.bd-pd-icon--magic     { border-color: var(--quality-magic); box-shadow: 0 0 6px rgba(105,105,255,0.2); }
.bd-pd-icon--rare      { border-color: var(--quality-rare); box-shadow: 0 0 6px rgba(255,255,0,0.2); }
.bd-pd-icon--legendary { border-color: var(--quality-legendary); box-shadow: 0 0 8px rgba(191,100,47,0.3); background: rgba(191,100,47,0.06); }
.bd-pd-icon--set       { border-color: var(--quality-set); box-shadow: 0 0 8px rgba(0,255,0,0.2); background: rgba(0,255,0,0.04); }
.bd-pd-icon--ancient   { border-color: var(--quality-ancient); box-shadow: 0 0 10px rgba(255,215,0,0.3); }
.bd-pd-icon--primal    { border-color: var(--quality-primal); box-shadow: 0 0 12px rgba(255,0,0,0.4); }

/* ═══ Paper-Doll Grid (Build Planner only) ═══ */
.bd-paperdoll {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: repeat(5, auto);
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 0;
    align-items: center;
}

.bd-pd-item {
    display: flex;
    align-items: center;
    cursor: default;
    transition: opacity 150ms;
}

.bd-pd-item:hover { opacity: 0.8; }
.bd-pd-item--left { justify-self: end; }
.bd-pd-item--left .bd-pd-item__text { text-align: right; }
.bd-pd-item--right { justify-self: start; }
.bd-pd-item--right .bd-pd-item__text { text-align: left; }
.bd-pd-item--center { flex-direction: column; align-items: center; justify-self: center; }
.bd-pd-item--center .bd-pd-item__text { text-align: center; margin-top: 0.15rem; }

.bd-pd-item__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 3px;
}

.bd-pd-item__icon img {
    display: block;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.bd-paperdoll .gear-slot { display: flex; background: none; border: none; padding: 0; cursor: pointer; }
.bd-paperdoll .gear-slot:hover { border: none; box-shadow: none; transform: none; }
.bd-paperdoll .gear-slot__icon { width: auto; height: auto; }
.bd-paperdoll .gear-slot__plus { font-size: 1.2rem; color: var(--text-secondary); opacity: 0.4; }

.bd-pd-item__icon .slot-placeholder { opacity: 0.2; filter: grayscale(100%) brightness(0.8); transition: opacity 200ms; }
.bd-pd-item:hover .slot-placeholder { opacity: 0.35; }

[data-slot-key="head"] .bd-pd-item__icon img             { width: 66px; height: 66px; }
[data-slot-key="chest"] .bd-pd-item__icon img            { width: 82px; height: 115px; }
[data-slot-key="belt"] .bd-pd-item__icon img             { width: 82px; height: 34px; }
[data-slot-key="pants"] .bd-pd-item__icon img            { width: 66px; height: 88px; }
[data-slot-key="boots"] .bd-pd-item__icon img            { width: 66px; height: 88px; }
[data-slot-key="shoulders"] .bd-pd-item__icon img        { width: 66px; height: 88px; }
[data-slot-key="gloves"] .bd-pd-item__icon img           { width: 66px; height: 88px; }
[data-slot-key="bracers"] .bd-pd-item__icon img          { width: 66px; height: 88px; }
[data-slot-key="ring1"] .bd-pd-item__icon img,
[data-slot-key="ring2"] .bd-pd-item__icon img            { width: 42px; height: 42px; }
[data-slot-key="mainhand"] .bd-pd-item__icon img         { width: 66px; height: 130px; }
[data-slot-key="offhand"] .bd-pd-item__icon img          { width: 66px; height: 130px; }
[data-slot-key="amulet"] .bd-pd-item__icon img           { width: 56px; height: 56px; }

.bd-pd-item__line { width: 24px; height: 1px; flex-shrink: 0; margin: 0 0.25rem; }
.bd-pd-item--left .bd-pd-item__line { background: linear-gradient(90deg, rgba(196,162,78,0.05), rgba(196,162,78,0.35)); }
.bd-pd-item--right .bd-pd-item__line { background: linear-gradient(90deg, rgba(196,162,78,0.35), rgba(196,162,78,0.05)); }

.bd-pd-item__text { min-width: 0; }
.bd-pd-item__slot { display: block; font-size: 0.55rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); line-height: 1.2; }
.bd-pd-item__name { display: block; font-size: 0.78rem; font-weight: 600; white-space: nowrap; line-height: 1.3; }

/* Gems */
.bd-gems {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bd-gems li {
    font-size: 0.82rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.bd-gems li:last-child { border-bottom: none; }

/* Responsive */
@media (max-width: 768px) {
    .bd-overview {
        grid-template-columns: 1fr;
    }

    .bd-equipment-grid {
        grid-template-columns: 1fr;
    }

    .bd-equipment-col--right .bd-gear-slot__info {
        text-align: left;
    }

    .bd-skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bd-header__title {
        font-size: 1.2rem;
    }
}

/* ═══════════════════════════════════════════════════════
   Build Planner — 3-Spalten Layout (Maxroll-Style)
   ═══════════════════════════════════════════════════════ */

.planner-layout {
    display: grid;
    grid-template-columns: 1fr 320px 220px;
    gap: 1.5rem;
    margin-top: 1rem;
}

.planner-layout__left { min-width: 0; }
.planner-layout__center { min-width: 0; }
.planner-layout__right { min-width: 0; }

/* Section titles */
.planner-section {
    margin-bottom: 1.25rem;
}

.planner-section__title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-gold);
    margin: 0 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(196, 162, 78, 0.15);
}

/* Modal Tabs (d4guides-Style) */
.modal__tabs {
    display: flex;
    border-bottom: 1px solid #2a2b35;
    background: #15161d;
}

.modal__tab {
    flex: 1;
    padding: 0 16px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #777;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: color 0.2s, background 0.2s;
    font-family: inherit;
}

.modal__tab:hover {
    color: #bbb;
    background: rgba(255, 255, 255, 0.05);
}

.modal__tab--active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.modal__tab-panel { display: none; }
.modal__tab-panel--active { display: block; }

/* Rune items in modal */
.modal__rune-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.modal__rune-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 150ms;
    width: 100%;
    text-align: left;
    font-family: inherit;
    color: var(--text-primary);
}

.modal__rune-item:hover { border-color: var(--accent-gold); }
.modal__rune-item--active { border-color: var(--accent-gold); background: rgba(196, 162, 78, 0.06); }

.modal__rune-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-orange);
}

.modal__rune-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
    line-height: 1.4;
}

.modal__rune-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    background: rgba(196, 162, 78, 0.06);
    border: 1px solid rgba(196, 162, 78, 0.2);
    border-radius: 5px;
    font-size: 0.82rem;
    color: var(--accent-gold);
    font-weight: 600;
}

.modal__rune-selected img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

/* Socket rows in modal */
.socket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 0.35rem;
}

.socket-row__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.socket-row__select {
    padding: 0.3rem 0.5rem;
    background: #22232a;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: inherit;
}

/* Affix selection in modal (d4guides stat-row style) */
.affix-section-label {
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-gold);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid #2a2b35;
}

.affix-stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
}

.affix-stat-row__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 50px;
}

.affix-stat-row__wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.affix-stat-row__input {
    width: 100%;
    background: #22232b;
    border: 1px solid #3a3b45;
    border-radius: 4px;
    padding: 7px 28px 7px 10px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.affix-stat-row__input::placeholder { color: #555; }
.affix-stat-row__input:focus { border-color: var(--accent-gold); }

.affix-stat-row__clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #555;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color 0.15s;
    display: none;
}

.affix-stat-row__clear--visible { display: block; }
.affix-stat-row__clear:hover { color: #ccc; }

/* Affix Dropdown */
.affix-dropdown {
    position: fixed;
    background: #1a1b23;
    border: 1px solid #3a3b45;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10001;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    scrollbar-width: thin;
    scrollbar-color: #3a3b45 #1a1b23;
}

.affix-dropdown__item {
    padding: 7px 12px;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
    transition: background 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    display: block;
}

.affix-dropdown__item:hover {
    background: #2a2b35;
    color: #fff;
}

/* Gem overlay on item icons */
/* ═══ Gem Sub-Tabs & List (Socket Tab) ═══ */
.gem-subtabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #2a2b35;
    padding: 0 16px;
}

.gem-subtab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}

.gem-subtab:hover {
    color: var(--text-primary);
}

.gem-subtab--active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-gold, #c4a24e);
}

.gem-subtab__num {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gem-subtab__gem {
    font-size: 13px;
    font-weight: 500;
}

.gem-list-section {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 12px 16px 4px;
}

.gem-list {
    display: flex;
    flex-direction: column;
}

.gem-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid #2a2b35;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s;
    width: 100%;
}

.gem-list__item:hover {
    background: #26272d;
}

.gem-list__item--selected {
    background: rgba(255, 255, 255, 0.04);
}

.gem-list__item--selected .gem-list__icon {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.gem-list__item--selected .gem-list__icon img {
    display: none;
}

.gem-list__item--selected .gem-list__icon::after {
    content: '✓';
    font-size: 1rem;
    font-weight: 700;
    color: #999;
}

.gem-list__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gem-list__icon--empty {
    width: 36px;
    height: 36px;
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 4px;
}

.gem-list__icon img {
    border-radius: 4px;
}

.gem-list__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ═══ Gem Summary (auto from sockets) ═══ */
.gem-summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gem-summary__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gem-summary__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 0 0 4px;
}

.gem-summary__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.gem-summary__icon {
    flex-shrink: 0;
    border-radius: 3px;
}

.gem-summary__name {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.gem-summary__slot {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Gem overlay — top-right of gear slot (d4guides style) */
.gem-overlay {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 5;
    pointer-events: none;
}

.gem-overlay__icon {
    width: 22px;
    height: 22px;
    overflow: hidden;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gem-overlay__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gem-overlay__icon--legendary {
    background: none;
}

/* Modal Footer */
.modal__footer {
    padding: 8px 16px;
    border-top: 1px solid #2a2b35;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.affix-dropdown__group {
    padding: 4px 12px 2px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-gold);
    background: rgba(0, 0, 0, 0.3);
}

/* Stats Panel (rechts) */
.planner-stats {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

.planner-stats__title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-gold);
    margin: 0 0 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(196, 162, 78, 0.12);
}

.planner-stats__row {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    font-size: 0.78rem;
}

.planner-stats__row span:first-child { color: var(--text-secondary); }
.planner-stats__row span:last-child { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }

.planner-stats__row--highlight span:first-child { color: var(--text-primary); }
.planner-stats__row--highlight span:last-child { font-size: 0.85rem; }

.planner-stats__divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .planner-layout {
        grid-template-columns: 1fr 280px;
    }

    .planner-layout__right {
        grid-column: 1 / -1;
    }

    .planner-stats {
        position: static;
    }
}

@media (max-width: 768px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   Item Detail Page
   ═══════════════════════════════════════════════════════ */

.item-detail__header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.item-detail__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px;
}

.item-detail__icon img {
    max-width: 80px;
    height: auto;
    display: block;
}

.item-detail__name {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.item-detail__type {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.2rem 0 0.5rem;
}

.item-detail__badges {
    display: flex;
    gap: 0.4rem;
}

.item-detail__content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
}

.item-detail__main {
    min-width: 0;
}

.item-detail__section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.item-detail__section--set {
    background: rgba(0, 255, 0, 0.03);
    border: 1px solid rgba(0, 255, 0, 0.1);
    border-radius: 6px;
    padding: 1rem;
}

.item-detail__section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-gold);
    margin: 0 0 0.5rem;
}

.item-detail__stat-big {
    display: inline-flex;
    flex-direction: column;
    margin-right: 2rem;
    margin-bottom: 0.5rem;
}

.item-detail__stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.item-detail__stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.item-detail__dmg-range {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

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

.item-detail__attrs li {
    font-size: 0.88rem;
    padding: 0.25rem 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.item-detail__attrs--secondary li {
    color: var(--text-secondary);
}

.item-detail__flavor {
    font-style: italic;
    color: #c7b377;
    font-size: 0.88rem;
    line-height: 1.6;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.item-detail__set-bonuses {
    font-size: 0.85rem;
    color: var(--quality-set);
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Sidebar: Related Items */
.item-detail__sidebar {
    min-width: 0;
}

.item-detail__related {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.item-detail__related-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 150ms;
    font-size: 0.82rem;
}

.item-detail__related-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.item-detail__related-icon {
    width: 28px;
    height: auto;
    max-height: 36px;
    flex-shrink: 0;
}

/* Item cards as links */
a.item-card {
    text-decoration: none;
    color: inherit;
}

/* Blizzard D3 color classes in item tooltips */
.d3-color-ff00ff00 { color: #00ff00; }
.d3-color-ffc7b377 { color: #c7b377; }
.d3-color-ff6969ff { color: #6969ff; }
.d3-color-ffff8000 { color: #ff8000; }

@media (max-width: 768px) {
    .item-detail__content {
        grid-template-columns: 1fr;
    }

    .item-detail__header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══════════════════════════════════════════════════════
   Class Detail — Sets & Items
   ═══════════════════════════════════════════════════════ */

.class-header__img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Set Block */
.class-set {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.class-set__name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
}

.class-set__en {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
}

.class-set__bonuses {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.class-set__bonus {
    padding: 0.2rem 0;
    font-size: 0.82rem;
    line-height: 1.5;
}

.class-set__bonus-pieces {
    color: var(--quality-set);
    font-weight: 700;
    margin-right: 0.3rem;
}

.class-set__bonus-text {
    color: var(--text-secondary);
}

/* Set Items Grid */
.class-set__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.class-set__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: background 150ms;
}

.class-set__item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.class-set__item-icon {
    width: 32px;
    height: auto;
    max-height: 40px;
    flex-shrink: 0;
}

.class-set__item-name {
    font-size: 0.82rem;
    font-weight: 600;
    display: block;
}

.class-set__item-type {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
}

/* Legendary Items Grid */
.class-legendaries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.35rem;
}

.class-legendary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: background 150ms;
}

.class-legendary-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.class-legendary-item__icon {
    width: 32px;
    height: auto;
    max-height: 40px;
    flex-shrink: 0;
}

.class-legendary-item__name {
    font-size: 0.82rem;
    font-weight: 600;
    display: block;
}

.class-legendary-item__type {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
}

/* ═══════════════════════════════════════════════════════
   GLOBAL MOBILE RESPONSIVE FIXES
   ═══════════════════════════════════════════════════════ */

/* ─── 640px: Tablets / große Phones ─── */
@media (max-width: 640px) {
    .hero-skills-bar {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .class-set__items {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .class-legendaries {
        grid-template-columns: 1fr;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .s38-class-weapons {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .s38-sets-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── 480px: Phones ─── */
@media (max-width: 480px) {
    /* Container */
    .container { padding: 0 0.75rem; }

    /* Tooltip */
    .d3-tooltip {
        min-width: 0;
        max-width: calc(100vw - 16px);
        font-size: 12px;
    }

    .d3-tooltip__icon img {
        max-width: 48px;
        max-height: 72px;
    }

    .d3-tooltip__armor-value,
    .d3-tooltip__dps-value {
        font-size: 22px;
    }

    /* Section titles */
    .section__title { font-size: 1.3rem; }

    /* Hero Banner */
    .hero-banner { padding: 1rem; }
    .hero-banner__name { font-size: 1.1rem; }
    .hero-banner__icon { width: 56px; height: 56px; }
    .hero-banner__stats { width: 100%; }
    .hero-stat-pill { flex: 1; min-width: 70px; padding: 0.4rem 0.5rem; }
    .hero-stat-pill__value { font-size: 0.9rem; }

    /* Equipment Grid */
    .equip-grid {
        grid-template-columns: repeat(3, 50px);
        grid-template-rows: repeat(7, 50px);
        gap: 3px;
        padding: 0.5rem;
    }

    .equip-slot__icon { width: 36px; height: 36px; }
    .equip-slot__name { display: none; }
    .equip-slot__label { font-size: 0.45rem; }

    /* Kanai Cube */
    .kanai-cube {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem 0.75rem;
    }

    .kanai-cube__slot {
        width: 56px;
        height: 56px;
    }

    .kanai-cube__name { font-size: 0.65rem; max-width: 80px; }

    /* Hero Content */
    .hero-content { grid-template-columns: 1fr; }
    .hero-stats-panel { padding: 0.75rem; }

    /* Build Row */
    .build-row { padding: 0.5rem; gap: 0.5rem; }
    .build-row__class-icon { width: 36px; height: 36px; }
    .build-row__title { font-size: 0.8rem; }
    .build-row__meta { min-width: 0; }
    .build-row__desc { display: none; }

    /* Item Grid */
    .item-card { padding: 0.5rem 0.75rem; gap: 0.5rem; }

    /* Item Detail */
    .item-detail__content { grid-template-columns: 1fr; }
    .item-detail__header { flex-direction: column; gap: 0.75rem; }
    .item-detail__name { font-size: 1.2rem; }
    .item-detail__stat-big { margin-right: 1rem; }
    .item-detail__icon img { max-width: 60px; }

    /* Class Sets */
    .class-set__items {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .class-set { padding: 0.75rem; }

    /* Season 38 Hero */
    .s38-hero { padding: 2rem 0.75rem 1.5rem; }
    .s38-hero__title { font-size: 1.5rem; }
    .s38-hero__tagline { font-size: 0.85rem; }
    .s38-hero__content { max-width: 100%; }

    /* TOC */
    .s38-toc { flex-direction: column; align-items: center; }
    .s38-toc__link { padding: 0.3rem 0.5rem; font-size: 0.72rem; }

    /* Season 38 Features */
    .s38-features,
    .s38-class-weapons,
    .s38-sets-grid,
    .s38-achievements,
    .s38-rewards {
        grid-template-columns: 1fr;
    }

    /* Build Detail Paperdoll */
    .bd-paperdoll {
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem 0.4rem;
    }

    .bd-pd-item__icon { width: 40px; height: 40px; padding: 2px; }
    .bd-pd-item__icon img { max-width: 36px; max-height: 36px; }
    .bd-pd-item__line { width: 12px; margin: 0 0.15rem; }
    .bd-pd-item__name { font-size: 0.65rem; }
    .bd-pd-item__slot { font-size: 0.5rem; }

    /* Build Detail Overview */
    .bd-overview { grid-template-columns: 1fr; }
    .bd-header__title { font-size: 1.1rem; }

    /* Skills Grid */
    .bd-skills-grid { grid-template-columns: repeat(2, 1fr); }
    .bd-passives { grid-template-columns: repeat(2, 1fr); }
    .bd-cube-row { grid-template-columns: 1fr; }

    /* Planner Layout */
    .planner-layout { grid-template-columns: 1fr; gap: 1rem; }

    /* Builds Class Filter */
    .builds-class-btn { padding: 0.3rem; }
    .builds-class-btn__name { display: none; }
    .builds-class-btn__icon { width: 24px; height: 24px; }

    /* Auth Modal */
    .modal { margin: 0.5rem; max-height: 95vh; }
    .modal--auth { width: calc(100vw - 1rem); }

    /* Footer */
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .footer__search { flex-direction: column; }

    /* Nav */
    .nav__logo { font-size: 1rem; }
    .nav__badge-wip { font-size: 0.45rem; padding: 0.1rem 0.3rem; }
}

/* ─── 360px: Sehr kleine Phones ─── */
@media (max-width: 360px) {
    .bd-paperdoll {
        grid-template-columns: 1fr;
    }

    .bd-pd-item--left,
    .bd-pd-item--right,
    .bd-pd-item--center {
        justify-self: start;
        flex-direction: row;
    }

    .bd-pd-item--center { flex-direction: row; }
    .bd-pd-item--center .bd-pd-item__text { text-align: left; margin-top: 0; margin-left: 0.3rem; }
    .bd-pd-item--right .bd-pd-item__text { text-align: left; }
    .bd-pd-item--right { flex-direction: row-reverse; }

    .build-row__title { font-size: 0.75rem; }
    .build-row__skills { display: none; }

    .hero-banner__inner { gap: 0.75rem; }
    .hero-banner__name { font-size: 1rem; }

    .s38-hero__title { font-size: 1.2rem; }
}
