/* 
 * B2勋章系统 - 短代码样式
 * 包含勋章墙、排行榜和勋章用户展示页面的样式
 */

/* 通用样式 */
:root {
    --medal-primary-color: #4693fb;
    --medal-secondary-color: #ffc107;
    --medal-text-color: #333;
    --medal-light-color: #f5f7fa;
    --medal-border-color: #e0e0e0;
    --medal-success-color: #4CAF50;
    --medal-error-color: #F44336;
    --medal-warning-color: #FF9800;
    --medal-hover-color: #f0f7ff;
    --medal-gold-color: #ffd700;
    --medal-silver-color: #c0c0c0;
    --medal-bronze-color: #cd7f32;
    --medal-shadow-color: rgba(0, 0, 0, 0.1);
}
.page .content-area {
    max-width: calc(100% - 1px) !important;
}
.b2-medal-empty {
    text-align: center;
    padding: 2rem;
    background-color: var(--medal-light-color);
    border-radius: 8px;
    color: var(--medal-text-color);
    font-size: 16px;
    margin: 1rem 0;
}

/* 勋章墙样式 */
.b2-medal-wall {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    overflow: hidden;
}

.b2-medal-wall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--medal-border-color);
}

.b2-medal-wall-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--medal-text-color);
    margin: 0;
    position: relative;
}

.b2-medal-wall-header h2:after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--medal-primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.b2-medal-wall:hover .b2-medal-wall-header h2:after {
    width: 80px;
}

.b2-user-info {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.b2-user-credit, .b2-user-balance {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: var(--medal-light-color);
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.b2-user-credit:hover, .b2-user-balance:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.b2-user-credit:before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--medal-primary-color);
    border-radius: 50%;
    margin-right: 8px;
}

.b2-user-balance:before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--medal-secondary-color);
    border-radius: 50%;
    margin-right: 8px;
}

.b2-medal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 10px;
}

/* 自定义列数 */
.b2-medal-grid-col-1 {
    grid-template-columns: repeat(1, 1fr);
}

.b2-medal-grid-col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.b2-medal-grid-col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.b2-medal-grid-col-4 {
    grid-template-columns: repeat(4, 1fr);
}

.b2-medal-grid-col-5 {
    grid-template-columns: repeat(5, 1fr);
}

.b2-medal-grid-col-6 {
    grid-template-columns: repeat(6, 1fr);
}

.b2-medal-item {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid var(--medal-border-color);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    text-align: center;
    will-change: transform, box-shadow, border-color;
    backface-visibility: hidden;
    transform: translateZ(0);
}
/* 勋章墙项目悬停效果 */
.b2-medal-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--medal-primary-color);
}
/* 已拥有勋章样式 */
.b2-medal-owned {
    border-color: var(--medal-success-color);
    background-color: rgba(76, 175, 80, 0.05);
}

.b2-medal-image {
    margin-bottom: 15px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.b2-medal-item:hover .b2-medal-image {
    transform: scale(1.05);
}

.b2-medal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 5px;
    background-color: #fff;
    border: 1px solid var(--medal-border-color);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
}

.b2-medal-item:hover .b2-medal-image img {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.b2-medal-owned .b2-medal-image img {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.b2-medal-owned:hover .b2-medal-image img {
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.3);
}

.b2-medal-info {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.b2-medal-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--medal-text-color);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.b2-medal-item:hover .b2-medal-info h3 {
    color: var(--medal-primary-color);
}

.b2-medal-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    flex: 1;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.b2-medal-condition {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
    padding: 10px 12px;
    background-color: var(--medal-light-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.b2-medal-item:hover .b2-medal-condition {
    border-left: 2px solid var(--medal-primary-color);
    background-color: rgba(70, 147, 251, 0.05);
}

.b2-medal-buy-btn {
    padding: 10px 20px;
    background-color: var(--medal-primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-top: auto;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.b2-medal-buy-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.b2-medal-buy-btn:hover {
    background-color: #3a84ec;
    box-shadow: 0 6px 12px rgba(70, 147, 251, 0.3);
    transform: translateY(-3px);
}

.b2-medal-buy-btn:hover:before {
    left: 100%;
}

.b2-medal-buy-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(70, 147, 251, 0.2);
}

.b2-medal-buy-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.b2-medal-owned-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: var(--medal-success-color);
    color: white;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    margin-top: auto;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.b2-medal-owned-tag:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s ease;
}

.b2-medal-item:hover .b2-medal-owned-tag:before {
    left: 100%;
}

.b2-medal-special {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--medal-warning-color);
    color: white;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    margin-top: auto;
}

.b2-medal-manual {
    display: inline-block;
    padding: 6px 12px;
    background-color: #8e44ad;  /* 紫色，区别于其他类型 */
    color: white;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    margin-top: auto;
}

/* 排行榜样式 */
.b2-medal-ranking {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
    overflow: hidden;
}

.b2-medal-ranking h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--medal-text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--medal-primary-color);
    position: relative;
}

