/* 公会排行榜专用样式 */

/* 公会排行榜内容区域 */
.guild-ranking-content {
    padding: 60px 0;
    background: var(--background-primary);
}

.guild-ranking-container {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* 公会列表样式 */
.guild-list {
    padding: 20px;
}

.guild-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guild-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 121, 24, 0.05), transparent);
    transition: left 0.5s ease;
}

.guild-item:hover::before {
    left: 100%;
}

.guild-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.guild-item:last-child {
    margin-bottom: 0;
}

/* 公会排名 */
.guild-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--background-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 20px;
    position: relative;
}

.guild-rank.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.guild-rank.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    border-color: #c0c0c0;
    color: #333;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.3);
}

.guild-rank.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    border-color: #cd7f32;
    color: white;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.3);
}

.guild-rank.rank-other {
    color: var(--text-primary);
}

.guild-rank i {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 1rem;
    color: var(--accent-color);
}

/* 公会信息 */
.guild-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.guild-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

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

.guild-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.guild-details {
    flex: 1;
}

.guild-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guild-level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-left: 10px;
}

.guild-level.t0 {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.guild-level.t0-5 {
    background: linear-gradient(135deg, #9c27b0, #673ab7);
    color: white;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.guild-level.t1 {
    background: linear-gradient(135deg, #2196f3, #03a9f4);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.guild-level.t2 {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.guild-level.t3 {
    background: linear-gradient(135deg, #ff9800, #ffc107);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.guild-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.guild-server {
    display: inline-block;
    padding: 2px 8px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 公会统计信息 */
.guild-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.stat-value.high { color: var(--success-color); }
.stat-value.medium { color: var(--warning-color); }
.stat-value.low { color: var(--error-color); }

/* 公会等级说明区域 */
.guild-rank-explanation {
    padding: 60px 0;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-color);
}

.guild-rank-levels {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guild-rank-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.guild-rank-level:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.rank-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.rank-badge.t0 {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.rank-badge.t0-5 {
    background: linear-gradient(135deg, #9c27b0, #673ab7);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.rank-badge.t1 {
    background: linear-gradient(135deg, #2196f3, #03a9f4);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.rank-badge.t2 {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.rank-badge.t3 {
    background: linear-gradient(135deg, #ff9800, #ffc107);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.rank-details h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.rank-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.rank-requirements {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.requirement {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.requirement strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 空状态样式 */
.guild-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.guild-empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.guild-empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.guild-empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .guild-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* MCPVP-inspired guild tiers: compact rank rows with click-through stats */
    .guild-ranking-content {
        padding: 30px 0 60px;
        background: transparent;
    }

    .guild-ranking-container {
        padding: 10px;
        background: #111426;
        border: 1px solid #1d263b;
        border-radius: 10px;
        box-shadow: none;
    }

    .guild-list {
        padding: 0;
    }

    .guild-item {
        min-height: 92px;
        gap: 16px;
        padding: 12px 16px 12px 0;
        margin-bottom: 8px;
        background: #0a0a1a;
        border: 1px solid #1d263b;
        border-radius: 8px;
        cursor: pointer;
    }

    .guild-item::before {
        display: none;
    }

    .guild-item:hover {
        transform: translateY(-1px);
        border-color: #3b4660;
        background: #101426;
        box-shadow: none;
    }

    .guild-item:focus-visible {
        outline: 2px solid #ed1835;
        outline-offset: 2px;
    }

    .guild-item.featured {
        background: #0a0a1a;
        border: 1px solid #1d263b;
    }

    .guild-item.featured::after {
        display: none;
    }

    .guild-item.guild-item-enter {
        animation: guild-item-enter 0.38s ease-out backwards;
        animation-delay: var(--entry-delay, 0ms);
    }

    @keyframes guild-item-enter {
        from { transform: translateY(12px); }
        to { transform: translateY(0); }
    }

    .guild-rank {
        position: relative;
        align-self: stretch;
        flex: 0 0 68px;
        width: 68px;
        height: auto;
        min-height: 66px;
        margin: -12px 0 -12px;
        border: 0;
        border-radius: 7px 0 0 7px;
        color: #aab4c8;
        background: #14192b;
        clip-path: polygon(0 0, 100% 0, 80% 50%, 100% 100%, 0 100%);
    }

    .guild-rank.rank-1 {
        color: #111426;
        background: linear-gradient(135deg, #f1cf4a, #bd8d12);
        box-shadow: none;
    }

    .guild-rank.rank-2 {
        color: #1c2636;
        background: linear-gradient(135deg, #e1e8f0, #8d9eb3);
        box-shadow: none;
    }

    .guild-rank.rank-3 {
        color: #231810;
        background: linear-gradient(135deg, #e6a16e, #a45b34);
        box-shadow: none;
    }

    .guild-info {
        min-width: 0;
        gap: 13px;
    }

    .guild-avatar {
        flex: 0 0 58px;
        width: 58px;
        height: 58px;
        color: #aab4c8;
        background: #111426;
        border: 1px solid #28334c;
        border-radius: 7px;
    }

    .guild-avatar::before {
        display: none;
    }

    .guild-avatar img {
        object-fit: contain;
    }

    .guild-details {
        min-width: 0;
    }

    .guild-name {
        gap: 8px;
        margin-bottom: 4px;
        color: #e7e9ef;
        font-size: 1.05rem;
    }

    .guild-name-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .guild-level {
        flex: 0 0 auto;
        padding: 3px 7px;
        margin-left: 0;
        color: #e7c766;
        background: rgba(204, 164, 47, 0.1);
        border: 1px solid rgba(204, 164, 47, 0.3);
        border-radius: 5px;
        font-size: 0.67rem;
    }

    .guild-level.t0-5 {
        color: #e7c766;
        background: rgba(204, 164, 47, 0.1);
        border-color: rgba(204, 164, 47, 0.3);
    }

    .guild-level.t1,
    .guild-level.t2,
    .guild-level.t3 {
        color: #acb6ca;
        background: #14192b;
        border-color: #29344e;
        box-shadow: none;
    }

    .guild-meta {
        overflow: hidden;
        color: #909bb1;
        font-size: 0.78rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .guild-row-chevron {
        flex: 0 0 auto;
        color: #6f7a92;
        font-size: 0.8rem;
    }

    .guild-rank-explanation {
        padding: 34px 0 60px;
        background: transparent;
        border-top: 1px solid #1d263b;
    }

    .guild-rank-level {
        padding: 18px;
        background: #111426;
        border-color: #1d263b;
        border-radius: 8px;
    }

    .rank-badge {
        border-radius: 7px;
    }

    @media (max-width: 600px) {
        .guild-ranking-container {
            padding: 7px;
        }

        .guild-item {
            gap: 9px;
            padding-right: 9px;
        }

        .guild-rank {
            flex-basis: 45px;
            width: 45px;
            font-size: 1rem;
        }

        .guild-info {
            gap: 9px;
        }

        .guild-avatar {
            flex-basis: 44px;
            width: 44px;
            height: 44px;
        }

        .guild-name {
            font-size: 0.92rem;
        }

        .guild-meta {
            font-size: 0.68rem;
        }
    }
    
    .guild-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }
    
    .guild-stats {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        min-width: auto;
    }
    
    .guild-rank-level {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .rank-requirements {
        width: 100%;
        min-width: auto;
    }
    
    .requirement {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .guild-list {
        padding: 15px;
    }
    
    .guild-item {
        padding: 15px;
    }
    
    .guild-rank {
        width: 50px;
        height: 50px;
        font-size: 1rem;
        margin-right: 15px;
    }
    
    .guild-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .guild-name {
        font-size: 1.1rem;
    }
    
    .guild-level {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    
    .guild-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .stat-row {
        font-size: 0.8rem;
    }
    
    .guild-rank-level {
        padding: 20px 15px;
    }
    
    .rank-badge {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .rank-details h4 {
        font-size: 1.1rem;
    }
    
    .requirement {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* 加载动画 */
.guild-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

/* MCPVP-inspired tier rows */
.guild-ranking-content {
    padding: 30px 0 60px;
    background: transparent;
}

.guild-ranking-container {
    padding: 30px;
    background: #111426;
    border: 1px solid #1d263b;
    border-radius: 10px;
    box-shadow: none;
}

.guild-list {
    padding: 0;
}

.guild-item {
    min-height: 92px;
    gap: 16px;
    padding: 12px 16px 12px 0;
    margin-bottom: 8px;
    background: #0a0a1a;
    border: 1px solid #1d263b;
    border-radius: 8px;
    cursor: pointer;
}

.guild-item::before,
.guild-avatar::before {
    display: none;
}

.guild-item:hover {
    transform: translateY(-1px);
    border-color: #3b4660;
    background: #101426;
    box-shadow: none;
}

.guild-item:focus-visible {
    outline: 2px solid #ed1835;
    outline-offset: 2px;
}

.guild-rank {
    position: relative;
    align-self: stretch;
    flex: 0 0 68px;
    width: 68px;
    height: auto;
    min-height: 66px;
    margin: -12px 0;
    border: 0;
    border-radius: 7px 0 0 7px;
    color: #aab4c8;
    background: #14192b;
    clip-path: polygon(0 0, 100% 0, 80% 50%, 100% 100%, 0 100%);
}

.guild-rank.rank-1 {
    color: #111426;
    background: linear-gradient(135deg, #f1cf4a, #bd8d12);
    box-shadow: none;
}

.guild-rank.rank-2 {
    color: #1c2636;
    background: linear-gradient(135deg, #e1e8f0, #8d9eb3);
    box-shadow: none;
}

.guild-rank.rank-3 {
    color: #231810;
    background: linear-gradient(135deg, #e6a16e, #a45b34);
    box-shadow: none;
}

.guild-info {
    min-width: 0;
    gap: 13px;
}

.guild-avatar {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    color: #aab4c8;
    background: #111426;
    border: 1px solid #28334c;
    border-radius: 7px;
}

.guild-avatar img {
    object-fit: contain;
}

.guild-name {
    gap: 8px;
    margin-bottom: 4px;
    color: #e7e9ef;
    font-size: 1.05rem;
}

.guild-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guild-level {
    flex: 0 0 auto;
    padding: 3px 7px;
    margin-left: 0;
    color: #e7c766;
    background: rgba(204, 164, 47, 0.1);
    border: 1px solid rgba(204, 164, 47, 0.3);
    border-radius: 5px;
    font-size: 0.67rem;
}

.guild-level.t0-5 {
    color: #e7c766;
    background: rgba(204, 164, 47, 0.1);
    border-color: rgba(204, 164, 47, 0.3);
}

.guild-level.t1,
.guild-level.t2,
.guild-level.t3 {
    color: #acb6ca;
    background: #14192b;
    border-color: #29344e;
    box-shadow: none;
}

.guild-meta {
    color: #909bb1;
    font-size: 0.78rem;
}

.guild-row-chevron {
    flex: 0 0 auto;
    color: #6f7a92;
    font-size: 0.8rem;
}

.guild-rank-explanation {
    padding: 34px 0 60px;
    background: transparent;
    border-top: 1px solid #1d263b;
}

.guild-rank-level {
    padding: 18px;
    background: #111426;
    border-color: #1d263b;
    border-radius: 8px;
}

.rank-badge {
    border-radius: 7px;
}

@media (max-width: 768px) {
    .guild-ranking-container {
        padding: 10px;
    }

    .guild-item {
        flex-direction: row;
        align-items: center;
    }

    .guild-info {
        flex-direction: row;
        align-items: center;
        width: auto;
    }
}

@media (max-width: 600px) {
    .guild-ranking-container {
        padding: 7px;
    }

    .guild-item {
        gap: 9px;
        padding-right: 9px;
    }

    .guild-rank {
        flex-basis: 45px;
        width: 45px;
        font-size: 1rem;
    }

    .guild-info {
        gap: 9px;
    }

    .guild-avatar {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .guild-name {
        font-size: 0.92rem;
    }

    .guild-meta {
        font-size: 0.68rem;
    }
}

.guild-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

/* 搜索高亮 */
.guild-search-highlight {
    background: rgba(255, 235, 59, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* 公会徽章动画 */
.guild-badge-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 特殊效果 */
.guild-item.featured {
    border: 2px solid var(--accent-color);
    background: linear-gradient(135deg, var(--background-primary) 0%, rgba(255, 107, 53, 0.05) 100%);
}

.guild-item.featured::after {
    content: '推荐';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.guild-item.featured {
    background: #0a0a1a;
    border: 1px solid #1d263b;
}

.guild-item.featured::after {
    display: none;
}
