/* 陈恩个人主页 - 合并样式文件 */

/* 重置浏览器默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式变量 - 优化版 */
:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --font-family: "LXGW WenKai Screen", sans-serif;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-orange: #f59e0b;

    /* 优化的排版变量 */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;

    /* 组件色彩方案 - 更柔和的配色 */
    --contact-primary: #059669;
    --contact-light: #10b981;
    --contact-bg: rgba(16, 185, 129, 0.05);

    --about-primary: #2563eb;
    --about-light: #3b82f6;
    --about-bg: rgba(59, 130, 246, 0.05);


}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
    color: var(--text);
    background: var(--bg);
    background-image:
        linear-gradient(135deg, rgba(173, 216, 230, 0.08) 0%, rgba(240, 248, 255, 0.12) 25%, rgba(230, 230, 250, 0.08) 50%, rgba(255, 240, 245, 0.12) 75%, rgba(240, 255, 240, 0.08) 100%),
        radial-gradient(circle at 25% 25%, rgba(135, 206, 250, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(221, 160, 221, 0.06) 0%, transparent 50%);
    background-size: 100% 100%, 100% 100%, 100% 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* 仅在桌面端启用背景动画 */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
    body {
        background-size: 400% 400%, 100% 100%, 100% 100%;
        animation: gentleGradientAnimation 60s ease-in-out infinite;
    }
}

@keyframes gentleGradientAnimation {
    0%, 100% {
        background-position: 0% 50%, 25% 25%, 75% 75%;
        opacity: 1;
    }
    25% {
        background-position: 50% 25%, 30% 30%, 70% 70%;
        opacity: 0.95;
    }
    50% {
        background-position: 100% 50%, 35% 35%, 65% 65%;
        opacity: 0.9;
    }
    75% {
        background-position: 50% 75%, 30% 30%, 70% 70%;
        opacity: 0.95;
    }
}

/* 加载动画 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* 滚动进度条 */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent-purple), var(--accent-green), var(--accent-orange));
    z-index: 1000;
    transition: width 0.3s ease;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* 卡片样式 - 性能优化版 */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.9));
    border-radius: 24px;
    box-shadow: var(--shadow-lg),
                0 0 0 1px rgba(255, 255, 255, 0.8) inset,
                0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border: 1px solid rgba(229, 231, 235, 0.3);
    backdrop-filter: blur(10px);
}

/* 仅在桌面端启用卡片动画 */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
    .card {
        background-size: 300% 300%;
        animation: subtleCardGradient 60s ease-in-out infinite;
    }
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl),
                0 0 0 1px rgba(255, 255, 255, 0.9) inset,
                0 4px 20px rgba(0, 0, 0, 0.08);
}

@keyframes subtleCardGradient {
    0%, 100% {
        background-position: 0% 50%;
        transform: scale(1);
    }
    33% {
        background-position: 50% 25%;
        transform: scale(1.001);
    }
    66% {
        background-position: 100% 75%;
        transform: scale(0.999);
    }
}

/* 仅在桌面端启用卡片边框动画 */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(to right, var(--primary), var(--accent-purple), var(--accent-green), var(--accent-orange));
        background-size: 300% 100%;
        animation: gradientBorder 12s ease infinite;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .card:hover::before {
        transform: scaleX(1);
    }
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}



/* 个人资料部分 */
.profile {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.2);
}

/* 仅在桌面端启用头像渐变边框 */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
    .avatar:before {
        content: '';
        position: absolute;
        inset: -6px;
        border-radius: 50%;
        background: linear-gradient(45deg, var(--primary), var(--accent-purple), var(--accent-green), var(--accent-orange));
        background-size: 300% 300%;
        animation: gradientAvatar 12s ease infinite;
        z-index: -1;
    }
}

@keyframes gradientAvatar {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

.profile h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile .title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.25rem 0;
    padding: 0.75rem 1.25rem;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 24px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-wide);
    transition: all 0.3s ease;
}

.profile .title:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
}

.location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 小组件容器 - 增加间距 */
.widget-container {
    margin-bottom: 2rem;
    position: relative;
}

.widget {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: var(--shadow),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    border: 1px solid rgba(229, 231, 235, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.widget:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-lg),
                0 0 0 1px rgba(255, 255, 255, 0.8) inset,
                0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: rgba(229, 231, 235, 0.4);
}

.widget-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.widget-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 1rem !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

.widget-icon i {
    color: white !important;
    font-size: 18px !important;
}

