/* ================================================================
   朋友圈 - 前端样式
   仿微信朋友圈风格 - Pixel-perfect WeChat Moments UI
   ================================================================ */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    background-color: #ededed;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: #576b95;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

input, button, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    -webkit-appearance: none;
    border: none;
    background: none;
}

button {
    cursor: pointer;
}

/* === Top Navigation Bar === */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background-color: #2e2e2e;
    z-index: 100;
}

.top-nav-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 12px;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-avatar img,
.nav-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.nav-title {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-right: 28px; /* balance the avatar width for true centering */
}

/* === Cover Section === */
.cover {
    position: relative;
    height: 320px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: cover;
    background-position: center;
    overflow: visible;
}

.cover-inner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 16px;
}

.cover-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.25) 75%,
        rgba(0, 0, 0, 0.55) 100%
    );
    z-index: 1;
}

.cover-user {
    position: absolute;
    bottom: -32px;
    right: 16px;
    display: flex;
    align-items: center;
    z-index: 2;
}

.cover-name {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    margin-right: 12px;
    line-height: 1.3;
}

.cover-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: #c8c8c8;
}

.cover-avatar img,
.cover-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* === Moments Feed === */
.moments-feed {
    background: #fff;
    min-height: 50vh;
    padding-top: 48px;
}

/* === Post Card === */
.post-card {
    padding: 15px 15px 12px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: flex-start;
}

.post-card:last-child {
    border-bottom: none;
}

/* === Post Avatar === */
.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 12px;
    background: #f0f0f0;
}

.post-avatar img,
.post-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* === Post Body (right of avatar) === */
.post-body {
    flex: 1;
    min-width: 0;
}

/* Nickname */
.post-nickname {
    color: #576b95;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
    display: inline-block;
    margin-bottom: 4px;
    word-break: break-all;
}

/* Top/Pinned tag */
.post-top-tag {
    display: inline-block;
    background: #ff5722;
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    line-height: 1.4;
    vertical-align: middle;
    margin-left: 6px;
    font-weight: normal;
}

/* V verified badge (评论区站长标识) */
.comment-v-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #1da1f2;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 3px;
    line-height: 1;
    font-style: normal;
}

/* Post text content */
.post-content {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    word-break: break-all;
    white-space: pre-wrap;
    margin-bottom: 8px;
}

/* 折叠状态：固定高度 + 溢出隐藏（按视觉高度截断，不限字符数） */
.post-content-collapsed {
    max-height: 9.6em;  /* 6 行 × 1.6 line-height */
    overflow: hidden;
}

.post-content-toggle {
    display: inline-block;
    color: #576b95;
    font-size: 14px;
    margin-bottom: 8px;
    cursor: pointer;
}

.post-content-toggle:active {
    opacity: 0.7;
}

/* === Image Grid === */
.post-images {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 420px;
    margin-bottom: 8px;
}

.post-images .img-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #f5f5f5;
    border-radius: 2px;
}

.post-images .img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 3+ images: 3-column grid */
.post-images.img-count-multi {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 100%;
}

.post-images.img-count-multi .img-item {
    aspect-ratio: 1 / 1;
}

/* 2 images: 2 columns, square */
.post-images.img-count-2 .img-item {
    width: calc(50% - 2px);
    aspect-ratio: 1 / 1;
}

/* 1 image: natural aspect ratio, max 200px wide */
.post-images.img-count-1 {
    max-width: 200px;
}

.post-images.img-count-1 .img-item {
    width: auto;
    height: auto;
    padding-bottom: 0;
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
}

.post-images.img-count-1 .img-item img {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
}

/* === Post Footer Row === */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
    position: relative;
    flex-wrap: wrap;
}

.post-location {
    width: 100%;
    color: #576b95;
    font-size: 12px;
    line-height: 1.4;
    padding-bottom: 8px;
}

.post-time {
    color: #b2b2b2;
    font-size: 12px;
    line-height: 1;
}

