/* ============================================================
 * anchors.css - 主播列表页样式
 * ============================================================ */

/* === 统计概览卡片 === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.stat-card {
    padding: var(--space-sm);
    position: relative;
    overflow: hidden;
    text-align: center;
    animation: fadeInUp 0.5s var(--ease-elastic) backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-hover);
}

.stat-card .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-xs);
}

.stat-card .stat-icon svg {
    width: 18px;
    height: 18px;
}

.stat-card .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-card .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-trend {
    font-size: 11px;
    color: var(--color-success);
    margin-top: var(--space-xs);
}

/* 各卡片图标配色 */
.stat-card.total .stat-icon   { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.stat-card.active .stat-icon  { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.stat-card.leave .stat-icon   { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.stat-card.vacation .stat-icon{ background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }

/* === 主播卡片网格 === */
.anchors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.anchor-card {
    padding: var(--space-lg);
    cursor: default;
    animation: fadeInUp 0.5s var(--ease-elastic) backwards;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 卡片顶部徽章组：日期 + 状态 并排靠右 */
.anchor-card .card-badges,
.card-badges {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: var(--space-sm);
    width: 100%;
    position: relative;
    z-index: 2;
}

.anchor-card .card-badges .date-badge,
.card-badges .date-badge {
    position: static !important;
    display: inline-flex !important;
    float: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
}

.anchor-card .card-badges .anchor-status-badge,
.card-badges .anchor-status-badge {
    position: static !important;
    display: inline-flex !important;
    float: none !important;
    top: auto !important;
    right: auto !important;
}

/* 错位入场延迟 */
.anchor-card:nth-child(1) { animation-delay: 0.05s; }
.anchor-card:nth-child(2) { animation-delay: 0.1s; }
.anchor-card:nth-child(3) { animation-delay: 0.15s; }
.anchor-card:nth-child(4) { animation-delay: 0.2s; }
.anchor-card:nth-child(5) { animation-delay: 0.25s; }
.anchor-card:nth-child(6) { animation-delay: 0.3s; }
.anchor-card:nth-child(7) { animation-delay: 0.35s; }
.anchor-card:nth-child(8) { animation-delay: 0.4s; }
.anchor-card:nth-child(n+9) { animation-delay: 0.45s; }

.anchor-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--glass-shadow-hover);
    border-color: var(--primary-light);
}

/* 卡片头部：头像 + 主信息 */
.anchor-head {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.anchor-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    position: relative;
}

/* 头像配色循环（根据姓名首字） */
.anchor-avatar.color-0 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.anchor-avatar.color-1 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.anchor-avatar.color-2 { background: linear-gradient(135deg, #10b981, #14b8a6); }
.anchor-avatar.color-3 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.anchor-avatar.color-4 { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.anchor-avatar.color-5 { background: linear-gradient(135deg, #8b5cf6, #d946ef); }

.anchor-info {
    flex: 1;
    min-width: 0;
}

.anchor-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.anchor-id {
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: 'SF Mono', Consolas, monospace;
}

/* 卡片状态徽章（徽章组内显示） */
.anchor-status-badge {
    position: static;
}

/* 卡片信息区 */
.anchor-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-sm) var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px dashed var(--border-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 0;
}

.meta-item .meta-label {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.meta-item .meta-value {
    color: var(--text-primary);
    font-weight: 500;
    min-width: 0;
}

/* 备注项：跨列自动换行 */
.meta-item.remark-item {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.meta-item.remark-item .meta-value {
    width: 100%;
    white-space: normal;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.5;
}

/* === 主播卡片状态快捷切换按钮 === */
.status-quick {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-sm);
    border-top: 1px dashed var(--border-light);
    flex-wrap: wrap;
}

.status-chip {
    flex: 1;
    min-width: 56px;
    padding: 5px var(--space-xs);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all 0.25s var(--ease-elastic);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.status-chip:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.status-chip.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}
.status-chip.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}
.status-chip.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

.status-chip.active {
    font-weight: 600;
    transform: scale(1.02);
}
.status-chip.active.success {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--color-success);
}
.status-chip.active.warning {
    background: rgba(245, 158, 11, 0.25);
    border-color: var(--color-warning);
}
.status-chip.active.danger {
    background: rgba(239, 68, 68, 0.25);
    border-color: var(--color-danger);
}

/* 卡片操作按钮区 */
.anchor-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.anchor-actions .btn {
    flex: 1;
}

/* === 加载骨架 === */
.skeleton-card {
    padding: var(--space-lg);
    height: 200px;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.4) 25%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0.4) 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-sm);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === 响应式 === */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .anchors-grid {
        grid-template-columns: 1fr;
    }
}
