/* --- 样式文件 style.css --- */

/* 基础变量与重置 */
:root {
    --primary-color: #2A6EBB;
    --secondary-color: #7B4DFF;
    --accent-color: #00D4AA;
    --dark-color: #121826;
    --light-color: #F8F9FA;
    --gray-color: #6C757D;
    --card-bg: #FFFFFF;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

html {
    font-size: 14px;
    height: 100%;
    overflow-x: hidden;
}

@media (min-width: 375px) { html { font-size: 15px; } }
@media (min-width: 414px) { html { font-size: 16px; } }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
    background-color: var(--light-color);
    color: #333;
    line-height: 1.5;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--safe-area-inset-top);
    padding-bottom: var(--safe-area-inset-bottom);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container { padding: 0 1.5rem; }
}

/* 导航栏 */
header {
    background-color: var(--dark-color);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding-top: var(--safe-area-inset-top);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3.5rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    padding: 0.5rem 0;
}

.logo i { color: var(--accent-color); margin-right: 0.5rem; font-size: 1.5rem; }

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
}
.nav-actions { display: none; }

@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
    .nav-actions { display: flex; align-items: center; gap: 1rem; }
}

.login-btn, .trial-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.login-btn { color: white; }
.trial-btn { background-color: var(--primary-color); color: white; }
.trial-btn:active { background-color: #1a5ca3; transform: scale(0.98); }

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 80%; max-width: 300px;
    height: 100vh;
    background-color: var(--dark-color);
    z-index: 1100;
    transition: var(--transition);
    padding: 1rem;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}
.mobile-menu.active { right: 0; }
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-menu-logo { color: white; font-size: 1.25rem; font-weight: 700; }
.close-menu-btn {
    background: none; border: none; color: white; font-size: 1.5rem;
    width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; border-radius: 0.375rem;
}
.mobile-nav-links { list-style: none; }
.mobile-nav-links li { margin-bottom: 0.5rem; }
.mobile-nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 0.375rem;
}
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); z-index: 1050; display: none;
}
.mobile-menu-overlay.active { display: block; }

/* Hero */
.hero {
    padding: 5rem 0 3rem;
    background: linear-gradient(135deg, #121826 0%, #1e2a47 100%);
    color: white;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    margin-top: 3.5rem;
}
.hero-content { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 1rem; }
.hero h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.2; font-family: 'Poppins', sans-serif; }
.hero-subtitle { font-size: 1.25rem; font-weight: 500; color: var(--accent-color); margin-bottom: 1.5rem; }
.hero-description { font-size: 1rem; color: rgba(255, 255, 255, 0.8); margin: 0 auto 2rem; line-height: 1.6; max-width: 600px; }
.hero-actions { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; justify-content: center; } }

.primary-btn, .secondary-btn {
    padding: 0.875rem 1.75rem; border-radius: 0.5rem; text-decoration: none;
    font-weight: 600; font-size: 1rem; transition: var(--transition);
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    border: none; cursor: pointer; width: 100%; max-width: 300px; margin: 0 auto;
}
@media (min-width: 640px) { .primary-btn, .secondary-btn { width: auto; min-width: 160px; } }
.primary-btn { background-color: var(--accent-color); color: var(--dark-color); }
.secondary-btn { background-color: transparent; color: white; border: 2px solid rgba(255, 255, 255, 0.3); }

/* Stats */
.stats { background-color: white; padding: 3rem 0; }
.stats-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; text-align: center; }
@media (min-width: 640px) { .stats-container { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.stat-item { padding: 1.5rem 1rem; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--primary-color); margin-bottom: 0.5rem; }
.stat-label { font-size: 0.875rem; color: var(--gray-color); font-weight: 500; }

/* Features */
.features { padding: 3rem 0; }
.section-title { text-align: center; font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; color: var(--dark-color); font-family: 'Poppins', sans-serif; }
.features-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
    background-color: var(--card-bg); border-radius: 1rem; padding: 1.5rem;
    box-shadow: var(--shadow); transition: var(--transition); border: 1px solid rgba(0, 0, 0, 0.05);
}
.feature-icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; font-size: 1.5rem; }
.code-icon { background-color: rgba(42, 110, 187, 0.1); color: var(--primary-color); }
.ppt-icon { background-color: rgba(123, 77, 255, 0.1); color: var(--secondary-color); }
.video-icon { background-color: rgba(0, 212, 170, 0.1); color: var(--accent-color); }
.feature-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--dark-color); }
.feature-description { color: var(--gray-color); margin-bottom: 1.25rem; line-height: 1.6; font-size: 0.9375rem; }

