/* ============================================
   蘑菇视频最新版 - 全局样式
   现代扁平简约风格 | Material Design
   ============================================ */

/* CSS 变量 */
:root {
    --primary: #00bcd4;
    --primary-dark: #0097a7;
    --primary-light: #4dd0e1;
    --secondary: #4caf50;
    --secondary-dark: #388e3c;
    --secondary-light: #81c784;
    --bg: #f5f5f5;
    --surface: #ffffff;
    --text: #212121;
    --text-secondary: #616161;
    --text-hint: #9e9e9e;
    --divider: #e0e0e0;
    --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-2: 0 3px 6px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-3: 0 10px 20px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC',
        'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif SC', 'Noto Sans SC', serif;
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
}

/* ============================================
   头部导航
   ============================================ */
.site-header {
    background: var(--surface);
    box-shadow: var(--shadow-1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    font-family: 'Noto Serif SC', serif;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
}

.main-nav a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: rgba(0, 188, 212, 0.08);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: var(--text);
    font-size: 24px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--bg);
}

/* ============================================
   通用布局
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

main {
    min-height: calc(100vh - 64px - 320px);
}

.section {
    padding: 64px 0;
}

.section-alt {
    background: var(--surface);
}

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

.section-header h2 {
    font-size: 36px;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Hero 区域
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 44px;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-content .badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 28px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: #fff;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: var(--primary-dark);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
    backdrop-filter: blur(10px);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-green {
    background: var(--secondary);
    color: #fff;
}

.btn-green:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76,175,80,0.3);
}

.hero-visual {
    position: relative;
}

.hero-visual img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
}

/* ============================================
   卡片组件
   ============================================ */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-1);
    transition: var(--transition);
    border: 1px solid var(--divider);
}

.card:hover {
    box-shadow: var(--shadow-2);
    transform: translateY(-4px);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 20px;
}

.card-icon.green {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
}

.card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* ============================================
   视频卡片
   ============================================ */
.video-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    transition: var(--transition);
}

.video-card:hover {
    box-shadow: var(--shadow-3);
    transform: translateY(-6px);
}

.video-thumb {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--bg);
}

.video-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 17px;
    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;
    font-size: 13px;
    color: var(--text-hint);
}

.video-meta .views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   创作者卡片
   ============================================ */
.creator-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    transition: var(--transition);
    text-align: center;
}

.creator-card:hover {
    box-shadow: var(--shadow-2);
    transform: translateY(-4px);
}

.creator-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 32px auto 16px;
    object-fit: cover;
    border: 4px solid var(--primary-light);
}

.creator-card h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.creator-role {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.creator-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--divider);
    margin-top: 16px;
}

.creator-stat {
    text-align: center;
}

.creator-stat .num {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.creator-stat .label {
    font-size: 12px;
    color: var(--text-hint);
}

.creator-level {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ============================================
   进度条/等级
   ============================================ */
.level-badge {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-1);
    text-align: center;
    border: 2px solid var(--divider);
    transition: var(--transition);
}

.level-badge:hover {
    border-color: var(--primary);
}

.level-badge .level-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

.level-beginner .level-icon { background: #bdbdbd; }
.level-intermediate .level-icon { background: var(--primary-light); }
.level-advanced .level-icon { background: var(--primary); }
.level-expert .level-icon { background: var(--secondary); }
.level-elite .level-icon { background: linear-gradient(135deg, var(--primary), var(--secondary)); }

.level-badge h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.level-badge .level-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================
   表格
   ============================================ */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
}

.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--divider);
}

.comparison-table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background: rgba(0, 188, 212, 0.04);
}

.comparison-table td:first-child {
    font-weight: 600;
    color: var(--text);
}

.version-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.version-latest {
    background: var(--secondary);
    color: #fff;
}

.version-stable {
    background: var(--primary);
    color: #fff;
}

.version-old {
    background: #e0e0e0;
    color: var(--text-secondary);
}

/* ============================================
   评论/社区
   ============================================ */
.comment-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-1);
    transition: var(--transition);
}

