/* SkyWall Armory - Ultra-Premium Redesign v2 */

:root {
    --sky-gold: #ffb800;
    --sky-void: #0a0d14;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.02);
    /* Dynamic class color (injected via PHP) */
    --class-color: #ffffff;
    --class-glow: rgba(255, 255, 255, 0.1);
}

/* ============================================
   ARMORY ATMOSPHERE BACKGROUND
   ============================================ */
.armory-atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    filter: blur(30px) saturate(1.2);
    pointer-events: none;
    will-change: auto;
    contain: strict;
}

.armory-atmosphere::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--sky-void) 70%);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.armory-container {
    color: #fff;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 3rem;
    background: radial-gradient(circle at top center, var(--class-glow), var(--sky-void));
    backdrop-filter: blur(50px);
    border-radius: 48px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 100px 200px -50px rgba(0, 0, 0, 1);
    position: relative;
    z-index: 10;
}

/* ============================================
   AMBIENT PARTICLES
   ============================================ */
#armory-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    border-radius: 48px;
}

/* ============================================
   CHARACTER HEADER STYLES
   ============================================ */
.character-title {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--class-color);
    opacity: 0.6;
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

.character-name-glow {
    text-shadow: 0 0 50px var(--class-glow);
    letter-spacing: -0.05em;
    background: linear-gradient(to bottom, #fff 30%, var(--class-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px var(--class-glow));
}

.signatory-line {
    width: 120px;
    height: 2px;
    margin: 1rem auto;
    background: linear-gradient(90deg, transparent, var(--class-color), transparent);
    opacity: 0.5;
}

/* ============================================
   GLASS COMPONENTS
   ============================================ */
.glass-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-pill:hover {
    background: var(--class-glow);
    border-color: var(--class-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px var(--class-glow);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: background 0.3s ease, border-color 0.3s ease;
    contain: layout style;
}

.glass-panel:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   HERO PORTRAIT FRAME
   ============================================ */
.hero-frame-container {
    padding: 20px;
    perspective: 1000px;
    position: relative;
    overflow: visible !important;
}

.parallax-layer {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

.frame-edge {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--class-color);
    z-index: 20;
    opacity: 0.4;
    pointer-events: none;
    filter: drop-shadow(0 0 8px var(--class-color));
}

.frame-edge.top-left {
    top: 0;
    left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 24px 0 0 0;
}

.frame-edge.top-right {
    top: 0;
    right: 0;
    border-left: 0;
    border-bottom: 0;
    border-radius: 0 24px 0 0;
}

.frame-edge.bottom-left {
    bottom: 0;
    left: 0;
    border-right: 0;
    border-top: 0;
    border-radius: 0 0 0 24px;
}

.frame-edge.bottom-right {
    bottom: 0;
    right: 0;
    border-left: 0;
    border-top: 0;
    border-radius: 0 0 24px 0;
}

/* ============================================
   CHARACTER PORTRAIT
   ============================================ */
.character-portrait-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 32px;
    background: radial-gradient(ellipse at center bottom, var(--class-glow), transparent 70%);
}

.character-portrait-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, var(--sky-void) 100%);
    z-index: 2;
    pointer-events: none;
}

.character-portrait {
    max-height: 90%;
    max-width: 90%;
    object-fit: contain;
    filter: drop-shadow(0 0 40px var(--class-color));
    transition: filter 0.4s ease, transform 0.4s ease;
    animation: portraitFloat 8s ease-in-out infinite;
    z-index: 1;
    will-change: transform;
}

@keyframes portraitFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

.character-portrait:hover {
    filter: drop-shadow(0 0 80px var(--class-color)) brightness(1.1);
    transform: scale(1.05);
}

/* Portrait Scanlines */
.portrait-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px);
    pointer-events: none;
    z-index: 3;
    opacity: 0.5;
}

/* Portrait Shimmer */
.portrait-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.03) 45%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 55%,
            transparent 100%);
    animation: shimmerSweep 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 4;
    will-change: transform;
}

@keyframes shimmerSweep {

    0%,
    100% {
        transform: skewX(-20deg) translateX(0);
    }

    50% {
        transform: skewX(-20deg) translateX(400%);
    }
}

/* Online Status Badge */
.online-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    z-index: 10;
}

.online-badge.is-online {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #22c55e;
    animation: onlinePulse 2s ease-in-out infinite;
}

.online-badge.is-offline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
}

@keyframes onlinePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

/* ============================================
   ITEM SLOTS
   ============================================ */
.item-slot {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid transparent;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
    will-change: transform;
    contain: layout style;
}

.item-slot:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.item-slot.quality-0 {
    border-color: #9d9d9d;
}

