:root {
    /* 更新配色方案 */
    --primary-color: #FF6B6B;     /* 活力珊瑚红 */
    --secondary-color: #4ECDC4;   /* 清新薄荷绿 */
    --accent-color: #FFD93D;      /* 明亮黄色 */
    --text-color: #2D3436;        /* 柔和深灰 */
    --background-color: #E3F2FD;  /* 更新：浅蓝色背景 */
    --section-bg-1: #FFF5E6;      /* 新增：温暖米色背景 */
    --section-bg-2: #E8F5E9;      /* 新增：浅绿色背景 */
    --hover-color: #1B5E20;       /* 更深的绿色 */
    --hover-bg-dark: #2E7D32;     /* 新增：深绿色用于背景 */
    --hover-text-color: #FFFFFF;  /* 保持白色文字 */
}

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

body {
    font-family: 'ZCOOL KuaiLe', 'Comic Sans MS', cursive;
    background: linear-gradient(135deg, #E3F2FD 0%, #FFF5E6 100%);
    color: var(--text-color);
    line-height: 1.6;
}

/* 漂浮字母动画 */
.floating-letters {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* 导航栏样式优化 */
.main-nav {
    background: linear-gradient(to right, rgba(255,107,107,0.95), rgba(78,205,196,0.95));
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    background-color: var(--hover-bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-links a::after {
    content: '🎮';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-links a:hover::after {
    opacity: 1;
    transform: rotate(15deg);
}

.logo-text {
    color: white;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* 英雄区域样式 */
.hero {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--section-bg-1) 0%, #FFFFFF 100%);
    border-radius: 0 0 30px 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;  /* 添加相对定位 */
    overflow: hidden;    /* 限制装饰元素在区域内 */
    min-height: 60vh;    /* 确保有足够的高度 */
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

.hero h1 {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.8rem;  /* 稍微增大字号 */
    margin-bottom: 2.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));  /* 使用渐变色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);  /* 添加轻微阴影 */
    font-weight: bold;
    letter-spacing: 1px;  /* 增加字间距 */
    animation: fadeIn 1s ease-out;  /* 添加淡入动画 */
}

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

.btn-start {
    display: inline-flex;
    align-items: center;
    background-color: #FFD93D;
    color: #333;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.3s;
    margin: 0 auto;
    width: fit-content;
}

.btn-start:hover {
    transform: scale(1.05);
}

.arrow-icon {
    width: 20px;
    margin-left: 10px;
}

.hero-image img {
    max-width: 500px;
    border-radius: 20px;
}

/* 特性区域样式 */
.features {
    padding: 4rem 2rem;
    background-color: #fff;
}

.features h2 {
    text-align: center;
    color: #4AA5FF;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

/* 演示区域样式 */
.demo {
    background: linear-gradient(45deg, #FFE5E5 0%, #E5F8FF 100%);
    padding: 5rem 2rem;
    position: relative;
    margin: 2rem 0;
    border-radius: 30px;
}

.demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255,107,107,0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(78,205,196,0.1) 0%, transparent 30%);
    border-radius: 30px;
}

.demo h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.demo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-secondary);
}

.stat-card h3 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border-radius: 30px 30px 0 0;
    margin-top: 2rem;
    color: white;
    padding: 4rem 2rem 1rem;
    position: relative;
    overflow: hidden;
}

/* 添加装饰性背景 */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 30%);
    opacity: 0.6;
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);  /* 使用明亮黄色突出标题 */
    font-size: 1.2rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.footer-section a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.footer-bottom {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-bottom p {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .hero-image img {
        max-width: 100%;
    }

    .nav-links {
        display: none;
    }
}

/* 新增样式 */
.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #666;
}

.practice-options {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 3rem;
}

.practice-card {
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
    border: none;
    position: relative;
    overflow: hidden;
}

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

.practice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #4CAF50;
    transition: all 0.3s ease;
}

.practice-card:hover::before {
    width: 6px;
}

