/* 
 * 抖阴 - 原创样式表 v2.0
 * 主色调: 深紫色 (#5B3A8F) + 亮粉色 (#FF6B9D) + 天蓝色 (#4ECDC4)
 * 修复: 全局overflow溢出、移动端适配、导航栏折叠
 */

:root {
    --primary-color: #5B3A8F;
    --secondary-color: #FF6B9D;
    --tertiary-color: #4ECDC4;
    --accent-color: #FFD700;
    --text-main: #2C3E50;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --bg-dark: #1A1A2E;
    --white: #FFFFFF;
    --border-color: #EAECEE;
    --shadow: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 25px rgba(91,58,143,0.2);
    --transition: all 0.3s ease;
}

/* ===== 全局重置 & 防溢出 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; scroll-behavior: smooth; }

body {
    font-family: 'PingFang SC','Microsoft YaHei','Helvetica Neue',Helvetica,Arial,sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    min-width: 320px;
    word-wrap: break-word;
    word-break: break-word;
}

a { text-decoration: none; color: var(--primary-color); transition: var(--transition); }
a:hover { color: var(--secondary-color); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

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

/* ===== 工具类 ===== */
.bg-light  { background-color: var(--bg-light); }
.bg-dark   { background-color: var(--bg-dark); }
.text-white { color: var(--white); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

/* ===== 按钮 ===== */
.btn {
    display: inline-block; padding: 10px 24px; border-radius: 30px;
    font-weight: 600; text-align: center; cursor: pointer;
    transition: var(--transition); border: 2px solid transparent;
    white-space: nowrap; max-width: 100%;
}
.btn-primary { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: var(--white); }
.btn-primary:hover { background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary-color); }
.btn-large  { padding: 14px 36px; font-size: 1.05rem; }
.btn-small  { padding: 6px 16px;  font-size: 0.85rem; }

/* ===== 导航头部 ===== */
.header { background-color: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 1000; width: 100%; }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 70px; gap: 20px; flex-wrap: nowrap; overflow: hidden; }

.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-img { height: 36px; width: 36px; object-fit: contain; }
.logo-text { font-size: 1.4rem; font-weight: 800; color: var(--primary-color); letter-spacing: 1px; white-space: nowrap; }

.nav { flex: 1; overflow: hidden; }
.nav-list { display: flex; gap: 20px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2px; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li { flex-shrink: 0; }
.nav-list a { color: var(--text-main); font-weight: 600; font-size: 0.95rem; position: relative; padding: 5px 0; white-space: nowrap; }
.nav-list a:hover, .nav-list a.active { color: var(--primary-color); }
.nav-list a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); transition: var(--transition); border-radius: 3px; }
.nav-list a:hover::after, .nav-list a.active::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; justify-content: space-between; width: 28px; height: 20px; cursor: pointer; flex-shrink: 0; background: none; border: none; padding: 0; }
.nav-toggle span { display: block; height: 3px; background: var(--primary-color); border-radius: 3px; transition: var(--transition); }
.header-actions { flex-shrink: 0; }

/* ===== 搜索栏 ===== */
.search-bar { background-color: var(--bg-light); padding: 10px 0; border-top: 1px solid var(--border-color); }
.search-box { display: flex; max-width: 600px; margin: 0 auto; background: var(--white); border-radius: 30px; overflow: hidden; border: 1px solid var(--border-color); transition: var(--transition); }
.search-box:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(91,58,143,0.1); }
.search-input { flex: 1; border: none; padding: 10px 20px; font-size: 0.95rem; outline: none; min-width: 0; }
.search-btn { background: transparent; border: none; padding: 0 18px; color: var(--primary-color); cursor: pointer; flex-shrink: 0; transition: var(--transition); }
.search-btn:hover { color: var(--secondary-color); }