.b2-medal-ranking h2:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--medal-secondary-color);
}

.b2-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b2-ranking-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
    position: relative;
}

.b2-ranking-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.b2-ranking-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    margin-right: 15px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.b2-ranking-item:hover .b2-ranking-number {
    background-color: #eaf2ff;
    color: var(--medal-primary-color);
}

.b2-rank-first .b2-ranking-number {
    background-color: var(--medal-gold-color);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.b2-rank-second .b2-ranking-number {
    background-color: var(--medal-silver-color);
    color: white;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.b2-rank-third .b2-ranking-number {
    background-color: var(--medal-bronze-color);
    color: white;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.b2-ranking-avatar {
    margin-right: 15px;
    flex-shrink: 0;
}

.b2-ranking-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 3px solid #fff;
    transition: all 0.3s ease;
}

.b2-ranking-item:hover .b2-ranking-avatar img {
    border-color: var(--medal-primary-color);
    box-shadow: 0 4px 12px rgba(70, 147, 251, 0.2);
}

.b2-ranking-info {
    flex: 1;
    min-width: 0; /* 确保flex子元素不会溢出 */
}

.b2-ranking-user-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.b2-ranking-name {
    font-size: 18px;
    font-weight: 600;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.b2-ranking-name a {
    color: var(--medal-text-color);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    display: inline-block;
}

.b2-ranking-name a:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--medal-primary-color);
    transition: width 0.3s ease;
}

.b2-ranking-name a:hover {
    color: var(--medal-primary-color);
}

.b2-ranking-name a:hover:after {
    width: 100%;
}

.b2-ranking-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: #666;
    background-color: rgba(245, 245, 245, 0.5);
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.b2-ranking-item:hover .b2-ranking-stats {
    background-color: rgba(234, 242, 255, 0.7);
}

.b2-medal-count, .b2-medal-value {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.b2-medal-count:before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--medal-primary-color);
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 0 2px rgba(70, 147, 251, 0.2);
}

.b2-medal-value:before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--medal-secondary-color);
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

/* 勋章用户展示页面样式 */
.b2-medal-users {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    overflow: hidden;
}

.b2-medal-users-header {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--medal-border-color);
    position: relative;
}

.b2-medal-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

.b2-medal-image-container {
    flex-shrink: 0;
    position: relative;
}

.b2-medal-image {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 4px solid #fff;
    background-color: var(--medal-light-color);
    animation: medalPulse 2s infinite ease-in-out;
}

@keyframes medalPulse {
    0% {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 12px 24px rgba(70, 147, 251, 0.3);
    }
    100% {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }
}

.b2-medal-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0) 30%, rgba(255,255,255,0.3) 100%);
    z-index: 1;
}

.b2-medal-image img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.b2-medal-details {
    flex: 1;
}

.b2-medal-details h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--medal-text-color);
    margin: 0 0 15px;
    position: relative;
    display: inline-block;
}

.b2-medal-details h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--medal-primary-color);
    border-radius: 3px;
}

.b2-medal-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.b2-medal-condition {
    font-size: 15px;
    color: #555;
    margin-bottom: 15px;
    padding: 12px 15px;
    background-color: var(--medal-light-color);
    border-radius: 8px;
    border-left: 3px solid var(--medal-primary-color);
}

.condition-label {
    font-weight: 600;
    color: var(--medal-text-color);
}

.condition-value {
    font-weight: 600;
    color: var(--medal-primary-color);
}