.card-content h2 {
    color: #4CAF50;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-family: 'ZCOOL KuaiLe', cursive;
}

.card-content ul {
    list-style: none;
    padding: 0;
}

.card-content li {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #666;
    font-size: 1.1rem;
}

.card-content li::before {
    content: '•';
    color: #4CAF50;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .practice-card {
        padding: 1.5rem;
        margin: 0.8rem;
    }

    .card-content h2 {
        font-size: 1.5rem;
    }

    .card-content li {
        font-size: 1rem;
    }
}

.practice-card:hover h2,
.practice-card:hover li,
.practice-card:hover p {
    color: var(--hover-text-color);
}

.practice-card:hover li:before {
    color: var(--accent-color);  /* 使用明亮的黄色作为勾选标记 */
}

.practice-card:hover h2 {
    color: var(--hover-color);  /* 修改：使用统一的悬停颜色 */
}

.practice-card:hover .practice-icon {
    transform: scale(1.1); /* 图标轻微放大 */
}

.practice-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.practice-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.practice-card p {
    color: #666;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
}

.feature-card ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.feature-card li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-card li:before {
    content: "✓";
    color: #4CAF50;
    position: absolute;
    left: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .practice-options {
        flex-direction: column;
        align-items: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

.practice-card ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
    text-align: left;
}

.practice-card li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.practice-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
}

.practice-card h2 {
    margin-bottom: 0.5rem;
}

.practice-options {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* 统一所有链接的基础样式 */
a {
    transition: color 0.3s ease, background-color 0.3s ease;  /* 新增：统一的过渡效果 */
}

/* 统一按钮样式（如果有的话） */
.btn-start:hover {
    background-color: var(--hover-color);
    color: var(--hover-text-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 添加趣味动画和装饰 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

/* 添加装饰性元素 */
.hero::before {
    content: '⌨️';
    position: absolute;
    left: 5%;
    top: 20%;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.hero::after {
    content: '🎯';
    position: absolute;
    right: 5%;
    top: 30%;
    font-size: 2rem;
    animation: float 4s ease-in-out infinite;
}

/* 添加互动元素 */
.practice-card {
    position: relative;
    overflow: hidden;
}

.practice-card::before {
    content: '👆';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.practice-card:hover::before {
    opacity: 1;
    transform: translateY(0);
}

/* 添加装饰性背景 */
.floating-letters::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255,107,107,0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(78,205,196,0.1) 0%, transparent 20%);
    animation: rotate 30s linear infinite;
}

/* 添加趣味性提示 */
.practice-card .card-content::after {
    content: 'Click me!';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--accent-color);
    opacity: 0;
    transition: all 0.3s ease;
}

.practice-card:hover .card-content::after {
    opacity: 1;
    transform: translateX(0);
}

/* 更新装饰元素容器样式 */
.decoration-container {
    position: absolute;  /* 改为 absolute */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;  /* 调整层级 */
    overflow: hidden;
}

/* 更新 hero 样式 */
.hero {
    padding: 2rem;
    text-align: center;
    background-color: #fff;
    position: relative;  /* 添加相对定位 */
    overflow: hidden;    /* 限制装饰元素在区域内 */
    min-height: 60vh;    /* 确保有足够的高度 */
}

/* 调整装饰元素动画范围 */
@keyframes floatSlow {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, -10px) rotate(5deg);
    }
    50% {
        transform: translate(0, -20px) rotate(0deg);
    }
    75% {
        transform: translate(-10px, -10px) rotate(-5deg);
    }
}

/* 更新装饰元素样式 */
.decoration-item {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.12;
    filter: blur(0.5px);
    transition: all 3s ease;
    animation: floatSlow 8s ease-in-out infinite;
}

/* 为每个装饰元素设置固定位置 */
.decoration-item:nth-child(1) { 
    top: 20%;
    left: 10%;
}
.decoration-item:nth-child(2) { 
    top: 30%;
    right: 15%;
}
.decoration-item:nth-child(3) { 
    bottom: 25%;
    left: 15%;
}
.decoration-item:nth-child(4) { 
    bottom: 20%;
    right: 10%;
}