/* === Interaction Bar (WeChat style: pops up left of the 3-dot button) === */
.post-interact-bar {
    position: absolute;
    right: 42px; /* 留出 menu-btn 的空间 */
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    background-color: #4c4c4c;
    border-radius: 4px;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.post-interact-bar.active {
    display: flex;
}

.interact-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 22px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: background 0.15s;
}

.interact-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

.interact-btn + .interact-btn {
    border-left: 1px solid #5a5a5a;
}

.interact-btn svg {
    flex-shrink: 0;
}

/* === Menu Button (three dots) === */
.menu-btn {
    position: relative;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1;
    transition: background 0.15s;
    z-index: 11;
}

.menu-btn:active {
    background: #e0e0e0;
}

.menu-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #555;
}

/* === Interaction Popup === */
.interact-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background-color: #4c4c4c;
    border-radius: 6px;
    display: flex;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    animation: popupFadeIn 0.15s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Triangle arrow pointing up - position set via --triangle-left CSS variable from JS */
.interact-popup::before {
    content: '';
    position: absolute;
    top: -7px;
    left: var(--triangle-left, auto);
    right: 16px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #4c4c4c;
}

.popup-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    user-select: none;
}

.popup-item:first-child {
    border-radius: 6px 0 0 6px;
}

.popup-item:last-child {
    border-radius: 0 6px 6px 0;
}

.popup-item + .popup-item {
    border-left: 1px solid #5a5a5a;
}

.popup-item:active {
    background: rgba(255, 255, 255, 0.15);
}

.popup-item svg {
    flex-shrink: 0;
}

.popup-item.liked {
    color: #07c160;
}

.popup-item.liked svg {
    fill: #07c160;
}

/* === Likes & Comments Section === */
.post-interactions {
    background-color: #f7f7f7;
    border-radius: 4px;
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 14px;
}

/* Likes row */
.likes-row {
    display: flex;
    align-items: flex-start;
    padding: 2px 0;
    line-height: 1.6;
}

.likes-row .heart-icon {
    flex-shrink: 0;
    margin-right: 6px;
    margin-top: 3px;
    display: flex;
    align-items: center;
}

.like-names {
    color: #576b95;
    word-break: break-all;
}

.like-names .liker-name + .liker-name::before {
    content: ',';
    margin-right: 2px;
    color: #999;
}

/* Divider between likes and comments */
.interact-divider {
    height: 1px;
    background-color: #e5e5e5;
    margin: 6px 0;
}

/* Comments list */
.comments-list {
    /* container */
}

/* Single comment item */
.comment-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    padding: 3px 0;
    line-height: 1.6;
    cursor: pointer;
    border-radius: 2px;
}

.comment-item:active {
    background-color: rgba(0, 0, 0, 0.04);
}

.comment-item .cmt-nickname {
    color: #576b95;
    cursor: pointer;
}

.comment-item .cmt-nickname:active {
    opacity: 0.7;
}

.comment-item .cmt-text {
    color: #333;
    cursor: pointer;
    white-space: pre-wrap;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.comment-item .cmt-text:active {
    opacity: 0.7;
}

.comment-item .reply-to {
    color: #576b95;
}

/* Prefix wrapper: nickname + badge + colon */
.cmt-prefix {
    white-space: nowrap;
    flex-shrink: 0;
}

.comment-item .reply-sep {
    color: #333;
}

/* Comment thread: top-level comment + its replies */
.comment-thread {
    /* wrapper for one top-level comment and its replies */
}

/* Separator between top-level comments */
.comment-separator {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin: 6px 0;
}

/* Replies container (indented under parent) */
.comment-replies {
    margin-left: 0;
    padding-left: 12px;
    border-left: 2px solid rgba(87, 107, 149, 0.15);
    margin-top: 2px;
}

/* Reply item styling */
.reply-item {
    padding: 3px 0;
}

/* === Image Preview Overlay === */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    flex-direction: column;
    cursor: default;
}

.image-preview-overlay.active {
    display: flex;
}

