/* ======================== 玩家详情页面 ======================== */
/* 移动端优先设计，暗色主题支持 */

:root {
    --pw-radius: 14px;
    --pw-radius-sm: 10px;
    --pw-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- 容器 ---- */
.pw-player-detail-wrap {
    padding: 4px 0 24px;
}

.pw-player-detail-wrap * {
    box-sizing: border-box;
}

.pw-player-detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    color: var(--pw-muted, #8b8fa3);
    gap: 16px;
}

.pw-player-detail-loading .pw-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(124, 92, 252, 0.15);
    border-top-color: #7c5cfc;
    border-radius: 50%;
    animation: pw-spin 0.8s linear infinite;
}

/* ---- 玩家头部 ---- */
.pw-pd-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--pw-radius);
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.08), rgba(124, 92, 252, 0.02));
    border: 1px solid rgba(124, 92, 252, 0.12);
    margin-bottom: 16px;
}

.pw-pd-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c5cfc, #9b7afc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
}

.pw-pd-header-info {
    flex: 1;
    min-width: 0;
}

.pw-pd-name {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--pw-text, #1a1d27);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-theme .pw-pd-name { --pw-text: #e0e0e0; }

.pw-pd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pw-pd-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.pw-pd-badge .pw-pd-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.pw-pd-online {
    background: rgba(46, 204, 113, 0.12);
    color: #27ae60;
}
.pw-pd-online .pw-pd-dot {
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.5);
    animation: pw-pulse 2s infinite;
}

