/* ========== 基础重置 ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ========== 全局变量 ========== */
:root {
    --primary: #6C5CE7;
    --primary-light: #a29bfe;
    --primary-dark: #5a4bd1;
    --accent: #00cec9;
    --accent-light: #81ecec;
    --gradient: linear-gradient(135deg, #6C5CE7 0%, #a29bfe 50%, #81ecec 100%);
    --gradient-btn: linear-gradient(135deg, #6C5CE7 0%, #00cec9 100%);
    --shadow: 0 10px 40px rgba(108, 92, 231, 0.12);
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 头部导航 ========== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(108,92,231,0.08);
    transition: var(--transition);
}
.header.scrolled {
    box-shadow: 0 4px 20px rgba(108,92,231,0.1);
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: 70px;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 22px; font-weight: 700; color: var(--primary);
}
.logo-icon {
    width: 38px; height: 38px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; font-weight: 900;
    box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}
.nav { display: flex; align-items: center; gap: 8px; }
.nav a {
    padding: 8px 18px; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: #666;
    transition: var(--transition);
}
.nav a:hover, .nav a.active {
    color: var(--primary); background: rgba(108,92,231,0.08);
}
.nav-btn {
    margin-left: 12px;
    padding: 9px 24px; border-radius: 8px;
    background: var(--gradient-btn); color: #fff;
    font-size: 14px; font-weight: 600;
    border: none; cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}
.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108,92,231,0.4);
}
.mobile-menu-btn {
    display: none; width: 30px; height: 30px;
    flex-direction: column; justify-content: center; gap: 5px;
    cursor: pointer; background: none; border: none; padding: 0;
}
.mobile-menu-btn span {
    display: block; width: 100%; height: 2px;
    background: #333; border-radius: 2px;
    transition: var(--transition);
}

/* ========== 主内容区 ========== */
.main { padding-top: 70px; flex: 1; }

/* ========== Hero / 解析区域 ========== */
.hero {
    position: relative;
    padding: 60px 24px 0px 24px;
    background: linear-gradient(180deg, #f8f7ff 0%, #f5f6fa 100%);
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(108,92,231,0.06) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: ''; position: absolute; bottom: -30%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0,206,201,0.05) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-inner {
    max-width: 800px; margin: 0 auto; text-align: center;
    position: relative; z-index: 1;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
.hero h1 {
    font-size: 42px; font-weight: 800;
    background: linear-gradient(135deg, #333 0%, var(--primary) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px; line-height: 1.3;
    animation: fadeInUp 0.6s ease 0.1s both;
}
.hero p {
    font-size: 16px; color: #888; margin-bottom: 40px;
    animation: fadeInUp 0.6s ease 0.2s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 解析输入框 */
.parse-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 8px;
    max-width: 680px; margin: 0 auto 24px;
    animation: fadeInUp 0.6s ease 0.3s both;
    border: 2px solid transparent;
    transition: var(--transition);
}
.parse-box:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 10px 40px rgba(108,92,231,0.2);
}
.parse-box input {
    flex: 1; border: none; outline: none;
    padding: 14px 16px; font-size: 15px;
    color: #333; background: transparent;
}
.parse-box input::placeholder { color: #bbb; }
.parse-btn {
    padding: 14px 32px; border-radius: 10px;
    background: var(--gradient-btn); color: #fff;
    font-size: 15px; font-weight: 600;
    border: none; cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}
.parse-btn:hover { transform: scale(1.03); }
.parse-btn:active { transform: scale(0.98); }

/* 支持平台标签 */
.platform-tags {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 10px;
    animation: fadeInUp 0.6s ease 0.4s both;
}
.platform-tags span {
    font-size: 12px; color: #999; margin-right: 4px;
}
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px; border-radius: 6px;
    background: #fff; color: #666;
    font-size: 12px; font-weight: 500;
    border: 1px solid #eee;
    transition: var(--transition);
}
.tag:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.tag-icon {
    width: 16px; height: 16px; border-radius: 3px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 9px; color: #fff; font-weight: 700;
}

/* ========== 通用板块标题 ========== */
.section { padding: 30px 34px; }
.section-header {
    text-align: center; margin-bottom: 40px;
}
.section-header h2 {
    font-size: 28px; font-weight: 700; color: #222;
    margin-bottom: 8px;
}
.section-header p {
    font-size: 14px; color: #999;
}
.container { max-width: 1200px; margin: 0 auto; }

/* ========== 解析结果区域 ========== */
.result-area { display: none; }
.result-area.show { display: block; animation: fadeInUp 0.5s ease; }
.result-tabs {
    display: flex; justify-content: center; gap: 8px;
    margin-bottom: 24px;
}
.result-tab {
    padding: 10px 28px; border-radius: 8px;
    font-size: 14px; font-weight: 600; color: #888;
    background: #fff; border: 1px solid #eee;
    cursor: pointer; transition: var(--transition);
}
.result-tab.active, .result-tab:hover {
    color: var(--primary); border-color: var(--primary-light);
    background: rgba(108,92,231,0.04);
}
.result-panel { display: none; }
.result-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 视频结果卡片 */
.video-card {
    background: #fff; border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    max-width: 680px; margin: 0 auto;
}
.video-preview {
    position: relative; width: 100%; aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2d2d3f 0%, #1a1a2e 100%);
    display: flex; align-items: center; justify-content: center;
}
.video-preview .play-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff; cursor: pointer;
    transition: var(--transition);
}
.video-preview .play-icon:hover { transform: scale(1.1); }
.video-info { padding: 20px 24px; }
.video-info h4 {
    font-size: 15px; font-weight: 600; color: #333;
    margin-bottom: 8px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.video-actions { display: flex; gap: 10px; }
.btn-download, .btn-copy {
    flex: 1; padding: 10px 16px; border-radius: 8px;
    font-size: 14px; font-weight: 600;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: var(--transition);
}
.btn-download {
    background: var(--gradient-btn); color: #fff;
    box-shadow: 0 4px 12px rgba(108,92,231,0.25);
}
.btn-download:hover { transform: translateY(-1px); }
.btn-copy {
    background: #f5f6fa; color: #666;
    border: 1px solid #eee;
}
.btn-copy:hover { border-color: var(--primary-light); color: var(--primary); }

/* 图集结果 */
.image-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px; max-width: 800px; margin: 0 auto;
}
.image-item {
    aspect-ratio: 1; border-radius: var(--radius-sm);
    overflow: hidden; position: relative;
    background: #eee; cursor: pointer;
}
.image-item .img-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #dfe6e9 0%, #b2bec3 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: #fff;
}
.image-item .download-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
}
.image-item:hover .download-overlay { opacity: 1; }
.download-overlay a {
    width: 36px; height: 36px; border-radius: 50%;
    background: #fff; color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700;
}