.item-slot.quality-1 {
    border-color: #ffffff;
}

.item-slot.quality-2 {
    border-color: #1eff00;
}

.item-slot.quality-3 {
    border-color: #0070dd;
}

.item-slot.quality-4 {
    border-color: #a335ee;
}

.item-slot.quality-5 {
    border-color: #ff8000;
}

.item-slot.quality-6 {
    border-color: #e6cc80;
}

.item-slot.quality-7 {
    border-color: #00ccff;
}

/* Ghost/Empty Slots */
.empty-slot-ghost {
    border: 1px dashed rgba(255, 255, 255, 0.1) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.empty-slot-ghost:hover {
    border-color: var(--class-color) !important;
    box-shadow: 0 0 15px var(--class-glow), inset 0 0 10px var(--class-glow) !important;
}

.empty-slot-ghost i {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

/* Weapon Slots */
.hero-weapon-slot {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid transparent;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), inset 0 0 20px var(--class-glow);
    transition: all 0.4s ease;
}

.hero-weapon-slot:hover {
    border-color: var(--class-color);
    box-shadow: 0 30px 60px -10px var(--class-glow);
    transform: translateY(-4px);
}

.slot-glint {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.hero-weapon-slot:hover .slot-glint {
    left: 150%;
}

/* Rarity glow - static instead of animated for performance */
.quality-4 {
    color: #a335ee;
    filter: drop-shadow(0 0 8px #a335ee44);
}

.quality-5 {
    color: #ff8000;
    filter: drop-shadow(0 0 10px #ff800044);
}

/* ============================================
   STAT CARDS (HUD STYLE)
   ============================================ */
.hud-card {
    position: relative;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.hud-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(6px);
}

.stat-label-hud {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

.stat-value-hud {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    font-family: var(--font-display, 'Rajdhani', sans-serif);
}

/* Stat Card Ultra (with underline effect) */
.stat-card-ultra {
    position: relative;
    overflow: hidden;
}

.stat-card-ultra::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--class-color);
    transition: width 0.4s ease;
}

.stat-card-ultra:hover::after {
    width: 100%;
}

/* ============================================
   RESOURCE BARS
   ============================================ */
.resource-bar-compact {
    padding: 0 8px;
}

.resource-bar-compact .bar-fill {
    transition: width 1s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================
   UTILITIES
   ============================================ */
.online-pulse {
    border-color: #22c55e !important;
    animation: p-green 2s infinite;
}

@keyframes p-green {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes scan-fast {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(400%);
    }
}

.animate-scan-fast {
    animation: scan-fast 3s linear infinite;
}

.bg-radial-at-t {
    background-image: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.05), transparent);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
.armory-container::-webkit-scrollbar {
    width: 6px;
}

.armory-container::-webkit-scrollbar-track {
    background: transparent;
}

.armory-container::-webkit-scrollbar-thumb {
    background: var(--class-color);
    border-radius: 10px;
}

/* ============================================
   PREMIUM ITEM HOVER GLOW EFFECTS
   ============================================ */
.item-slot.quality-0:hover {
    box-shadow: 0 0 25px #9d9d9d, 0 15px 30px rgba(0, 0, 0, 0.5);
}

.item-slot.quality-1:hover {
    box-shadow: 0 0 25px #ffffff, 0 15px 30px rgba(0, 0, 0, 0.5);
}

.item-slot.quality-2:hover {
    box-shadow: 0 0 30px #1eff00, 0 15px 30px rgba(0, 0, 0, 0.5);
}

.item-slot.quality-3:hover {
    box-shadow: 0 0 35px #0070dd, 0 15px 30px rgba(0, 0, 0, 0.5);
}

.item-slot.quality-4:hover {
    box-shadow: 0 0 40px #a335ee, 0 0 60px rgba(163, 53, 238, 0.3), 0 15px 30px rgba(0, 0, 0, 0.5);
}

.item-slot.quality-5:hover {
    box-shadow: 0 0 50px #ff8000, 0 0 80px rgba(255, 128, 0, 0.4), 0 15px 30px rgba(0, 0, 0, 0.5);
}

.item-slot.quality-6:hover {
    box-shadow: 0 0 40px #e6cc80, 0 0 60px rgba(230, 204, 128, 0.3), 0 15px 30px rgba(0, 0, 0, 0.5);
}

.item-slot.quality-7:hover {
    box-shadow: 0 0 35px #00ccff, 0 0 50px rgba(0, 204, 255, 0.3), 0 15px 30px rgba(0, 0, 0, 0.5);
}

/* Weapon slot hover glow */
.hero-weapon-slot.quality-4:hover {
    box-shadow: 0 0 50px #a335ee, 0 30px 60px -10px var(--class-glow);
}

.hero-weapon-slot.quality-5:hover {
    box-shadow: 0 0 60px #ff8000, 0 30px 60px -10px var(--class-glow);
}

.hero-weapon-slot.quality-6:hover {
    box-shadow: 0 0 50px #e6cc80, 0 30px 60px -10px var(--class-glow);
}

/* ============================================
   GAMER BORDER - ANIMATED FRAME
   ============================================ */
.gamer-border {
    position: relative;
    overflow: visible;
}

.gamer-border::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 36px;
    padding: 3px;
    background: linear-gradient(135deg,
            var(--class-color) 0%,
            transparent 25%,
            transparent 50%,
            var(--class-color) 75%,
            transparent 100%);
    background-size: 400% 400%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 6s linear infinite;
    pointer-events: none;
    z-index: 1;
    will-change: background-position;
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Corner accents for gamer border */
.corner-accent {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--class-color);
    z-index: 5;
    opacity: 0.6;
    filter: drop-shadow(0 0 6px var(--class-color));
}

.corner-accent.tl {
    top: -8px;
    left: -8px;
    border-right: 0;
    border-bottom: 0;
}

.corner-accent.tr {
    top: -8px;
    right: -8px;
    border-left: 0;
    border-bottom: 0;
}

.corner-accent.bl {
    bottom: -8px;
    left: -8px;
    border-right: 0;
    border-top: 0;
}

.corner-accent.br {
    bottom: -8px;
    right: -8px;
    border-left: 0;
    border-top: 0;
}

/* ============================================
   PARALLAX CONTAINER
   ============================================ */
.parallax-portrait {
    transition: transform 0.2s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

.parallax-portrait:hover {
    transform: perspective(1000px) rotateY(calc(var(--mouse-x, 0) * 10deg)) rotateX(calc(var(--mouse-y, 0) * -10deg));
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .armory-container {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 32px;
    }

    .item-slot {
        width: 56px;
        height: 56px;
    }

    .hero-weapon-slot {
        width: 64px;
        height: 64px;
    }

    .character-portrait-container {
        min-height: 350px;
    }

    .gamer-border::before,
    .gamer-border::after {
        display: none;
    }
}

/* ============================================
   角色页紧凑化（依据 UI 设计师 / 验收设计师 实测）
   ============================================ */
#armory-container {
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: 24px;
}

@media (min-width: 1024px) {
    .armory-hero {
        gap: 32px;
        align-items: start;
    }

    /* 两侧列固定窄宽，中列吃掉剩余，三列合计约 236 / 540 / 236 */
    .armory-hero > .lg\:col-span-3 {
        width: 236px;
    }

    /* 行高 66，列内间距 6：8 行（66*8 + 6*7 = 570）与中列 540 高基本齐平 */
    .armory-hero .stat-card-ultra {
        height: 66px;
        padding: 2px 10px;
    }

    .armory-hero .space-y-2 > * + * {
        margin-top: 6px;
    }

    /* 中列：去掉 4:5 的高框，肖像铺满 1:1，避免上下 131px 死白 */
    .armory-hero .hero-frame-container {
        aspect-ratio: auto;
        padding: 14px;
    }

    .armory-hero .character-portrait-container {
        min-height: 0;
        aspect-ratio: 4 / 5;
    }

    .armory-hero .character-portrait {
        max-height: none;
        max-width: 100%;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 16%;
    }

    /* 名称与物品等级同一基线、同一左右边界 */
    .armory-hero .name-line {
        font-size: 13px;
        line-height: 1.15;
    }

    .armory-hero .ilvl-line {
        font-size: 11px;
        line-height: 1.2;
    }

    /* 底部武器行贴近肖像框 */
    .armory-hero + .flex.justify-center {
        margin-top: 14px;
    }
}


/* ============================================
   官网式版面：无边框、扁平行、大立绘、手绘场景
   ============================================ */
#armory-container {
    max-width: 1180px;
    margin-inline: auto;
    padding: 96px 24px 40px;
    border-radius: 0;
    background-color: transparent;
    background-image:
        linear-gradient(90deg, rgba(6, 8, 13, .94) 0%, rgba(6, 8, 13, .30) 18%, rgba(6, 8, 13, .30) 82%, rgba(6, 8, 13, .94) 100%),
        linear-gradient(180deg, rgba(6, 8, 13, .55) 0%, rgba(6, 8, 13, .82) 100%),
        url('../../../../templates/skywall/assets/img/bg/crystal_tower.webp');
    background-size: auto, auto, cover;
    background-position: center, center, center 55%;
    background-repeat: no-repeat;
}

@media (min-width: 1024px) {
    .armory-hero {
        gap: 48px;
        align-items: center;
    }

    .armory-hero > .lg\:col-span-3 {
        width: 252px;
    }

    /* 行扁平成「图标 + 名称/等级」，不再有卡片底 */
    .armory-hero .stat-card-ultra {
        height: 64px;
        padding: 0;
        background: none !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .armory-hero .space-y-2 > * + * {
        margin-top: 14px;
    }

    /* 去掉肖像框：四角括线、扫描线、内阴影全部关闭 */
    .armory-hero .hero-frame-container {
        aspect-ratio: auto;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
    }

    .armory-hero .gamer-border::before,
    .armory-hero .gamer-border::after,
    .armory-hero .frame-edge,
    .armory-hero .corner-accent,
    .armory-hero .portrait-scanlines,
    .armory-hero .portrait-shimmer {
        display: none !important;
    }

    .armory-hero .character-portrait-container {
        min-height: 0;
        height: 560px;
        background: none !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .armory-hero .character-portrait {
        max-height: 100%;
        max-width: 100%;
        width: auto;
        height: 100%;
        object-fit: contain;
        filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .65));
    }

    /* 武器行：贴底居中，两格 */
    .armory-hero + .flex.justify-center {
        margin-top: 18px;
        gap: 20px !important;
    }
}


/* 页头：官网式左对齐（徽记 56 + 称号/名字/元信息，右侧时长） */
.armory-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 auto 28px;
}