.comment-card:hover {
    box-shadow: var(--shadow-2);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.comment-meta .name {
    font-weight: 600;
    color: var(--text);
}

.comment-meta .time {
    font-size: 13px;
    color: var(--text-hint);
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.comment-actions {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-hint);
}

.comment-actions span {
    cursor: pointer;
    transition: var(--transition);
}

.comment-actions span:hover {
    color: var(--primary);
}

/* ============================================
   联系表单
   ============================================ */
.contact-form {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--divider);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   版本日志
   ============================================ */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--primary);
    z-index: 1;
}

.timeline-item.highlight::before {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.2);
}

.timeline-date {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.timeline-version {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text);
}

.timeline-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-1);
}

.timeline-content ul {
    list-style: none;
    padding: 0;
}

.timeline-content li {
    padding: 6px 0;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    padding-left: 18px;
}

.timeline-content li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.update-type {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
}

.type-new { background: rgba(0, 188, 212, 0.15); color: var(--primary-dark); }
.type-improve { background: rgba(76, 175, 80, 0.15); color: var(--secondary-dark); }
.type-fix { background: #fff3e0; color: #e65100; }

/* ============================================
   面包屑
   ============================================ */
.breadcrumb {
    background: var(--surface);
    padding: 16px 0;
    border-bottom: 1px solid var(--divider);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
    color: var(--text-hint);
}

.breadcrumb-list a {
    color: var(--text-secondary);
}

.breadcrumb-list a:hover {
    color: var(--primary);
}

.breadcrumb-list .separator {
    color: var(--text-hint);
}

.breadcrumb-list .current {
    color: var(--primary);
    font-weight: 500;
}

/* ============================================
   页面头部 Banner
   ============================================ */
.page-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 60px 0 48px;
    text-align: center;
}

.page-banner h1 {
    font-size: 36px;
    color: #fff;
    margin-bottom: 12px;
}

.page-banner p {
    font-size: 17px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   脚注
   ============================================ */
.site-footer {
    background: #263238;
    color: #b0bec5;
    padding: 56px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 16px;
}

.footer-brand p {
    line-height: 1.7;
    margin-bottom: 20px;
    color: #90a4ae;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #90a4ae;
    transition: var(--transition);
    font-size: 14px;
}

.footer-col a:hover {
    color: var(--primary-light);
    padding-left: 4px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    color: #78909c;
    font-size: 14px;
}

/* ============================================
   标签/徽章
   ============================================ */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 188, 212, 0.1);
    color: var(--primary-dark);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 6px;
}

.tag.green {
    background: rgba(76, 175, 80, 0.1);
    color: var(--secondary-dark);
}

/* ============================================
   CTA 区域
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    color: #fff;
    text-align: center;
    padding: 64px 0;
}

.cta-section h2 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 12px;
}

.cta-section p {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 28px;
}

.cta-section .btn {
    background: #fff;
    color: var(--primary-dark);
}

.cta-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* ============================================
   统计数字
   ============================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.stat-item {
    text-align: center;
    padding: 32px 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
}

.stat-item .stat-num {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-item .stat-label {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero { padding: 48px 0; }
    .hero .container { grid-template-columns: 1fr; gap: 32px; }
    .hero-content h1 { font-size: 32px; }
    .hero-content p { font-size: 16px; }
    .section { padding: 48px 0; }
    .section-header h2 { font-size: 28px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; gap: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .page-banner h1 { font-size: 28px; }

    .menu-toggle { display: block; }

    .main-nav {
        position: fixed;
        top: 64px;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: calc(100vh - 64px);
        background: var(--surface);
        box-shadow: var(--shadow-3);
        transition: right 0.3s ease;
        padding: 24px;
    }

    .main-nav.open {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .main-nav a {
        padding: 12px 16px;
        font-size: 16px;
    }

    .contact-form { padding: 24px; }

    .comparison-table { font-size: 14px; }
    .comparison-table th,
    .comparison-table td {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 26px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .stats-row { grid-template-columns: 1fr; }
    .section { padding: 32px 0; }
    .card { padding: 24px 20px; }
}

/* ============================================
   动画
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--divider);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}