/* style.css */
:root {
    /* 亮色模式变量 */
    --primary-color: #7c4dff; /* 紫色，匹配图片中的外套 */
    --secondary-color: #ffb300; /* 黄色，用于强调和按钮 */
    --bg-color: #f4f7f6; /* 浅灰绿背景 */
    --text-color: #333;
    --card-bg: #ffffff;
    --shadow-color: rgba(124, 77, 255, 0.1);
    --card-shadow: rgba(0, 0, 0, 0.05);
    --nav-bg: #ffffff;
}

/* 暗色模式变量 */
body.dark-mode {
    --primary-color: #b388ff; /* 暗色下紫色调亮，保证对比度 */
    --secondary-color: #ffca28; /* 黄色调亮 */
    --bg-color: #121212; /* 深色背景 */
    --text-color: #e0e0e0; /* 浅灰文字 */
    --card-bg: #1e1e1e; /* 暗色卡片背景 */
    --shadow-color: rgba(179, 136, 255, 0.15);
    --card-shadow: rgba(0, 0, 0, 0.4);
    --nav-bg: #1e1e1e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease; /* 平滑过渡 */
}

/* 导航栏 */
nav {
    background: var(--nav-bg);
    padding: 15px 30px;
    box-shadow: 0 4px 15px var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

nav a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 主题切换按钮 */
#theme-toggle {
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(20deg) scale(1.1);
}

body.dark-mode #theme-toggle:hover {
    color: #121212;
}

/* 主体容器 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 50px 20px;
}

/* 首页 Hero 区域 */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 15px 40px var(--shadow-color);
    overflow: hidden;
    position: relative;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(124, 77, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

body.dark-mode .hero::before {
    background: rgba(179, 136, 255, 0.05);
}

.hero-text {
    flex: 1;
    padding-right: 40px;
    z-index: 1;
}

.hero-text h1 {
    font-size: 52px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 900;
    text-shadow: 2px 2px 0px rgba(124, 77, 255, 0.2);
}

.hero-text p {
    font-size: 18px;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    text-align: center;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    box-shadow: 0 15px 30px var(--card-shadow);
    object-fit: cover;
    border: 5px solid var(--card-bg);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), #5e35b1);
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(124, 77, 255, 0.4);
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(124, 77, 255, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #ff8f00);
    box-shadow: 0 6px 20px rgba(255, 179, 0, 0.4);
}

.btn-secondary:hover {
    box-shadow: 0 10px 25px rgba(255, 179, 0, 0.5);
}

/* 内页通用标题 */
.page-title {
    text-align: center;
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-weight: 900;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 60px 40px;
    box-shadow: 0 15px 40px var(--card-shadow);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* 空状态样式（用于更新日志） */
.empty-state {
    color: var(--text-color);
    opacity: 0.5;
    font-size: 20px;
    padding: 40px 0;
}

.empty-state span {
    display: block;
    font-size: 60px;
    margin-bottom: 20px;
}

/* 响应式适配手机端 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .nav-right {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        gap: 20px;
    }

    .hero {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
        margin-bottom: 30px;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .hero-image img {
        max-width: 250px;
    }
    
    .card {
        padding: 40px 20px;
    }
}