.code-block { background-color: #1e1e1e; border-radius: 0.5rem; padding: 1.25rem; margin-top: 1rem; overflow-x: auto; font-family: 'Consolas', monospace; font-size: 0.8125rem; }
.code-line { color: #d4d4d4; line-height: 1.4; margin-bottom: 0.25rem; }
.code-keyword { color: #569cd6; } .code-function { color: #dcdcaa; } .code-string { color: #ce9178; } .code-comment { color: #6a9955; }
.ppt-structure { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.ppt-item { display: flex; align-items: center; padding: 0.75rem 1rem; background-color: rgba(123, 77, 255, 0.05); border-radius: 0.5rem; border-left: 4px solid var(--secondary-color); }
.ppt-item i { margin-right: 0.75rem; color: var(--secondary-color); }
.video-preview { background: linear-gradient(135deg, #1a2b4d 0%, #2d3b5e 100%); border-radius: 0.75rem; padding: 1.25rem; margin-top: 1rem; display: flex; align-items: center; justify-content: space-between; }
.video-info { color: white; flex: 1; }
.video-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.video-desc { color: rgba(255, 255, 255, 0.8); font-size: 0.8125rem; }
.play-btn { width: 3rem; height: 3rem; border-radius: 50%; background-color: var(--accent-color); display: flex; align-items: center; justify-content: center; color: var(--dark-color); font-size: 1.25rem; cursor: pointer; flex-shrink: 0; margin-left: 1rem; }

/* Tools */
.tools { padding: 3rem 0; background-color: #f8fafc; }
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
@media (min-width: 640px) { .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
@media (min-width: 768px) { .tools-grid { grid-template-columns: repeat(6, 1fr); } }
.tool-item { background-color: white; padding: 1.25rem; border-radius: 0.75rem; text-align: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); transition: var(--transition); }
.tool-icon { font-size: 2rem; margin-bottom: 0.75rem; color: var(--primary-color); transition: var(--transition); }
.tool-name { font-weight: 600; font-size: 0.875rem; color: var(--dark-color); transition: var(--transition); }

/* Modal */
.modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); z-index: 2000;
    display: none; align-items: center; justify-content: center; padding: 1rem;
    overflow-y: auto;
}
.modal.active { display: flex; }
.modal-content {
    background-color: white; border-radius: 1rem; width: 100%; max-width: 500px;
    padding: 1.5rem; position: relative; max-height: 90vh; overflow-y: auto;
    animation: modalSlideUp 0.3s ease-out;
}
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid #e2e8f0; }
.modal-title { font-size: 1.25rem; font-weight: 600; color: var(--dark-color); }
.close-modal { background: none; border: none; font-size: 1.5rem; color: var(--gray-color); cursor: pointer; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; border-radius: 0.375rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--dark-color); }
.form-group input {
    width: 100%; padding: 0.75rem 1rem; border: 2px solid #e2e8f0;
    border-radius: 0.5rem; font-size: 1rem; transition: var(--transition);
    -webkit-appearance: none;
}
.form-group input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(42, 110, 187, 0.1); }

/* 新增认证相关 CSS */
.auth-tabs { display: flex; margin-bottom: 1.5rem; border-bottom: 1px solid #e2e8f0; }
.auth-tab { flex: 1; text-align: center; padding: 0.75rem; font-size: 0.95rem; color: var(--gray-color); cursor: pointer; transition: var(--transition); font-weight: 500; position: relative; }
.auth-tab.active { color: var(--primary-color); }
.auth-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background-color: var(--primary-color); }

.auth-form { display: none; animation: fadeIn 0.3s ease; }
.auth-form.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.input-with-btn { display: flex; gap: 0.5rem; }
.send-code-btn {
    background-color: var(--primary-color); color: white; border: none; border-radius: 0.5rem;
    padding: 0 1rem; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: var(--transition);
    white-space: nowrap; min-width: 100px;
}
.send-code-btn:disabled { background-color: #cbd5e1; color: #64748b; cursor: not-allowed; }

.wechat-login-container { text-align: center; padding: 1rem 0; }
.qrcode-box {
    width: 180px; height: 180px; margin: 0 auto 1rem; border: 1px solid #e2e8f0;
    padding: 0.5rem; border-radius: 0.5rem; background: white;
    display: flex; align-items: center; justify-content: center; position: relative;
}
.qrcode-placeholder { color: var(--gray-color); font-size: 0.875rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.wechat-icon-large { font-size: 3rem; color: #07C160; }
.wechat-tip { color: var(--gray-color); font-size: 0.875rem; }
.wechat-tip i { color: var(--primary-color); margin-right: 0.25rem; }
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; font-size: 0.875rem; }
.forgot-link { color: var(--primary-color); text-decoration: none; }
.form-footer { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0; text-align: center; font-size: 0.875rem; }
.register-link { color: var(--primary-color); text-decoration: none; font-weight: 500; }

/* Footer */
footer { background-color: var(--dark-color); color: rgba(255, 255, 255, 0.7); padding: 3rem 0 1.5rem; }
.footer-content { display: flex; flex-direction: column; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .footer-content { flex-direction: row; justify-content: space-between; } }
.footer-logo { font-size: 1.5rem; font-weight: 700; color: white; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.footer-description { line-height: 1.6; margin-bottom: 1rem; font-size: 0.875rem; }
.social-links { display: flex; gap: 1rem; }
.social-links a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; background-color: rgba(255, 255, 255, 0.1);
    color: white; border-radius: 50%; text-decoration: none; transition: var(--transition);
}
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (min-width: 640px) { .footer-links { grid-template-columns: repeat(3, 1fr); } }
.footer-column h3 { color: white; margin-bottom: 1rem; font-size: 1rem; }
.footer-column ul { list-style: none; }
.footer-column li { margin-bottom: 0.5rem; }
.footer-column a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 0.875rem; transition: var(--transition); }
.copyright { text-align: center; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.75rem; }

/* Misc */
.back-to-top {
    position: fixed; bottom: 1.5rem; right: 1.5rem; width: 3rem; height: 3rem;
    background-color: var(--primary-color); color: white; border: none; border-radius: 50%;
    cursor: pointer; display: none; align-items: center; justify-content: center;
    font-size: 1.25rem; transition: var(--transition); z-index: 100; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.notification {
    position: fixed; top: 1rem; right: 1rem; left: 1rem; padding: 1rem 1.25rem;
    border-radius: 0.75rem; color: white; font-weight: 500; z-index: 2000;
    transform: translateY(-100px); transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex; align-items: center; gap: 0.75rem;
}
@media (min-width: 640px) { .notification { left: auto; max-width: 400px; } }
.notification.show { transform: translateY(0); }
.notification.success { background-color: #10b981; }
.notification.error { background-color: #ef4444; }
.notification.info { background-color: var(--primary-color); }
.loading { display: inline-block; width: 1.25rem; height: 1.25rem; border: 2px 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); } }