/* Armory Grid Layout */
.armory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.armory-card {
    padding: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left-width: 3px;
    border-left-style: solid;
}

.armory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.armory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.armory-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.armory-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.class-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #000;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.armory-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.armory-item {
    font-size: 13px;
    color: #a0aec0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.armory-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #9ca3af;
}

.armory-footer .btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* Class colors */
.armory-card.class-warrior {
    border-left-color: #C79C6E;
}

.armory-card.class-paladin {
    border-left-color: #F58CBA;
}

.armory-card.class-hunter {
    border-left-color: #ABD473;
}

.armory-card.class-rogue {
    border-left-color: #FFF569;
}

.armory-card.class-priest {
    border-left-color: #FFFFFF;
}

.armory-card.class-shaman {
    border-left-color: #0070DE;
}

.armory-card.class-mage {
    border-left-color: #69CCF0;
}

.armory-card.class-warlock {
    border-left-color: #9482C9;
}

.armory-card.class-druid {
    border-left-color: #FF7D0A;
}

.armory-header h3.class-warrior {
    color: #C79C6E;
}

.armory-header h3.class-paladin {
    color: #F58CBA;
}

.armory-header h3.class-hunter {
    color: #ABD473;
}

.armory-header h3.class-rogue {
    color: #FFF569;
}

.armory-header h3.class-priest {
    color: #FFFFFF;
}

.armory-header h3.class-shaman {
    color: #0070DE;
}

.armory-header h3.class-mage {
    color: #69CCF0;
}

.armory-header h3.class-warlock {
    color: #9482C9;
}

.armory-header h3.class-druid {
    color: #FF7D0A;
}

.class-badge.class-warrior {
    background: #C79C6E;
}

.class-badge.class-paladin {
    background: #F58CBA;
}

.class-badge.class-hunter {
    background: #ABD473;
}

.class-badge.class-rogue {
    background: #FFF569;
}

.class-badge.class-priest {
    background: #FFFFFF;
}

.class-badge.class-shaman {
    background: #0070DE;
}

.class-badge.class-mage {
    background: #69CCF0;
}

.class-badge.class-warlock {
    background: #9482C9;
}

.class-badge.class-druid {
    background: #FF7D0A;
}

/* Compare layout - Complete rebuild */
.compare-layout {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.compare-col {
    background: linear-gradient(180deg, #0a0e14 0%, #0d1117 100%);
    padding: 12px;
    position: relative;
}

.compare-col .profile-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: 0;
}

.compare-col .profile-header {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}

.compare-col .profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.compare-col .profile-info {
    flex: 1;
    min-width: 0;
}

.compare-col .profile-info h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.compare-col .profile-meta {
    margin-top: 2px;
    font-size: 11px;
    color: #9ca3af;
    display: flex;
    gap: 6px;
}

/* Diff highlighting - Refined minimal style */
.slot-name.diff {
    position: relative;
    font-weight: 600;
    padding-left: 12px;
    animation: pulse-diff 2s ease-in-out infinite;
}

.slot-name.diff::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    border-radius: 2px;
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

@keyframes pulse-diff {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

.slot-icon.diff {
    position: relative;
}

/* Removed animated glow effect - keeping it simple */

/* Modal footer helpers */
.footer-row {
    gap: 12px;
    align-items: center;
    width: 100%;
}

.footer-label {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-label span {
    font-weight: 600;
    min-width: 120px;
}

.footer-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.footer-actions-left {
    display: flex;
    gap: 8px;
}

.footer-actions-right {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Modal content improvements */
#modal-content .profile-container {
    margin: 0;
    padding: 0;
    background: transparent;
    max-width: none;
    width: 100%;
}

#modal-content .profile-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

#modal-content .equipment-grid {
    gap: 12px;
    width: 100%;
    grid-template-columns: 1fr 240px 1fr;
}

#modal-content .equipment-slot {
    transition: all 0.2s ease;
}

#modal-content .equipment-slot:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.1);
}