.armory-head__lead {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
}

.armory-crest {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(0, 0, 0, .45);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.armory-crest img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.armory-head__text {
    flex: 1 1 auto;
    min-width: 0;
}

.armory-head__name {
    white-space: nowrap;
    font-family: var(--font-display, inherit);
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 2px 0 6px;
}

.armory-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
}

.armory-head__meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
}

.armory-head__stats {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

@media (max-width: 1023px) {
    .armory-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}


/* 武器行：图标 + 名称/物品等级（左右对称） */
.hero-weapon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-weapon--rev {
    flex-direction: row-reverse;
}

.hero-weapon__text {
    min-width: 92px;
    text-align: right;
    line-height: 1.25;
}

.hero-weapon--rev .hero-weapon__text {
    text-align: left;
}

.hero-weapon__name {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.hero-weapon__ilvl {
    font-size: 11px;
    color: rgba(255, 255, 255, .45);
}

.hero-weapon .hero-weapon-slot {
    flex: 0 0 auto;
}


/* 图标靠内侧、文字在外侧：行内不溢出 */
.armory-hero .stat-card-ultra{overflow:hidden}
.armory-hero .stat-card-ultra > .flex-1{min-width:0}


/* 主网格 + 卡片：与页头同宽同边距，图标才会贴近中列 */
#armory-body{max-width:1180px;margin:0 auto;padding:0 24px}
#armory-body .armory-hero{gap:34px}


/* 页头：去掉容器自带的那层背景图，内容居中 */
#armory-container {
    background-image: none !important;
    background-color: transparent !important;
}

.armory-head {
    justify-content: center;
    gap: 32px;
    text-align: center;
}

.armory-head__lead {
    justify-content: center;
    text-align: left;
    flex: 0 1 auto;
}

.armory-head__meta {
    justify-content: flex-start;
}


/* 左右装备列与角色立绘底部对齐 */
#armory-body .armory-hero{align-items:flex-end}


/* 两列底边对齐「立绘」而不是立绘下面的武器行（武器行高 72 + 间距 18 = 90） */
#armory-body .armory-hero > .lg\:col-span-3{padding-bottom:90px}


/* ===== AR-EMBED-FIX: 窄容器（账号页弹窗）下的自适应 ===== */
#armory-body { container-type: inline-size; }

/* 立绘不得超出所在列，否则会压住左右装备列 */
#armory-body .character-portrait-container { overflow: hidden; }
#armory-body .character-portrait {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

@container (max-width: 1020px) {
    #armory-body .armory-hero { gap: 18px; }
    #armory-body .armory-hero > .lg\:col-span-3 { width: 176px; padding-bottom: 72px; }
    #armory-body .armory-hero .character-portrait-container { max-height: 380px; }
    #armory-body .armory-hero .name-line { font-size: 11.5px; }
    #armory-body .armory-hero .ilvl-line { font-size: 10.5px; }
    #armory-body .armory-hero .stat-card-ultra { height: 54px; }
    #armory-body .armory-hero .space-y-2 > * + * { margin-top: 4px; }
    #armory-body .hero-weapon__text { min-width: 72px; }
    #armory-body .hero-weapon__name { font-size: 11px; max-width: 130px; }
    #armory-body .armory-head__name { font-size: 26px; }
}
