/* ========================================
   51漫画 - 全站样式表
   品牌色：紫色渐变 #7B2FF7 -> #FF2D95
   ======================================== */

/* CSS Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; color: #333; background: #f8f9fa; line-height: 1.6; overflow-x: hidden; }
a { color: #7B2FF7; text-decoration: none; transition: color .3s; }
a:hover { color: #FF2D95; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header { background: linear-gradient(135deg, #1a0533 0%, #2d1b69 100%); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 20px rgba(123,47,247,.3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; max-width: 1200px; margin: 0 auto; }
.logo-link { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 42px; width: auto; }
.logo-text { color: #fff; font-size: 1.4rem; font-weight: 700; background: linear-gradient(90deg, #c084fc, #f472b6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a { color: rgba(255,255,255,.85); padding: 8px 16px; font-size: .95rem; border-radius: 6px; transition: all .3s; position: relative; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.main-nav a.active::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 20px; height: 3px; background: linear-gradient(90deg, #7B2FF7, #FF2D95); border-radius: 2px; }

/* Mobile Menu */
.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 8px; }

/* Search Bar */
.search-bar { background: rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.08); }
.search-bar-inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; justify-content: center; }
.search-form { display: flex; max-width: 600px; width: 100%; }
.search-form input { flex: 1; padding: 10px 18px; border: 2px solid rgba(123,47,247,.3); border-right: none; border-radius: 25px 0 0 25px; background: rgba(255,255,255,.08); color: #fff; font-size: .95rem; outline: none; transition: border-color .3s; }
.search-form input::placeholder { color: rgba(255,255,255,.4); }
.search-form input:focus { border-color: #7B2FF7; background: rgba(255,255,255,.12); }
.search-form button { padding: 10px 24px; background: linear-gradient(135deg, #7B2FF7, #FF2D95); color: #fff; border: none; border-radius: 0 25px 25px 0; cursor: pointer; font-size: .95rem; transition: opacity .3s; }
.search-form button:hover { opacity: .9; }

/* ===== Hero Banner ===== */
.hero-banner { position: relative; overflow: hidden; height: 500px; }
.hero-slider { display: flex; transition: transform .6s ease; height: 100%; }
.hero-slide { min-width: 100%; height: 100%; position: relative; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(26,5,51,.85) 0%, rgba(26,5,51,.4) 50%, transparent 100%); display: flex; align-items: center; padding: 0 60px; }
.hero-content { max-width: 550px; color: #fff; }
.hero-content h1 { font-size: 2.5rem; margin-bottom: 16px; line-height: 1.3; }
.hero-content h1 span { background: linear-gradient(90deg, #c084fc, #f472b6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-content p { font-size: 1.1rem; opacity: .9; margin-bottom: 24px; line-height: 1.7; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary { display: inline-block; padding: 12px 32px; background: linear-gradient(135deg, #7B2FF7, #FF2D95); color: #fff; border-radius: 30px; font-weight: 600; transition: transform .3s, box-shadow .3s; border: none; cursor: pointer; font-size: 1rem; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(123,47,247,.4); color: #fff; }
.btn-outline { display: inline-block; padding: 12px 32px; border: 2px solid rgba(255,255,255,.4); color: #fff; border-radius: 30px; font-weight: 600; transition: all .3s; background: transparent; cursor: pointer; font-size: 1rem; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }

/* Hero Dots */
.hero-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.hero-dots span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: all .3s; }
.hero-dots span.active { background: #FF2D95; transform: scale(1.2); }

/* ===== Section Common ===== */
.section { padding: 60px 0; }
.section-dark { background: linear-gradient(180deg, #1a0533 0%, #0f0a1a 100%); color: #fff; }
.section-alt { background: #f0ecf7; }
.section-header { text-align: center; margin-bottom: 45px; }
.section-header h2 { font-size: 2rem; margin-bottom: 12px; color: #1a0533; }
.section-dark .section-header h2 { color: #fff; }
.section-header h2 span { background: linear-gradient(90deg, #7B2FF7, #FF2D95); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-header p { color: #666; font-size: 1.05rem; max-width: 650px; margin: 0 auto; }
.section-dark .section-header p { color: rgba(255,255,255,.7); }

/* ===== Video Card Grid ===== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.video-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,.08); transition: transform .3s, box-shadow .3s; }
.video-card:hover { transform: translateY(-6px); box-shadow: 0 12px 35px rgba(123,47,247,.15); }
.video-thumb { position: relative; padding-top: 56.25%; overflow: hidden; cursor: pointer; }
.video-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.video-card:hover .video-thumb img { transform: scale(1.05); }
.play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.3); opacity: 0; transition: opacity .3s; }
.video-card:hover .play-btn { opacity: 1; }
.play-btn-icon { width: 60px; height: 60px; background: rgba(123,47,247,.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.play-btn-icon::after { content: ''; display: block; width: 0; height: 0; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; margin-left: 4px; }
.video-duration { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.75); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: .8rem; }
.video-tag { position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, #7B2FF7, #FF2D95); color: #fff; padding: 3px 10px; border-radius: 4px; font-size: .75rem; font-weight: 600; }
.video-info { padding: 14px 16px; }
.video-info h3 { font-size: 1rem; margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { display: flex; align-items: center; justify-content: space-between; color: #999; font-size: .85rem; }
.video-meta .views { display: flex; align-items: center; gap: 4px; }
.video-meta .likes { display: flex; align-items: center; gap: 4px; }

/* ===== Feature Modules ===== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.feature-card { background: #fff; border-radius: 12px; padding: 30px 24px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,.06); transition: transform .3s, box-shadow .3s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(123,47,247,.12); }
.feature-icon { width: 64px; height: 64px; margin: 0 auto 18px; background: linear-gradient(135deg, rgba(123,47,247,.1), rgba(255,45,149,.1)); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 10px; color: #1a0533; }
.feature-card p { color: #666; font-size: .92rem; line-height: 1.6; }
.section-dark .feature-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.section-dark .feature-card h3 { color: #fff; }
.section-dark .feature-card p { color: rgba(255,255,255,.65); }

/* ===== Expert Section ===== */
.expert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.expert-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.08); transition: transform .3s; }
.expert-card:hover { transform: translateY(-4px); }
.expert-img { width: 100%; height: 280px; object-fit: cover; }
.expert-info { padding: 20px; text-align: center; }
.expert-info h3 { font-size: 1.15rem; margin-bottom: 4px; color: #1a0533; }
.expert-info .title { color: #7B2FF7; font-size: .9rem; margin-bottom: 10px; }
.expert-info p { color: #666; font-size: .88rem; line-height: 1.6; margin-bottom: 14px; }
.expert-btns { display: flex; gap: 10px; justify-content: center; }
.expert-btns a { padding: 6px 16px; border-radius: 20px; font-size: .85rem; font-weight: 500; }
.btn-sm-primary { background: linear-gradient(135deg, #7B2FF7, #FF2D95); color: #fff; }
.btn-sm-outline { border: 1px solid #7B2FF7; color: #7B2FF7; }
.btn-sm-outline:hover { background: #7B2FF7; color: #fff; }

/* ===== Partner Logos ===== */
.partner-wall { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; align-items: center; }
.partner-logo { height: 50px; opacity: .6; filter: grayscale(100%); transition: all .3s; }
.partner-logo:hover { opacity: 1; filter: grayscale(0); }

/* ===== How-To Guide ===== */
.howto-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; counter-reset: step; }
.howto-step { background: #fff; border-radius: 12px; padding: 30px 24px; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,.06); }
.howto-step::before { counter-increment: step; content: counter(step); position: absolute; top: -14px; left: 24px; width: 36px; height: 36px; background: linear-gradient(135deg, #7B2FF7, #FF2D95); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; }
.howto-step h3 { font-size: 1.05rem; margin-bottom: 10px; margin-top: 8px; color: #1a0533; }
.howto-step p { color: #666; font-size: .92rem; line-height: 1.6; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: #fff; border-radius: 10px; margin-bottom: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.faq-question { padding: 18px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: #1a0533; transition: background .3s; }
.faq-question:hover { background: rgba(123,47,247,.04); }
.faq-question::after { content: '+'; font-size: 1.4rem; color: #7B2FF7; transition: transform .3s; }
.faq-item.open .faq-question::after { content: '-'; }
.faq-answer { padding: 0 24px; max-height: 0; overflow: hidden; transition: all .3s; }
.faq-item.open .faq-answer { padding: 0 24px 18px; max-height: 300px; }
.faq-answer p { color: #666; font-size: .92rem; line-height: 1.7; }

/* ===== Reviews ===== */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.review-card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 4px 15px rgba(0,0,0,.06); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.review-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #7B2FF7, #FF2D95); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.review-name { font-weight: 600; color: #1a0533; }
.review-stars { color: #f59e0b; font-size: .9rem; }
.review-text { color: #555; font-size: .92rem; line-height: 1.7; }

/* ===== Contact Section ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.contact-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 28px; }
.contact-card h3 { color: #c084fc; font-size: 1.1rem; margin-bottom: 16px; }
.contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; color: rgba(255,255,255,.8); font-size: .92rem; }
.contact-item strong { color: #fff; min-width: 70px; }

/* ===== Footer ===== */
.site-footer { background: #0a0515; color: rgba(255,255,255,.6); padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 30px; height: 3px; background: linear-gradient(90deg, #7B2FF7, #FF2D95); border-radius: 2px; }
.footer-col p, .footer-col a { color: rgba(255,255,255,.55); font-size: .9rem; line-height: 1.8; display: block; }
.footer-col a:hover { color: #c084fc; }
.footer-qr { display: flex; gap: 20px; margin-top: 12px; }
.footer-qr img { width: 100px; height: 100px; border-radius: 8px; }
.footer-qr-label { text-align: center; font-size: .8rem; margin-top: 6px; color: rgba(255,255,255,.5); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; text-align: center; font-size: .85rem; }
.footer-bottom a { color: rgba(255,255,255,.5); margin: 0 8px; }

/* Social Share */
.social-share { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.social-share a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); font-size: .85rem; transition: all .3s; }
.social-share a:hover { background: linear-gradient(135deg, #7B2FF7, #FF2D95); color: #fff; }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 16px 0; font-size: .9rem; color: #999; }
.breadcrumb a { color: #7B2FF7; }
.breadcrumb span { margin: 0 8px; color: #ccc; }

/* ===== Page Hero ===== */
.page-hero { background: linear-gradient(135deg, #1a0533 0%, #2d1b69 50%, #4a1d8e 100%); padding: 60px 0 50px; text-align: center; color: #fff; }
.page-hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
.page-hero h1 span { background: linear-gradient(90deg, #c084fc, #f472b6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.page-hero p { color: rgba(255,255,255,.75); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ===== Content Sections for Inner Pages ===== */
.content-section { padding: 40px 0; }
.content-section h2 { font-size: 1.6rem; color: #1a0533; margin-bottom: 20px; }
.content-section h3 { font-size: 1.2rem; color: #2d1b69; margin-bottom: 14px; }
.content-section p { color: #555; line-height: 1.8; margin-bottom: 16px; }
.content-section .highlight-box { background: linear-gradient(135deg, rgba(123,47,247,.05), rgba(255,45,149,.05)); border-left: 4px solid #7B2FF7; padding: 20px 24px; border-radius: 0 10px 10px 0; margin: 20px 0; }

/* Tool Cards */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.tool-card { background: #fff; border-radius: 12px; padding: 24px; text-align: center; border: 1px solid #eee; transition: all .3s; }
.tool-card:hover { border-color: #7B2FF7; box-shadow: 0 8px 25px rgba(123,47,247,.1); }
.tool-card .tool-icon { font-size: 2.5rem; margin-bottom: 12px; }
.tool-card h3 { font-size: 1.05rem; margin-bottom: 8px; color: #1a0533; }
.tool-card p { color: #666; font-size: .88rem; line-height: 1.5; }

/* Community Cards */
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.community-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,.06); }
.community-card-img { height: 200px; overflow: hidden; }
.community-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.community-card:hover .community-card-img img { transform: scale(1.05); }
.community-card-body { padding: 20px; }
.community-card-body h3 { font-size: 1.1rem; margin-bottom: 8px; color: #1a0533; }
.community-card-body p { color: #666; font-size: .9rem; line-height: 1.6; }
.community-stats { display: flex; gap: 16px; margin-top: 12px; font-size: .85rem; color: #999; }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag { display: inline-block; padding: 4px 14px; background: rgba(123,47,247,.08); color: #7B2FF7; border-radius: 20px; font-size: .82rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .main-nav { display: none; flex-direction: column; width: 100%; padding: 10px 0; gap: 4px; }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 10px 16px; }
    .menu-toggle { display: block; }
    .hero-banner { height: 380px; }
    .hero-overlay { padding: 0 24px; }
    .hero-content h1 { font-size: 1.6rem; }
    .hero-content p { font-size: .95rem; }
    .hero-btns { flex-direction: column; }
    .section { padding: 40px 0; }
    .section-header h2 { font-size: 1.5rem; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
    .expert-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .page-hero { padding: 40px 0 30px; }
    .page-hero h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .hero-banner { height: 320px; }
    .hero-content h1 { font-size: 1.3rem; }
    .video-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .search-form { flex-direction: column; }
    .search-form input { border-radius: 25px; border-right: 2px solid rgba(123,47,247,.3); margin-bottom: 8px; }
    .search-form button { border-radius: 25px; }
}

/* Lazy Load Placeholder */
img[data-src] { background: #eee; min-height: 100px; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeInUp .6s ease forwards; }

/* Live Badge */
.live-badge { display: inline-flex; align-items: center; gap: 4px; background: #ef4444; color: #fff; padding: 2px 10px; border-radius: 4px; font-size: .75rem; font-weight: 600; }
.live-badge::before { content: ''; width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Video Player Modal */
.video-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 9999; align-items: center; justify-content: center; }
.video-modal.active { display: flex; }
.video-modal-content { max-width: 800px; width: 90%; background: #000; border-radius: 12px; overflow: hidden; position: relative; }
.video-modal-close { position: absolute; top: -40px; right: 0; color: #fff; font-size: 1.5rem; cursor: pointer; background: none; border: none; }
