/* 主题颜色变量 */
:root {
    /* 亮色主题 - 跨性别配色 */
    --bg-primary: #f0f5ff;
    --bg-gradient: linear-gradient(135deg, rgba(91, 206, 250, 0.1) 0%, rgba(255, 255, 255, 0.3) 30%, rgba(245, 169, 184, 0.2) 60%);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-shadow: rgba(91, 206, 250, 0.15);
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-light: #eee;
    
    --blue-primary: #5bcefa;
    --blue-secondary: #6ca2f5;
    --blue-dark: #5b86e5;
    
    --pink-primary: #f5a9b8;
    --pink-secondary: #f591b2;
    --pink-dark: #f075a1;
    
    --white-overlay: rgba(255, 255, 255, 0.25);
    --white-overlay-hover: rgba(255, 255, 255, 0.4);
}

/* 暗色主题色彩变量 */
.dark-theme {
    --bg-primary: #121212;
    --bg-gradient: linear-gradient(135deg, rgba(32, 32, 35, 1) 0%, rgba(21, 21, 26, 1) 50%, rgba(27, 27, 36, 1) 100%);
    --card-bg: rgba(30, 30, 35, 0.8);
    --card-shadow: rgba(0, 0, 0, 0.4);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #707070;
    --border-light: #2a2a2a;
    
    --blue-primary: #5682d8;
    --blue-secondary: #4169c8;
    --blue-dark: #3861c0;
    
    --pink-primary: #c86fa3;
    --pink-secondary: #af5a8c;
    --pink-dark: #9a4e7b;
    
    --white-overlay: rgba(255, 255, 255, 0.1);
    --white-overlay-hover: rgba(255, 255, 255, 0.15);
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    right: 20px;
    top: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

.theme-toggle i {
    font-size: 18px;
    color: var(--text-secondary);
}
/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding: clamp(10px, 2vw, 20px);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden; /* 防止水平滚动 */
    width: 100%;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: clamp(10px, 2vw, 20px);
    overflow-x: hidden; /* 防止水平滚动 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .profile-card {
        width: 100%;
        padding: 15px;
        margin: 0;
        border-radius: 12px;
    }
    
    .profile-content {
        flex-direction: column;
        width: 100%;
    }
    
    .left-column {
        margin-right: 0;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .right-column {
        width: 100%;
    }
    
    .content-row {
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }
    
    .blog-section, .friends-section {
        width: 100%;
        padding: 15px;
        margin: 0;
        border-radius: 12px;
    }

    /* 移动端文章列表优化 */
    .post-list {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 5px;
        width: 100%;
        overflow-x: hidden;
    }

    .post-item {
        padding: 12px;
        margin-bottom: 10px;
        width: 100%;
        overflow-x: hidden;
    }

    .post-header {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .post-category {
        margin-bottom: 0;
    }

    .post-title {
        font-size: 15px;
        -webkit-line-clamp: 1;
        flex: 1;
        min-width: 0; /* 修复flex布局下的溢出问题 */
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .post-date {
        font-size: 11px;
        margin-left: auto;
        white-space: nowrap;
    }

    .post-arrow {
        margin-left: 8px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .post-content {
        font-size: 13px;
        padding: 10px;
        margin-top: 10px;
        background-color: var(--card-bg);
        border-radius: 8px;
        border: 1px solid var(--border-light);
        width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
    }

    /* 移动端相册优化 */
    .gallery-item {
        padding: 10px;
        width: 100%;
        overflow-x: hidden;
    }

    .gallery-image {
        max-height: 250px;
        object-fit: cover;
        width: 100%;
    }

    .gallery-description {
        font-size: 13px;
        padding: 8px;
        width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
    }

    /* 移动端社交链接优化 */
    .social-card {
        padding: 12px;
        width: 100%;
        overflow-x: hidden;
    }

    .social-info {
        flex: 1;
        min-width: 0; /* 修复flex布局下的溢出问题 */
    }

    .social-info h3 {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .social-info p {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .social-count {
        font-size: 11px;
        padding: 3px 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* 移动端好友列表优化 */
    .friend-item {
        padding: 8px;
        width: 100%;
        overflow-x: hidden;
    }

    .friend-info {
        flex: 1;
        min-width: 0; /* 修复flex布局下的溢出问题 */
    }

    .friend-name {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .friend-intro {
        font-size: 12px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.4;
        margin-bottom: 4px;
    }

    /* 主题切换按钮优化 */
    .theme-toggle {
        right: 10px;
        top: 10px;
        width: 35px;
        height: 35px;
    }

    .theme-toggle i {
        font-size: 16px;
    }
}

/* 添加触摸设备的优化 */
@media (hover: none) {
    .post-item:hover,
    .gallery-item:hover,
    .social-card:hover {
        transform: none;
        box-shadow: 0 2px 10px var(--card-shadow);
    }

    .post-item:active,
    .gallery-item:active,
    .social-card:active {
        transform: translateY(2px);
        box-shadow: 0 1px 5px var(--card-shadow);
    }
}

/* 个人资料卡片 */
.profile-card {
    width: 100%;
    max-width: 1200px;
    background-color: var(--card-bg);
    border-radius: clamp(12px, 2vw, 16px);
    box-shadow: 0 4px 20px var(--card-shadow);
    overflow: hidden;
    padding: clamp(15px, 2vw, 25px);
    transition: all 0.3s ease;
}

/* 内容布局 */
.profile-content {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(15px, 2vw, 25px);
    margin-top: clamp(20px, 3vw, 30px);
}

.left-column {
    flex: 1;
    min-width: 250px;
    max-width: 100%;
}

.right-column {
    flex: 3;
    min-width: 300px;
}

.content-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(15px, 2vw, 25px);
}

/* 头部区域 */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.avatar {
    margin-bottom: 15px;
    border: 3px solid var(--blue-primary);
    border-radius: 50%;
    transition: border-color 0.3s ease;
    width: 120px;
    height: 120px;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--blue-dark);
    transition: color 0.3s ease;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.3s ease;
}

/* 简介卡片 */
.intro-card {
    background-image: linear-gradient(to right, var(--blue-primary), var(--blue-secondary));
    color: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(91, 206, 250, 0.3);
    transition: box-shadow 0.3s ease;
}

.dark-theme .intro-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.intro-card p {
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.5;
}

.intro-actions {
    display: flex;
    justify-content: center;
}

button {
    background-color: var(--white-overlay);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    padding: 5px 15px;
    transition: all 0.2s;
}

button:hover {
    background-color: var(--white-overlay-hover);
    transform: translateY(-2px);
}

/* 社交链接 */
.social-links {
    display: grid;
    gap: clamp(8px, 1.5vw, 10px);
}

.social-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: clamp(12px, 1.5vw, 15px);
    border-radius: clamp(8px, 1.5vw, 12px);
}

.social-card:hover {
    transform: translateY(-3px);
}

.social-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.social-info p {
    font-size: 12px;
    opacity: 0.8;
}

.social-card.github {
    background-color: var(--blue-primary);
    color: white;
}

.social-card.website {
    background-color: #6366F1;
    color: white;
}

.social-card.bilibili {
    background-color: var(--pink-primary);
    color: white;
}

.social-card.zhihu {
    background-color: var(--blue-secondary);
    color: white;
}

.social-card.netease {
    background-color: var(--pink-secondary);
    color: white;
}

.social-count {
    background-color: var(--white-overlay);
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
}

/* 博客部分 */
.blog-section {
    flex: 2;
    min-width: 300px;
    background-color: var(--card-bg);
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(15px, 2vw, 25px);
    box-shadow: 0 2px 15px var(--card-shadow);
}

.blog-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.blog-icon {
    margin-right: 10px;
    font-size: 18px;
    color: var(--blue-primary);
    transition: color 0.3s ease;
}

.blog-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--blue-dark);
    transition: color 0.3s ease;
}

/* 文章分类 */
.blog-categories {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
    transition: border-color 0.3s ease;
}

.category {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.category:hover {
    color: var(--blue-primary);
}

.category.active {
    color: var(--blue-primary);
    border-bottom: 2px solid var(--blue-primary);
}

/* 文章列表 */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(10px, 2vw, 20px);
    width: 100%;
}

.post-item {
    background-color: var(--card-bg);
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(12px, 1.5vw, 15px);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--card-shadow);
}

.post-header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 8px;
    align-items: center;
}

