/* ==================== 友链页 ==================== */
.links-page {
    color: #4a5560;
    font-size: 14.5px;
    line-height: 1.85;
}

html.dark-mode .links-page {
    color: #c3c8d2;
}

.links-intro {
    margin: 0 0 22px;
    color: #78889a;
    font-size: 13.5px;
}

html.dark-mode .links-intro {
    color: #9aa0ac;
}

/* ---------- 友链卡片网格 ---------- */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
    gap: 13px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid rgba(var(--accent-rgb), 0.16);
    border-radius: 14px;
    background: rgba(var(--accent-rgb), 0.035);
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: inherit;
}

/* RSS 订阅小图标（卡片右侧） */
.link-rss {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 9px;
    color: #b6c2ce;
    font-size: 11.5px;
    text-decoration: none !important;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.link-rss:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    transform: scale(1.08);
}

html.dark-mode .link-rss {
    color: #6f7885;
}

html.dark-mode .link-rss:hover {
    color: #241a22;
}

.link-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), 0.42);
    background: rgba(var(--accent-rgb), 0.075);
    box-shadow: 0 10px 24px rgba(30, 45, 70, 0.13);
}

html.dark-mode .link-card {
    border-color: rgba(var(--accent-rgb), 0.2);
    background: rgba(var(--accent-rgb), 0.055);
}

html.dark-mode .link-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}

.link-avatar {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.18);
}

.link-body {
    min-width: 0;
}

.link-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--accent-deep);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark-mode .link-name {
    color: var(--accent-light);
}

.link-desc {
    margin-top: 2px;
    font-size: 12px;
    color: #8d9aa8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.dark-mode .link-desc {
    color: #8d93a0;
}

/* ---------- 空态 ---------- */
.links-empty {
    padding: 34px 20px;
    text-align: center;
    color: #9aa8b6;
    border: 1px dashed rgba(var(--accent-rgb), 0.26);
    border-radius: 16px;
    margin-top: 6px;
}

.links-empty i {
    font-size: 26px;
    color: rgba(var(--accent-rgb), 0.5);
    margin-bottom: 10px;
}

.links-empty p {
    margin: 0;
    font-size: 13px;
}

html.dark-mode .links-empty {
    color: #8d93a0;
    border-color: rgba(var(--accent-rgb), 0.24);
}

/* ---------- 申请友链 ---------- */
.links-apply {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid rgba(var(--accent-rgb), 0.14);
}

.links-apply h2 {
    font-size: 17px;
    margin: 0 0 12px;
    color: #37424e;
    display: flex;
    align-items: center;
    gap: 9px;
}

.links-apply h2 i {
    font-size: 15px;
    color: var(--accent);
}

html.dark-mode .links-apply h2 {
    color: #d5d9e0;
}

.links-apply > p {
    margin: 0 0 14px;
    font-size: 13.5px;
    color: #78889a;
}

html.dark-mode .links-apply > p {
    color: #9aa0ac;
}

.apply-box {
    border: 1px solid rgba(var(--accent-rgb), 0.16);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.apply-row {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    font-size: 13px;
    background: rgba(var(--accent-rgb), 0.035);
}

.apply-row + .apply-row {
    border-top: 1px solid rgba(var(--accent-rgb), 0.11);
}

.apply-row span {
    flex: 0 0 108px;
    color: #9aa8b6;
}

.apply-row b {
    font-weight: 500;
    color: #5b6875;
}

html.dark-mode .apply-row {
    background: rgba(var(--accent-rgb), 0.055);
}

html.dark-mode .apply-row b {
    color: #b9c0cc;
}

.apply-mine {
    font-size: 13px;
    color: #78889a;
    background: rgba(var(--accent-rgb), 0.05);
    border-radius: 11px;
    padding: 11px 14px;
    margin: 0 0 16px;
    line-height: 2;
}

.apply-mine b {
    color: var(--accent-deep);
}

html.dark-mode .apply-mine {
    color: #9aa0ac;
}

html.dark-mode .apply-mine b {
    color: var(--accent-light);
}

.apply-mail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.apply-mail:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 9px 22px rgba(var(--accent-rgb), 0.38);
}

.apply-mail i {
    font-size: 13px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 560px) {
    .links-grid { grid-template-columns: 1fr; }
    .apply-row { flex-direction: column; align-items: flex-start; gap: 2px; }
    .apply-row span { flex: none; font-size: 12px; }
}

/* 复制成功后的按钮状态 */
.apply-mail.copied {
    background: linear-gradient(135deg, #5ec48a, #3fa96b) !important;
    box-shadow: 0 6px 16px rgba(63, 169, 107, 0.35) !important;
}

html.dark-mode .apply-mail.copied {
    color: #10241a !important;
}

/* 按钮下方的小提示 */
.apply-mail-tip {
    margin: 9px 0 0;
    font-size: 12.5px;
    color: #9aa8b6;
    line-height: 1.7;
}

html.dark-mode .apply-mail-tip {
    color: #8d93a0;
}