.b2-medal-stats {
    margin-top: 15px;
    font-size: 15px;
    color: #666;
}

.b2-medal-user-count {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: rgba(70, 147, 251, 0.1);
    border-radius: 30px;
}

.b2-medal-user-count::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--medal-primary-color);
    border-radius: 50%;
    margin-right: 8px;
}

.count-value {
    font-weight: 700;
    color: var(--medal-primary-color);
    margin: 0 3px;
}

.b2-medal-users-title {
    margin: 30px 0 20px;
    position: relative;
}

.b2-medal-users h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--medal-text-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin: 0;
}

.b2-medal-users h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--medal-primary-color);
    border-radius: 3px;
}

.b2-medal-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

/* 用户头像动画效果 */
@keyframes userFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b2-medal-user-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: userFadeIn 0.5s ease forwards;
    animation-delay: calc(var(--user-index, 0) * 0.05s);
    opacity: 0;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.b2-medal-user-item:hover {
    transform: translateY(-8px);
}

.b2-medal-user-avatar {
    margin-bottom: 10px;
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 3px solid #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    will-change: transform, box-shadow;
}

.b2-medal-user-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    z-index: 1;
}

.b2-medal-user-avatar:hover {
    box-shadow: 0 8px 16px rgba(70, 147, 251, 0.3);
    border-color: var(--medal-primary-color);
    transform: scale(1.05);
}

.b2-medal-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.b2-medal-user-avatar:hover img {
    transform: scale(1.1);
}

.b2-medal-user-name {
    font-size: 14px;
    font-weight: 500;
    margin-top: 5px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b2-medal-user-name a {
    color: var(--medal-text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.b2-medal-user-name a:hover {
    color: var(--medal-primary-color);
}

/* 分页样式 */
.b2-medal-pagination {
    margin-top: 40px;
    text-align: center;
}

.b2-medal-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 6px;
    background-color: var(--medal-light-color);
    color: var(--medal-text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.b2-medal-pagination .page-numbers.current {
    background-color: var(--medal-primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(70, 147, 251, 0.3);
}

.b2-medal-pagination .page-numbers:hover:not(.current) {
    background-color: var(--medal-hover-color);
    transform: translateY(-2px);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .b2-medal-wall {
        padding: 20px;
    }
    
    .b2-medal-wall-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .b2-user-info {
        margin-top: 15px;
    }
    
    .b2-medal-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .b2-medal-users {
        padding: 20px;
    }
    
    .b2-medal-users .b2-medal-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .b2-medal-users .b2-medal-image {
        width: 100px;
        height: 100px;
    }
    
    .b2-medal-users .b2-medal-details h2 {
        font-size: 24px;
    }
    
    .b2-medal-users .b2-medal-details h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .b2-medal-users .b2-medal-desc {
        font-size: 15px;
    }
    
    .b2-medal-users-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 15px;
    }
    
    .b2-medal-user-avatar {
        width: 70px;
        height: 70px;
    }
    
    .b2-ranking-user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .b2-ranking-name {
        margin-right: 0;
    }
    
    .b2-ranking-stats {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .b2-medal-wall {
        padding: 15px;
    }
    
    .b2-medal-wall-header h2 {
        font-size: 20px;
    }
    
    .b2-medal-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .b2-user-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .b2-medal-users {
        padding: 15px;
    }
    
    .b2-medal-users-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .b2-medal-users .b2-medal-image {
        width: 80px;
        height: 80px;
    }
    
    .b2-medal-users .b2-medal-details h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .b2-medal-users .b2-medal-desc {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .b2-medal-condition {
        font-size: 14px;
        padding: 10px;
    }
    
    .b2-medal-users h3 {
        font-size: 18px;
    }
    
    .b2-medal-users-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 12px;
    }
    
    .b2-medal-user-avatar {
        width: 60px;
        height: 60px;
    }
    
    .b2-medal-user-name {
        font-size: 13px;
    }
    
    .b2-medal-pagination .page-numbers {
        padding: 6px 12px;
        margin: 0 3px;
        font-size: 13px;
    }
    
    .b2-ranking-user-header {
        width: 100%;
    }
    
    .b2-ranking-name {
        font-size: 16px;
    }
    
    .b2-ranking-stats {
        font-size: 13px;
        gap: 8px;
    }
}

.single-article h1 {
    font-size: 36px !important;
    text-align: center;
}

/* 排行榜用户勋章样式 */
.b2-user-medals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.b2-medal-img-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: 1px solid var(--medal-border-color);
    background-color: #fff;
    padding: 2px;
    position: relative;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.b2-medal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.b2-medal-img-wrapper:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.b2-medal-img-wrapper:active {
    transform: scale(1.05);
    transition: all 0.1s ease;
}

/* 添加勋章图片的淡入效果 */
@keyframes medalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.b2-user-medals .b2-medal-img-wrapper {
    animation: medalFadeIn 0.4s ease forwards;
    animation-delay: calc(var(--medal-index, 0) * 0.1s);
}

/* 在排行榜中调整勋章大小 */
.b2-ranking-item .b2-user-medals {
    margin-top: 8px;
}

.b2-ranking-item .b2-medal-img-wrapper {
    width: 36px;
    height: 36px;
}

@media (max-width: 768px) {
    .b2-user-medals {
        margin-top: 8px;
        gap: 6px;
    }
    
    .b2-medal-img-wrapper {
        width: 35px;
        height: 35px;
    }
    
    .b2-ranking-item .b2-medal-img-wrapper {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .b2-user-medals {
        max-width: 100%;
        margin-top: 6px;
        gap: 4px;
    }
    
    .b2-medal-img-wrapper {
        width: 30px;
        height: 30px;
    }
    
    .b2-ranking-item .b2-medal-img-wrapper {
        width: 28px;
        height: 28px;
    }
}

/* 添加勋章墙项目的淡入动画 */
@keyframes medalItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b2-medal-grid .b2-medal-item {
    animation: medalItemFadeIn 0.5s ease-out forwards;
    animation-delay: calc(var(--medal-index, 0) * 0.05s);
    opacity: 0;
}

/* 多勋章用户展示容器 */
.b2-medal-users-container {
    margin-bottom: 30px;
}

/* 单个勋章区域 */
.b2-medal-section {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    overflow: hidden;
}

/* 勋章展示区域 */
.b2-medal-display {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--medal-border-color);
    position: relative;
}

.b2-medal-display-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 4px solid #fff;
    background-color: var(--medal-light-color);
    animation: medalPulse 2s infinite ease-in-out;
}

.b2-medal-display-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0) 30%, rgba(255,255,255,0.3) 100%);
    z-index: 1;
}

.b2-medal-display-image img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.b2-medal-display-info {
    flex: 1;
}

.b2-medal-display-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--medal-text-color);
    margin: 0 0 15px;
    position: relative;
    display: inline-block;
}