.pw-pd-offline {
    background: rgba(149, 165, 166, 0.12);
    color: #7f8c8d;
}
.pw-pd-offline .pw-pd-dot { background: #95a5a6; }

.pw-pd-banned {
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

.pw-pd-source {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
}

/* ---- 标签栏 ---- */
.pw-pd-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-radius: var(--pw-radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--pw-border, #e8eaf0);
}

body.dark-theme .pw-pd-tabs {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.pw-pd-tab {
    flex: 1;
    padding: 12px 4px;
    border: none;
    background: transparent;
    color: var(--pw-muted, #8b8fa3);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pw-transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

body.dark-theme .pw-pd-tab { --pw-muted: #8b8fa3; }

.pw-pd-tab i { font-size: 16px; }

.pw-pd-tab em {
    font-style: normal;
    font-size: 10px;
    background: rgba(124, 92, 252, 0.15);
    color: #7c5cfc;
    padding: 1px 6px;
    border-radius: 8px;
}

.pw-pd-tab.active {
    color: #7c5cfc;
    background: rgba(124, 92, 252, 0.06);
}

.pw-pd-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #7c5cfc;
    border-radius: 2px 2px 0 0;
}

/* ---- 标签内容 ---- */
.pw-pd-tab-content {
    display: none;
    animation: pw-fade-in 0.3s ease;
}

.pw-pd-tab-content.active {
    display: block;
}

@keyframes pw-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- 卡片 ---- */
.pw-pd-card {
    background: var(--pw-card-bg, #fff);
    border-radius: var(--pw-radius);
    border: 1px solid var(--pw-border, #e8eaf0);
    padding: 16px;
    margin-bottom: 12px;
}

body.dark-theme .pw-pd-card {
    --pw-card-bg: #1e1e2e;
    --pw-border: rgba(255, 255, 255, 0.06);
}

.pw-pd-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--pw-text, #1a1d27);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-theme .pw-pd-card-title { --pw-text: #e0e0e0; }

.pw-pd-card-title i {
    color: #7c5cfc;
    font-size: 13px;
}

.pw-pd-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--pw-muted, #8b8fa3);
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 8px;
    border-radius: 8px;
}

body.dark-theme .pw-pd-count {
    background: rgba(255, 255, 255, 0.06);
    --pw-muted: #8b8fa3;
}

/* ---- 信息网格 ---- */
.pw-pd-info-grid {
    display: grid;
    gap: 8px;
}

.pw-pd-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

body.dark-theme .pw-pd-info-row {
    border-bottom-color: rgba(255, 255, 255, 0.03);
}

.pw-pd-info-label {
    color: var(--pw-muted, #8b8fa3);
    flex-shrink: 0;
}

body.dark-theme .pw-pd-info-label { --pw-muted: #8b8fa3; }

.pw-pd-info-value {
    color: var(--pw-text, #1a1d27);
    text-align: right;
    word-break: break-all;
    font-weight: 500;
}

body.dark-theme .pw-pd-info-value { --pw-text: #e0e0e0; }

/* ---- 统计网格 ---- */
.pw-pd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.pw-pd-stat-box {
    text-align: center;
    padding: 12px 8px;
    border-radius: var(--pw-radius-sm);
    background: rgba(0, 0, 0, 0.02);
}

body.dark-theme .pw-pd-stat-box {
    background: rgba(255, 255, 255, 0.03);
}

.pw-pd-stat-icon {
    font-size: 18px;
    margin-bottom: 6px;
}

.pw-pd-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--pw-text, #1a1d27);
    line-height: 1;
    margin-bottom: 4px;
}

body.dark-theme .pw-pd-stat-value { --pw-text: #e0e0e0; }

.pw-pd-stat-label {
    font-size: 11px;
    color: var(--pw-muted, #8b8fa3);
}

body.dark-theme .pw-pd-stat-label { --pw-muted: #8b8fa3; }

/* ---- 公会成员 ---- */
.pw-pd-guild-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--pw-border, #e8eaf0);
}

body.dark-theme .pw-pd-guild-members {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.pw-pd-member {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--pw-text, #1a1d27);
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
}

body.dark-theme .pw-pd-member {
    background: rgba(255, 255, 255, 0.04);
    --pw-text: #e0e0e0;
}

.pw-pd-member .pw-pd-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.pw-pd-member .pw-pd-dot.online {
    background: #2ecc71;
    box-shadow: 0 0 4px rgba(46, 204, 113, 0.5);
}

.pw-pd-member .pw-pd-dot.offline {
    background: #95a5a6;
}

/* ---- 公会标签页 ---- */
.pw-pd-guild-members {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pw-pd-member {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pw-text, #1a1d27);
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    transition: background 0.2s;
}

.pw-pd-member:hover {
    background: rgba(0, 0, 0, 0.06);
}

.pw-pd-member-online {
    border-left: 3px solid #2ecc71;
}

.pw-pd-member-name {
    flex: 1;
    font-weight: 500;
}

.pw-pd-member-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    font-weight: 600;
}

.pw-pd-member-status {
    font-size: 11px;
    color: var(--pw-muted, #8b8fa3);
}

/* 据点列表 */
.pw-pd-camp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pw-pd-camp {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--pw-border, #e8eaf0);
}

.pw-pd-camp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.pw-pd-camp-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--pw-text, #1a1d27);
}

.pw-pd-camp-level {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(124, 92, 252, 0.1);
    color: #7c5cfc;
    font-weight: 600;
}

.pw-pd-camp-state {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.pw-pd-camp-pos {
    font-size: 11px;
    color: var(--pw-muted, #8b8fa3);
}

body.dark-theme .pw-pd-member:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .pw-pd-camp {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .pw-pd-camp-name {
    --pw-text: #e0e0e0;
}

/* ---- 帕鲁网格 ---- */
.pw-pd-pal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.pw-pd-pal-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--pw-radius-sm);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid transparent;
    transition: var(--pw-transition);
}

body.dark-theme .pw-pd-pal-card {
    background: rgba(255, 255, 255, 0.03);
}

.pw-pd-pal-card.lucky {
    border-color: rgba(241, 196, 15, 0.3);
    background: rgba(241, 196, 15, 0.04);
}

.pw-pd-pal-card.boss {
    border-color: rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.04);
}

.pw-pd-pal-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

body.dark-theme .pw-pd-pal-icon {
    background: rgba(255, 255, 255, 0.04);
}

.pw-pd-pal-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pw-pd-pal-info {
    flex: 1;
    min-width: 0;
}

.pw-pd-pal-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--pw-text, #1a1d27);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-theme .pw-pd-pal-name { --pw-text: #e0e0e0; }

.pw-pd-pal-nick {
    font-size: 11px;
    color: var(--pw-muted, #8b8fa3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-theme .pw-pd-pal-nick { --pw-muted: #8b8fa3; }

.pw-pd-pal-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.pw-pd-lvl {
    font-size: 11px;
    font-weight: 600;
    color: #7c5cfc;
}

.pw-pd-gender {
    font-size: 12px;
    font-weight: 700;
}

.pw-pd-tag {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 6px;
}

.pw-pd-tag.lucky {
    background: rgba(241, 196, 15, 0.15);
    color: #f39c12;
}

.pw-pd-tag.boss {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

/* ---- 物品网格 ---- */
.pw-pd-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.pw-pd-item-card {
    text-align: center;
    padding: 8px 4px;
    border-radius: var(--pw-radius-sm);
    background: rgba(0, 0, 0, 0.02);
    position: relative;
}

body.dark-theme .pw-pd-item-card {
    background: rgba(255, 255, 255, 0.03);
}

.pw-pd-item-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 4px;
    border-radius: 8px;
    overflow: hidden;
}

.pw-pd-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pw-pd-item-name {
    font-size: 10px;
    color: var(--pw-text, #1a1d27);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

body.dark-theme .pw-pd-item-name { --pw-text: #e0e0e0; }

.pw-pd-item-count {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: rgba(124, 92, 252, 0.8);
    padding: 1px 5px;
    border-radius: 8px;
}

/* ---- 科技网格 ---- */
.pw-pd-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.pw-pd-tech-card {
    text-align: center;
    padding: 10px 6px;
    border-radius: var(--pw-radius-sm);
    background: rgba(0, 0, 0, 0.02);
}

body.dark-theme .pw-pd-tech-card {
    background: rgba(255, 255, 255, 0.03);
}

.pw-pd-tech-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 4px;
    border-radius: 8px;
    overflow: hidden;
}

.pw-pd-tech-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pw-pd-tech-name {
    font-size: 10px;
    color: var(--pw-text, #1a1d27);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-theme .pw-pd-tech-name { --pw-text: #e0e0e0; }

/* ---- 空状态 ---- */
.pw-pd-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--pw-muted, #8b8fa3);
}

body.dark-theme .pw-pd-empty { --pw-muted: #8b8fa3; }

.pw-pd-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.pw-pd-empty p {
    font-size: 14px;
    margin: 0;
}

/* ---- 响应式 ---- */
@media (min-width: 600px) {
    .pw-pd-header {
        padding: 24px;
    }

    .pw-pd-avatar {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }

    .pw-pd-name {
        font-size: 24px;
    }

    .pw-pd-tab {
        font-size: 13px;
        flex-direction: row;
        justify-content: center;
        gap: 6px;
    }

    .pw-pd-tab i { font-size: 14px; }

    .pw-pd-card {
        padding: 20px;
    }

    .pw-pd-stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .pw-pd-pal-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .pw-pd-item-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }

    .pw-pd-tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
}

@media (min-width: 900px) {
    .pw-player-detail-wrap {
        max-width: 800px;
        margin: 0 auto;
    }
}