/* ========== 功能特点 ========== */
.features { background: #fff; }
.features-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature-card {
    text-align: center; padding: 32px 20px;
    border-radius: var(--radius);
    background: #fafbff;
    border: 1px solid rgba(108,92,231,0.06);
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(108,92,231,0.12);
}
.feature-icon {
    width: 56px; height: 56px; border-radius: 14px;
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.feature-card h4 {
    font-size: 15px; font-weight: 600; color: #333;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 13px; color: #999; line-height: 1.6;
}

/* ========== 热门解析列表 ========== */
.hot-list { background: #f5f6fa; }
.hot-items { display: grid; gap: 12px; }
.hot-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px; border-radius: var(--radius-sm);
    background: #fff; transition: var(--transition);
    border: 1px solid transparent;
}
.hot-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}
.hot-rank {
    width: 28px; height: 28px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    background: #ccc; flex-shrink: 0;
}
.hot-rank.top { background: var(--gradient-btn); }
.hot-item-content { flex: 1; min-width: 0; }
.hot-item-content h4 {
    font-size: 14px; font-weight: 500; color: #333;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hot-item-content p {
    font-size: 12px; color: #bbb; margin-top: 2px;
}
.hot-stats {
display: flex; gap: 12px; font-size: 12px; color: #bbb;
flex-shrink: 0;
}
.hot-stats span { display: flex; align-items: center; gap: 3px; }

/* ========== 常见问题 ========== */
.faq { background: #fff; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    border: 1px solid #eee;
    overflow: hidden;
    transition: var(--transition);
}
.faq-item:hover { border-color: var(--primary-light); }
.faq-question {
    padding: 18px 20px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; background: #fff;
    user-select: none;
}
.faq-question h4 {
    font-size: 15px; font-weight: 500; color: #333;
}
.faq-arrow {
    width: 20px; height: 20px; color: #ccc;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--primary); }
.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.open .faq-answer {
    max-height: 200px;
}
.faq-answer-inner {
    padding: 0 20px 18px;
    font-size: 14px; color: #777; line-height: 1.8;
}

/* ========== 用户反馈 ========== */
.feedback { background: #f5f6fa; }
.feedback-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feedback-card {
    background: #fff; border-radius: var(--radius);
    padding: 24px; position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.feedback-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.feedback-card::before {
    content: '"'; position: absolute;
    top: 12px; left: 20px;
    font-size: 48px; color: var(--primary-light);
    opacity: 0.2; font-family: Georgia, serif;
    line-height: 1;
}
.feedback-stars {
    color: #fdcb6e; font-size: 14px; margin-bottom: 12px;
    letter-spacing: 2px;
}
.feedback-text {
    font-size: 14px; color: #666; line-height: 1.8;
    margin-bottom: 16px;
}
.feedback-user {
    display: flex; align-items: center; gap: 10px;
}
.feedback-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; color: #fff;
}
.feedback-user-info h5 {
    font-size: 13px; font-weight: 600; color: #333;
    }
.feedback-user-info span {
    font-size: 11px; color: #bbb;
}

/* ========== 使用步骤 ========== */
.steps { background: #fff; }
.steps-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 30px; max-width: 900px; margin: 0 auto;
}
.step-card {
    text-align: center; position: relative;
}
.step-card:not(:last-child)::after {
    content: '→'; position: absolute;
    top: 30px; right: -20px;
    font-size: 24px; color: var(--primary-light);
    z-index: 1;
}
.step-num {
width: 60px; height: 60px; border-radius: 50%;
    background: var(--gradient);
    color: #fff; font-size: 22px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 6px 20px rgba(108,92,231,0.25);
}
.step-card h4 {
    font-size: 16px; font-weight: 600; color: #333;
    margin-bottom: 8px;
}
.step-card p {
    font-size: 13px; color: #999; line-height: 1.7;
}

/* ========== CTA区域 ========== */
.cta {
    padding: 60px 24px;
    background: linear-gradient(135deg, #6C5CE7 0%, #00cec9 100%);
    text-align: center; color: #fff;
}
.cta h2 { font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.cta p { font-size: 15px; opacity: 0.85; margin-bottom: 28px; }
.cta-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 40px; border-radius: 10px;
    background: #fff; color: var(--primary);
    font-size: 16px; font-weight: 700;
    border: none; cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.cta-btn:hover { transform: translateY(-2px); }

/* ========== 页脚 ========== */
.footer {
    background: #1a1a2e; 
    color: #aaa;
    padding: 50px 24px 20px;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px; margin-bottom: 40px;
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p {
    font-size: 13px; color: #666; line-height: 1.8;
}
.footer-col h5 {
    font-size: 14px; font-weight: 600; color: #ddd;
    margin-bottom: 12px;
}
.footer-col a {
    display: block; font-size: 13px; color: #777;
    padding: 4px 0; transition: var(--transition);
}
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom {
    border-top: 1px solid #2d2d3f;
    padding-top: 20px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: #555;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: #666; transition: var(--transition); }
.footer-links a:hover { color: var(--primary-light); }

/* ========== Toast通知 ========== */
.toast {
    position: fixed; top: 90px; left: 50%; transform: translateX(-50%);
    padding: 12px 28px; border-radius: 8px;
    background: #333; color: #fff;
    font-size: 14px; font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0; transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.toast.show {
    opacity: 1; transform: translateX(-50%) translateY(0);
}
.toast.success { background: #00b894; }
.toast.error { background: #e74c3c; }

/* ========== Loading动画 ========== */
.loading-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    z-index: 9998;
    align-items: center; justify-content: center;
}
.loading-overlay.show { display: flex; }
.spinner {
    width: 44px; height: 44px;
    border: 3px solid #eee;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* 如果.login-modal已经是flex容器，可以这样写 */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1000;
    /* 确保这是flex */
    /* display: flex; */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    /* margin: auto; 可以移除，因为flex已经处理居中 */
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.3s ease-out;
    position: relative;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #333;
    font-size: 22px;
    margin-bottom: 8px;
}

.modal-header p {
    color: #777;
    font-size: 14px;
}

/* 关闭按钮 */
.close-btn {
    z-index: 9999 !important;
    position: absolute;
    top: 0px;
    right: 10px;
    height: 36px;
    line-height: 36px;
    font-size: 36px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px 5px;
}
.close-btn:hover {
    color: #e74c3c;
}

.modal-qr-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed #ddd;
}

.modal-qr-placeholder {
    color: #3498db; /* 蓝色主题 */
    font-size: 50px;
    margin-bottom: 10px;
}

.modal-qr-text {
    font-size: 14px;
    color: #777;
}

.modal-footer {
    margin-top: 20px;
    font-size: 13px;
    color: #999;
}
