/* 暗色主题变量 */
:root[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-color: #64ffda;
    --border-color: #2d2d2d;
    --nav-bg: rgba(10, 10, 10, 0.95);
    --card-bg: #1a1a1a;
}

/* 亮色主题变量 */
:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-color: #2196f3;
    --border-color: #e0e0e0;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
}

/* 默认使用暗色主题 */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-color: #64ffda;
    --border-color: #2d2d2d;
    --nav-bg: rgba(10, 10, 10, 0.95);
    --card-bg: #1a1a1a;
}

/* 全局背景和文字颜色 */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Noto Sans SC', sans-serif;
}

/* 欢迎区域样式优化 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 0 2rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
    text-align: left;
    animation: fadeIn 1s ease;
}

.hero-title {
    margin-bottom: 2rem;
}

.hero-name {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1rem;
    display: block;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 400;
    opacity: 0.9;
    display: block;
    margin-top: 1rem;
}

.scroll-down {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-down:hover {
    opacity: 1;
}

/* 轮播区域样式优化 */
.works {
    padding: 4rem 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.carousel-container {
    max-width: 800px;  /* 减小最大宽度 */
    margin: 2rem auto;
    position: relative;
}

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 450px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.carousel-inner {
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-inner img:hover {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.carousel-btn:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
}

.prev { left: 1rem; }
.next { right: 1rem; }

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--accent-color);
    transform: scale(1.2);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-name {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .carousel {
        height: 300px;
    }

    .works {
        padding: 2rem 1rem;
    }
}

/* 页脚样式更新 */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.footer-nav {
    padding-top: 1rem;
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--accent-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* 导航栏样式更新 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 主要内容区域卡片样式 */
.works, .about, .contact {
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* 按钮样式更新 */
.btn {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 关于我部分样式优化 */
.about {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.about-content {
    max-width: 1000px;
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: start;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.about-image:hover img {
    filter: grayscale(0%);
}

.about-text {
    color: var(--text-secondary);
}

.about-intro {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.detail-item h3 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill {
    padding: 0.5rem 1rem;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* 页脚样式优化 */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
}

.footer-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-section h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        max-width: 300px;
        margin: 0 auto;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* 联系方式部分样式 */
.contact {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.contact-content {
    max-width: 1200px;
    margin: 3rem auto 0;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.contact-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.contact-card h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.contact-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent-color);
    border-radius: 25px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
}

/* 微信二维码弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1100;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    max-width: 300px;
    width: 90%;
    border: 1px solid var(--border-color);
}

.qr-code {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact {
        padding: 4rem 1rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 1.5rem;
    }
}

/* AI 助手部分样式 */
.ai-assistant {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.ai-chat-container {
    max-width: 800px;
    margin: 3rem auto 0;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chat-window {
    display: flex;
    flex-direction: column;
    height: 600px;
    background: var(--bg-primary);
}

.chat-header {
    padding: 1.5rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.chat-title i {
    color: var(--accent-color);
    font-size: 1.4rem;
}

.chat-messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

.message.user {
    align-self: flex-end;
}

.message.ai {
    align-self: flex-start;
}

.message-content {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
}

.message.user .message-content {
    background: var(--accent-color);
    color: var(--bg-primary);
}

.chat-input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    background: var(--card-bg);
}

.chat-input {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.send-message {
    padding: 1rem;
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-message:hover {
    transform: scale(1.05);
    background: var(--accent-color);
    opacity: 0.9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ai-assistant {
        padding: 4rem 1rem;
    }

    .chat-window {
        height: 500px;
    }

    .message {
        max-width: 90%;
    }

    .chat-input-area {
        padding: 1rem;
    }
}

/* 主题切换按钮样式 */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    color: var(--accent-color);
    transform: rotate(15deg);
} 