/* 图标颜色 */
.about-icon {
    background: linear-gradient(135deg, #4f46e5, #3b82f6) !important;
}

.contact-icon {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.knowledge-icon {
    background: linear-gradient(135deg, #f59e0b, #f97316) !important;
}

.products-widget .widget-icon {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
}

.widget-header h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
}

.widget-content {
    color: var(--text-light);
    line-height: var(--line-height-relaxed);
    letter-spacing: var(--letter-spacing-normal);
}

.widget-content p {
    margin-bottom: 1rem;
    line-height: var(--line-height-relaxed);
}

.widget-content p:last-child {
    margin-bottom: 0;
}

/* 联系方式小组件 */
.contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.contact-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--contact-primary), var(--contact-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.contact-text p {
    margin: 0;
    color: var(--text);
    font-weight: 500;
}

.subscribe-btn {
    background: linear-gradient(135deg, var(--contact-primary), var(--contact-light));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* AI知识库卡片 */
.knowledge-card {
    position: relative;
}

.knowledge-description {
    margin-bottom: 1.5rem;
}

.knowledge-description p {
    margin-bottom: 0.75rem;
    color: var(--text);
    font-weight: 500;
    line-height: 1.7;
}

.knowledge-description p:last-child {
    margin-bottom: 0;
}

.knowledge-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    text-decoration: none;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.knowledge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.knowledge-btn i:first-child {
    font-size: 1.1rem;
}

.knowledge-btn i:last-child {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.knowledge-btn:hover i:last-child {
    transform: translateX(4px);
}









/* 个人产品 */
.coming-soon {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(139, 92, 246, 0.3);
}

.coming-soon-icon {
    color: var(--accent-purple);
    font-size: 2rem;
}

.coming-soon-text p {
    margin: 0;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 500;
}

/* 背景装饰 */
.decoration-lines {
    position: fixed;
    top: 0;
    width: 2px;
    height: 100vh;
    background: linear-gradient(to bottom, transparent, var(--primary-light), transparent);
    opacity: 0.3;
    z-index: 0;
}

.decoration-lines.left {
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.decoration-lines.right {
    right: 10%;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.floating-dots {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0.6;
    animation: floatDot 8s ease-in-out infinite;
}

.floating-dot:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.floating-dot:nth-child(2) {
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.floating-dot:nth-child(3) {
    bottom: 30%;
    left: 30%;
    animation-delay: 4s;
}

.floating-dot:nth-child(4) {
    top: 40%;
    right: 40%;
    animation-delay: 6s;
}

@keyframes floatDot {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.6; }
    50% { transform: translateY(-30px) scale(1.2); opacity: 0.8; }
}

/* 侧边装饰 */
.side-decoration {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 0;
    opacity: 0.1;
}

.side-decoration.left {
    left: 2rem;
}

.side-decoration.right {
    right: 2rem;
}

.geometric-shape {
    width: 20px;
    height: 20px;
    background: var(--primary);
}

.geometric-shape.circle {
    border-radius: 50%;
}

.geometric-shape.square {
    border-radius: 4px;
}

.geometric-shape.triangle {
    width: 0;
    height: 0;
    background: transparent;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid var(--primary);
}

.geometric-line {
    width: 2px;
    height: 30px;
    background: var(--primary);
    margin: 0.5rem 0;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal.active {
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    margin: auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.modal-header i {
    color: var(--primary);
    font-size: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
}

/* 社交媒体链接 */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 1.125rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.social-link:hover {
    background: rgba(59, 130, 246, 0.12);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.2);
}

.social-link:active {
    transform: translateY(-1px) scale(0.99);
    transition: all 0.1s ease;
}

.social-link.wechat {
    background: rgba(7, 193, 96, 0.05);
    border-color: rgba(7, 193, 96, 0.1);
}

.social-link.wechat:hover {
    background: rgba(7, 193, 96, 0.12);
    box-shadow: 0 8px 25px rgba(7, 193, 96, 0.2);
    border-color: rgba(7, 193, 96, 0.2);
}

.social-link.github {
    background: rgba(36, 41, 46, 0.05);
    border-color: rgba(36, 41, 46, 0.1);
}

.social-link.github:hover {
    background: rgba(36, 41, 46, 0.12);
    box-shadow: 0 8px 25px rgba(36, 41, 46, 0.2);
    border-color: rgba(36, 41, 46, 0.2);
}

.social-link.public-account {
    background: rgba(255, 165, 0, 0.05);
    border-color: rgba(255, 165, 0, 0.1);
}

.social-link.public-account:hover {
    background: rgba(255, 165, 0, 0.12);
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.2);
    border-color: rgba(255, 165, 0, 0.2);
}

.social-link.youtube {
    background: rgba(255, 0, 0, 0.05);
    border-color: rgba(255, 0, 0, 0.1);
}

.social-link.youtube:hover {
    background: rgba(255, 0, 0, 0.12);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.2);
}

.social-link.bilibili {
    background: rgba(0, 174, 236, 0.05);
    border-color: rgba(0, 174, 236, 0.1);
}

.social-link.bilibili:hover {
    background: rgba(0, 174, 236, 0.12);
    box-shadow: 0 8px 25px rgba(0, 174, 236, 0.2);
    border-color: rgba(0, 174, 236, 0.2);
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
    color: white;
}

.social-link.wechat .social-icon {
    background: linear-gradient(135deg, #07C160, #00A854);
}

.social-link.public-account .social-icon {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
}

.social-link.youtube .social-icon {
    background: linear-gradient(135deg, #FF0000, #CC0000);
}

.social-link.bilibili .social-icon {
    background: linear-gradient(135deg, #00AEEC, #0099CC);
}

.social-link.github .social-icon {
    background: linear-gradient(135deg, #24292e, #1a1e22);
}

.social-info {
    flex: 1;
}

.social-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.social-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.social-arrow {
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-link:hover .social-arrow {
    transform: translateX(5px);
    color: var(--text);
}

.copy-icon {
    color: var(--primary);
    transition: all 0.2s ease;
}

.social-link.wechat:hover .copy-icon {
    transform: scale(1.1);
    color: #07C160;
}

.social-link.copy-active {
    background: rgba(7, 193, 96, 0.1);
    transform: scale(0.98);
}

/* 二维码弹窗样式 */
.qr-modal-content {
    max-width: 400px;
    text-align: center;
}

.qr-container {
    padding: 1rem 0;
}

.qr-image {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.qr-text {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast i {
    font-size: 1.1rem;
}

/* 页脚 */
.footer {
    margin-top: 3rem;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid rgba(229, 231, 235, 0.3);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.footer .icp {
    text-align: center;
    margin-top: 10px;
}

.footer .icp a {
    color: #666;
    text-decoration: none;
    font-size: 12px;
}

.footer .icp a:hover {
    color: #3b82f6;
}

.copyright {
    margin-bottom: 0.5rem;
}

.copyright a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: var(--primary-dark);
}

.year, .name {
    font-weight: 600;
}

/* 按钮通用样式 */
button, .social-icon {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:active, .social-icon:active {
    transform: scale(0.95);
}

/* 交互元素优化样式 */
.interactive-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-project {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 移动端触摸反馈 */
.touch-active {
    transform: scale(0.98) !important;
    opacity: 0.8 !important;
    transition: all 0.1s ease !important;
}

/* 优化移动端交互 */
@media (hover: hover) and (pointer: fine) {
    /* 仅在支持精确悬停的设备上应用悬停效果 */
    .skill-item:hover,
    .tech-item:hover {
        transform: translateY(-3px) scale(1.02);
    }

    .project-item:hover {
        transform: translateY(-3px) scale(1.01);
    }
}

/* 移动设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 移动设备上禁用悬停效果，使用触摸反馈 */
    .widget:hover,
    .card:hover {
        transform: none;
        box-shadow: inherit;
    }

    .social-link {
        min-height: 60px;
        padding: 1.25rem;
    }
}

/* 淡入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 鼠标跟随效果 */
.cursor {
    position: fixed;
    background: var(--primary-light);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    opacity: 0.6;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    filter: blur(4px);
    animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(3); }
}

/* 响应式设计 */

/* 平板设备样式 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 20px;
    }

    .card {
        max-width: 100%;
        padding: 30px;
    }

    .widget-container {
        width: 100%;
    }

    .side-decoration {
        display: none;
    }


}

/* 移动设备样式 (< 768px) */
@media screen and (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 10px;
    }

    .card {
        padding: 20px;
        border-radius: 15px;
    }

    .profile {
        flex-direction: column;
        text-align: center;
    }

    .profile .avatar {
        margin: 0 auto 15px;
    }

    .decoration-lines {
        display: none;
    }

    .widget {
        padding: 1.5rem;
    }

    .widget-header h2 {
        font-size: 1.2rem;
    }



    .contact-card {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-content {
        justify-content: center;
        text-align: center;
    }

    .subscribe-btn {
        align-self: center;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        margin: 0;
    }

    .social-links {
        gap: 0.75rem;
    }

    .social-link {
        padding: 0.75rem;
    }

    .social-icon {
        width: 45px;
        height: 45px;
        margin-right: 0.75rem;
    }

    .social-info h4 {
        font-size: 1rem;
    }

    .social-info p {
        font-size: 0.85rem;
    }
}

/* 小型移动设备样式 (< 480px) */
@media screen and (max-width: 480px) {
    html {
        font-size: 15px;
    }

    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    .container {
        padding: 8px;
        margin: 0.5rem auto;
    }

    .card {
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 10px;
    }

    .profile {
        margin-bottom: 1.5rem;
    }

    .avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 10px;
    }

    h1 {
        font-size: 1.7rem;
        margin-bottom: 0.5rem;
    }

    .title {
        margin: 0.7rem 0;
        font-size: 1rem;
    }



    .widget-decoration {
        display: none;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
        justify-content: center;
    }

    .modal-content {
        border-radius: 15px 15px 0 0;
        padding: 1.5rem;
    }

    .modal-header {
        margin-bottom: 1.5rem;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .social-link {
        padding: 0.75rem;
        border-radius: 10px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
        font-size: 1rem;
    }

    .social-info h4 {
        font-size: 0.95rem;
    }

    .social-info p {
        font-size: 0.8rem;
    }

    .footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* 特别小的移动设备 (< 360px) */
@media screen and (max-width: 360px) {
    body {
        font-size: 13px;
    }

    .card {
        padding: 15px 10px;
    }

    .widget-content {
        padding: 12px 10px;
    }

    .widget-header {
        padding: 12px 10px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .title {
        font-size: 1rem;
    }



    .modal-content {
        padding: 12px;
    }

    .social-link {
        padding: 10px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
        margin-right: 10px;
        font-size: 0.9rem;
    }

    .social-info h4 {
        font-size: 0.95rem;
    }

    .social-info p {
        font-size: 0.8rem;
    }
}

/* 针对打印的样式优化 */
@media print {
    body {
        background: white;
    }

    .card {
        box-shadow: none;
        max-width: 100%;
    }

    .decoration-lines,
    .side-decoration,
    .floating-dots,
    .subscribe-btn {
        display: none !important;
    }

    a {
        text-decoration: underline;
    }
}

/* 减少动画（可访问性优化） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating-dot,
    .decoration-lines,
    .loading-spinner {
        animation: none !important;
    }

    .fade-in {
        transition: none !important;
    }
}

/* 通用AI课程卡片样式 */
.course-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.course-inner {
    padding: 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(139,92,246,0.04));
    border: 1px solid rgba(59,130,246,0.12);
    box-shadow: 0 6px 18px rgba(59,130,246,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.course-inner h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.course-inner p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.5;
}

.course-card:hover .course-inner,
.course-card:focus .course-inner {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(59,130,246,0.12);
    background: linear-gradient(135deg, rgba(59,130,246,0.09), rgba(139,92,246,0.06));
}

/* 可访问性：键盘聚焦样式 */
.course-card:focus {
    outline: 3px solid rgba(59,130,246,0.18);
    outline-offset: 3px;
}

/* 移动端微调 */
@media screen and (max-width: 480px) {
    .course-inner {
        padding: 1rem;
        border-radius: 12px;
    }
    .course-inner h3 {
        font-size: 1rem;
    }
}

/* 价格徽章与 CTA 按钮 */
.course-badge {
    display: inline-block;
    background: linear-gradient(90deg, #ffedd5, #fff7ed);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.15);
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.88rem;
    /* remove bottom margin when inline with title */
    margin: 0;
}

.course-cta {
    display: flex;
    justify-content: center;
    margin-top: 0.9rem;
}

/* header: title and badge inline */
.course-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

/* 在小屏幕上让徽章换行到标题下方 */
@media screen and (max-width: 480px) {
    .course-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    .course-badge {
        align-self: flex-start;
    }
}

.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.btn-cta {
    background: linear-gradient(135deg, #ff7a18, #ff5724);
    color: white;
    border: none;
    box-shadow: 0 8px 20px rgba(255, 87, 36, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-cta:active,
.btn-cta:focus {
    transform: translateY(-1px);
}

/* 让整张卡片保持可点击，同时按钮也看起来像独立元素 */
.course-card { text-decoration: none; }
.course-card .btn { pointer-events: none; }

/* 回到主页悬浮按钮 */
.back-home-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    background: linear-gradient(135deg, #ff7a18, #ff5724);
    color: #fff;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(255,87,36,0.18);
    z-index: 20000;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.back-home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255,87,36,0.22);
}

@media screen and (max-width: 480px) {
    .back-home-btn {
        top: 12px;
        right: 12px;
        padding: 0.45rem 0.7rem;
        font-size: 0.95rem;
    }
}

/* 图标按钮样式 */
.back-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
}

.back-home-btn i {
    font-size: 18px;
}

.back-home-btn .back-home-text {
    margin-left: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.back-home-btn {
    padding: 8px 12px;
    min-width: 110px;
    height: auto;
    border-radius: 999px;
}

.back-home-btn i { font-size: 18px; margin-right: 6px; }

@media screen and (max-width: 480px) {
    .back-home-btn .back-home-text { display: none; }
    .back-home-btn { min-width: 44px; padding: 6px; }
}

/* 页面退出淡出效果 */
.page-exit {
    transition: opacity 240ms ease-out, transform 240ms ease-out;
    opacity: 0;
    transform: translateY(6px) scale(0.995);
}
