/* =====================================================
   海角植物视频社区 - 全站样式表 style.css
   版本：2.0 | 百度SEO EEAT优化版 | bdfeln.cn
   ===================================================== */

:root {
    --primary-color: #2c5e1a;
    --secondary-color: #4CAF50;
    --accent-color: #7CFC00;
    --bg-color: #f5f5f5;
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --white: #fff;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.12);
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: 0.3s ease;
}

/* =====================================================
   全局重置与基础样式
   ===================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    color: var(--secondary-color);
}

/* =====================================================
   头部导航
   ===================================================== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.logo img {
    height: 48px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95em;
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

/* 汉堡菜单按钮（移动端） */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* 搜索框 */
.search-box {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    padding: 10px 20px;
    text-align: center;
    border-bottom: 1px solid #c8e6c9;
}

.search-box form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.search-box input {
    padding: 10px 18px;
    width: 380px;
    max-width: 100%;
    border: 2px solid #c8e6c9;
    border-radius: 25px;
    font-size: 0.95em;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: inherit;
}

.search-box input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

.search-box button {
    padding: 10px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.search-box button:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* =====================================================
   Banner 大图
   ===================================================== */
.banner {
    position: relative;
    height: 420px;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(44,94,26,0.75), rgba(0,0,0,0.55));
}

.banner-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
    max-width: 800px;
}

.banner h1 {
    font-size: 2.8em;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    font-weight: 700;
    letter-spacing: 2px;
}

.banner h2 {
    font-size: 1.25em;
    margin-bottom: 15px;
    opacity: 0.95;
    font-weight: 400;
}

.banner p {
    font-size: 1em;
    max-width: 600px;
    margin: 0 auto 22px;
    opacity: 0.9;
    line-height: 1.7;
}

/* =====================================================
   内容区块
   ===================================================== */
.section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 1.5em;
    font-weight: 700;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* =====================================================
   视频网格与卡片
   ===================================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

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

/* 触控设备点击态 */
.video-card:active {
    transform: translateY(-2px);
}

.video-thumbnail {
    position: relative;
    height: 165px;
    background-color: #c8e6c9;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    overflow: hidden;
}

/* 视频封面遮罩 */
.video-thumbnail::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background var(--transition);
    z-index: 1;
}

.video-thumbnail:hover::before,
.video-thumbnail.touched::before {
    background: rgba(0,0,0,0.25);
}

/* 播放按钮 - 默认隐藏，hover/touch显示 */
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(44,94,26,0.85);
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: transform var(--transition), background var(--transition);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.play-btn::after {
    content: '';
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent var(--white);
    margin-left: 6px;
}

/* 鼠标悬停显示播放按钮 */
.video-thumbnail:hover .play-btn {
    display: flex;
}

/* 触控设备：touch状态显示播放按钮 */
.video-thumbnail.touched .play-btn {
    display: flex;
}

.play-btn:hover {
    background: var(--secondary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 14px 15px;
}

.video-info h3 {
    font-size: 0.95em;
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-info h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.video-info h3 a:hover {
    color: var(--primary-color);
}

/* 作者署名行（EEAT信号） */
.video-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.82em;
    color: var(--text-muted);
}

.video-author .author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.75em;
    flex-shrink: 0;
}

.video-author .author-name {
    font-weight: 600;
    color: var(--primary-color);
}

.video-author .pub-date {
    margin-left: auto;
}

.video-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.82em;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 4px;
}

/* =====================================================
   FAQ 样式
   ===================================================== */
.faq-item {
    background: var(--white);
    margin-bottom: 12px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--secondary-color);
    transition: box-shadow var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-q {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1em;
    cursor: pointer;
}

.faq-a {
    color: var(--text-light);
    font-size: 0.92em;
    line-height: 1.8;
}

/* =====================================================
   用户评价
   ===================================================== */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.review-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--secondary-color);
    transition: transform var(--transition);
}

.review-card:hover {
    transform: translateY(-3px);
}

.review-user {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 0.95em;
}

/* =====================================================
   合作品牌Logo墙
   ===================================================== */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    align-items: center;
}

.partner-item {
    background: var(--white);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid #e8f5e9;
}

.partner-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.partner-item .partner-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.partner-item .partner-name {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--primary-color);
}

.partner-item .partner-type {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 3px;
}

/* =====================================================
   EEAT 信任区块
   ===================================================== */
.trust-bar {
    background: linear-gradient(135deg, #1a3a0a, #2c5e1a);
    padding: 15px 20px;
    text-align: center;
}

.trust-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 0.88em;
}