.image-preview-close {
    position: absolute;
    top: 10px;
    right: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 36px;
    cursor: pointer;
    z-index: 1002;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.image-preview-close:active {
    background: rgba(255, 255, 255, 0.1);
}

.image-preview-counter {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    z-index: 1001;
    pointer-events: none;
}

/* 左右切换按钮 */
.image-preview-prev,
.image-preview-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 28px;
    cursor: pointer;
    z-index: 1002;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.2s, opacity 0.2s;
    user-select: none;
}

.image-preview-prev {
    left: 16px;
}

.image-preview-next {
    right: 16px;
}

.image-preview-prev:hover,
.image-preview-next:hover {
    background: rgba(0, 0, 0, 0.6);
}

.image-preview-prev:active,
.image-preview-next:active {
    background: rgba(0, 0, 0, 0.8);
}

.image-preview-prev.disabled,
.image-preview-next.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* 手机端隐藏导航按钮（使用滑动即可） */
@media (max-width: 768px) {
    .image-preview-prev,
    .image-preview-next {
        display: none;
    }
}

.image-preview-swipe {
    flex: 1;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.image-preview-swipe::-webkit-scrollbar {
    display: none;
}

.image-preview-wrapper {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    padding: 50px 16px 20px;
}

.image-preview-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* === Comment Input Bar === */
.comment-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 8px 10px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 200;
    display: none;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.comment-bar.active {
    display: block;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.comment-bar-inner {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 750px;
    margin: 0 auto;
}

.comment-nickname {
    width: 72px;
    height: 34px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 13px;
    color: #333;
    background: #fafafa;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.comment-nickname:focus {
    border-color: #07c160;
    background: #fff;
}

.comment-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 34px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    background: #fafafa;
    overflow: hidden;
    transition: border-color 0.2s;
}

.comment-input-wrap:focus-within {
    border-color: #07c160;
    background: #fff;
}

.reply-hint {
    color: #576b95;
    font-size: 12px;
    white-space: nowrap;
    margin-right: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.reply-cancel {
    margin-left: 4px;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.reply-cancel:active {
    background: #e0e0e0;
}

.comment-content {
    flex: 1;
    border: none;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    background: transparent;
    min-width: 0;
    resize: none;
    min-height: 34px;
    max-height: 120px;
    padding: 0;
    overflow-y: auto;
    font-family: inherit;
}

.comment-content::placeholder {
    color: #bbb;
}

.comment-cancel-btn {
    display: none;
    height: 34px;
    padding: 0 14px;
    background-color: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.comment-cancel-btn:active {
    background-color: #e0e0e0;
}

.comment-send-btn {
    height: 34px;
    padding: 0 16px;
    background-color: #07c160;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
    transition: background 0.2s;
}

.comment-send-btn:active {
    background-color: #06ad56;
}

.comment-send-btn:disabled {
    background-color: #a5d6b7;
    cursor: not-allowed;
}

/* === Site Footer === */
.site-footer {
    text-align: center;
    padding: 24px 16px 32px;
    color: #b0b0b0;
    font-size: 12px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.site-footer p {
    margin: 4px 0;
}

.footer-icp,
.footer-police {
    font-size: 12px;
    color: #b0b0b0;
}

.footer-icp a,
.footer-police a {
    color: #b0b0b0;
    text-decoration: none;
}

.footer-icp a:hover,
.footer-police a:hover {
    color: #576b95;
}

/* === Loading & Status === */
.load-more-btn {
    text-align: center;
    padding: 16px 0 24px;
    color: #576b95;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
}

.load-more-btn:active {
    opacity: 0.6;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #07c160;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-more {
    text-align: center;
    padding: 16px 0 24px;
    color: #c0c0c0;
    font-size: 13px;
}

.no-more::before,
.no-more::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 1px;
    background: #ddd;
    vertical-align: middle;
    margin: 0 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #c0c0c0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
}

.empty-icon {
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 14px;
}

/* === Toast Notification === */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.72);
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 2000;
    pointer-events: none;
    animation: toastFade 2s ease-in-out forwards;
    white-space: nowrap;
}

@keyframes toastFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* === Responsive === */
@media screen and (max-width: 480px) {
    .cover {
        height: 260px;
    }

    .cover-name {
        font-size: 16px;
    }

    .cover-avatar {
        width: 56px;
        height: 56px;
        border-radius: 6px;
    }

    .cover-user {
        bottom: -28px;
    }

    .post-images {
        max-width: 280px;
    }

    .post-images.img-count-1 {
        max-width: 160px;
    }

    .post-images.img-count-1 .img-item img {
        max-width: 160px;
    }

    .post-card {
        padding: 12px 12px 10px;
    }

    .post-avatar {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }

    .post-nickname {
        font-size: 14px;
    }

    .post-content {
        font-size: 14px;
    }

    .post-interactions {
        font-size: 13px;
    }

    .comment-nickname {
        width: 64px;
        font-size: 12px;
    }
}

@media screen and (max-width: 360px) {
    .cover {
        height: 220px;
    }

    .cover-avatar {
        width: 48px;
        height: 48px;
    }

    .cover-user {
        bottom: -24px;
    }

    .post-images {
        max-width: 240px;
    }

    .post-images.img-count-1 {
        max-width: 140px;
    }

    .post-images.img-count-1 .img-item img {
        max-width: 140px;
    }
}

@media screen and (min-width: 768px) {
    .cover {
        max-width: 680px;
        margin: 0 auto;
        border-radius: 0;
    }

    .cover-inner {
        padding: 0 20px;
    }

    .post-card {
        padding: 15px 20px 12px;
        max-width: 680px;
        margin: 0 auto;
    }

    .moments-feed,
    .links-page {
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
    }

    .load-more-btn,
    .no-more,
    .empty-state,
    .site-footer {
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
    }

    .comment-bar-inner {
        max-width: 680px;
    }
}

/* ================================================================
   友情链接页面样式
   ================================================================ */

/* 整体白色背景卡片（复刻首页 .moments-feed 风格） */
.links-page {
    background: #fff;
    min-height: 50vh;
    padding-top: 48px;
    max-width: 680px;
    margin: 0 auto;
}

.links-card {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px 24px;
}

.links-header {
    text-align: center;
    padding: 8px 0 24px;
}

.links-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.links-subtitle {
    font-size: 13px;
    color: #999;
}

/* 4 列网格布局 */
.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* 平板：降到 3 列 */
@media screen and (max-width: 768px) {
    .links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 单个链接卡片 */
.link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f8fa;
    border-radius: 12px;
    padding: 14px 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    overflow: hidden;
}

.link-card:hover {
    background: #eef1f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.link-card:active {
    background: #e5e8ec;
}

/* 文字区域（左侧对齐，仿 post-body） */
.link-card-body {
    flex: 1;
    min-width: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.link-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-card-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

/* 友情链接空状态 */
.links-empty {
    text-align: center;
    padding: 48px 20px;
}

.links-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.links-empty p {
    font-size: 14px;
    color: #ccc;
}

/* 底部链接区 */
.footer-links {
    margin-top: 6px;
}

.footer-links a {
    color: #576b95;
    font-size: 13px;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ===== 友情链接响应式 ===== */
@media screen and (max-width: 480px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .link-card {
        padding: 10px 8px;
    }

    .link-card-name {
        font-size: 13px;
    }

    .link-card-desc {
        font-size: 11px;
    }

    .links-card {
        padding: 0 8px 16px;
    }
}

/* ================================================================
   好友申请区样式
   ================================================================ */

/* 分割线（细线 + 上下留白） */
.links-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 20px 0;
}

/* 好友申请帖：去掉底部边框（申请列表紧贴下面） */
.post-card.friend-apply-post {
    border-bottom: none;
    padding-bottom: 0;
}

/* 申请列表内的空状态和加载态 */
.application-loading {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: #999;
}

.application-empty {
    text-align: center;
    padding: 20px 16px;
    font-size: 13px;
    color: #ccc;
}

/* 响应式 */
@media screen and (max-width: 480px) {
    .application-empty {
        padding: 16px 10px;
    }
}
