/* 抖阴 植物视频社区 - Pugu风格CSS */
:root {
    --primary-color: #4CAF50; /* 绿 */
    --secondary-color: #8BC34A; /* 浅绿 */
    --accent-color: #FFD700; /* 金色 */
    --bg-dark: #1A2E1A; /* 深森林绿 */
    --bg-card: #2E4C2E; /* 卡片绿 */
    --text-main: #E8F5E9; /* 浅绿白 */
    --text-muted: #A5D6A7; /* 柔和绿 */
    --border-color: rgba(76, 175, 80, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

a { color: var(--text-main); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--accent-color); }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 32px; color: var(--accent-color); margin-bottom: 10px; }

/* 头部导航 */
header { background: rgba(26, 46, 26, 0.95); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border-color); backdrop-filter: blur(10px); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 50px; }
.nav-menu { display: flex; gap: 30px; }
.nav-menu a { font-weight: bold; font-size: 16px; }
.nav-menu a:hover, .nav-menu a.active { color: var(--accent-color); }

/* 搜索框 */
.search-container { background: var(--bg-card); padding: 10px 0; display: none; }
.search-box { display: flex; max-width: 600px; margin: 0 auto; }
.search-box input { flex: 1; padding: 10px 15px; border: 1px solid var(--border-color); background: var(--bg-dark); color: #fff; border-radius: 4px 0 0 4px; outline: none; }
.search-box button { padding: 10px 25px; background: var(--primary-color); color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-weight: bold; }
.search-box button:hover { background: var(--secondary-color); }

/* 按钮 */
.btn { display: inline-block; padding: 12px 30px; background: var(--primary-color); color: #fff; border-radius: 25px; font-weight: bold; text-align: center; cursor: pointer; border: none; }
.btn:hover { background: var(--accent-color); color: var(--bg-dark); }
.btn-outline { background: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background: var(--primary-color); color: #fff; }

/* 视频卡片 (H5/JS实现) */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.video-card { background: var(--bg-card); border-radius: 12px; overflow: hidden; transition: transform 0.3s; position: relative; cursor: pointer; }
.video-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.video-thumb { position: relative; padding-bottom: 56.25%; background: #000; overflow: hidden; }
.video-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.video-card:hover .video-thumb img { transform: scale(1.05); opacity: 0.7; }
.play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); width: 60px; height: 60px; background: rgba(0,0,0,0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; opacity: 0; }
.play-icon::after { content: ''; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.video-card:hover .play-icon { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.video-duration { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.8); color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 4px; }
.video-info { padding: 15px; }
.video-title { font-size: 16px; margin-bottom: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.video-tags span { display: inline-block; background: rgba(76,175,80,0.2); color: var(--secondary-color); font-size: 12px; padding: 2px 8px; border-radius: 12px; margin-right: 5px; }

/* 视频模态框 */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { width: 90%; max-width: 900px; background: #000; position: relative; border-radius: 8px; overflow: hidden; }
.close-btn { position: absolute; top: 10px; right: 15px; color: #fff; font-size: 30px; cursor: pointer; z-index: 10; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; }
.video-wrapper iframe, .video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* 面包屑 */
.breadcrumb { padding: 20px 0; font-size: 14px; color: var(--text-muted); }
.breadcrumb a { color: var(--primary-color); }
.breadcrumb span { margin: 0 8px; }

/* 页脚 */
footer { background: #112211; padding: 60px 0 20px; border-top: 1px solid var(--border-color); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h3 { color: var(--accent-color); margin-bottom: 20px; font-size: 18px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-muted); }
.footer-col ul li a:hover { color: var(--accent-color); }
.qr-codes { display: flex; gap: 20px; }
.qr-item { text-align: center; }
.qr-item img { width: 100px; height: 100px; border-radius: 8px; margin-bottom: 10px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); font-size: 14px; }

/* 响应式 */
@media (max-width: 768px) {
    .header-inner { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; }
    .nav-menu { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* 懒加载占位 */
img.lazy { opacity: 0; transition: opacity 0.5s; }
img.loaded { opacity: 1; }
