/**
 * Label Vibe v1.3.0 样式
 * 包含：积分系统、通知系统、徽章系统
 */

/* ===== 积分卡片 ===== */
.lv-points-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 0 20px 20px;
    display: flex;
    align-items: center;
    gap: 32px;
    color: white;
}

.lv-points-display {
    text-align: center;
    min-width: 120px;
}

.lv-points-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.lv-points-label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

.lv-level-progress {
    flex: 1;
}

.lv-level-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.lv-current-level {
    font-weight: 600;
}

.lv-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.lv-progress-bar.small {
    height: 4px;
}

.lv-progress-fill {
    height: 100%;
    background: #FFD700;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.lv-level-next {
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.9;
}

/* ===== 积分记录 ===== */
.lv-points-logs {
    padding: 8px 0;
}

.lv-points-log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.lv-points-log-item:last-child {
    border-bottom: none;
}

.lv-log-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lv-log-action {
    font-size: 14px;
    color: #333;
}

.lv-log-time {
    font-size: 12px;
    color: #999;
}

.lv-log-points {
    font-size: 16px;
    font-weight: 600;
}

.lv-log-points.positive {
    color: #4CAF50;
}

.lv-log-points.negative {
    color: #f44336;
}

/* ===== 徽章卡片 ===== */
.lv-badges-card .lv-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lv-badge-count {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.lv-badges-earned {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
}

.lv-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.lv-badge-item:hover {
    transform: translateY(-4px);
}

.lv-badge-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s;
}

.lv-badge-name {
    font-size: 12px;
    color: #666;
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 徽章进度 */
.lv-badges-progress {
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
}

.lv-badges-progress h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.lv-badge-progress-item {
    margin-bottom: 12px;
}

.lv-badge-progress-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.lv-progress-badge-icon {
    font-size: 16px;
}

.lv-progress-badge-name {
    font-size: 13px;
    color: #333;
    flex: 1;
}

.lv-progress-badge-desc {
    font-size: 12px;
    color: #999;
}

/* 徽章弹窗 */
.lv-badges-modal .lv-modal-content {
    max-width: 600px;
}

.lv-badges-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.lv-badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.lv-badge-grid-item {
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s;
}

.lv-badge-grid-item.earned {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.lv-badge-grid-item.progress {
    opacity: 0.7;
}

.lv-badge-grid-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 12px;
}

.lv-badge-grid-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.lv-badge-grid-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.lv-badge-grid-time {
    font-size: 11px;
    color: #999;
}

.lv-badge-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lv-badge-progress .lv-progress-bar {
    flex: 1;
}

.lv-badge-progress span {
    font-size: 11px;
    color: #999;
    min-width: 40px;
}

/* ===== 通知页面 ===== */
.lv-notifications-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.lv-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lv-page-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
}

.lv-page-header h1 svg {
    width: 28px;
    height: 28px;
    color: #667eea;
}

.lv-badge {
    background: #ff4757;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.lv-notifications-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.lv-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.lv-tab.active {
    color: #667eea;
    font-weight: 600;
}

.lv-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.lv-tab-badge {
    background: #ff4757;
    color: white;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
}

.lv-notifications-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.lv-notification-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.lv-notification-item:last-child {
    border-bottom: none;
}

.lv-notification-item.unread {
    background: #f0f5ff;
}

.lv-notification-item:hover {
    background: #f8f9fa;
}

.lv-notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lv-notification-icon svg {
    width: 22px;
    height: 22px;
}

.lv-icon-reply { background: #e3f2fd; color: #2196F3; }
.lv-icon-mention { background: #f3e5f5; color: #9C27B0; }
.lv-icon-like { background: #ffebee; color: #f44336; }
.lv-icon-system { background: #e8eaf6; color: #3f51b5; }
.lv-icon-badge { background: #fff8e1; color: #ff9800; }
.lv-icon-points { background: #e0f2f1; color: #009688; }

.lv-notification-content {
    flex: 1;
    min-width: 0;
}

.lv-notification-text {
    font-size: 14px;
    color: #333;
    margin: 0 0 4px;
    line-height: 1.5;
}

.lv-notification-time {
    font-size: 12px;
    color: #999;
}

.lv-notification-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.lv-btn-text {
    background: none;
    border: none;
    color: #667eea;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.lv-btn-text:hover {
    background: #f0f5ff;
}

.lv-btn-danger {
    color: #f44336;
}

.lv-btn-danger:hover {
    background: #ffebee;
}

/* ===== 导航栏通知下拉 ===== */
.lv-nav-notification {
    position: relative;
}

.lv-notification-trigger {
    position: relative;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lv-notification-trigger svg {
    width: 20px;
    height: 20px;
}

.lv-notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.lv-notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
}

.lv-nav-notification.active .lv-notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lv-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.lv-notification-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.lv-notification-list {
    max-height: 360px;
    overflow-y: auto;
}

.lv-notification-item-small {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s;
}

.lv-notification-item-small:hover {
    background: #f8f9fa;
}

.lv-notification-item-small.unread {
    background: #f0f5ff;
}

.lv-notification-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lv-notification-body {
    flex: 1;
    min-width: 0;
}

.lv-notification-title {
    font-size: 13px;
    color: #333;
    margin: 0 0 2px;
    line-height: 1.4;
}

.lv-notification-meta {
    font-size: 12px;
    color: #999;
}

.lv-notification-footer {
    padding: 12px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.lv-notification-footer a {
    color: #667eea;
    font-size: 13px;
    text-decoration: none;
}

.lv-notification-footer a:hover {
    text-decoration: underline;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .lv-points-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .lv-badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lv-notification-dropdown {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
    }
    
    .lv-notification-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .lv-notification-item {
        flex-wrap: wrap;
    }
    
    .lv-notification-content {
        order: 2;
        width: calc(100% - 60px);
    }
    
    .lv-notification-actions {
        order: 3;
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #f0f0f0;
        flex-direction: row;
        gap: 8px;
    }
    
    .lv-notification-actions .lv-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* 通知页面移动端优化 */
    .lv-notifications-page .lv-container {
        padding: 12px;
    }
    
    .lv-notifications-page .lv-page-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .lv-notifications-page .lv-page-header h1 {
        font-size: 20px;
    }
    
    .lv-notifications-page .lv-actions {
        width: 100%;
    }
    
    .lv-notifications-page .lv-actions .lv-btn {
        width: 100%;
        padding: 10px;
    }
    
    .lv-notifications-tabs {
        margin: 0 -12px 16px;
        padding: 0 12px;
    }
    
    .lv-notifications-tabs .lv-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .lv-notification-item {
        padding: 12px;
        gap: 10px;
    }
    
    .lv-notification-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lv-notification-content {
        width: calc(100% - 50px);
    }
    
    .lv-notification-text {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .lv-notification-time {
        font-size: 11px;
    }
    
    /* 空状态 */
    .lv-empty-state {
        padding: 40px 20px;
    }
    
    .lv-empty-state-icon {
        font-size: 48px;
    }
    
    .lv-empty-state h3 {
        font-size: 16px;
    }
    
    .lv-empty-state p {
        font-size: 13px;
    }
}
    }
}

@media (max-width: 480px) {
    .lv-badges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .lv-badge-grid-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
}
