body { background: #F5F5F8; padding-bottom: 40px; }

/* ===== TABS ===== */
.fr-tabs {
    display: flex; background: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky; top: 48px; z-index: 50;
}
.fr-tab {
    flex: 1; text-align: center; padding: 12px 0 10px;
    font-size: 13px; font-weight: 600; color: #999;
    cursor: pointer; position: relative; transition: all 0.2s;
}
.fr-tab:active { opacity: 0.6; }
.fr-tab.active { color: #1a1a1a; font-weight: 800; }
.fr-tab.active::after {
    content: ''; position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 24px; height: 3px; border-radius: 1.5px;
    background: linear-gradient(90deg, #FF5722, #FF9800);
}
.fr-tab .tab-badge {
    position: absolute; top: 6px; right: calc(50% - 28px);
    min-width: 16px; height: 16px; border-radius: 8px;
    background: #F44336; color: #fff; font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

/* ===== SEARCH ===== */
.fr-search {
    padding: 10px 16px; background: #fff;
}
.fr-search-box {
    display: flex; align-items: center; gap: 8px;
    background: #F5F5F8; border-radius: 20px; padding: 0 14px; height: 38px;
}
.fr-search-box i { color: #bbb; font-size: 14px; }
.fr-search-box input { flex: 1; border: none; background: none; font-size: 13px; outline: none; font-family: inherit; }

/* ===== TAB CONTENT ===== */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== FRIEND CARD ===== */
.fr-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; background: #fff; margin-bottom: 1px;
    transition: all 0.15s;
}
.fr-card:active { background: #fafafa; }
.fr-avatar-wrap { position: relative; flex-shrink: 0; }
.fr-avatar {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
}
.fr-online-dot {
    position: absolute; bottom: 1px; right: 1px;
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid #fff;
}
.fr-online-dot.on { background: #4CAF50; }
.fr-online-dot.off { background: #bbb; }
.fr-info { flex: 1; min-width: 0; }
.fr-name {
    font-size: 15px; font-weight: 700; color: #1a1a1a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fr-name .verified { color: #FF9800; font-size: 11px; margin-left: 3px; }
.fr-meta { font-size: 12px; color: #999; margin-top: 2px; }
.fr-meta span { margin-right: 8px; }
.fr-actions { display: flex; gap: 8px; flex-shrink: 0; }
.fr-btn {
    height: 30px; padding: 0 14px; border-radius: 15px;
    font-size: 12px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; gap: 4px;
    transition: all 0.15s; border: none;
}
.fr-btn:active { transform: scale(0.95); }
.fr-btn-pk {
    background: linear-gradient(135deg, #FFD54F, #FFA000);
    color: #fff;
}
.fr-btn-primary {
    background: linear-gradient(135deg, #FF5722, #FF9800);
    color: #fff;
}
.fr-btn-outline {
    background: #fff; color: #666;
    border: 1.5px solid #e0e0e0;
}
.fr-btn-outline:hover { border-color: #FF5722; color: #FF5722; }
.fr-btn-danger {
    background: #fff; color: #F44336;
    border: 1.5px solid rgba(244,67,54,0.2);
}
.fr-btn-followed {
    background: #f5f5f5; color: #999;
    border: 1.5px solid #e0e0e0;
}
.fr-btn-mutual {
    background: rgba(255,87,34,0.06); color: #FF5722;
    border: 1.5px solid rgba(255,87,34,0.15);
}

/* ===== STATS BAR ===== */
.fr-stats {
    display: flex; background: #fff; padding: 14px 16px;
    gap: 0; margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}
.fr-stat {
    flex: 1; text-align: center;
    border-right: 1px solid #f0f0f0;
}
.fr-stat:last-child { border-right: none; }
.fr-stat-num { font-size: 20px; font-weight: 900; color: #1a1a1a; }
.fr-stat-label { font-size: 11px; color: #999; margin-top: 2px; }

/* 顶部统计骨架屏 - 整体一块 */
.fr-stats-loading .fr-stat { visibility: hidden; }
.fr-stats-loading::before {
    content: '';
    position: absolute;
    inset: 14px 16px;
    background: #eee;
    background-image: linear-gradient(90deg, #eee 0px, #f5f5f5 40px, #eee 80px);
    background-size: 200px 100%;
    animation: frSkeletonShimmer 1.2s linear infinite;
    border-radius: 8px;
}

/* ===== SECTION HEADER ===== */
.fr-section {
    padding: 14px 16px 8px; font-size: 12px; font-weight: 700;
    color: #999; display: flex; align-items: center; justify-content: space-between;
}
.fr-section .fr-sort { font-size: 11px; color: #bbb; cursor: pointer; }

/* ===== EMPTY STATE ===== */
.fr-empty {
    text-align: center; padding: 60px 20px; color: #ccc;
}
.fr-empty i { font-size: 48px; margin-bottom: 12px; display: block; }
.fr-empty .fe-title { font-size: 15px; font-weight: 700; color: #999; margin-bottom: 4px; }
.fr-empty .fe-desc { font-size: 12px; color: #bbb; }

/* ===== SKELETON ===== */
@keyframes frSkeletonShimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}
/* 全页骨架屏 */
.fr-page-skeleton {
    min-height: 60vh;
    background: #F5F5F8;
}
.fr-skeleton-stats {
    height: 72px; margin-bottom: 8px;
    background: #fff;
    background-image: linear-gradient(90deg, #eee 0px, #f5f5f5 40px, #eee 80px);
    background-size: 200px 100%;
    animation: frSkeletonShimmer 1.2s linear infinite;
    border-radius: 0 0 8px 8px;
}
.fr-skeleton-tabs {
    height: 45px; margin-bottom: 0;
    background: #fff;
    background-image: linear-gradient(90deg, #eee 0px, #f5f5f5 40px, #eee 80px);
    background-size: 200px 100%;
    animation: frSkeletonShimmer 1.2s linear infinite;
    border-bottom: 1px solid #f0f0f0;
}
.fr-skeleton-search-wrap {
    padding: 10px 16px; background: #fff;
}
.fr-skeleton-search {
    height: 38px;
    background: #eee;
    background-image: linear-gradient(90deg, #eee 0px, #f5f5f5 40px, #eee 80px);
    background-size: 200px 100%;
    animation: frSkeletonShimmer 1.2s linear infinite;
    border-radius: 20px;
}
.fr-skeleton-section {
    height: 20px; margin: 14px 16px 8px;
    width: 120px;
    background: #eee;
    background-image: linear-gradient(90deg, #eee 0px, #f5f5f5 40px, #eee 80px);
    background-size: 200px 100%;
    animation: frSkeletonShimmer 1.2s linear infinite;
    border-radius: 4px;
}
.fr-skeleton-list {
    padding-top: 4px;
}
.fr-skeleton-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; background: #fff; margin-bottom: 1px;
}
.fr-skeleton-avatar,
.fr-skeleton-line {
    background: #eee;
    background-image: linear-gradient(90deg, #eee 0px, #f5f5f5 40px, #eee 80px);
    background-size: 200px 100%;
    animation: frSkeletonShimmer 1.2s linear infinite;
}
.fr-skeleton-avatar {
    width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
}
.fr-skeleton-content {
    flex: 1; min-width: 0;
}
.fr-skeleton-line {
    height: 10px; border-radius: 5px; margin-bottom: 8px;
}
.fr-skeleton-line.short { width: 40%; }
.fr-skeleton-line.medium { width: 60%; }
.fr-skeleton-line.long { width: 80%; }

/* ===== FRIEND REQUEST CARD ===== */
.req-card {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; background: #fff; margin-bottom: 1px;
}
.req-msg {
    font-size: 12px; color: #666; margin-top: 4px;
    padding: 6px 10px; background: #f5f5f5; border-radius: 8px;
}
.req-actions { display: flex; gap: 8px; margin-top: 8px; }
.req-time { font-size: 11px; color: #bbb; margin-top: 4px; }

/* ===== PK MODAL ===== */
.pk-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.5); display: none;
    align-items: center; justify-content: center;
}
.pk-overlay.open { display: flex; }
.pk-modal {
    width: 90%; max-width: 360px; background: #fff;
    border-radius: 20px; overflow: hidden;
    animation: pkSlideUp 0.3s ease;
}
@keyframes pkSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pk-header {
    background: linear-gradient(135deg, #FF5722, #FF9800);
    padding: 24px 20px; text-align: center; color: #fff; position: relative;
}
.pk-header .pk-close {
    position: absolute; top: 12px; right: 12px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.2); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; cursor: pointer; border: none;
}
.pk-title { font-size: 18px; font-weight: 900; margin-bottom: 4px; }
.pk-subtitle { font-size: 12px; opacity: 0.8; }
.pk-vs {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; padding: 20px; position: relative;
}
.pk-player {
    text-align: center; flex: 1;
}
.pk-player img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid #f0f0f0; }
.pk-player .pkp-name { font-size: 13px; font-weight: 700; margin-top: 6px; color: #333; }
.pk-player .pkp-stats { font-size: 11px; color: #999; margin-top: 2px; }
.pk-vs-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, #FFD54F, #FFA000);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 900; color: #fff;
    flex-shrink: 0;
}
.pk-guess-select {
    padding: 0 20px 16px;
}
.pk-guess-label { font-size: 12px; font-weight: 700; color: #999; margin-bottom: 8px; }
.pk-guess-list { display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; }
.pk-guess-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 12px;
    border: 1.5px solid #f0f0f0; cursor: pointer;
    transition: all 0.15s; background: #fff;
}
.pk-guess-item:active { transform: scale(0.98); }
.pk-guess-item.selected { border-color: #FF5722; background: rgba(255,87,34,0.04); }
.pk-guess-item .pgi-icon { font-size: 20px; }
.pk-guess-item .pgi-title { font-size: 13px; font-weight: 600; color: #333; flex: 1; }
.pk-guess-item .pgi-meta { font-size: 10px; color: #999; }
.pk-guess-item .pgi-check { color: transparent; font-size: 14px; }
.pk-guess-item.selected .pgi-check { color: #FF5722; }
.pk-footer {
    padding: 0 20px 20px; display: flex; gap: 10px;
}
.pk-footer .btn { flex: 1; height: 44px; border-radius: 22px; font-size: 14px; font-weight: 700; border: none; cursor: pointer; }
.pk-footer .btn-cancel { background: #f5f5f5; color: #666; }
.pk-footer .btn-pk { background: linear-gradient(135deg, #FF5722, #FF9800); color: #fff; }
.pk-footer .btn-pk:active { opacity: 0.85; }

/* ===== PK SUCCESS ===== */
.pk-success {
    text-align: center; padding: 24px 20px 20px;
}
.pk-success .pks-icon { font-size: 56px; margin-bottom: 8px; }
.pk-success .pks-title { font-size: 18px; font-weight: 800; color: #333; margin-bottom: 4px; }
.pk-success .pks-desc { font-size: 13px; color: #999; margin-bottom: 16px; }

/* ===== 添加好友 Modal ===== */
.fr-add-overlay { z-index: 600; }
.fr-add-modal { max-height: 80vh; display: flex; flex-direction: column; }
.fr-add-search-wrap { padding: 12px 16px; background: #fff; border-bottom: 1px solid #f0f0f0; }
.fr-add-results { flex: 1; overflow-y: auto; max-height: 320px; min-height: 120px; }
.fr-add-empty {
    text-align: center; padding: 40px 20px; color: #ccc;
}
.fr-add-empty i { font-size: 36px; margin-bottom: 12px; display: block; opacity: 0.4; }
.fr-add-empty .fe-title { font-size: 14px; font-weight: 700; color: #999; margin-bottom: 4px; }
.fr-add-empty .fe-desc { font-size: 12px; color: #bbb; }
.fr-add-list { padding-bottom: 16px; }
.fr-add-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: #fff; margin-bottom: 1px;
    transition: background 0.15s;
}
.fr-add-card:active { background: #fafafa; }
.fr-add-card .fr-avatar { width: 44px; height: 44px; }
.fr-add-card .fr-name { font-size: 14px; }
.fr-add-card .fr-meta { font-size: 11px; }
.fr-add-card .fr-btn-add { height: 28px; padding: 0 12px; font-size: 11px; }
.fr-add-card .fr-btn-add:disabled { opacity: 0.6; cursor: not-allowed; }