.trust-item .trust-icon {
    font-size: 1.2em;
}

/* =====================================================
   页脚
   ===================================================== */
footer {
    background: #1a1a1a;
    color: var(--white);
    padding: 45px 0 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding: 0 20px 30px;
    border-bottom: 1px solid #333;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    background: #111;
}

/* 备案信息样式 */
.beian-info {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.beian-info a {
    color: #666;
    text-decoration: none;
    font-size: 0.8em;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.beian-info a:hover {
    color: var(--secondary-color);
}

/* 法律链接 */
.legal-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.legal-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.82em;
    transition: color var(--transition);
}

.legal-links a:hover {
    color: var(--secondary-color);
}

/* =====================================================
   面包屑导航
   ===================================================== */
.breadcrumb {
    max-width: 1200px;
    margin: 10px auto;
    padding: 8px 20px;
    font-size: 0.88em;
    color: var(--text-muted);
    background: var(--white);
    border-bottom: 1px solid #eee;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 6px;
    color: #ccc;
}

/* =====================================================
   移动端深度适配 - 百度移动优先索引
   ===================================================== */

/* 平板端 (≤1024px) */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .banner h1 {
        font-size: 2.2em;
    }
}

/* 移动端 (≤768px) - 百度移动端搜索权重优先 */
@media (max-width: 768px) {
    /* 导航适配 */
    .nav-container {
        flex-wrap: wrap;
        padding: 10px 15px;
        gap: 10px;
    }

    .nav-toggle {
        display: flex;
    }

    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    nav.nav-open {
        max-height: 400px;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
        border-top: 1px solid #eee;
    }

    nav ul li a {
        display: block;
        padding: 10px 5px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 1em;
    }

    /* 搜索框适配 */
    .search-box input {
        width: 100%;
        max-width: 260px;
        font-size: 0.9em;
    }

    .search-box button {
        padding: 10px 18px;
        font-size: 0.9em;
    }

    /* Banner适配 */
    .banner {
        height: 280px;
        background-attachment: scroll;
    }

    .banner h1 {
        font-size: 1.7em;
        letter-spacing: 1px;
    }

    .banner h2 {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .banner p {
        font-size: 0.88em;
        display: none; /* 移动端隐藏长描述，保留标题 */
    }

    /* 视频网格适配 - 移动端2列 */
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .video-thumbnail {
        height: 120px;
    }

    .video-info {
        padding: 10px 12px;
    }

    .video-info h3 {
        font-size: 0.85em;
        -webkit-line-clamp: 2;
    }

    .video-stats {
        font-size: 0.75em;
        flex-direction: column;
        gap: 2px;
    }

    /* 移动端播放按钮：触控时始终可见 */
    .video-thumbnail .play-btn {
        display: flex;
        opacity: 0.75;
        width: 40px;
        height: 40px;
    }

    .video-thumbnail .play-btn::after {
        border-width: 8px 0 8px 13px;
    }

    /* 内容区块适配 */
    .section {
        margin: 25px auto;
        padding: 0 12px;
    }

    .section-title {
        font-size: 1.2em;
        margin-bottom: 20px;
    }

    /* 评价网格适配 */
    .review-grid {
        grid-template-columns: 1fr;
    }

    /* 合作品牌适配 */
    .partner-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    /* 页脚适配 */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 0 15px 20px;
    }

    .trust-bar-inner {
        gap: 15px;
    }

    .trust-item {
        font-size: 0.8em;
    }

    /* 面包屑适配 */
    .breadcrumb {
        font-size: 0.82em;
        padding: 6px 15px;
    }
}

/* 小屏手机 (≤480px) */
@media (max-width: 480px) {
    /* 视频网格：小屏1列 */
    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .video-thumbnail {
        height: 190px;
    }

    .video-info h3 {
        font-size: 0.95em;
    }

    .video-stats {
        flex-direction: row;
        font-size: 0.78em;
    }

    .banner h1 {
        font-size: 1.4em;
    }

    .banner {
        height: 240px;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
    }

    .search-box form {
        flex-direction: column;
        gap: 8px;
    }

    .search-box input {
        max-width: 100%;
    }

    .search-box button {
        width: 100%;
        max-width: 200px;
    }
}

/* 超小屏 (≤360px) */
@media (max-width: 360px) {
    .banner h1 {
        font-size: 1.2em;
    }

    .logo img {
        height: 38px;
    }
}

/* =====================================================
   打印样式
   ===================================================== */
@media print {
    header, footer, .search-box, .play-btn, .trust-bar {
        display: none;
    }
    .section {
        margin: 10px auto;
    }
}