.post-category {
    grid-column: 1;
    font-size: clamp(11px, 1vw, 12px);
    padding: 3px 8px;
    border-radius: 12px;
    background-color: var(--blue-primary);
    color: white;
    white-space: nowrap;
}

.post-title {
    grid-column: 1 / -1;
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.post-date {
    grid-column: 2;
    font-size: clamp(11px, 1vw, 12px);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-arrow {
    grid-column: 4;
    color: var(--text-muted);
    font-size: clamp(12px, 1.2vw, 14px);
    transition: transform 0.3s ease;
}

.post-arrow.expanded {
    transform: rotate(180deg);
}

.post-content {
    margin-top: clamp(10px, 1.5vw, 15px);
    padding-top: clamp(10px, 1.5vw, 15px);
    border-top: 1px solid var(--border-light);
    font-size: clamp(12px, 1.1vw, 14px);
    color: var(--text-secondary);
    line-height: 1.6;
    display: none; /* 默认隐藏内容 */
}

.post-content.expanded {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 好友列表部分 */
.friends-section {
    flex: 1;
    min-width: 250px;
    background-color: var(--card-bg);
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(15px, 2vw, 25px);
    box-shadow: 0 2px 15px var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.friends-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--pink-primary), var(--pink-secondary));
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.friends-section:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.friends-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.friends-icon {
    margin-right: 10px;
    font-size: 18px;
    color: var(--pink-primary);
    transition: all 0.3s ease;
    transform-origin: center;
}

.friends-section:hover .friends-icon {
    transform: rotate(15deg) scale(1.1);
}

.friends-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--pink-dark);
    transition: all 0.3s ease;
    position: relative;
}

.friends-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--pink-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.friends-section:hover .friends-title::after {
    transform: scaleX(1);
    transform-origin: left;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.friend-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(8px, 1.5vw, 15px);
    padding: clamp(8px, 1vw, 10px);
    border-radius: clamp(6px, 1vw, 10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    background: var(--card-bg);
}

.friend-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(45deg, var(--pink-primary), var(--pink-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.friend-item > * {
    position: relative;
    z-index: 1;
}

.friend-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--card-shadow);
}

.friend-item:hover::before {
    opacity: 0.1;
}

.friend-avatar {
    width: clamp(40px, 5vw, 50px);
    height: clamp(40px, 5vw, 50px);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--pink-primary);
    transition: all 0.3s ease;
    position: relative;
}

.friend-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--pink-secondary);
    opacity: 0;
    transform: scale(1.2);
    transition: all 0.3s ease;
}

.friend-item:hover .friend-avatar {
    transform: scale(1.1) rotate(5deg);
}

.friend-item:hover .friend-avatar::after {
    opacity: 1;
    transform: scale(1);
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.friend-item:hover .friend-avatar img {
    transform: scale(1.1);
}

.friend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

.friend-item:hover .friend-info {
    transform: translateX(5px);
}

.friend-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--pink-dark);
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.friend-name::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--pink-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.friend-item:hover .friend-name::after {
    transform: scaleX(1);
    transform-origin: left;
}

.friend-intro {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.friend-item:hover .friend-intro {
    opacity: 1;
}

.friend-relation {
    display: inline-block;
    font-size: 10px;
    background-color: rgba(245, 169, 184, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--pink-dark);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.friend-item:hover .friend-relation {
    background-color: rgba(245, 169, 184, 0.25);
    transform: translateY(-2px);
}

.friend-relation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
}

.friend-item:hover .friend-relation::before {
    animation: shine 1s ease;
}

@keyframes shine {
    to {
        transform: translateX(100%);
    }
}

/* 暗色主题适配 */
.dark-theme .friend-item:hover::before {
    opacity: 0.15;
}

.dark-theme .friend-relation {
    background-color: rgba(150, 78, 123, 0.15);
}

.dark-theme .friend-item:hover .friend-relation {
    background-color: rgba(150, 78, 123, 0.25);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .friend-item:hover {
        transform: none;
    }
    
    .friend-item:active {
        transform: scale(0.98);
    }
    
    .friend-item:hover .friend-info {
        transform: none;
    }
    
    .friend-item:hover .friend-avatar {
        transform: none;
    }
    
    .friend-avatar::after {
        display: none;
    }
    
    .friend-name::after {
        display: none;
    }
    
    .friend-relation::before {
        display: none;
    }
}

/* 页脚 */
footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 30px;
    transition: color 0.3s ease;
}

.gallery-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--card-shadow);
}

.gallery-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.02);
}

.gallery-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 10px;
}

