/* ============================================================
   作者信息卡片 - AeroCore Theme Component
   ============================================================ */

.author-card {
    --avatar-size: 100px;
    --bg-height: 110px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

/* 背景 */
.author-card-bg-section {
    position: absolute;
    inset: 0;
    height: var(--bg-height);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.author-card-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.author-card-bg::before,
.author-card-bg::after {
    content: '';
    position: absolute;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10,50 Q25,20 50,50 T90,50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    background-size: 200px;
    opacity: 0.3;
}
.author-card-bg::before { top: 20%; left: -10%; width: 60%; height: 60%; transform: rotate(15deg); }
.author-card-bg::after  { bottom: -20%; right: -10%; width: 50%; height: 50%; transform: rotate(-20deg); }

/* ============================================================
   Header: 昵称 | 头像 | 签名
   ============================================================ */
.author-card-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding-top: 110px;
    padding-bottom: 0;
    padding-left: 12px;
    padding-right: 12px;
}

.author-header-left  { flex: 1; text-align: right; padding-right: 8px; padding-bottom: 12px; max-width: calc(50% - 54px); }
.author-header-center { width: 108px; flex-shrink: 0; display: flex; justify-content: center; }
.author-header-right { flex: 1; text-align: center; padding-left: 8px; padding-bottom: 6px; max-width: calc(50% - 54px); }

/* ============================================================
   头像
   ============================================================ */
.author-card-avatar {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: calc(var(--avatar-size) / -2);
}

/* ============================================================
   昵称
   ============================================================ */
.author-card-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.admin-badge { width: 0.8em; height: 0.8em; flex-shrink: 0; }

/* ============================================================
   签名（≤8字单行，>8字双行居中）
   ============================================================ */
.author-card-bio {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    text-align: center;
}

.bio-single { white-space: nowrap; }
.bio-double { display: flex; flex-direction: column; align-items: center; }
.bio-double span { white-space: nowrap; display: block; }

/* ============================================================
   Body: 统计 + 社交
   ============================================================ */
.author-card-body { padding: 12px 20px 20px; text-align: center; }

/* 统计 */
.author-card-stats { display: flex; justify-content: space-between; margin-bottom: 14px; padding: 8px 0; }
.author-card-stat  { flex: 1; display: flex; flex-direction: column; align-items: center; }
.stat-value { font-size: 0.9rem; font-weight: 700; color: var(--text-tertiary); line-height: 1; }
.stat-label { font-size: 0.85rem; color: var(--text-tertiary); margin-top: 5px; }

/* 社交图标 */
.author-card-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.social-rows { flex-direction: column; align-items: center; gap: 10px; }
.social-row  { display: flex; justify-content: center; gap: 12px; }

.social-link-wrapper { position: relative; }

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-decoration: none;
}
.social-link:hover { transform: translateY(-3px); color: #fff; }
.social-link svg { width: 16px; height: 16px; }

/* 各平台颜色 */
.social-qq       { background: #12b7f5; color: #fff; }
.social-qq:hover       { box-shadow: 0 4px 12px rgba(18, 183, 245, 0.4); }
.social-wechat  { background: #07c160; color: #fff; }
.social-wechat:hover   { box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4); }
.social-bilibili{ background: #00aeec; color: #fff; }
.social-bilibili:hover  { box-shadow: 0 4px 12px rgba(0, 174, 236, 0.4); }
.social-weibo   { background: #e6162d; color: #fff; }
.social-weibo:hover     { box-shadow: 0 4px 12px rgba(230, 22, 45, 0.4); }
.social-github  { background: #333;    color: #fff; }
.social-github:hover    { box-shadow: 0 4px 12px rgba(51, 51, 51, 0.4); }
.social-rss     { background: #ff6600; color: #fff; }
.social-rss:hover       { box-shadow: 0 4px 12px rgba(255, 102, 0, 0.4); }
.social-csdn    { background: #fc5531; color: #fff; }
.social-csdn:hover      { box-shadow: 0 4px 12px rgba(252, 85, 49, 0.4); }
.social-email   { background: var(--theme-color); color: #fff; }
.social-email:hover     { box-shadow: 0 4px 12px rgba(var(--theme-color-rgb, 102, 126, 234), 0.4); }

/* 微信二维码弹窗 */
.wechat-qrcode-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-card);
    padding: 12px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}
.wechat-qrcode-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--bg-card);
}
.social-link-wrapper:hover .wechat-qrcode-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}
.wechat-qrcode-popup img { width: 140px; height: 140px; object-fit: contain; display: block; border-radius: 4px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 480px) {
    .author-card { --avatar-size: 80px; --bg-height: 90px; }
    .author-card-header     { padding-left: 8px; padding-right: 8px; }
    .author-card-name       { font-size: 1.1rem; }
    .author-card-bio        { font-size: 0.75rem; }
    .author-card-body       { padding: 10px 12px 16px; }
    .stat-value             { font-size: 0.85rem; }
    .stat-label             { font-size: 0.78rem; }
    .author-card-social,
    .social-row             { gap: 10px; }
    .social-link            { width: 28px; height: 28px; }
    .social-link svg        { width: 14px; height: 14px; }
}