/* 确保导航栏样式正确显示 */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

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

.logo-img {
    width: 40px;
    height: 40px;
}

/* 修复导航链接在移动端的显示问题 */
@media (max-width: 768px) {
    .nav-links {
        display: flex;  /* 改为 flex 而不是 none */
        gap: 1rem;
        flex-wrap: wrap;  /* 允许在小屏幕上换行 */
        justify-content: center;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links a {
        margin: 0.5rem;
        font-size: 0.9rem;
    }
}

/* 统一所有链接的基础悬停效果 */
a {
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* 按钮悬停效果增强 */
.btn-start:hover {
    background-color: var(--hover-color);
    color: var(--hover-text-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 统计卡片悬停效果 */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background-color: var(--hover-bg-dark);
}

.stat-card:hover h3,
.stat-card:hover p {
    color: var(--hover-text-color);
}

/* 添加页面分隔装饰 */
.container {
    position: relative;
    padding: 2rem 0;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 0% 0%, var(--section-bg-1) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, var(--section-bg-2) 0%, transparent 40%);
    opacity: 0.5;
    z-index: -1;
}

/* 添加波浪分隔效果 */
.wave-divider {
    position: relative;
    height: 50px;
    overflow: hidden;
}

.wave-divider::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='1' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
}

/* 卡片基础样式统一 */
.practice-card, .stat-card, .feature-card {
    background: linear-gradient(145deg, #FFFFFF 0%, var(--section-bg-2) 100%);
    border: 3px solid var(--secondary-color);  /* 默认边框色使用薄荷绿 */
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

/* 练习卡片悬停效果 */
.practice-card:hover {
    transform: translateY(-8px);
    background: var(--hover-bg-dark);
    border-color: var(--hover-color);  /* 悬停时边框变深绿色 */
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* 统计卡片样式 */
.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    background-color: var(--hover-bg-dark);
    border-color: var(--hover-color);
}

/* 特性卡片样式 */
.feature-card:hover {
    transform: translateY(-5px);
    background-color: var(--hover-bg-dark);
    border-color: var(--hover-color);
}

/* 统一悬停时的文字颜色变化 */
.practice-card:hover h2,
.practice-card:hover li,
.practice-card:hover p,
.stat-card:hover h3,
.stat-card:hover p,
.feature-card:hover h3,
.feature-card:hover p {
    color: var(--hover-text-color);
}

/* 调整 container 和 main 的间距 */
.container {
    padding: 20px;  /* 减小内边距 */
    margin-top: -40px;  /* 使用负边距来减少与上方的间距 */
}

main {
    margin-bottom: 40px;  /* 减小底部边距 */
}

/* 调整 demo 部分的间距 */
.demo {
    padding: 40px 0;  /* 减小上下内边距 */
}

/* 悬浮二维码样式 */
.floating-qrcode {
    position: fixed;
    top: 15%;  /* 垂直居中 */
    right: 20px;  /* 距离右侧边缘20px */
    transform: translateY(-50%);  /* 精确垂直居中 */
    width: 120px;  /* 调整二维码大小 */
    height: 120px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;  /* 确保在其他元素上方 */
    opacity: 0.8;  /* 略微透明，不遮挡页面 */
    transition: all 0.3s ease;  /* 添加平滑过渡效果 */
    cursor: pointer;  /* 鼠标悬停显示手型 */
}

.floating-qrcode:hover {
    opacity: 1;  /* 鼠标悬停时完全显示 */
    transform: translateY(-50%) scale(1.05);  /* 保持垂直居中并轻微放大 */
}

/* 为小屏幕设备添加响应式样式 */
@media screen and (max-width: 768px) {
    .floating-qrcode {
        width: 80px;
        height: 80px;
        right: 10px;
        /* 保持垂直居中 */
    }
}