/* Larger modal for comparison */
#modal.armory-compare-modal {
    /* Force a wider modal in compare mode, override any base width */
    width: min(1920px, 99vw) !important;
    max-height: 95vh;
}

#modal.armory-compare-modal .content {
    max-height: 82vh;
    padding: 10px;
    overflow-x: auto;
    /* allow side-by-side without clipping */
}

/* Slimmer modal header */
#modal.armory-compare-modal header {
    padding: 8px 12px !important;
}

/* Equipment grid in compare mode - Clean rebuild */
#modal.armory-compare-modal .equipment-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    align-items: start;
}

#modal.armory-compare-modal .equipment-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#modal.armory-compare-modal .equipment-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    min-height: 48px;
    transition: all 0.2s ease;
}

#modal.armory-compare-modal .equipment-slot:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(2px);
}

#modal.armory-compare-modal .slot-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 6px;
}

#modal.armory-compare-modal .slot-icon svg {
    width: 24px;
    height: 24px;
}

#modal.armory-compare-modal .slot-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e5e7eb;
}

#modal.armory-compare-modal .equipment-slot.empty {
    opacity: 0.3;
}

#modal.armory-compare-modal .equipment-slot.empty:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
}

/* Center column (character model + weapons) */
#modal.armory-compare-modal .equipment-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    position: relative;
}

#modal.armory-compare-modal .character-model {
    width: 64px;
    height: 100px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 32px;
    opacity: 0.5;
    margin: 4px 0;
}

#modal.armory-compare-modal .model-placeholder {
    opacity: 0.6;
}

#modal.armory-compare-modal .equipment-weapons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

#modal.armory-compare-modal .equipment-weapons .equipment-slot {
    flex-direction: column;
    min-height: 56px;
    padding: 6px;
    text-align: center;
}

#modal.armory-compare-modal .equipment-weapons .slot-icon {
    width: 36px;
    height: 36px;
}

#modal.armory-compare-modal .equipment-weapons .slot-name {
    font-size: 11px;
    margin-top: 4px;
}

/* Compact mode toggle */
#modal.armory-compare-modal.armory-compact .equipment-column {
    gap: 3px;
}

#modal.armory-compare-modal.armory-compact .equipment-slot {
    padding: 4px 6px;
    gap: 6px;
    min-height: 42px;
}

#modal.armory-compare-modal.armory-compact .slot-icon {
    width: 36px;
    height: 36px;
}

#modal.armory-compare-modal.armory-compact .slot-name {
    font-size: 12px;
}

#modal.armory-compare-modal.armory-compact .character-model {
    width: 56px;
    height: 88px;
}

#modal.armory-compare-modal.armory-compact .equipment-weapons .slot-icon {
    width: 32px;
    height: 32px;
}

/* Keep weapon slots tidy under the smaller model */
#modal.armory-compare-modal .equipment-weapons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Scalable compare content via classes; keeps layout centered and scrollable */
#modal .compare-layout {
    --armory-scale: 1;
    transform: scale(var(--armory-scale));
    transform-origin: top center;
    width: calc(100% / var(--armory-scale));
}

#modal.armory-scale-90 .compare-layout {
    --armory-scale: 0.9;
}

#modal.armory-scale-100 .compare-layout {
    --armory-scale: 1;
}

#modal.armory-scale-110 .compare-layout {
    --armory-scale: 1.1;
}

/* Footer controls small polish */
.footer-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
}

.footer-controls .spacer {
    flex: 1 1 auto;
}

.zoom-indicator {
    min-width: 42px;
    text-align: center;
    opacity: 0.85;
}

/* Single view modal */
#modal.armory-single-modal {
    width: min(900px, 96vw);
}

#modal.armory-single-modal .content {
    max-height: 75vh;
}

/* Modal title improvements */
#modal-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}