.b2-medal-display-info h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--medal-primary-color);
    border-radius: 3px;
}

.b2-medal-display-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.b2-medal-display-condition {
    font-size: 15px;
    color: #555;
    margin-bottom: 15px;
    padding: 12px 15px;
    background-color: var(--medal-light-color);
    border-radius: 8px;
    border-left: 3px solid var(--medal-primary-color);
}

.b2-medal-display-stats {
    margin-top: 15px;
    font-size: 15px;
    color: #666;
}

/* 用户列表区域 */
.b2-medal-users-list {
    margin-top: 25px;
}

.b2-medal-users-list h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--medal-text-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin: 0 0 20px;
}

.b2-medal-users-list h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--medal-primary-color);
    border-radius: 3px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .b2-medal-section {
        padding: 20px;
    }
    
    .b2-medal-display {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        padding-bottom: 20px;
    }
    
    .b2-medal-display-image {
        width: 100px;
        height: 100px;
    }
    
    .b2-medal-display-info h2 {
        font-size: 24px;
    }
    
    .b2-medal-display-info h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .b2-medal-display-desc {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .b2-medal-section {
        padding: 15px;
    }
    
    .b2-medal-display {
        padding-bottom: 15px;
    }
    
    .b2-medal-display-image {
        width: 80px;
        height: 80px;
    }
    
    .b2-medal-display-info h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .b2-medal-display-desc {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .b2-medal-display-condition {
        font-size: 14px;
        padding: 10px;
    }
    
    .b2-medal-users-list h3 {
        font-size: 18px;
    }
}