/* ==================== 好友系统（仙缘）- 样式表 ==================== */

/* --- 好友入口按钮 --- */
.social-entry-btn {
    position: fixed; bottom: 20px; left: 75%; z-index: 100;
    cursor: pointer; transition: transform 0.3s; text-align: center;
}
.social-entry-btn:hover { transform: scale(1.15); }
.social-entry-icon {
    width: 50px; height: 50px;
    background: rgba(10,31,51,0.85); border: 2px solid rgba(100,200,255,0.6);
    border-radius: 10px; display: flex; justify-content: center; align-items: center;
    font-size: 28px; box-shadow: 0 0 12px rgba(100,200,255,0.3); position: relative;
}
.social-entry-label {
    color: #64c8ff; font-size: 11px; margin-top: 2px;
    text-shadow: 0 0 6px rgba(100,200,255,0.5); font-weight: bold;
}
.social-red-dot {
    position: absolute; top: -2px; right: -2px; width: 10px; height: 10px;
    background: #ff0000; border-radius: 50%; border: 1px solid #fff;
    box-shadow: 0 0 6px red; display: none;
    animation: socialBreath 1.5s ease-in-out infinite;
}
@keyframes socialBreath {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

/* --- 好友面板（居中弹窗） --- */
.social-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 500;
    display: flex; justify-content: center; align-items: center;
}
.social-window {
    width: 90%; max-width: 500px; height: 70vh; max-height: 550px;
    background: #0a1f33; border: 2px solid #444;
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
    border-radius: 16px; display: flex; flex-direction: column; overflow: hidden;
}
.social-header {
    padding: 14px 20px; display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(to bottom, #1a4261, #0a1f33);
    border-radius: 16px 16px 0 0; border-bottom: 1px solid #333; flex-shrink: 0;
}
.social-title { color: #ffcc66; font-weight: bold; font-size: 16px; letter-spacing: 2px; }
.social-close { cursor: pointer; font-size: 22px; color: #fff; opacity: 0.7; }
.social-close:hover { opacity: 1; }

/* Tab栏 */
.social-tabs { display: flex; gap: 16px; }
.social-tab {
    color: #aaa; cursor: pointer; font-weight: bold; font-size: 14px;
    padding-bottom: 4px; border-bottom: 2px solid transparent; transition: 0.3s;
}
.social-tab:hover { color: #ffcc66; }
.social-tab.active { color: #ffcc66; border-bottom-color: #ffcc66; text-shadow: 0 0 10px rgba(255,204,102,0.5); }

/* 搜索区 */
.social-search-wrap {
    padding: 12px 16px; border-bottom: 1px solid rgba(139,109,69,0.2); flex-shrink: 0;
}
.social-search-input {
    width: 100%; padding: 10px 14px; border: 1px solid #8b6d45; border-radius: 20px;
    background: rgba(255,255,255,0.5); outline: none; box-sizing: border-box;
    font-size: 13px; color: #3d2a1a;
}
.social-search-input::placeholder { color: #999; }

/* 内容区（卷轴质感） */
.social-body {
    flex: 1; background: #e6ce9e; box-shadow: inset 0 0 30px #d4b47c;
    overflow-y: auto; padding: 10px;
}

/* 好友卡片 */
.social-card {
    display: flex; align-items: center; background: rgba(255,255,255,0.3);
    margin-bottom: 8px; padding: 12px; border-radius: 8px;
    border: 1px solid transparent; transition: 0.2s;
}
.social-card:hover { border-color: #8b6d45; background: rgba(255,255,255,0.5); }

.social-avatar {
    width: 42px; height: 42px; border-radius: 50%; border: 2px solid #8b6d45;
    background: #5a4a3a; margin-right: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
}

.social-info { flex: 1; min-width: 0; }
.social-name { font-weight: bold; font-size: 14px; color: #3d2a1a; }
.social-status { font-size: 11px; margin-top: 2px; }
.social-online { color: #2e7d32; }
.social-offline { color: #888; }

/* 操作按钮组 */
.social-actions { display: flex; gap: 6px; flex-shrink: 0; }
.social-act-btn {
    padding: 4px 10px; border: 1px solid #8b6d45; border-radius: 4px;
    background: #fff; cursor: pointer; font-size: 11px; font-weight: bold;
    color: #3d2a1a; transition: 0.2s;
}
.social-act-btn:hover { background: #ffcc66; color: #000; }
.social-act-btn.danger { border-color: #f44336; color: #f44336; }
.social-act-btn.danger:hover { background: #f44336; color: #fff; }
.social-act-btn.primary { border-color: #2e7d32; color: #2e7d32; }
.social-act-btn.primary:hover { background: #2e7d32; color: #fff; }

/* 申请列表卡片 */
.social-request-card {
    display: flex; align-items: center; background: rgba(255,204,102,0.1);
    margin-bottom: 8px; padding: 12px; border-radius: 8px;
    border: 1px solid rgba(255,204,102,0.3);
}

/* 名字颜色分级（基于weekly_lv14_count等级） */
.social-lvl-0 { color: #ffffff; }
.social-lvl-1 { color: #cccccc; }
.social-lvl-2, .social-lvl-3, .social-lvl-4, .social-lvl-5 { color: #60a5fa; font-weight: bold; }
.social-lvl-6 { color: #a855f7; font-weight: bold; }
.social-lvl-7 { color: #ff8c00; font-weight: bold; }
.social-lvl-8 {
    background: linear-gradient(90deg, #ff8c00, #ffd700, #ff8c00);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: socialShine 3s linear infinite; font-weight: bold;
}
.social-lvl-9 {
    background: linear-gradient(90deg, #a855f7, #d8b4fe, #a855f7);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: socialShine 3s linear infinite; font-weight: bold;
}
.social-lvl-10 {
    background: linear-gradient(90deg, #22c55e, #86efac, #22c55e);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: socialShine 3s linear infinite; font-weight: bold;
}
.social-lvl-11 {
    background: linear-gradient(90deg, #ec4899, #f9a8d4, #ec4899);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: socialShine 3s linear infinite; font-weight: bold;
}
.social-lvl-12 {
    background: linear-gradient(90deg, #ffd700, #ffaa00, #ffd700, #ffee00, #ffd700);
    background-size: 300% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: socialShine 4s linear infinite; font-weight: 900;
    filter: drop-shadow(0 0 3px rgba(255,215,0,0.5));
}
@keyframes socialShine { to { background-position: 200% center; } }

/* 空状态 */
.social-empty {
    text-align: center; color: #999; padding: 40px 20px; font-size: 13px;
}

/* 右下角通知弹窗（好友上下线） */
.social-toast {
    position: fixed; right: 20px; bottom: 80px; z-index: 9000;
    background: rgba(10,31,51,0.95); border: 1px solid #ffcc66;
    border-radius: 8px; padding: 12px 18px; color: #ffcc66;
    font-size: 13px; box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: socialToastIn 0.3s ease-out;
    max-width: 250px;
}
.social-toast.fade-out { animation: socialToastOut 0.5s ease-in forwards; }
@keyframes socialToastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes socialToastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }
