/* style.css - 为你的个人主页定制样式 */

/* --- 基础样式与重置 --- */
* {
    box-sizing: border-box; /* 确保 padding 和 border 不会增加元素的总宽度/高度 */
    margin: 0;
    padding: 0;
}

/* 定义深色模式变量 */
:root {
    --primary-color: #3498db;   /* 主色调 (如蓝色，用于链接、强调等) */
    --secondary-color: #1a1a1a; /* 更深的背景色，用于导航栏和页脚 */
    --accent-color: #e74c3c;    /* 强调色 (如红色) */
    --text-color: #e0e0e0;      /* 浅灰色文本，与深色背景对比 */
    --heading-color: #f0f0f0;   /* 标题颜色 */
    --bg-color: #121212;        /* 主体深色背景 */
    --light-gray: #333;         /* 用于边框、分隔线或浅色背景 */
    --button-bg: #222;          /* 按钮背景色 */
    --button-border: #444;      /* 按钮边框色 */
    --button-text: #e0e0e0;     /* 按钮文字色 */
    --card-bg: #1c1c1c;         /* 卡片背景色 */
    --card-border: #333;        /* 卡片边框 */

    --font-family-main: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* 主字体 */
    --font-family-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* 标题字体 */

    --max-width: 1000px; /* 页面内容区域最大宽度 */
    --padding-base: 20px; /* 基础内边距 */
    --border-radius-base: 8px; /* 按钮和卡片圆角 */
}

/* 亮色模式变量 (当body有.light-mode类时应用) */
body.light-mode {
    --primary-color: #007bff;   /* 亮色模式主色调 */
    --secondary-color: #f8f9fa; /* 亮色模式导航栏和页脚背景 */
    --accent-color: #dc3545;
    --text-color: #333;         /* 亮色模式深色文本 */
    --heading-color: #222;      /* 亮色模式深色标题 */
    --bg-color: #f0f2f5;        /* 亮色模式主体浅色背景 */
    --light-gray: #e9ecef;
    --button-bg: #e0e0e0;
    --button-border: #ccc;
    --button-text: #333;
    --card-bg: #fff;
    --card-border: #ddd;
    --hover-bg: rgba(0, 0, 0, 0.05);
}

/* 分享功能样式 */
.share-dropdown {
    position: relative;
    display: inline-block;
}

.share-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.share-trigger .share-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

.share-trigger.active .share-arrow {
    transform: rotate(180deg);
}

.share-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-base);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 280px;
    backdrop-filter: blur(10px);
}

.share-dropdown.active .share-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.share-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--card-border);
}

.share-menu::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--card-bg);
}

.share-platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.share-platform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.85rem;
}

.share-platform:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-platform.share-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: 2px solid var(--primary-color);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.share-platform.share-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.share-platform.share-primary:hover {
    background: linear-gradient(135deg, #2980b9, #c0392b);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.share-platform.share-primary:hover::before {
    left: 100%;
}

.share-platform i {
    font-size: 1.2rem;
}

.share-platform[data-platform="wechat"]:hover {
    color: #07c160;
    border-color: #07c160;
    background: rgba(7, 193, 96, 0.1);
}

.share-platform[data-platform="weibo"]:hover {
    color: #e6162d;
    border-color: #e6162d;
    background: rgba(230, 22, 45, 0.1);
}

.share-platform[data-platform="twitter"]:hover {
    color: #1da1f2;
    border-color: #1da1f2;
    background: rgba(29, 161, 242, 0.1);
}

.share-platform[data-platform="linkedin"]:hover {
    color: #0077b5;
    border-color: #0077b5;
    background: rgba(0, 119, 181, 0.1);
}

.share-platform[data-platform="qq"]:hover {
    color: #12b7f5;
    border-color: #12b7f5;
    background: rgba(18, 183, 245, 0.1);
}

.share-platform[data-platform="copy"]:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.share-stats {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
}

.share-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.share-count::before {
    content: '📊';
}

/* 分享成功通知 */
.share-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-base);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateX(100%);
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.share-notification.show {
    transform: translateX(0);
}

.share-notification::before {
    content: '✓';
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .share-menu {
        left: auto;
        right: 0;
        transform: none;
        min-width: 260px;
    }
    
    .share-menu::before,
    .share-menu::after {
        left: auto;
        right: 20px;
        transform: none;
    }
    
    .share-platforms {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-notification {
        right: 10px;
        top: 10px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

body.light-mode .share-dropdown {
    --hover-bg: rgba(0, 0, 0, 0.05);
}

/* 微信分享弹窗样式 */
.wechat-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wechat-share-modal.show {
    opacity: 1;
    visibility: visible;
}

.wechat-share-modal.closing {
    opacity: 0;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius-base);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wechat-share-modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header .fab.fa-weixin {
    color: #07c160;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--hover-bg);
    color: var(--accent-color);
}

.modal-body {
    padding: 2rem 1.5rem;
    text-align: center;
}

.qr-container {
    margin-bottom: 2rem;
}

.qr-container #wechat-qrcode {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.qr-container img {
    border: 2px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-container p {
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

.share-info h4 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.share-url {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    word-break: break-all;
    padding: 0.5rem;
    background: var(--hover-bg);
    border-radius: 4px;
}

.copy-url-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-url-btn:hover {
    background: var(--primary-hover, #2980b9);
    transform: translateY(-1px);
}

/* 错误状态的分享通知 */
.share-notification.error {
    background: var(--accent-color);
}

.share-notification.error::before {
    content: '⚠';
}

/* 动画优化 */
@keyframes shareSuccess {
    0% { transform: translateX(100%) scale(0.8); }
    50% { transform: translateX(-10px) scale(1.05); }
    100% { transform: translateX(0) scale(1); }
}

.share-notification.show {
    animation: shareSuccess 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 精美分享预览卡片样式 */
.share-preview-card {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(231, 76, 60, 0.05));
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.share-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.share-preview-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
}

.share-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.share-preview-card:hover .share-preview-image img {
    transform: scale(1.05);
}

.share-preview-content {
    padding: 1.5rem;
}

.share-preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-preview-description {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-preview-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.6;
}

.share-preview-author,
.share-preview-domain {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.qr-section {
    text-align: center;
}

.qr-code {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.qr-code img {
    border: 2px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-tip {
    color: #07c160;
    font-size: 0.85rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.qr-tip .fab.fa-weixin {
    font-size: 1rem;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.copy-url-btn,
.copy-title-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.copy-url-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
}

.copy-url-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.copy-title-btn.secondary {
    background: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--button-border);
}

.copy-title-btn.secondary:hover {
    background: var(--light-gray);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 更新模态框大小以适应新布局 */
.wechat-share-modal .modal-content {
    max-width: 520px;
    width: 95%;
}

.wechat-share-modal .modal-body {
    padding: 1.5rem;
}

/* 移动端微信弹窗优化 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem 1rem;
    }
    
    .wechat-share-modal .modal-body {
        padding: 1rem;
    }
    
    .share-preview-image {
        height: 120px;
    }
    
    .share-preview-content {
        padding: 1rem;
    }
    
    .share-actions {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .share-buttons {
        order: -1;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .share-info h4 {
        font-size: 1rem;
    }
}

/* 深色模式下的优化 */
body:not(.light-mode) .qr-container img {
    filter: brightness(0.9);
}

body.light-mode .modal-overlay {
    background: rgba(255, 255, 255, 0.9);
}

body {
    font-family: var(--font-family-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased; /* 字体抗锯齿优化 */
    scroll-behavior: smooth; /* 平滑滚动 */
    display: flex; /* 使用 flexbox 布局，使页脚始终在底部 */
    flex-direction: column;
    min-height: 100vh; /* 确保 body 至少占满视口高度 */
    transition: background-color 0.3s ease, color 0.3s ease; /* 模式切换过渡效果 */
}

/* --- 全局链接样式 --- */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease; /* 链接悬停过渡效果 */
}

a:hover {
    color: var(--accent-color);
}

/* --- 标题样式 --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: var(--heading-color);
    margin-bottom: 0.8em;
    margin-top: 1.2em;
    /* 移除这里的 opacity: 0; 初始隐藏将由具体的动画规则来控制 */
    /* animation-fill-mode: backwards; 也由具体的动画规则来控制 */
}

h1 { font-size: 3.5em; line-height: 1.2; } /* 默认H1大小，主要用于首页第一行问候语 */
h2 { font-size: 2.5em; }
h3 { font-size: 1.8em; }

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

/* --- 应用到主页内容元素 --- */
/* 这些动画只在home.html被加载时生效 */
.main-content > h1:nth-child(1) { /* 你好，我是 */
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 0.8s ease-out 0.2s forwards; /* 增加 forwards */
}

.main-content > h1:nth-child(2) { /* 名字 */
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 0.8s ease-out 0.4s forwards; /* 增加 forwards */
}

.main-content > h1.main-title { /* 打字机效果 */
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 0.8s ease-out 0.6s forwards; /* 增加 forwards */
}

.main-content > p:nth-child(4) { /* 喜欢... */
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 0.8s ease-out 0.8s forwards; /* 增加 forwards */
}

.main-content > p:nth-child(5) { /* 在这里记录... */
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 0.8s ease-out 1.0s forwards; /* 增加 forwards */
}

.main-content > .button-group {
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 0.8s ease-out 1.2s forwards; /* 增加 forwards */
}

.main-content > .social-icons {
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 0.8s ease-out 1.4s forwards; /* 增加 forwards */
}


/* --- 容器和布局 --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto; /* 居中显示 */
    padding: var(--padding-base);
}

/* --- 导航栏样式 --- */
.navbar {
    background-color: var(--secondary-color);
    padding: 15px var(--padding-base);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* 阴影效果 */
    position: sticky; /* 导航栏固定在顶部 */
    top: 0;
    z-index: 1000; /* 确保导航栏在最上层 */
    transition: background-color 0.3s ease; /* 模式切换过渡 */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 导航栏顶部区域 - 包含头像姓名和主题切换按钮 */
.navbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* 桌面端导航栏布局 */
@media (min-width: 769px) {
    .navbar .container {
        flex-direction: row;
        align-items: center;
    }
    
    .navbar-top {
        width: auto;
        margin-bottom: 0;
    }
    
    .nav-links {
        margin-left: auto;
        margin-top: 0;
    }
    
    .theme-toggle {
        margin-left: 20px;
    }
}

/* 修正后的 navbar-brand 样式，直接作用于 a 标签 */
.navbar-brand {
    display: flex; /* 使用 flexbox 布局排列头像和名字 */
    align-items: center;
    text-decoration: none; /* 移除a标签下划线 */
    color: var(--heading-color); /* 继承颜色变量 */
    font-weight: bold;
    font-family: var(--font-family-heading);
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-color); /* 悬停颜色 */
}

.navbar-avatar {
    width: 40px; /* 头像大小 */
    height: 40px;
    border-radius: 50%; /* 圆形 */
    margin-right: 10px; /* 头像与名字的间距 */
    object-fit: cover; /* 保证图片覆盖圆形区域 */
    border: 1px solid var(--primary-color); /* 添加边框以示强调 */
}

.navbar-name {
    color: var(--heading-color); /* 名字颜色 */
    font-size: 1.1em; /* 名字字体大小 */
}


.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.05em;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 模式切换按钮 */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--text-color);
    cursor: pointer;
    margin-left: 20px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

/* 主要内容区域样式 */
main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 50px 0;
}

#content-area {
    flex-grow: 1;
    display: flex;
    justify-content: flex-start; /* 内容靠左对齐 */
    align-items: flex-start;
    padding-top: 50px;
    transition: opacity 0.3s ease;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* 首页特定内容样式 */
.main-content {
    max-width: 800px;
    padding: var(--padding-base);
    text-align: left; /* 首页内容靠左对齐 */
    width: 100%;
}

.main-content h1:first-child { /* "你好，我是" */
    font-size: 3.2em;
    margin-bottom: 0.3em;
    line-height: 1.1;
    color: var(--heading-color);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.main-content h1:nth-child(2) { /* 名字 "陈澄 | Stephen Chan" */
    font-size: 3.8em;
    margin-top: 0;
    margin-bottom: 0.3em;
    line-height: 1.1;
    color: var(--heading-color);
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #7dd3fc, #3b82f6, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 亮色模式下的名字颜色 */
body.light-mode .main-content h1:nth-child(2) {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-content h1.main-title { /* 打字机效果的整个H1容器 */
    font-size: 2.4em;
    margin-top: 0;
    margin-bottom: 0.4em;
    line-height: 1.2;
    color: var(--heading-color);
    font-weight: 700;
}

.main-content .subtitle { /* 打字机效果的文本容器，相对于父级 H1 */
    font-size: 1em;
    color: var(--text-color);
    min-height: 1.5em;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid rgba(255, 255, 255, 0.75);
    animation: blink-caret 0.75s step-end infinite;
    display: inline-block;
    vertical-align: middle;
    box-sizing: content-box;
}

/* 光标闪烁动画 (深色模式) */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: rgba(255, 255, 255, 0.75); }
}

/* 光标闪烁动画 (亮色模式) */
body.light-mode .main-content .subtitle {
    border-color: rgba(0, 0, 0, 0.75);
    animation: blink-caret-light 0.75s step-end infinite;
}
@keyframes blink-caret-light {
    from, to { border-color: transparent }
    50% { border-color: rgba(0, 0, 0, 0.75); }
}


.main-content p {
    font-size: 1.3em;
    margin-top: 24px;
    margin-bottom: 32px;
    color: var(--text-color);
    opacity: 0; /* 初始隐藏 */
    animation-fill-mode: backwards;
    line-height: 1.7;
    font-weight: 400;
}

/* 技术标签样式 - 深色模式（默认）*/
.tech-python {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.05em;
    position: relative;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tech-python::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(147, 197, 253, 0.15));
    border-radius: 6px;
    z-index: -1;
}

.tech-java {
    background: linear-gradient(135deg, #fb923c, #fbbf24);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.05em;
    position: relative;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tech-java::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(251, 191, 36, 0.15));
    border-radius: 6px;
    z-index: -1;
}

.tech-js {
    background: linear-gradient(135deg, #fde047, #facc15);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.05em;
    position: relative;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tech-js::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(253, 224, 71, 0.2), rgba(250, 204, 21, 0.2));
    border-radius: 6px;
    z-index: -1;
}

.tech-csharp {
    background: linear-gradient(135deg, #4ade80, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.05em;
    position: relative;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tech-csharp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(167, 139, 250, 0.15));
    border-radius: 6px;
    z-index: -1;
}

.tech-react {
    background: linear-gradient(135deg, #61dafb, #21d4fd);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.05em;
    position: relative;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tech-react::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(97, 218, 251, 0.15), rgba(33, 212, 253, 0.15));
    border-radius: 6px;
    z-index: -1;
}

/* 亮色模式下的技术标签 */
body.light-mode .tech-python {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .tech-python::before {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.1));
}

body.light-mode .tech-java {
    background: linear-gradient(135deg, #f97316, #ea580c);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .tech-java::before {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(234, 88, 12, 0.1));
}

body.light-mode .tech-js {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .tech-js::before {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(202, 138, 4, 0.15));
}

body.light-mode .tech-csharp {
    background: linear-gradient(135deg, #16a34a, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .tech-csharp::before {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.1), rgba(124, 58, 237, 0.1));
}

body.light-mode .tech-react {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .tech-react::before {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.1), rgba(14, 116, 144, 0.1));
}

/* 技术标签悬停效果 */
.tech-python:hover,
.tech-java:hover,
.tech-js:hover,
.tech-react:hover,
.tech-csharp:hover {
    transform: translateY(-1px) scale(1.05);
    filter: brightness(1.1);
}

.tech-python:hover::before {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.25), rgba(147, 197, 253, 0.25));
}

.tech-java:hover::before {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(251, 191, 36, 0.25));
}

.tech-js:hover::before {
    background: linear-gradient(135deg, rgba(253, 224, 71, 0.3), rgba(250, 204, 21, 0.3));
}

.tech-csharp:hover::before {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.25), rgba(167, 139, 250, 0.25));
}

.tech-react:hover::before {
    background: linear-gradient(135deg, rgba(97, 218, 251, 0.25), rgba(33, 212, 253, 0.25));
}

/* 亮色模式下的悬停效果 */
body.light-mode .tech-python:hover::before {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(29, 78, 216, 0.2));
}

body.light-mode .tech-java:hover::before {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.2));
}

body.light-mode .tech-js:hover::before {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.25));
}

body.light-mode .tech-csharp:hover::before {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.2), rgba(124, 58, 237, 0.2));
}

body.light-mode .tech-react:hover::before {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.2), rgba(14, 116, 144, 0.2));
}

/* 为特定的 p 标签应用动画 */
.main-content p:nth-child(4) { /* 喜欢... */
    animation: fadeIn 0.8s ease-out 0.8s forwards; /* 增加 forwards */
}
.main-content p:nth-child(5) { /* 在这里记录... */
    animation: fadeIn 0.8s ease-out 1.0s forwards; /* 增加 forwards */
}


.main-content .button-group {
    display: flex;
    justify-content: flex-start;
    gap: 18px;
    margin-top: 36px;
    margin-bottom: 44px;
    flex-wrap: wrap;
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 0.8s ease-out 1.2s forwards; /* 增加 forwards */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 14px 28px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 2px solid var(--button-border);
    font-size: 1.1em;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: white;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
    color: var(--text-primary);
}

/* 页面描述样式 */
.page-description {
    color: var(--text-secondary);
    font-size: 1.1em;
    margin-bottom: 40px;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.8;
}

.empty-state h2 {
    color: var(--heading-color);
    margin-bottom: 16px;
    font-size: 1.8em;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1em;
    line-height: 1.6;
}

.coming-soon-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.feature-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--card-bg);
    border-radius: var(--border-radius-base);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.feature-preview:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.feature-emoji {
    font-size: 1.2em;
}

/* 单个项目展示样式 */
.single-project-showcase {
    max-width: 1200px;
    margin: 0 auto;
}

.project-hero {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.project-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.project-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    min-width: 280px;
}

.project-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.icon-emoji {
    font-size: 2em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.icon-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(15px);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.project-preview {
    width: 100%;
    max-width: 240px;
}

.preview-screen {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.preview-header {
    background: var(--light-gray);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.preview-dots {
    display: flex;
    gap: 6px;
}

.preview-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.5;
}

.preview-dots span:nth-child(1) { background: #ff5f57; }
.preview-dots span:nth-child(2) { background: #ffbd2e; }
.preview-dots span:nth-child(3) { background: #28ca42; }

.preview-content {
    padding: 30px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-circle-preview {
    text-align: center;
}

.timer-numbers {
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-feature-settings: "tnum";
}

.timer-label {
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 500;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.project-title {
    font-size: 1.8em;
    color: var(--heading-color);
    margin: 0;
    line-height: 1.2;
}

.project-subtitle {
    font-size: 1em;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.project-description {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1.05em;
}

.project-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--border-radius-base);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 1.2em;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-text h4 {
    color: var(--heading-color);
    margin: 0 0 4px 0;
    font-size: 1em;
}

.feature-text p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.85em;
    line-height: 1.4;
}

.project-tech {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-label {
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.project-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.project-actions .btn-primary,
.project-actions .btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 1.05em;
    font-weight: 600;
    border-radius: var(--border-radius-base);
    transition: var(--transition);
}

.project-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 30px;
    justify-content: space-between;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-base);
    padding: 20px 16px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 120px;
    max-width: 150px;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-feature-settings: "tnum";
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* 项目网格布局样式 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* 中等屏幕调整为2列 */
@media (max-width: 1400px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 18px;  /* 从24px减少到18px，约25%减少 */
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;  /* 从20px减少到12px */
}

.project-card .project-icon .icon-circle {
    width: 60px;
    height: 60px;
    font-size: 1.5em;
}

.project-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
}

.project-card.featured .project-badge {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.project-preview {
    margin: 0 -8px 20px -8px;
}

.project-card .preview-screen {
    margin-bottom: 0;
}

.project-card .preview-content {
    padding: 16px;
    min-height: 80px;
}

/* 命令预览样式 */
.command-preview {
    position: relative;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.8em;
}

.command-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.command-prompt {
    color: var(--primary-color);
    font-weight: bold;
}

.command-text {
    color: var(--text-secondary);
}

.command-copy-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9em;
}

/* 美股看板预览样式 */
.stock-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 200px;
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.stock-symbol {
    font-weight: 700;
    color: var(--heading-color);
    font-size: 0.9em;
}

.stock-price {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8em;
}

.stock-change {
    font-size: 0.7em;
    font-weight: 600;
}

.stock-change.positive {
    color: var(--success-color, #27ae60);
}

.stock-change.negative {
    color: var(--accent-color);
}

.stock-chart {
    text-align: center;
    font-size: 1.5em;
    color: var(--primary-color);
    margin-top: 8px;
}

/* 心语集预览样式 */
.soulwords-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 200px;
    align-items: center;
}

.quote-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 12px;
    color: white;
    text-align: center;
    width: 100%;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.quote-text {
    font-size: 0.75em;
    line-height: 1.4;
    margin-bottom: 6px;
    font-weight: 500;
}

.quote-author {
    font-size: 0.6em;
    opacity: 0.8;
    font-style: italic;
    margin-bottom: 8px;
}

.quote-tags {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.quote-tags .tag {
    font-size: 0.55em;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.view-modes {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.mode-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6em;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.mode-icon.active {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* 英语发音助手预览样式 */
.pronunciation-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 200px;
    align-items: center;
}

.input-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
}

.input-box {
    padding: 8px 12px;
    background: var(--bg-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9em;
    text-align: center;
    min-width: 120px;
}

.accent-switches {
    display: flex;
    gap: 4px;
    font-size: 0.75em;
}

.accent-btn {
    padding: 3px 6px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.accent-btn.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.audio-waves {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
}

.audio-waves .wave-bar {
    width: 3px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
    opacity: 0.6;
}

.audio-waves .wave-bar:nth-child(1) { animation-delay: 0s; }
.audio-waves .wave-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-waves .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-waves .wave-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-waves .wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 8px; }
    50% { height: 16px; }
}

/* 缓存工具预览样式 */
.cache-tools-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 200px;
    align-items: center;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    margin-bottom: 8px;
}

.tool-icon {
    font-size: 1.2em;
    text-align: center;
    padding: 8px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.tool-icon:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: scale(1.05);
}

.cache-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75em;
    color: var(--text-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.success {
    background: #27ae60;
    box-shadow: 0 0 6px rgba(39, 174, 96, 0.3);
}

.status-dot.warning {
    background: #f39c12;
    box-shadow: 0 0 6px rgba(243, 156, 18, 0.3);
    animation: cache-pulse 2s infinite;
}

@keyframes cache-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 文件转换器预览样式 */
.converter-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 200px;
    align-items: center;
}

.file-input-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg-color);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.file-icon,
.conversion-icon,
.output-icon {
    font-size: 1.2em;
    padding: 4px;
    border-radius: 4px;
    background: var(--card-bg);
}

.file-icon {
    color: var(--primary-color);
}

.conversion-icon {
    color: var(--accent-color);
    animation: spin 2s linear infinite;
}

.output-icon {
    color: var(--success-color, #27ae60);
}

.arrow {
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 0.9em;
}

.format-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.format-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card .project-title {
    font-size: 1.2em;     /* 从1.4em减小到1.2em */
    margin: 0 0 6px 0;    /* 从8px减少到6px */
    color: var(--heading-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* 限制标题最多2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card .project-subtitle {
    color: var(--text-secondary);
    font-size: 0.8em;      /* 从0.9em减小到0.8em */
    margin-bottom: 10px;   /* 从16px减少到10px */
}

.project-card .project-description {
    margin-bottom: 12px;   /* 从20px减少到12px */
    flex: 1;
}

.project-card .project-description p {
    color: var(--text-color);
    line-height: 1.5;      /* 从1.6减小到1.5 */
    font-size: 0.85em;     /* 从0.95em减小到0.85em */
    display: -webkit-box;
    -webkit-line-clamp: 3;  /* 限制描述最多3行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;           /* 从8px减少到6px */
    margin-bottom: 12px; /* 从20px减少到12px */
}

.feature-tag {
    background: var(--light-gray);
    color: var(--text-color);
    padding: 3px 8px;     /* 从4px 10px减少到3px 8px */
    border-radius: 10px;  /* 从12px减少到10px */
    font-size: 0.7em;     /* 从0.8em减小到0.7em */
    font-weight: 500;
}

.project-card .project-tech {
    margin-bottom: 16px;  /* 从24px减少到16px */
}

.project-card .tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-card .tech-tag {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 500;
}

.project-card .project-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.project-card .project-actions a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: var(--transition);
    white-space: nowrap;      /* 防止文字换行 */
    min-width: 120px;         /* 设置最小宽度 */
}

.project-card .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
}

.project-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.project-card .btn-secondary {
    background: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--button-border);
}

.project-card .btn-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-1px);
}

/* 项目统计区域 */
.projects-stats {
    margin-top: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

/* 联系页面样式 */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-base);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4em;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.contact-details h3 {
    color: var(--heading-color);
    margin: 0 0 12px 0;
    font-size: 1.2em;
}

.contact-details p {
    color: var(--text-secondary);
    margin: 4px 0;
    font-size: 0.95em;
}

.contact-primary {
    color: var(--primary-color) !important;
    font-weight: 600;
    font-size: 1.05em !important;
    margin-bottom: 16px !important;
}

.form-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-base);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.form-container h2 {
    color: var(--heading-color);
    margin: 0 0 8px 0;
    font-size: 1.6em;
}

.form-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1em;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-base);
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 1em;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-submit {
    margin-top: 8px;
    padding: 14px 24px;
    font-size: 1.05em;
    align-self: flex-start;
}

.contact-footer {
    margin-top: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.availability {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.availability-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-dot.available {
    background: var(--success-color);
}

.status-text {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.05em;
}

.availability-note {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.5;
}

.social-links h3 {
    color: var(--heading-color);
    margin: 0 0 16px 0;
    font-size: 1.2em;
}

.social-icons-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-base);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    transform: translateX(4px);
    color: var(--text-primary);
}

.social-link i {
    font-size: 1.2em;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

/* 项目网格响应式样式 */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-card .project-actions {
        flex-direction: column;
    }
    
    .project-card .project-actions a {
        flex: none;
        min-width: 100px;         /* 移动端减小最小宽度 */
        padding: 10px 16px;       /* 减少内边距 */
        font-size: 0.85em;        /* 稍微减小字体 */
    }
}

@media (max-width: 480px) {
    .project-card {
        padding: 16px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .project-badge {
        align-self: flex-end;
    }
}

/* 联系页面响应式 */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-footer {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .contact-card {
        padding: 20px;
        gap: 16px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .form-container {
        padding: 24px;
    }
    
    .social-icons-contact {
        gap: 8px;
    }
    
    .social-link {
        padding: 10px 12px;
        font-size: 0.95em;
    }
}

.btn:hover {
    background-color: var(--light-gray);
    transform: translateY(-4px) scale(1.02);
    border-color: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn i {
    margin-right: 8px;
}

.btn-coffee {
    background-color: #FFDD00;
    color: #333;
    border-color: #FFDD00;
}

.btn-coffee:hover {
    background-color: #ffda00;
    border-color: #ffda00;
    color: #333;
}


/* --- 社交链接图标 --- */
.main-content .social-icons {
    margin-top: 56px;
    text-align: left;
    opacity: 0; /* 初始隐藏 */
    animation: fadeIn 0.8s ease-out 1.4s forwards; /* 增加 forwards */
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-icons a {
    color: var(--text-color);
    font-size: 2.4em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: -1;
}

.social-icons a:hover {
    color: white;
    transform: translateY(-6px) scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.3);
}

.social-icons a:hover::before {
    width: 100px;
    height: 100px;
    opacity: 1;
}

/* 为不同社交媒体添加专属颜色 */
.social-icons a[href*="github"]:hover {
    border-color: #333;
    box-shadow: 0 12px 30px rgba(51, 51, 51, 0.3);
}

.social-icons a[href*="github"]:hover::before {
    background: radial-gradient(circle, #333 0%, transparent 70%);
}

.social-icons a[href*="mailto"]:hover {
    border-color: #ea4335;
    box-shadow: 0 12px 30px rgba(234, 67, 53, 0.3);
}

.social-icons a[href*="mailto"]:hover::before {
    background: radial-gradient(circle, #ea4335 0%, transparent 70%);
}

.social-icons a[href*="kaylonchan.com"]:hover {
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.3);
}

.social-icons a[href*="kaylonchan.com"]:hover::before {
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
}

/* --- 页脚样式 --- */
.footer {
    background-color: var(--secondary-color);
    color: #aaa;
    text-align: center;
    padding: 25px var(--padding-base);
    font-size: 0.9em;
    margin-top: auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.footer p {
    margin-bottom: 5px;
}

/* --- 内容页面通用样式 --- */
.page-content {
    width: 100%;
    max-width: var(--max-width);
    padding: var(--padding-base);
    text-align: left;
    margin: 0 auto;
}

.page-content h1 {
    font-size: 2.8em;
    text-align: left;
    color: var(--heading-color);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--padding-base);
    margin-top: var(--padding-base);
    padding-bottom: 40px;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-base);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--card-border);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    text-align: left;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* 特色项目卡片 */
.card.featured-project {
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: visible;
}

.card.featured-project::before {
    content: '⭐ 推荐项目';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    z-index: 10;
}

.card.featured-project:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.card-image {
    width: 100%;
    height: 180px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: #fff;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-image::before {
    content: attr(data-placeholder);
    position: absolute;
    color: #bbb;
    font-size: 1em;
    text-align: center;
    line-height: 180px;
    width: 100%;
    height: 100%;
    background-color: #2a2a2a;
}
body.light-mode .card-image::before {
    background-color: #e0e0e0;
    color: #666;
}


.card-content {
    padding: var(--padding-base);
}

.card-content h3 {
    margin-top: 0;
    font-size: 1.4em;
    color: var(--heading-color);
}

.card-content p {
    font-size: 0.95em;
    color: var(--text-color);
    margin-bottom: 10px;
}

.card-meta {
    font-size: 0.85em;
    color: #888;
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.card-meta span {
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    border: 1px solid var(--button-border);
}
body.light-mode .card-meta span {
    background-color: #eee;
    color: #555;
    border-color: #ddd;
}


.card-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.card-actions .btn {
    padding: 8px 15px;
    font-size: 0.9em;
    width: auto;
}

/* Service Page Specific Styles */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--padding-base);
    margin-top: var(--padding-base);
    text-align: left;
}

.service-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-base);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--card-border);
    padding: var(--padding-base);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.service-item h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.6em;
}

.service-item p {
    font-size: 1em;
    color: var(--text-color);
    margin-bottom: 15px;
}

.service-item ul {
    list-style: none;
    padding-left: 0;
}
.service-item ul li {
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.95em;
}
.service-item ul li::before {
    content: "✓";
    color: var(--primary-color);
    margin-right: 8px;
}

.contact-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--light-gray);
    text-align: center;
}
.contact-section .social-icons {
    margin-top: 20px;
}


/* --- 响应式设计 --- */
@media (max-width: 992px) {
    .navbar .container {
        padding: 10px var(--padding-base);
    }
    .nav-links li {
        margin-left: 15px;
    }
    .page-content h1, .main-content h1:first-child {
        font-size: 2.5em;
    }
    .main-content h1:nth-child(2) {
        font-size: 3em;
    }
    .main-content h1.main-title {
        font-size: 1.8em;
    }
    .main-content p {
        font-size: 1.1em;
    }
    .button-group, .social-icons {
        justify-content: flex-start;
        text-align: left;
    }
    
    /* 全局页面内容优化 - 平板端 */
    .page-content {
        max-width: 95%;
        width: 95%;
        margin: 0 auto;
        padding: 1.5rem 1rem;
    }
    
    .main-content {
        max-width: 95%;
        width: 95%;
        margin: 0 auto;
        padding: 1.5rem 1rem;
    }
    /* 调整导航栏头像和名字在平板上的间距 */
    .navbar-avatar {
        width: 35px;
        height: 35px;
        margin-right: 8px;
    }
    .navbar-name {
        font-size: 1em;
    }
}