/* ===== 面包屑 ===== */
.breadcrumb-container { background-color: var(--bg-light); padding: 12px 0; border-bottom: 1px solid var(--border-color); overflow: hidden; }
.breadcrumb { display: flex; gap: 8px; font-size: 0.88rem; color: var(--text-light); flex-wrap: wrap; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li:not(:last-child)::after { content: '>'; color: #ccc; }

/* ===== Hero Banner ===== */
.hero { position: relative; height: 480px; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; z-index: 1; transform: scale(1.05); transition: transform 10s ease; will-change: transform; }
.hero:hover .hero-bg { transform: scale(1); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(26,26,46,0.9) 0%, rgba(91,58,143,0.55) 100%); z-index: 2; }
.hero-content { position: relative; z-index: 3; color: var(--white); max-width: 760px; padding: 0 20px; }
.hero-title { font-size: 2.4rem; font-weight: 800; margin-bottom: 18px; line-height: 1.25; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: 1.1rem; margin-bottom: 28px; opacity: 0.9; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== 通用区块 ===== */
.section { padding: 70px 0; }
.section-header { text-align: center; margin-bottom: 45px; }
.section-title { font-size: 2rem; color: var(--primary-color); margin-bottom: 14px; position: relative; display: inline-block; }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 55px; height: 4px; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); border-radius: 2px; }
.section-desc { font-size: 1.05rem; color: var(--text-light); margin-top: 18px; }

/* ===== 视频卡片网格 ===== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.video-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; min-width: 0; }
.video-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.video-thumb { height: 190px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }

.play-btn { width: 56px; height: 56px; background: rgba(255,255,255,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); border: 2px solid rgba(255,255,255,0.45); transition: var(--transition); opacity: 0; transform: scale(0.8); flex-shrink: 0; }
.play-btn::after { content: ''; width: 0; height: 0; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--white); margin-left: 4px; }
.video-card:hover .play-btn, .anime-card:hover .play-btn { opacity: 1; transform: scale(1); background: var(--secondary-color); border-color: var(--secondary-color); }

.video-duration { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.65); color: var(--white); padding: 3px 8px; border-radius: 4px; font-size: 0.78rem; }
.video-info { padding: 18px; }
.video-title { font-size: 1.05rem; margin-bottom: 10px; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { display: flex; gap: 14px; color: var(--text-light); font-size: 0.85rem; margin-bottom: 12px; flex-wrap: wrap; }
.video-meta span { display: flex; align-items: center; gap: 4px; }
.video-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--bg-light); color: var(--primary-color); padding: 3px 10px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }

/* ===== 动漫卡片网格 ===== */
.anime-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.anime-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; min-width: 0; }
.anime-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.anime-thumb { height: 145px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.anime-info { padding: 14px; }
.anime-title { font-size: 1rem; margin-bottom: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anime-desc { font-size: 0.88rem; color: var(--text-light); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.anime-stats { font-size: 0.78rem; color: var(--tertiary-color); font-weight: 600; }

/* ===== 生活技能卡片 ===== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.skill-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); min-width: 0; }
.skill-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.skill-img { width: 100%; height: 195px; object-fit: cover; }
.skill-content { padding: 18px; }
.skill-title { font-size: 1.1rem; color: var(--primary-color); margin-bottom: 8px; }
.skill-desc { color: var(--text-light); font-size: 0.92rem; }

/* ===== AI赋能模块 ===== */
.ai-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.ai-feature { text-align: center; padding: 28px 20px; background: rgba(255,255,255,0.05); border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); transition: var(--transition); }
.ai-feature:hover { background: rgba(255,255,255,0.1); transform: translateY(-5px); }
.ai-icon { width: 72px; height: 72px; margin: 0 auto 18px; background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); flex-shrink: 0; }
.ai-title { font-size: 1.2rem; margin-bottom: 12px; color: var(--white); }
.ai-desc { color: rgba(255,255,255,0.7); font-size: 0.93rem; }

/* ===== 社区模块 ===== */
.community-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.community-card { background: var(--bg-light); padding: 26px 18px; border-radius: 12px; text-align: center; border-top: 4px solid var(--tertiary-color); transition: var(--transition); }
.community-card:hover { background: var(--white); box-shadow: var(--shadow-hover); transform: translateY(-5px); }
.community-title { font-size: 1.15rem; margin-bottom: 12px; color: var(--primary-color); }
.community-desc { color: var(--text-light); margin-bottom: 18px; font-size: 0.92rem; }
.community-link { font-weight: 600; color: var(--secondary-color); }

/* ===== 专家模块 ===== */
.expert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; }
.expert-card { background: var(--white); padding: 26px 18px; border-radius: 12px; text-align: center; box-shadow: var(--shadow); }
.expert-avatar { width: 90px; height: 90px; margin: 0 auto 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--white); font-weight: bold; }
.expert-name { font-size: 1.2rem; margin-bottom: 4px; }
.expert-role { color: var(--secondary-color); font-weight: 600; margin-bottom: 12px; font-size: 0.88rem; }
.expert-desc { color: var(--text-light); font-size: 0.88rem; margin-bottom: 18px; }
.expert-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ===== 合作模块 ===== */
.partner-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 36px; }
.partner-logo { padding: 12px 24px; background: var(--bg-light); border-radius: 8px; font-weight: bold; color: var(--text-light); font-size: 1.1rem; transition: var(--transition); }
.partner-logo:hover { background: var(--white); color: var(--primary-color); box-shadow: var(--shadow); }
.subsection-title { font-size: 1.4rem; margin-bottom: 24px; color: var(--primary-color); }
.guide-steps { display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; align-items: flex-start; gap: 18px; background: var(--bg-light); padding: 18px; border-radius: 12px; }
.step-num { width: 38px; height: 38px; background: var(--primary-color); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.1rem; flex-shrink: 0; }
.step h4 { margin-bottom: 4px; font-size: 1.05rem; }
.step p  { color: var(--text-light); margin: 0; font-size: 0.92rem; }

