/* 7B2勋章插件前端样式 */
.b2-user-medals {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.b2-user-medals h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.b2-user-medals .medal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.b2-user-medals .medal-item {
    text-align: center;
    width: 80px;
}

.b2-user-medals .medal-item img {
    border-radius: 8px;
    margin-bottom: 5px;
}

.b2-user-medals .medal-name {
    display: block;
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.b2-user-medals .medal-obtained {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

.b2-author-medals {
    margin-top: 15px;
}

.b2-author-medals h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.b2-author-medals .medal-list {
    display: flex;
    gap: 8px;
}

.b2-author-medals .medal-list img {
    border-radius: 4px;
}

.b2-user-medals-shortcode {
    margin: 20px 0;
}

.b2-user-medals-shortcode h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.b2-user-medals-shortcode .medal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.b2-user-medals-shortcode .medal-item {
    text-align: center;
}

.b2-user-medals-shortcode .medal-item img {
    border-radius: 6px;
}

.b2-user-medals-shortcode .medal-name {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.b2-medal-error, .b2-medal-empty {
    color: #666;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    text-align: center;
}

/* 勋章墙样式 */
.b2-medal-wall {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.b2-medal-wall h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.b2-medal-wall .medal-wall-desc {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.b2-medal-wall.layout-grid .medal-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.b2-medal-wall.layout-list .medal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.b2-medal-wall.layout-list .medal-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.b2-medal-wall.layout-list .medal-item:hover {
    background-color: #f9f9f9;
}

.b2-medal-wall.layout-list .medal-item img {
    margin-right: 15px;
}

.b2-medal-wall.layout-list .medal-item .medal-name {
    font-size: 14px;
    margin-bottom: 0;
}

.b2-medal-wall.layout-list .medal-item .medal-status {
    margin-left: auto;
}

.b2-medal-wall .medal-item {
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.b2-medal-wall .medal-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.b2-medal-wall .medal-item img {
    border-radius: 8px;
    margin-bottom: 8px;
    width: 64px;
    height: 64px;
    object-fit: cover;
}

.b2-medal-wall .medal-item.obtained img {
    border: 2px solid #4CAF50;
}

.b2-medal-wall .medal-item.not-obtained img {
    border: 2px solid #ccc;
    filter: grayscale(50%);
}

.b2-medal-wall .medal-name {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.b2-medal-wall .medal-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
}

.b2-medal-wall .medal-item.obtained .medal-status {
    background-color: #e8f5e9;
    color: #4CAF50;
}

.b2-medal-wall .medal-item.not-obtained .medal-status {
    background-color: #f5f5f5;
    color: #999;
}

.b2-medal-wall .apply-medal-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.b2-medal-wall .apply-medal-btn:hover {
    background-color: #1976D2;
}

/* 排行榜样式 */
.b2-medal-ranking {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.b2-medal-ranking h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.b2-medal-ranking .ranking-tabs {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.b2-medal-ranking .ranking-tab {
    display: inline-block;
    padding: 8px 15px;
    margin-bottom: -1px;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.b2-medal-ranking .ranking-tab:hover {
    background-color: #f5f5f5;
    border-color: #ddd #ddd #fff;
}

.b2-medal-ranking .ranking-tab.active {
    background-color: #fff;
    border-color: #ddd #ddd #fff;
    color: #333;
    font-weight: bold;
}

.b2-medal-ranking .ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.b2-medal-ranking .ranking-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.b2-medal-ranking .ranking-item:hover {
    background-color: #f9f9f9;
}

.b2-medal-ranking .rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #eee;
    color: #666;
    font-weight: bold;
    margin-right: 15px;
}

.b2-medal-ranking .rank-number:nth-child(-n+3) {
    background-color: #FFD700;
    color: #333;
}

.b2-medal-ranking .rank-number:nth-child(2) {
    background-color: #C0C0C0;
}

.b2-medal-ranking .rank-number:nth-child(3) {
    background-color: #CD7F32;
}

.b2-medal-ranking .user-info {
    flex: 1;
}

.b2-medal-ranking .user-info a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.b2-medal-ranking .user-info a:hover {
    color: #2196F3;
}

.b2-medal-ranking .user-meta {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

/* 勋章通知弹窗 */
.b2-medal-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 15px;
    z-index: 9999;
    max-width: 300px;
    animation: slideInRight 0.3s ease;
}

.b2-medal-notification .notification-content {
    display: flex;
    align-items: center;
}

.b2-medal-notification .notification-content img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin-right: 15px;
}

.b2-medal-notification .notification-text h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 14px;
}

.b2-medal-notification .notification-text p {
    margin: 0;
    color: #666;
    font-size: 12px;
}

.b2-medal-notification .close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