/* 响应式设计 - 项目展示 */
@media (max-width: 992px) {
    .project-hero {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        padding: 25px;
    }
    
    .project-visual {
        min-width: auto;
    }
    
    .project-title {
        font-size: 1.6em;
    }
    
    .project-features {
        grid-template-columns: 1fr;
    }
    
    .project-actions {
        justify-content: center;
    }
    
    .project-stats {
        justify-content: center;
    }
    
    .stat-card {
        max-width: 120px;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        align-items: stretch; /* 让子元素占满宽度 */
    }
    
    /* 导航栏顶部区域保持水平布局 */
    .navbar-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 15px;
    }

    /* 调整导航链接在小屏幕上的位置 */
    .nav-links {
        width: 100%; /* 占据整行 */
        justify-content: space-around; /* 均匀分布 */
        flex-wrap: wrap;
    }
    .nav-links li {
        margin: 5px; /* 减小间距 */
    }
    
    /* 主题切换按钮在移动端保持在右上角 */
    .theme-toggle {
        margin-left: 0;
        margin-top: 0;
        width: auto;
        flex-shrink: 0; /* 防止按钮被压缩 */
    }
    
    /* 全局移动端布局优化 */
    .page-content {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0.75rem !important;
    }
    
    .main-content {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0.75rem !important;
    }
    
    /* 确保容器充分利用屏幕宽度 */
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0.5rem !important;
    }

    .main-content h1:first-child {
        font-size: 2.4em;
    }

    .main-content h1:nth-child(2) {
        font-size: 3em;
    }

    .main-content h1.main-title {
        font-size: 1.8em;
    }

    .main-content p {
        font-size: 1.1em;
    }
    
    .social-icons {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .social-icons a {
        font-size: 2em;
        padding: 10px;
    }

    .button-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .btn {
        width: 90%;
        justify-content: flex-start;
        margin-bottom: 15px;
    }

    .social-icons {
        text-align: left;
    }
    .social-icons a {
        font-size: 1.8em;
        margin-right: 15px;
        margin-left: 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
    .service-grid {
        grid-template-columns: 1fr;
    }

    .page-content h1 {
        font-size: 2.2em;
    }
    
    .project-hero {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .project-title {
        font-size: 1.5em;
    }
    
    .project-subtitle {
        font-size: 0.95em;
    }
    
    .project-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .project-actions .btn-primary,
    .project-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .project-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .stat-card {
        max-width: none;
    }
    
    .icon-circle {
        width: 60px;
        height: 60px;
    }
    
    .icon-glow {
        width: 80px;
        height: 80px;
    }
    
    .icon-emoji {
        font-size: 1.5em;
    }
    
    .preview-content {
        padding: 20px 15px;
    }
    
    .timer-numbers {
        font-size: 1.5em;
    }
    
    .empty-state {
        padding: 60px 20px;
    }
    
    .empty-icon {
        font-size: 3em;
    }
    
    .coming-soon-features {
        gap: 12px;
    }
    
    .feature-preview {
        padding: 10px 16px;
        font-size: 0.95em;
    }
    .service-item h3 {
        font-size: 1.4em;
    }
    .card-content h3 {
        font-size: 1.2em;
    }

    /* 手机视图下的导航栏头像和名字 */
    .navbar-avatar {
        width: 30px;
        height: 30px;
        margin-right: 5px;
    }
    .navbar-name {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .main-content h1:first-child {
        font-size: 2em;
    }
    .main-content h1:nth-child(2) {
        font-size: 2.4em;
    }
    .main-content h1.main-title {
        font-size: 1.4em;
    }
    
    .tech-python,
    .tech-java,
    .tech-js,
    .tech-react,
    .tech-csharp {
        font-size: 1em;
        padding: 1px 6px;
    }
    
    .social-icons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: flex-start;
    }
    
    .social-icons a {
        font-size: 1.8em;
        padding: 8px;
    }
    .btn {
        width: 95%;
        padding: 10px 15px;
        font-size: 0.85em;
    }
    .social-icons a {
        font-size: 1.5em;
        margin-right: 10px;
    }
    .page-content h1 {
        font-size: 1.8em;
    }
    .card-content p, .service-item p {
        font-size: 0.9em;
    }
    /* 更小屏幕下的导航栏头像和名字 */
    .navbar-avatar {
        width: 25px;
        height: 25px;
        margin-right: 3px;
    }
    .navbar-name {
        font-size: 0.8em;
    }
}

/* === 文件管理样式 === */

/* 上传区域 */
.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    border: 2px dashed var(--card-border);
    border-radius: var(--border-radius-base);
    padding: 40px 20px;
    text-align: center;
    background: var(--card-bg);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.upload-text {
    font-size: 18px;
    color: var(--text-color);
    font-weight: 500;
}

.upload-hint {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

/* 上传进度 */
.upload-progress {
    margin-top: 20px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--card-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #27ae60);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: var(--text-color);
    font-size: 14px;
}

/* 上传结果 */
.upload-result {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: var(--border-radius-base);
    font-size: 14px;
}

.result-item.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.result-item.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

/* 文件列表区域 */
.files-section {
    margin-top: 40px;
}

.files-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-base);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

/* 文件列表 */
.files-list {
    min-height: 200px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-base);
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-item:hover {
    background: rgba(52, 152, 219, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 18px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
    word-break: break-all;
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--button-bg);
    color: var(--button-text);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.loading i {
    font-size: 24px;
    margin-bottom: 10px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius-base);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
    color: var(--heading-color);
    margin: 0;
    word-break: break-all;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: var(--button-bg);
}

.modal-body {
    padding: 20px;
}

/* 文件信息 */
.file-info {
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    margin-bottom: 12px;
    align-items: center;
}

.info-item label {
    min-width: 80px;
    font-weight: 500;
    color: var(--text-color);
}

.info-item span {
    color: #888;
    word-break: break-all;
}

.link-container {
    flex: 1;
    display: flex;
    gap: 8px;
}

.link-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 13px;
}

.btn-copy {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: #2980b9;
}

/* 二维码区域 */
.qr-section {
    margin: 25px 0;
    text-align: center;
}

.qr-section h4 {
    color: var(--heading-color);
    margin-bottom: 15px;
    font-size: 14px;
}

.qr-code {
    background: white;
    padding: 15px;
    border-radius: var(--border-radius-base);
    display: inline-block;
    margin: 0 auto;
}

.qr-placeholder {
    padding: 20px;
    color: #888;
}

/* 文件操作按钮 */
.file-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-base);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 响应式设计 - 平板端优化 */
@media (max-width: 768px) {
    .upload-section {
        margin-bottom: 30px;
    }
    
    .upload-area {
        padding: 35px 20px;
        margin-bottom: 20px;
    }
    
    .upload-icon {
        font-size: 42px;
    }
    
    .upload-text {
        font-size: 17px;
    }
    
    .files-controls {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .search-box {
        max-width: 100%;
        order: 2;
    }
    
    .search-box input {
        padding: 12px 45px 12px 15px;
        font-size: 16px;
    }
    
    #refreshBtn {
        order: 1;
        align-self: flex-start;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .file-item {
        padding: 16px;
        gap: 14px;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    .file-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .file-name {
        font-size: 15px;
        line-height: 1.3;
    }
    
    .file-meta {
        flex-direction: row;
        gap: 12px;
        font-size: 13px;
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .modal-content {
        margin: 15px;
        width: calc(100% - 30px);
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 18px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .file-actions {
        flex-direction: row;
        gap: 12px;
    }
    
    .info-item {
        margin-bottom: 16px;
    }
    
    .info-item label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .link-container input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-copy {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .qr-section h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }
}

/* 手机端优化 - 更美观的设计 */
@media (max-width: 480px) {
    .page-content {
        padding: 20px 15px;
    }
    
    .page-content h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .page-description {
        font-size: 14px;
        margin-bottom: 25px;
        line-height: 1.5;
    }
    
    /* 上传区域手机端优化 */
    .upload-section {
        margin-bottom: 25px;
    }
    
    .upload-section h2 {
        font-size: 18px;
        margin-bottom: 15px;
        color: var(--heading-color);
    }
    
    .upload-area {
        padding: 25px 15px;
        border-radius: 12px;
        background: linear-gradient(135deg, var(--card-bg) 0%, rgba(52, 152, 219, 0.05) 100%);
        border: 2px dashed rgba(52, 152, 219, 0.3);
    }
    
    .upload-area:hover,
    .upload-area.drag-over {
        border-color: var(--primary-color);
        background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.15) 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
    }
    
    .upload-icon {
        font-size: 32px;
        margin-bottom: 8px;
        background: linear-gradient(45deg, var(--primary-color), #2ecc71);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .upload-text {
        font-size: 15px;
        margin-bottom: 6px;
        font-weight: 500;
    }
    
    .upload-hint {
        font-size: 12px;
        margin-bottom: 15px;
        color: #999;
    }
    
    .btn-primary {
        padding: 12px 24px;
        border-radius: 25px;
        font-size: 14px;
        font-weight: 500;
        background: linear-gradient(45deg, var(--primary-color), #2ecc71);
        border: none;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    }
    
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    }
    
    /* 进度条优化 */
    .upload-progress {
        margin-top: 15px;
        padding: 15px;
        background: var(--card-bg);
        border-radius: 10px;
        border: 1px solid var(--card-border);
    }
    
    .progress-bar {
        height: 8px;
        border-radius: 4px;
        background: var(--light-gray);
    }
    
    .progress-fill {
        border-radius: 4px;
        background: linear-gradient(90deg, var(--primary-color), #2ecc71);
    }
    
    .progress-text {
        margin-top: 8px;
        font-size: 13px;
        text-align: center;
    }
    
    /* 文件列表区域优化 */
    .files-section h2 {
        font-size: 18px;
        margin-bottom: 15px;
        color: var(--heading-color);
    }
    
    .files-controls {
        background: var(--card-bg);
        padding: 15px;
        border-radius: 12px;
        border: 1px solid var(--card-border);
        margin-bottom: 15px;
    }
    
    #refreshBtn {
        background: linear-gradient(45deg, var(--primary-color), #2ecc71);
        color: white;
        border: none;
        padding: 10px 18px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    }
    
    #refreshBtn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    }
    
    .search-box {
        margin-top: 12px;
    }
    
    .search-box input {
        padding: 12px 40px 12px 15px;
        border-radius: 20px;
        border: 1px solid var(--card-border);
        background: var(--bg-color);
        font-size: 14px;
        transition: all 0.3s ease;
    }
    
    .search-box input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        outline: none;
    }
    
    .search-box i {
        right: 12px;
        font-size: 14px;
    }
    
    /* 文件项优化 */
    .file-item {
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 10px;
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .file-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--primary-color), #2ecc71);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .file-item:hover::before {
        transform: translateX(0);
    }
    
    .file-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        border-color: rgba(52, 152, 219, 0.3);
    }
    
    .file-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 14px;
        background: linear-gradient(45deg, var(--primary-color), #2ecc71);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .file-name {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.3;
        margin-bottom: 4px;
    }
    
    .file-meta {
        font-size: 11px;
        gap: 8px;
        color: #888;
    }
    
    .btn-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        font-size: 13px;
        background: var(--light-gray);
        transition: all 0.3s ease;
    }
    
    .btn-icon:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
    }
    
    /* 弹窗优化 */
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        border-radius: 15px;
        max-height: calc(100vh - 40px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
    
    .modal-header {
        padding: 20px;
        border-bottom: 1px solid var(--card-border);
        background: linear-gradient(135deg, var(--card-bg) 0%, rgba(52, 152, 219, 0.05) 100%);
        border-radius: 15px 15px 0 0;
    }
    
    .modal-header h3 {
        font-size: 16px;
        margin: 0;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: var(--light-gray);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 15px;
        padding: 12px;
        background: rgba(52, 152, 219, 0.05);
        border-radius: 8px;
        border-left: 3px solid var(--primary-color);
    }
    
    .info-item label {
        font-size: 12px;
        font-weight: 600;
        color: var(--primary-color);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .info-item span {
        font-size: 13px;
        word-break: break-all;
    }
    
    .link-container {
        width: 100%;
        margin-top: 4px;
    }
    
    .link-container input {
        border-radius: 8px;
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .btn-copy {
        border-radius: 8px;
        padding: 8px 12px;
        background: linear-gradient(45deg, var(--primary-color), #2ecc71);
        font-size: 12px;
        font-weight: 500;
    }
    
    /* 二维码区域优化 */
    .qr-section {
        margin: 20px 0;
        padding: 15px;
        background: white;
        border-radius: 10px;
        text-align: center;
    }
    
    .qr-section h4 {
        font-size: 14px;
        margin-bottom: 10px;
        color: #333;
    }
    
    .qr-code {
        background: white;
        padding: 10px;
        border-radius: 8px;
        display: inline-block;
    }
    
    /* 操作按钮优化 */
    .file-actions {
        gap: 8px;
        margin-top: 15px;
    }
    
    .file-actions button {
        flex: 1;
        padding: 12px 16px;
        border-radius: 25px;
        font-size: 13px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all 0.3s ease;
    }
    
    .btn-primary {
        background: linear-gradient(45deg, var(--primary-color), #2ecc71);
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    }
    
    .btn-danger {
        background: linear-gradient(45deg, #e74c3c, #c0392b);
        box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    }
    
    .file-actions button:hover {
        transform: translateY(-2px);
    }
    
    /* 空状态和加载状态优化 */
    .empty-state {
        padding: 40px 20px;
        text-align: center;
    }
    
    .empty-state i {
        font-size: 40px;
        margin-bottom: 12px;
        color: #ddd;
    }
    
    .loading {
        padding: 30px;
    }
    
    .loading i {
        font-size: 20px;
        color: var(--primary-color);
    }
}

/* --- 博客页面样式 --- */

/* 博客网格布局 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 中等屏幕调整为2列 */
@media (max-width: 1400px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 博客卡片基础样式 - 优化版本：更紧凑、字体更小 */
.blog-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-base);
    padding: 1.2rem;  /* 从2rem减少到1.2rem，节省40%空间 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.blog-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, 
        var(--card-bg) 0%, 
        rgba(52, 152, 219, 0.03) 100%);
}

.blog-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;  /* 从4px减少到3px，更精致 */
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* 卡片悬停效果增强 - 突出视觉吸引力 */
.blog-card:hover .blog-title,
.project-card:hover .project-title {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.blog-card:hover .blog-badge,
.project-card:hover .project-badge {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* 强调重点内容的视觉效果 */
.blog-excerpt strong {
    color: var(--primary-color);
    font-weight: 700;
    background: rgba(52, 152, 219, 0.1);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

/* 博客头部 - 减少间距 */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;  /* 从1.5rem减少到0.8rem */
}

.blog-date {
    font-size: 0.75rem;  /* 从0.9rem减小到0.75rem */
    color: var(--text-color);
    opacity: 0.7;
    font-weight: 500;
}

.blog-badge {
    padding: 0.25rem 0.6rem;  /* 减少内边距 */
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 15px;  /* 稍微减小圆角 */
    font-size: 0.7rem;    /* 从0.8rem减小到0.7rem */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.2rem;          /* 减少间距 */
}

/* 博客预览区域 - 紧凑版本 */
.blog-preview {
    margin-bottom: 0.8rem;  /* 从1.5rem减少到0.8rem */
}

.preview-image {
    position: relative;
    height: 80px;  /* 从120px减少到80px，节省33%高度 */
    background: linear-gradient(135deg, 
        rgba(52, 152, 219, 0.1), 
        rgba(231, 76, 60, 0.1));
    border-radius: var(--border-radius-base);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-icon {
    font-size: 2rem;  /* 从3rem减小到2rem */
    opacity: 0.8;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 0.5rem;  /* 从1rem减少到0.5rem */
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;  /* 增加字体大小控制 */
}

/* 博客信息区域 - 紧凑间距 */
.blog-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;  /* 从1rem减少到0.6rem */
}

.blog-title {
    font-size: 1.1rem;    /* 从1.3rem减小到1.1rem */
    line-height: 1.3;     /* 从1.4减小到1.3，更紧凑 */
    margin: 0;
    color: var(--heading-color);
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* 限制最多显示2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-subtitle {
    color: var(--primary-color);
    font-size: 0.8rem;   /* 从0.9rem减小到0.8rem */
    font-weight: 600;
    margin: 0;
    opacity: 0.9;
}

.blog-excerpt {
    color: var(--text-color);
    line-height: 1.5;     /* 从1.6减小到1.5 */
    opacity: 0.9;
    font-size: 0.85rem;   /* 增加字体大小控制 */
    display: -webkit-box;
    -webkit-line-clamp: 3;  /* 限制最多显示3行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt p {
    margin: 0;
    margin-bottom: 0.3rem;  /* 段落间小间距 */
}

.blog-excerpt p:last-child {
    margin-bottom: 0;
}

/* 博客标签 - 精简版本 */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;  /* 从0.5rem减少到0.3rem */
}

.blog-tags .tag {
    padding: 0.2rem 0.4rem;  /* 从0.3rem 0.6rem减少到0.2rem 0.4rem */
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    border-radius: 10px;     /* 从15px减少到10px */
    font-size: 0.7rem;       /* 从0.8rem减小到0.7rem */
    font-weight: 500;
    border: 1px solid rgba(52, 152, 219, 0.2);
    display: flex;
    align-items: center;
    gap: 0.15rem;           /* 从0.2rem减少到0.15rem */
}

/* 技术标签 - 精简版本 */
.blog-tech {
    margin-top: 0.3rem;  /* 从0.5rem减少到0.3rem */
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;        /* 从0.4rem减少到0.25rem */
}

.tech-tag {
    padding: 0.15rem 0.35rem;  /* 从0.2rem 0.5rem减少 */
    background: var(--light-gray);
    color: var(--text-color);
    border-radius: 8px;        /* 从12px减少到8px */
    font-size: 0.65rem;        /* 从0.75rem减小到0.65rem */
    font-weight: 500;
    opacity: 0.8;
}

/* 博客元信息 - 紧凑版本 */
.blog-meta {
    display: flex;
    gap: 1rem;           /* 从1.5rem减少到1rem */
    align-items: center;
    padding-top: 0.6rem; /* 从1rem减少到0.6rem */
    border-top: 1px solid var(--card-border);
}

.reading-time,
.blog-category {
    display: flex;
    align-items: center;
    gap: 0.3rem;         /* 从0.4rem减少到0.3rem */
    font-size: 0.75rem;  /* 从0.85rem减小到0.75rem */
    color: var(--text-color);
    opacity: 0.8;
}

.reading-time i,
.blog-category i {
    color: var(--primary-color);
}

/* 博客操作按钮 */
.blog-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.blog-actions .btn-primary,
.blog-actions .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;  /* 居中对齐内容 */
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-base);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;      /* 防止文字换行 */
    min-width: 120px;         /* 设置最小宽度确保四个字在一行 */
}

.blog-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    flex: 1;
}

.blog-actions .btn-secondary {
    background: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--button-border);
}

.blog-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.blog-actions .btn-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
}

/* 博客统计 */
.blog-stats {
    margin: 3rem 0;
}

.blog-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.blog-stats .stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-base);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.blog-stats .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.blog-stats .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.blog-stats .stat-label {
    color: var(--text-color);
    font-weight: 600;
    opacity: 0.8;
}

/* 博客订阅区域 */
.blog-subscribe {
    background: linear-gradient(135deg, 
        rgba(52, 152, 219, 0.1), 
        rgba(231, 76, 60, 0.1));
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-base);
    padding: 2.5rem;
    margin-top: 3rem;
}

.subscribe-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.subscribe-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.subscribe-text {
    flex: 1;
}

.subscribe-text h3 {
    margin: 0 0 0.5rem 0;
    color: var(--heading-color);
    font-size: 1.4rem;
}

.subscribe-text p {
    margin: 0;
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.6;
}

.subscribe-actions .btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: var(--border-radius-base);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.subscribe-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

/* 博客响应式设计 */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .blog-card {
        padding: 1rem;
    }
    
    /* 移动端按钮优化 - 确保"阅读全文"在一行 */
    .blog-actions .btn-primary,
    .blog-actions .btn-secondary {
        min-width: 100px;         /* 移动端减小最小宽度 */
        padding: 0.6rem 1rem;     /* 减少内边距节省空间 */
        font-size: 0.85rem;       /* 稍微减小字体 */
    }
    
    .blog-actions {
        gap: 0.5rem;              /* 减少按钮间距 */
    }
    
    /* 统一文章布局的移动端优化 */
    .shorts-layout, 
    .blog-layout {
        width: 100% !important;
        padding: 0.25rem !important;
    }
    
    .article-container {
        max-width: none !important;
        width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
        border-radius: 4px !important;
    }
    
    .article-title {
        font-size: 1.6rem !important;
    }
    
    .share-platforms {
        gap: 0.5rem;
    }
    
    .share-platform {
        padding: 0.75rem;
        min-width: 70px;
    }
    
    .blog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .blog-actions {
        flex-direction: column;
    }
    
    .blog-actions .btn-primary,
    .blog-actions .btn-secondary {
        justify-content: center;
    }
    
    .subscribe-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .blog-card {
        padding: 1rem;
    }
    
    .blog-title {
        font-size: 1.1rem;
    }
    
    .blog-tags {
        gap: 0.3rem;
    }
    
    .blog-tags .tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
    
    .blog-subscribe {
        padding: 1rem;
    }
}

/* 微信浏览器和iOS Safari特殊优化 */
@media screen and (max-width: 768px) {
    /* 针对微信内置浏览器的特殊处理 */
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
    }
    
    /* 防止iOS Safari的自动缩放 */
    input, textarea, select {
        font-size: 16px !important;
    }
    
    /* 确保所有页面组件在移动端完全利用屏幕宽度 */
    .page-content,
    .main-content,
    .container,
    .blog-grid,
    .projects-grid,
    .contact-container {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* 优化卡片组件的移动端展示 */
    .blog-card,
    .project-card,
    .service-card,
    .contact-card {
        margin: 0.5rem 0 !important;
        border-radius: 8px;
    }
    
    /* 优化按钮在移动端的点击体验 */
    .btn, button, .nav-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    /* 修复微信分享时的布局问题 */
    img {
        max-width: 100%;
        height: auto;
    }
}