/* ============================================================
   Builds List, Build Cards, Vote Widget, Profile Page
   ============================================================ */

/* --- Class Filter Bar (Icon Row) --- */
.class-filter-bar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: -1.25rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
}

.class-filter-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.625rem;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--border-radius-lg, 8px);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    color: var(--text-dimmed);
    min-width: 64px;
}

.class-filter-bar__item:hover {
    background: rgba(196, 162, 78, 0.06);
    border-color: rgba(196, 162, 78, 0.25);
    transform: translateY(-2px);
}

.class-filter-bar__item--active {
    border-color: var(--gold, #c4a24e);
    background: rgba(196, 162, 78, 0.1);
    color: var(--gold, #c4a24e);
}

.class-filter-bar__item--active .class-filter-bar__icon {
    filter: drop-shadow(0 0 6px rgba(196, 162, 78, 0.5));
}

.class-filter-bar__icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s;
}

.class-filter-bar__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.class-filter-bar__name {
    font-size: 0.7rem;
    font-family: var(--font-body);
    text-transform: capitalize;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Build count below class filter */
.builds-header__count {
    font-size: 0.875rem;
    color: var(--text-dimmed);
    text-align: center;
    margin-bottom: 1rem;
}

/* Legacy header (for class-specific pages) */
.builds-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.builds-header__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.builds-header__icon img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.builds-header__info h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--gold);
    text-transform: uppercase;
}

/* Responsive: smaller icons on mobile */
@media (max-width: 768px) {
    .class-filter-bar {
        gap: 0.25rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding: 0.5rem 0;
        scrollbar-width: none;
    }
    .class-filter-bar::-webkit-scrollbar { display: none; }
    .class-filter-bar__item {
        min-width: 52px;
        padding: 0.375rem 0.4rem;
    }
    .class-filter-bar__icon {
        width: 48px;
        height: 48px;
    }
    .class-filter-bar__name {
        font-size: 0.6rem;
    }
}

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

.filter-bar__select {
    padding: 0.45rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.filter-bar__select:focus {
    outline: none;
    border-color: var(--gold-dark);
}

.filter-bar__search {
    flex: 1;
    min-width: 180px;
    padding: 0.45rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: border-color var(--transition-fast);
}

.filter-bar__search::placeholder {
    color: var(--text-dark);
}

.filter-bar__search:focus {
    outline: none;
    border-color: var(--gold-dark);
}

.filter-bar__spacer {
    flex: 1;
}

/* --- Build Cards Grid (flex-column for full-width rows) --- */
.builds-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.builds-grid--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-dimmed);
}

.builds-grid--empty p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* --- Build Card (full-width row) --- */
.build-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    min-height: 88px;
}

.build-card:hover {
    border-color: var(--gold-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 8px rgba(196, 162, 78, 0.06);
}

.build-card--featured {
    border-left: 3px solid var(--gold);
}

/* --- Thumbnail: Class Icon + Color Gradient --- */
.build-card__thumbnail {
    width: 80px;
    min-height: 88px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
    background: linear-gradient(to top, var(--class-color, #1a1a24) 0%, transparent 50%),
                #1a1a24;
}

.build-card__class-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* --- BG Image Overlay (right side) --- */
.build-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 70%;
    background-image: var(--card-bg, none);
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    pointer-events: none;
    mask-image: linear-gradient(to right, transparent, black 40%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 40%);
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
}

/* Hide ::after when no BG image set */
.build-card:not([style*="--card-bg"])::after {
    display: none;
}

/* --- Card Info (center) --- */
.build-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.625rem 1rem;
    position: relative;
    z-index: 1;
}

.build-card__title {
    font-family: 'Roboto', var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.build-card__meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--text-dimmed);
    line-height: 1.3;
}

.build-card__author {
    color: var(--text-dimmed);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.build-card__author:hover {
    color: var(--gold);
}

.build-card__details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    font-size: 0.78rem;
    color: var(--text-dimmed);
    line-height: 1.4;
}

