/* 全新重构 - 无冲突的PC和移动端适配 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 - 固定高度 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    height: 60px;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* Logo样式 */
.logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo-img {
    height: 35px;
    margin-right: 8px;
}

.logo-text {
    font-size: 16px;
    margin-right: 5px;
}

.logo-domain {
    font-size: 12px;
    opacity: 0.8;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 400;
    font-size: 14px;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
}

.user-avatar, .login-btn {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 400;
    font-size: 14px;
    display: flex;
    align-items: center;
    height: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.user-avatar:hover, .login-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.user-avatar-img {
    width: 25px;
    height: 25px;
    border-radius: 50% !important;
    margin-right: 8px;
}

.user-center-text {
    color: white;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

/* 移动端用户头像调整 */
@media (max-width: 768px) {
    .user-avatar-img {
        width: 20px !important;
        height: 20px !important;
        border-radius: 50% !important;
        margin-right: 6px !important;
    }
    
    .user-center-text {
        font-size: 16px !important;
    }
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    background: white;
    margin: 2px 0;
    transition: all 0.3s;
}

/* Hero横幅 */
.hero-banner {
    position: relative;
    height: 600px; /* 降低PC高度 */
    margin-top: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px; /* 减少padding */
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    width: 100%;
    max-width: 1000px;
}

/* 打字软件SLOG */
.typing-slogan {
    text-align: center;
    margin: 0 0 40px 0;
    width: 100%;
}

.typing-slogan img {
    margin-bottom: 70px; /* 图片下空70px */
}

.typing-slogan h2 {
    font-size: 48px;
    margin-bottom: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 25%, #ff6b6b 50%, #4facfe 75%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 107, 107, 0.3);
}

.typing-slogan p {
    font-size: 18px;
    margin-bottom: 20px;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #fff;
    line-height: 1.6;
}

/* 按钮容器 */
.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
    max-width: 600px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 120px;
    text-align: center;
}

.btn-primary {
    background: white;
    color: #667eea;
    border: 2px solid white;
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.btn-typing {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-typing:hover {
    background: linear-gradient(135deg, #ff5252, #d63031);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.4);
}

/* 功能特色区块 */
.features-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.section-header p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 左图右文通用布局 */
.split-section {
    background: #f8f9fa;
}

.split-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* 左图稍大 */
    gap: 48px;
    align-items: center;
}

/* 左文右图时使用 */
.split-reverse {
    grid-template-columns: 0.9fr 1.1fr;
}

.split-media img {
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.split-content h2 {
    font-size: 34px;
    line-height: 1.25;
    margin-bottom: 16px;
    color: #111;
}

.split-content p {
    font-size: 18px;
    color: #555;
    margin-bottom: 16px;
}

.split-list {
    margin: 6px 0 20px;
    padding-left: 18px;
    color: #444;
}

.split-list li {
    margin-bottom: 8px;
}

/* 小屏单列堆叠 */
@media (max-width: 992px) {
    .split-wrapper,
    .split-wrapper.split-reverse {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* 指定高度与背景需求 */
.split-700-media { padding: 0; }
.split-700-media .split-wrapper { height: 700px; }

.split-700-content { background: #ffffff; padding: 0; }
.split-700-content .split-wrapper { height: 700px; }

/* 游戏化体验区块 */
.games-section {
    padding: 80px 0;
    background: white;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.game-card {
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.game-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.game-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.game-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.game-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 用户评价区块 */
.testimonials-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* 移除重复的user-avatar样式定义 */

.user-details h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.user-details p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.rating {
    margin-left: auto;
    font-size: 16px;
}

.testimonial-text {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    font-style: italic;
}

/* 页脚 */
.footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 40px 20px 20px;
}

.footer p {
    font-size: 14px;
    opacity: 0.8;
}

/* 弹窗样式 */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-container.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    height: 90%;
    position: relative;
    overflow: hidden;
}

.modal-header {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: scale(1.1);
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 移动端适配 - 768px以下 */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    /* 移动端头部 */
    .header {
        height: 50px;
    }
    
    .header .container {
        height: 50px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .logo-domain {
        font-size: 10px;
    }
    
    /* 移动端导航菜单 */
    .nav-menu {
        display: none;
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 16px;
    }
    
    /* 用户中心按钮在移动端菜单中居左对齐 */
    .nav-menu .nav-link.user-avatar {
        text-align: left !important;
        justify-content: flex-start !important;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* 移动端Hero横幅 */
    .hero-banner {
        height: 400px !important; /* 增加移动端高度，给SLOG留空间 */
        margin-top: 50px;
        padding: 30px 15px !important; /* 增加移动端padding，给SLOG留空间 */
    }
    
    /* 移动端SLOG */
    .typing-slogan {
        margin-top: 20px !important; /* 给SLOG区块与顶部留距离 */
    }
    
    .typing-slogan h2 {
        font-size: 20px !important; /* 稍微增大移动端字体 */
        margin-bottom: 15px !important; /* 增加间距 */
        line-height: 1.3;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .typing-slogan p {
        font-size: 14px !important; /* 强制减小移动端段落字体 */
        margin-bottom: 10px !important; /* 强制减少间距 */
    }
    
    /* 移动端图片样式 */
    .typing-slogan img {
        width: 90% !important;
        display: block;
        margin: 0 auto 35px auto !important; /* 图片下空70px */
    }
    
    /* 移动端按钮 */
    .cta-buttons {
        flex-direction: row !important; /* 改为水平排列 */
        gap: 8px !important; /* 减少按钮间距 */
        margin-top: 10px !important; /* 增加上边距 */
        margin-bottom: 15px !important; /* 按钮下空70px */
        justify-content: center !important; /* 居中对齐 */
        flex-wrap: wrap !important; /* 允许换行 */
    }
    
    .btn {
        width: auto !important; /* 自动宽度 */
        max-width: 80px !important; /* 减小按钮最大宽度 */
        min-width: 70px !important; /* 设置最小宽度 */
        padding: 8px 12px !important; /* 减小按钮内边距 */
        font-size: 12px !important; /* 减小按钮字体 */
        text-align: center !important; /* 文字居中 */
        flex: 1 !important; /* 平均分配空间 */
    }
    
    /* 移动端弹窗 */
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    /* 移动端功能区块 */
    .features-section, .games-section, .testimonials-section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .section-header p {
        font-size: 16px;
    }
    
    /* 移动端split布局适配 - 统一为文字在上，图片在下 */
    .split-wrapper,
    .split-wrapper.split-reverse {
        grid-template-columns: 1fr;
        gap: 20px; /* 减少间距 */
        height: auto;
    }
    
    /* 移动端强制文字在上，图片在下 */
    .split-wrapper .split-content {
        order: 1; /* 文字内容在前 */
    }
    
    .split-wrapper .split-media {
        order: 2; /* 图片在后 */
    }
    
    .split-content h2 {
        font-size: 24px; /* 减小移动端标题字体 */
        margin-top: 60px !important; /* 移动端H2与顶部60px间距 */
    }
    
    /* 第一个区块的H2不需要上边距 */
    .split-section:first-of-type .split-content h2 {
        margin-top: 0 !important;
    }
    
    .split-content p {
        font-size: 15px; /* 减小移动端段落字体 */
    }
    
    .split-list li {
        font-size: 14px; /* 减小移动端列表字体 */
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 40px;
    }
    
    .game-card {
        padding: 20px 15px;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }
    
    .testimonial-card {
        padding: 20px;
    }
}

/* 确保桌面端导航显示 */
@media (min-width: 1025px) {
    .nav-menu {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}