/* ===== FAQ ===== */
.row { display: flex; flex-wrap: wrap; gap: 36px; }
.col-md-6 { flex: 1 1 300px; min-width: 0; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--white); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.faq-question { padding: 14px 18px; margin: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1rem; transition: var(--transition); gap: 10px; }
.faq-question:hover { color: var(--primary-color); }
.faq-toggle { font-size: 1.4rem; color: var(--secondary-color); transition: transform 0.3s ease; flex-shrink: 0; }
.faq-item.active .faq-toggle { transform: rotate(45deg); }
.faq-answer { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; color: var(--text-light); background: var(--bg-light); font-size: 0.93rem; }
.faq-item.active .faq-answer { padding: 14px 18px; max-height: 200px; }

/* ===== 用户评论 ===== */
.review-list { display: flex; flex-direction: column; gap: 18px; }
.review-item { background: var(--white); padding: 18px; border-radius: 12px; box-shadow: var(--shadow); }
.review-user { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-avatar { width: 38px; height: 38px; background: var(--tertiary-color); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; }
.review-info { display: flex; flex-direction: column; min-width: 0; }
.review-name { font-weight: 600; font-size: 0.95rem; }
.review-stars { color: var(--accent-color); font-size: 0.88rem; }
.review-text { color: var(--text-light); font-style: italic; font-size: 0.92rem; }

/* ===== 联系模块 ===== */
.contact-content { display: flex; flex-wrap: wrap; gap: 36px; background: var(--bg-light); padding: 36px; border-radius: 16px; }
.contact-info { flex: 1 1 280px; min-width: 0; }
.contact-info h3 { font-size: 1.4rem; color: var(--primary-color); margin-bottom: 18px; }
.contact-info p { margin-bottom: 9px; color: var(--text-main); font-size: 0.95rem; word-break: break-all; }
.contact-qrcodes { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.qrcode-box { background: var(--white); padding: 14px; border-radius: 12px; text-align: center; box-shadow: var(--shadow); width: 140px; flex-shrink: 0; }
.qrcode-img { width: 112px; height: 112px; margin: 0 auto 8px; object-fit: cover; }
.app-download { width: 112px; height: 112px; margin: 0 auto 8px; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--white); }
.qrcode-box p { font-size: 0.78rem; color: var(--text-light); margin: 0; line-height: 1.4; }

/* ===== JSON展示区 ===== */
.json-display { background: #282c34; border-radius: 8px; padding: 14px; margin-top: 18px; overflow-x: auto; max-width: 100%; }
.json-title { color: #abb2bf; font-size: 0.88rem; margin-bottom: 8px; border-bottom: 1px solid #3e4451; padding-bottom: 5px; }
.json-code { color: #98c379; font-family: 'Courier New',Courier,monospace; font-size: 0.85rem; margin: 0; white-space: pre-wrap; word-break: break-all; }

/* ===== 页脚 ===== */
.footer { background: var(--bg-dark); color: var(--white); padding: 55px 0 20px; }
.footer-content { display: flex; flex-wrap: wrap; gap: 36px; margin-bottom: 36px; }
.footer-brand { flex: 2 1 260px; min-width: 0; }
.footer-logo .logo-text { color: var(--white); }
.footer-desc { margin-top: 18px; color: rgba(255,255,255,0.6); max-width: 380px; font-size: 0.92rem; }
.footer-links { flex: 1 1 140px; min-width: 0; }
.footer-links h4, .footer-social h4 { font-size: 1.1rem; margin-bottom: 18px; color: var(--white); }
.footer-links ul li { margin-bottom: 9px; }
.footer-links ul a { color: rgba(255,255,255,0.6); font-size: 0.92rem; transition: var(--transition); }
.footer-links ul a:hover { color: var(--secondary-color); padding-left: 4px; }
.footer-social { flex: 1 1 180px; min-width: 0; }
.social-icons { display: flex; gap: 12px; flex-wrap: wrap; }
.social-icon { width: 38px; height: 38px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 0.85rem; font-weight: bold; transition: var(--transition); flex-shrink: 0; }
.social-icon:hover { background: var(--secondary-color); transform: translateY(-3px); color: var(--white); }
.footer-bottom { text-align: center; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); font-size: 0.88rem; }

/* ===== 内页内容区 ===== */
.page-content { padding: 60px 0; }

/* ===== 响应式 - 平板 ===== */
@media (max-width: 1024px) {
    .nav-list { gap: 14px; }
    .hero-title { font-size: 2.1rem; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* ===== 响应式 - 手机 ===== */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav { position: absolute; top: 70px; left: 0; right: 0; background: var(--white); box-shadow: 0 8px 20px rgba(0,0,0,0.1); max-height: 0; overflow: hidden; transition: max-height 0.35s ease; z-index: 999; }
    .nav.open { max-height: 400px; }
    .nav-list { flex-direction: column; gap: 0; padding: 10px 0; overflow-x: hidden; }
    .nav-list li { width: 100%; }
    .nav-list a { display: block; padding: 12px 24px; border-bottom: 1px solid var(--border-color); }
    .nav-list a::after { display: none; }
    .header-actions { display: none; }
    .hero { height: 380px; }
    .hero-title { font-size: 1.7rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; gap: 12px; }
    .btn-large { padding: 12px 28px; font-size: 1rem; }
    .section { padding: 45px 0; }
    .section-title { font-size: 1.6rem; }
    .video-grid, .anime-grid, .skills-grid, .ai-features, .community-grid, .expert-grid { grid-template-columns: 1fr; }
    .contact-content { padding: 22px; flex-direction: column; }
    .contact-qrcodes { justify-content: center; }
    .row { flex-direction: column; }
    .footer-content { flex-direction: column; gap: 24px; }
    .footer-brand { flex: none; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.4rem; }
    .container { padding: 0 14px; }
    .logo-text { font-size: 1.2rem; }
    .section-title { font-size: 1.4rem; }
    .qrcode-box { width: 120px; }
    .qrcode-img { width: 92px; height: 92px; }
}