.build-card__class-name {
    font-weight: 600;
    color: var(--class-color, var(--text-dimmed));
}

/* Class name color from --class-color CSS variable (set via inline style from DB) */

.build-card__type {
    text-transform: capitalize;
}

.build-card__separator {
    color: var(--text-dark);
}

.build-card__fav-count {
    color: #ef4444;
    font-weight: 600;
}

.build-card__views {
    color: var(--text-dark);
}

/* --- Label Badges (left of skills) --- */
.build-card__labels {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 0 0.75rem 0 0;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.build-card__label {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: var(--border-radius);
    line-height: 1.4;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.build-card__label--tier-s { background: color-mix(in srgb, var(--tier-s, #a50905) 45%, transparent); color: #fff; border-color: color-mix(in srgb, var(--tier-s, #a50905) 60%, transparent); }
.build-card__label--tier-a { background: color-mix(in srgb, var(--tier-a, #4ade80) 30%, transparent); color: #fff; border-color: color-mix(in srgb, var(--tier-a, #4ade80) 45%, transparent); }
.build-card__label--tier-b { background: color-mix(in srgb, var(--tier-b, #3b82f6) 30%, transparent); color: #fff; border-color: color-mix(in srgb, var(--tier-b, #3b82f6) 45%, transparent); }
.build-card__label--tier-c { background: color-mix(in srgb, var(--tier-c, #f59e0b) 30%, transparent); color: #fff; border-color: color-mix(in srgb, var(--tier-c, #f59e0b) 45%, transparent); }
.build-card__label--tier-d { background: color-mix(in srgb, var(--tier-d, #ef4444) 30%, transparent); color: #fff; border-color: color-mix(in srgb, var(--tier-d, #ef4444) 45%, transparent); }
.build-card__label--season { background: color-mix(in srgb, var(--label-season, #4ade80) 25%, transparent); color: #fff; border-color: color-mix(in srgb, var(--label-season, #4ade80) 40%, transparent); }
.build-card__label--eternal { background: color-mix(in srgb, var(--label-eternal, #c4a24e) 30%, transparent); color: #fff; border-color: color-mix(in srgb, var(--label-eternal, #c4a24e) 50%, transparent); }
.build-card__label--endgame   { background: color-mix(in srgb, var(--buildtype-endgame, #a50905) 35%, transparent); color: #fff; border-color: color-mix(in srgb, var(--buildtype-endgame, #a50905) 50%, transparent); }
.build-card__label--leveling  { background: color-mix(in srgb, var(--buildtype-leveling, #4ade80) 30%, transparent); color: #fff; border-color: color-mix(in srgb, var(--buildtype-leveling, #4ade80) 45%, transparent); }
.build-card__label--speedfarm { background: color-mix(in srgb, var(--buildtype-speedfarm, #f59e0b) 30%, transparent); color: #fff; border-color: color-mix(in srgb, var(--buildtype-speedfarm, #f59e0b) 45%, transparent); }
.build-card__label--bossing   { background: color-mix(in srgb, var(--buildtype-bossing, #8b5cf6) 30%, transparent); color: #fff; border-color: color-mix(in srgb, var(--buildtype-bossing, #8b5cf6) 45%, transparent); }
.build-card__label--pvp       { background: color-mix(in srgb, var(--buildtype-pvp, #ef4444) 30%, transparent); color: #fff; border-color: color-mix(in srgb, var(--buildtype-pvp, #ef4444) 45%, transparent); }
.build-card__label--hardcore  { background: color-mix(in srgb, var(--buildtype-hardcore, #ffdc32) 85%, transparent); color: #111; border-color: color-mix(in srgb, var(--buildtype-hardcore, #ffdc32) 90%, transparent); }

/* --- Tier Badge (flush right edge) --- */
.build-card__tier {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.6rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1;
    white-space: nowrap;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    flex-shrink: 0;
    min-width: 3.4rem;
    text-align: center;
    margin-left: auto;
    align-self: stretch;
}
.build-card__tier--empty {
    visibility: hidden;
}

/* --- Skill Icons (right side) --- */
.build-card__skills {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 1rem 0 0;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.build-card__skill-icon {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    object-fit: contain;
}

.build-card__skill-icon--empty {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    opacity: 0.3;
}

/* --- Build Card Actions (Fav + Share) --- */
.build-card__actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0 0.75rem 0 0;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.build-card__fav-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.3rem 0.5rem;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    transition: all var(--transition-fast);
}

.build-card__fav-btn:hover {
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.build-card__fav-btn--active {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.build-card__fav-btn--active .build-card__fav-heart {
    color: #ef4444;
}

.build-card__fav-heart {
    font-size: 1rem;
    line-height: 1;
}

.build-card__actions .build-card__fav-count {
    font-size: 0.8rem;
    font-weight: 600;
}

.build-card__share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.build-card__share-btn:hover {
    border-color: var(--gold-dark);
    color: var(--gold);
}

/* --- Unified Share Modal (d4-share-modal) --- */
/* Styles moved to components.css */

/* --- Skill Tooltip (reused from gear-slots.css for build-card pages) --- */
.item-tooltip {
    position: fixed;
    z-index: 99999;
    background: #1A1B20;
    border: 1px solid #3f3f46;
    border-radius: 2px;
    min-width: 280px;
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
    will-change: opacity, transform;
    font-family: 'Roboto', sans-serif;
}

.item-tooltip--visible {
    opacity: 1;
    transform: scale(1);
}

.item-tooltip h1,
.item-tooltip h2,
.item-tooltip h3,
.item-tooltip h4 {
    font-family: inherit;
}

.item-tooltip__name {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.item-tooltip__name--unique { color: var(--unique-gold, #a37e2c); }
.item-tooltip__name--mythic { color: var(--mythic-red, #ff6b6b); }
.item-tooltip__name--legendary { color: var(--legendary-purple, #8b5cf6); }
.item-tooltip__name--rare { color: var(--rare-yellow, #ffd700); }
.item-tooltip__name--magic { color: var(--magic-blue, #4a90d9); }

.item-tooltip__type {
    font-size: 0.8rem;
    color: var(--text-secondary, #a0a0a0);
    margin-bottom: 0.25rem;
}

.item-tooltip__rarity {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.item-tooltip__divider {
    height: 1px;
    background: var(--border-color, #2a2a35);
    margin: 0.75rem 0;
}

.item-tooltip__affixes { margin: 0.75rem 0; }

.item-tooltip__affix {
    font-size: 0.85rem;
    color: var(--text-primary, #e0ddd5);
    margin-bottom: 0.4rem;
    padding-left: 0.5rem;
    border-left: 2px solid transparent;
}

.item-tooltip__affix--greater {
    color: var(--gold, #c4a24e);
    border-left-color: var(--gold, #c4a24e);
    font-weight: 600;
}

.item-tooltip__affix--temper {
    color: var(--legendary-purple, #8b5cf6);
    border-left-color: var(--legendary-purple, #8b5cf6);
}

.item-tooltip__unique-effect {
    background: rgba(163, 126, 44, 0.1);
    border: 1px solid var(--unique-gold, #a37e2c);
    border-radius: 4px;
    padding: 0.75rem;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    color: var(--unique-gold, #a37e2c);
    line-height: 1.4;
}

.item-tooltip__aspect {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--legendary-purple, #8b5cf6);
    border-radius: 4px;
    padding: 0.75rem;
    margin: 0.75rem 0;
}

.item-tooltip__aspect-name {
    font-weight: 600;
    color: var(--legendary-purple, #8b5cf6);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.item-tooltip__aspect-description {
    font-size: 0.8rem;
    color: var(--text-primary, #e0ddd5);
    line-height: 1.4;
}

.item-tooltip__flavor {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted, #5a5a5a);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color, #2a2a35);
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: var(--border-radius);
    line-height: 1.4;
}

.badge--gold {
    background: rgba(165, 9, 5, 0.15);
    color: var(--gold);
    border: 1px solid rgba(165, 9, 5, 0.25);
}

.badge--type {
    background: rgba(138, 114, 53, 0.12);
    color: var(--gold-dark);
    border: 1px solid rgba(138, 114, 53, 0.2);
}

.badge--class {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.badge--tier-s { background: color-mix(in srgb, var(--tier-s, #a50905) 20%, transparent); color: var(--gold-bright); border: 1px solid color-mix(in srgb, var(--tier-s, #a50905) 35%, transparent); }
.badge--tier-a { background: color-mix(in srgb, var(--tier-a, #4ade80) 12%, transparent); color: var(--success); border: 1px solid color-mix(in srgb, var(--tier-a, #4ade80) 25%, transparent); }
.badge--tier-b { background: color-mix(in srgb, var(--tier-b, #3b82f6) 12%, transparent); color: var(--info); border: 1px solid color-mix(in srgb, var(--tier-b, #3b82f6) 25%, transparent); }
.badge--tier-c { background: color-mix(in srgb, var(--tier-c, #f59e0b) 12%, transparent); color: var(--warning); border: 1px solid color-mix(in srgb, var(--tier-c, #f59e0b) 25%, transparent); }
.badge--tier-d { background: color-mix(in srgb, var(--tier-d, #ef4444) 12%, transparent); color: var(--error); border: 1px solid color-mix(in srgb, var(--tier-d, #ef4444) 25%, transparent); }

/* --- Favorite Widget (Build View) --- */
.favorite-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.favorite-widget__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-dimmed);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
}

.favorite-widget__btn:hover:not(:disabled) {
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.favorite-widget__btn--active {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
}

.favorite-widget__btn--active:hover {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

.favorite-widget__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.favorite-widget__count {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 1.5rem;
    text-align: center;
}

.favorite-widget__hint {
    font-size: 0.75rem;
    color: var(--text-dark);
    margin-left: 0.5rem;
}

/* --- Favorite count in build cards --- */
.build-card__fav-count {
    color: #ef4444;
    font-weight: 600;
    font-size: 0.85rem;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 1rem 0;
}

.pagination__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination__btn:hover:not(:disabled):not(.pagination__btn--active) {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--bg-panel-hover);
}

.pagination__btn--active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg-primary);
    font-weight: 700;
    cursor: default;
}

.pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination__ellipsis {
    color: var(--text-dark);
    padding: 0 0.25rem;
}

/* --- Loading Skeleton --- */
.build-card--skeleton {
    pointer-events: none;
}

.skeleton-line {
    height: 0.875rem;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-panel-hover) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease infinite;
    border-radius: var(--border-radius);
}

.skeleton-line--short { width: 40%; }
.skeleton-line--medium { width: 65%; }
.skeleton-line--long { width: 90%; }
.skeleton-line--badge { width: 60px; height: 1.25rem; }

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

/* --- Profile Tabs --- */
.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.profile-tabs__tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-dimmed);
    cursor: pointer;
    font-size: 0.95rem;
    font-family: var(--font-body);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.profile-tabs__tab:hover {
    color: var(--text-primary);
}

.profile-tabs__tab--active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.profile-tabs__badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    font-size: 0.7rem; font-weight: 700; line-height: 1;
    color: #fff; background: #c4a24e;
    border-radius: 9px; margin-left: 6px;
}

.profile-tab-panel {
    display: none;
}

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

/* --- Following Cards --- */
.following-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.following-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: var(--border-radius-lg);
    transition: opacity 0.3s, transform 0.3s;
}

.following-card__avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bg-primary);
    font-family: var(--font-heading);
    flex-shrink: 0;
    text-decoration: none;
}

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

.following-card__name {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.following-card__name:hover {
    color: var(--gold);
}

.following-card__username {
    color: var(--gold);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.following-card__bio {
    color: var(--text-dimmed);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.following-card__unfollow-btn {
    padding: 0.4rem 0.85rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-dimmed);
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.following-card__unfollow-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.following-card__unfollow-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Settings Grid (two-column layout) --- */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.settings-grid__panel {
    padding: 1.5rem;
}

.settings-grid__heading {
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-grid__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* --- Profile Page --- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: var(--border-radius-lg);
    margin-bottom: 2rem;
    position: relative;
}

.profile-header__share-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-dimmed);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.profile-header__share-btn svg {
    width: 14px;
    height: 14px;
}

.profile-header__share-btn:hover {
    border-color: var(--gold-dark);
    color: var(--gold);
}

/* Profile share modal styles → unified in components.css */

.profile-header__avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bg-primary);
    font-family: var(--font-heading);
    flex-shrink: 0;
}

.profile-header__info h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.profile-header__stat-value {
    font-weight: 700;
    color: var(--gold);
}

/* Profile section headers */
.profile-section__title {
    font-size: 1.25rem;
    color: var(--gold);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .builds-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

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

    .filter-bar__select,
    .filter-bar__search {
        width: 100%;
    }

    .filter-bar__spacer {
        display: none;
    }

    .build-card__thumbnail {
        width: 64px;
        min-height: 72px;
    }

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

    .build-card__labels {
        display: none;
    }

    .build-card__skills {
        display: none;
    }

    .build-card__tier {
        display: none;
    }

    .build-card__actions {
        display: none;
    }

    .build-card__manage {
        flex-direction: row;
        padding: 0 0.35rem;
    }

    .build-card__info {
        padding: 0.5rem 0.75rem;
    }

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

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

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

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

    .settings-grid__row {
        grid-template-columns: 1fr;
    }

    .profile-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-tabs__tab {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }

    .following-card__bio {
        display: none;
    }
}

@media (max-width: 480px) {
    .build-card__thumbnail {
        width: 56px;
        min-height: 64px;
    }

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

    .builds-header__info h1 {
        font-size: 1.4rem;
    }

    .filter-bar {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .filter-bar__select,
    .filter-bar__search {
        width: 100%;
        flex: none;
    }
}

/* ===== Ticket Cards (Profile) ===== */
.ticket-card {
    background: var(--bg-panel, #13151a);
    border: 1px solid var(--border-color, #2a2a35);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
    cursor: pointer;
    transition: border-color var(--transition);
}

.ticket-card:hover {
    border-color: var(--gold, #c4a24e);
}
.ticket-card--unread {
    border-color: var(--gold, #c4a24e);
    background: rgba(196, 162, 78, 0.06);
}
.ticket-card__unread-dot {
    width: 8px; height: 8px; min-width: 8px;
    border-radius: 50%;
    background: var(--gold, #c4a24e);
    box-shadow: 0 0 6px rgba(196, 162, 78, 0.5);
}
.ticket-card__new-reply {
    color: var(--gold, #c4a24e);
    font-weight: 600;
}

.ticket-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ticket-card__subject {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary, #e0ddd5);
    font-weight: 600;
}

.ticket-card__meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-dimmed, #7a7870);
    margin-top: 0.3rem;
}

.ticket-card__thread {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-color, #2a2a35);
    padding-top: 0.75rem;
}

.ticket-msg {
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    border: 1px solid var(--border-color, #2a2a35);
}

.ticket-msg--staff {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.25);
}

.ticket-msg--user {
    background: var(--bg-secondary, #13151a);
}

.ticket-msg__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    color: var(--text-dimmed, #7a7870);
}

.ticket-msg__author {
    font-weight: 600;
    color: var(--text-secondary, #a0a0a0);
}

.ticket-msg__staff-tag {
    background: var(--legendary-purple, #8b5cf6);
    color: #fff;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 0.3rem;
}

/* Creator Badge — used on build cards, profiles, comments, build view */
.creator-badge {
    display: inline-block;
    background: #000;
    color: #FF9000;
    border: 1px solid #000;
    padding: 0.05rem 0.4rem;
    border-radius: 3px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 0.3rem;
    white-space: nowrap;
}

.ticket-msg__date {
    white-space: nowrap;
}

.ticket-msg__body {
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary, #e0ddd5);
}

/* Status badges */
.badge--amber {
    background: rgba(196, 162, 78, 0.15);
    color: var(--gold, #c4a24e);
    border: 1px solid rgba(196, 162, 78, 0.3);
}

.badge--blue {
    background: rgba(74, 144, 217, 0.15);
    color: #6bb3f0;
    border: 1px solid rgba(74, 144, 217, 0.3);
}

.badge--green {
    background: rgba(76, 175, 80, 0.15);
    color: #66bb6a;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* --- Avatar Picker (Profile Settings) --- */
.avatar-picker {
    margin-bottom: 1.25rem;
}

.avatar-picker__preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-picker__current {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-primary);
    font-family: var(--font-heading);
}

.avatar-picker__current:has(img) {
    background: none;
}

.avatar-picker__current img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-picker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
}

.avatar-picker__option {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
    background: transparent;
    padding: 0;
}

.avatar-picker__option:hover {
    transform: scale(1.1);
}

.avatar-picker__option--active {
    border-color: var(--gold);
}

.avatar-picker__option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-picker__option--none {
    background: var(--bg-panel);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dimmed);
    font-size: 0.75rem;
}

/* Avatar image in profile header */
.profile-header__avatar:has(img),
.following-card__avatar:has(img) {
    background: none;
}

.profile-header__avatar img,
.following-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* --- Custom Avatar Upload (Content Creators) --- */
.avatar-upload {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.avatar-upload__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.avatar-upload__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.avatar-upload__count {
    font-size: 0.8rem;
    color: var(--text-dimmed);
}

.avatar-upload__gallery {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.avatar-upload__item {
    position: relative;
    width: 56px;
    height: 56px;
}

.avatar-upload__item img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
}

.avatar-upload__item img:hover {
    border-color: var(--gold);
}

.avatar-upload__delete {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-dimmed);
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all var(--transition-fast);
}

.avatar-upload__delete:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.avatar-upload__dropzone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.avatar-upload__hint {
    font-size: 0.75rem;
    color: var(--text-dimmed);
}

/* --- Archive Segment Control (Profile Builds Tab) --- */
.profile-builds__segment {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1rem;
}

.profile-builds__segment .segment-btn {
    border: 1px solid var(--border-color);
}

.profile-builds__segment .segment-btn:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.profile-builds__segment .segment-btn:nth-child(2) {
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Legend for manage icons */
.profile-builds__legend {
    margin-left: auto;
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-dimmed, #7a7870);
}

.profile-builds__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.profile-builds__legend svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-dimmed, #7a7870);
}

.profile-builds__legend-sep {
    width: 1px;
    height: 12px;
    background: var(--border-color, #2a2a35);
}

@media (max-width: 768px) {
    .profile-builds__legend {
        display: none;
    }
}

.segment-btn {
    padding: 0.45rem 1.1rem;
    background: transparent;
    border: none;
    color: var(--text-dimmed);
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
}

.segment-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.segment-btn--active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: rgba(196, 162, 78, 0.06);
}

/* --- Archived Badge --- */
.build-card__archived-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 3px;
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
    margin-right: 0.4rem;
    vertical-align: middle;
    line-height: 1.2;
}

/* --- Build Card: Manage Buttons (Profile) --- */
.build-card__manage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0 0.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.build-card__manage-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-dimmed);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.build-card__manage-btn:hover {
    border-color: var(--gold-dark);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.build-card__manage-btn--danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.build-card__manage-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Private Badge --- */
.build-card__private-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 3px;
    background: rgba(122, 120, 112, 0.25);
    color: var(--text-dimmed);
    border: 1px solid rgba(122, 120, 112, 0.35);
    margin-right: 0.4rem;
    vertical-align: middle;
    line-height: 1.2;
}

/* Dim private build cards slightly */
.build-card--private {
    opacity: 0.75;
}

.build-card--private:hover {
    opacity: 1;
}

/* --- Unlisted Badge --- */
.build-card__unlisted-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 3px;
    background: rgba(196, 162, 78, 0.15);
    color: var(--gold, #c4a24e);
    border: 1px solid rgba(196, 162, 78, 0.3);
    margin-right: 0.4rem;
    vertical-align: middle;
    line-height: 1.2;
}

.build-card--unlisted {
    opacity: 0.85;
}

.build-card--unlisted:hover {
    opacity: 1;
}

/* ===== Content Creator Tab (Profile) ===== */
.creator-tab__info {
    padding: 1.25rem 1.5rem;
    background: var(--bg-panel, #13151a);
    border: 1px solid var(--border-panel, #252830);
    border-radius: var(--border-radius-lg, 8px);
}

.creator-tab__heading {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--gold, #c4a24e);
    margin-bottom: 0.5rem;
}

.creator-tab__desc {
    color: var(--text-dimmed, #7a7870);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

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

.creator-tab__benefit {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg-secondary, #0f1015);
    border: 1px solid rgba(196, 162, 78, 0.15);
    border-radius: var(--border-radius, 6px);
}

.creator-tab__benefit strong {
    color: var(--text-primary, #e0ddd5);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.15rem;
}

.creator-tab__benefit p {
    color: var(--text-dimmed, #7a7870);
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
}

.creator-tab__benefit-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 0.1rem;
}

.creator-tab__status {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-panel, #13151a);
    border: 1px solid var(--border-panel, #252830);
    border-radius: var(--border-radius-lg, 8px);
}

.creator-tab__status-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.creator-tab__status h3,
.creator-tab__status h4 {
    color: var(--text-primary, #e0ddd5);
    margin: 0 0 0.25rem;
}

.creator-tab__status--approved {
    border-color: rgba(76, 175, 80, 0.3);
}
.creator-tab__status--approved .creator-tab__status-icon {
    color: #66bb6a;
}

.creator-tab__status--pending {
    border-color: rgba(196, 162, 78, 0.3);
}
.creator-tab__status--pending .creator-tab__status-icon {
    color: var(--gold, #c4a24e);
}

.creator-tab__status--reviewing {
    border-color: rgba(74, 144, 217, 0.3);
}
.creator-tab__status--reviewing .creator-tab__status-icon {
    color: #6bb3f0;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dimmed, #7a7870);
    margin-top: 0.25rem;
}

/* Touch-friendly improvements */
.touch-device .build-card {
    min-height: 88px;
}

.touch-device .filter-bar__select {
    min-height: 44px;
}

/* ── Ideas Banner in Profile ────────────────────────────────────── */
.profile-ideas-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: rgba(196, 162, 78, 0.08);
    border: 1px solid rgba(196, 162, 78, 0.2);
    border-radius: 6px;
    color: var(--gold, #c4a24e);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.profile-ideas-banner:hover {
    background: rgba(196, 162, 78, 0.14);
    border-color: rgba(196, 162, 78, 0.35);
}
.profile-ideas-banner svg:last-child {
    margin-left: auto;
    opacity: 0.5;
}
.profile-ideas-banner:hover svg:last-child {
    opacity: 1;
}

/* ── Reorder Buttons (Up/Down) ────────────────────────────── */
.build-card__reorder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 0 4px;
    flex-shrink: 0;
}
.build-card__reorder-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--border-panel, #252830);
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted, #7a7870);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    padding: 0;
}
.build-card__reorder-btn:hover:not(:disabled) {
    background: rgba(196, 162, 78, 0.15);
    color: var(--gold, #c4a24e);
    border-color: var(--gold-dark, #a37e2c);
}
.build-card__reorder-btn:disabled {
    opacity: 0.2;
    cursor: default;
}