@media (max-width: 1024px) {
    .profile-content {
        flex-direction: column;
    }
    
    .left-column {
        max-width: none;
    }
    
    .social-links {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .content-row {
        flex-direction: column;
    }
    
    .blog-section,
    .friends-section {
        width: 100%;
    }
    
    .post-header {
        grid-template-columns: auto 1fr auto;
    }
    
    .post-category {
        grid-column: 1;
    }
    
    .post-title {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    
    .post-date {
        grid-column: 2;
        justify-self: end;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .profile-card {
        padding: 12px;
    }
    
    .post-list {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        grid-template-columns: 1fr;
    }
    
    .friend-item {
        padding: 6px;
    }
    
    .post-header {
        gap: 6px;
    }
    
    .post-content {
        padding: 8px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .post-item:hover,
    .gallery-item:hover,
    .social-card:hover {
        transform: none;
    }
    
    .post-item:active,
    .gallery-item:active,
    .social-card:active {
        transform: translateY(2px);
    }
}

/* 全局动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* 添加平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 优化滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 文章卡片优化 */
.post-item {
    animation: scaleIn 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.post-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--blue-primary), var(--pink-primary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.post-item:hover::after {
    transform: scaleX(1);
}

/* 文章标题优化 */
.post-title {
    position: relative;
    display: inline-block;
}

.post-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.post-title:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* 分类标签优化 */
.post-category {
    transition: all 0.3s ease;
    transform-origin: left;
}

.post-category:hover {
    transform: scale(1.05);
}

/* 箭头动画优化 */
.post-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-arrow.expanded {
    transform: rotate(180deg);
}

/* 内容展开动画优化 */
.post-content {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    display: block;
}

.post-content.expanded {
    opacity: 1;
    max-height: 1000px;
    animation: none;
}

/* 社交卡片优化 */
.social-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.social-card:hover::before {
    transform: translateX(0);
}

/* 加载动画 */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.loading {
    background: linear-gradient(90deg, 
        var(--card-bg) 25%, 
        var(--border-light) 50%, 
        var(--card-bg) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .post-item::after {
        display: none;
    }
    
    .post-title::after {
        display: none;
    }
    
    .post-content.expanded {
        max-height: none;
    }
    
    .social-card::before {
        display: none;
    }
}

/* 暗色主题切换动画 */
body {
    transition: background-color 0.5s ease, color 0.5s ease;
}

.dark-theme .post-item,
.dark-theme .social-card,
.dark-theme .friend-item {
    transition: transform 0.3s ease, background-color 0.5s ease, box-shadow 0.3s ease;
}

/* 附件相关样式 */
.attachments-section {
    margin-top: 25px;
    padding-top: 15px;
}

.attachment-container {
    background-color: rgba(0, 0, 0, 0.02);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.attachment-container:hover {
    background-color: rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dark-theme .attachment-container {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .attachment-container:hover {
    background-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.attachment-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.attachment-title::before {
    font-family: 'Font Awesome 5 Free';
    margin-right: 8px;
    font-weight: 900;
}

.attachment-container:has(.attachment-preview[src]) .attachment-title::before {
    content: '\f03e'; /* 图片图标 */
}

.attachment-container:has(audio.attachment-preview) .attachment-title::before {
    content: '\f025'; /* 音频图标 */
}

.attachment-container:has(a.attachment-preview) .attachment-title::before {
    content: '\f15b'; /* 文件图标 */
}

.attachment-description {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #666;
}

.dark-theme .attachment-description {
    color: #aaa;
}

.attachment-preview {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

img.attachment-preview {
    border: 1px solid #eee;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.dark-theme img.attachment-preview {
    border-color: #444;
}

img.attachment-preview:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dark-theme img.attachment-preview:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

audio.attachment-preview {
    width: 100%;
    margin-top: 10px;
}

a.attachment-preview {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

a.attachment-preview:hover {
    background-color: #2980b9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dark-theme a.attachment-preview {
    background-color: #2980b9;
}

.dark-theme a.attachment-preview:hover {
    background-color: #3498db;
}

/* 分页控制样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 10px;
}

.pagination-button {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
    padding: 8px 15px;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.pagination-button:hover:not(.disabled) {
    background-color: var(--accent-color);
    color: #fff;
}

.pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    margin: 0 10px;
    color: var(--text-color);
    font-size: 14px;
}

.dark-theme .pagination-button {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

.dark-theme .pagination-info {
    color: var(--text-color);
}

/* 好友列表分页控制 */
.friends-container .pagination {
    margin-top: 15px;
    padding: 8px;
}

.friends-container .pagination-button {
    padding: 6px 12px;
    font-size: 12px;
}

.friends-container .pagination-info {
    font-size: 12px;
}