/* --- 1. 全局变量与重置 --- */
@font-face {
    font-family: 'Pacifico';
    src: url('../font/Pacifico.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-color: #f9f7f3;
    --bg-card: #ffffff;
    --text-main: #2c3e3e;
    --text-secondary: #909399;
    --border: #e5e0d8;
    --primary: #7d9a8c;
    --primary-dark: #6a8a7c;
    --danger: #e74c3c;
    --danger-dark: #c0392b;
    --accent: #e2b59d;
    --accent-dark: #c9a86c;
    --success: #27ae60;
    --radius: 16px;
    --radius-sm: 10px;
    --header-height: 64px;
    --sidebar-width: 240px;
    --shadow: rgba(44, 62, 62, 0.08);
    --container-width: 1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, .serif {
    font-family: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }
input, textarea { outline: none; }

/* 背景纹理 */
.bg-texture {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(125, 154, 140, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(201, 168, 108, 0.06) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* --- 布局容器 --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- 前台布局 --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    height: 40px;
    width: auto;
    margin: 10px 0;
    cursor: pointer;
}

.logo img {
    height: 40px;
    display: block;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    position: relative;
    color: var(--text-main);
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    padding: 5px 0;
    transition: color 0.3s ease;
}

nav a:hover, nav a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
}

/* 移动端菜单按钮 (默认隐藏) */
.mnavh {
    display: none;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.mnavh svg {
    width: 24px;
    height: 24px;
    color: var(--text-main);
}

.navicon {
    display: none;
}

/* --- 主要内容区域 --- */
main {
    padding: 40px 0;
    min-height: 100vh;
}

.content-wrapper {
    padding: 100px 0 40px;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    position: relative;
}

/* --- 首页 --- */
.hero-name {
    margin-top: 100px;
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    font-family: 'Pacifico', French Script MT, Comic sans MS, serif;
}

.hero-bio {
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 30px;
}

.baidu-search {
    display: flex;
    justify-content: center;
    margin: 25px auto;
    max-width: 540px;
    width: 100%;
}

.baidu-search form {
    display: flex;
    align-items: center;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 28px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.baidu-search form:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.baidu-search form:focus-within {
    box-shadow: 0 4px 16px rgba(125, 154, 140, 0.2);
}

.search-input {
    flex: 1;
    padding: 14px 24px;
    border: none;
    font-size: 15px;
    background: var(--bg-card);
    color: var(--text-main);
    transition: all 0.3s ease;
    min-width: 0;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 0 28px 28px 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 60px 0;
}

.social-btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--border);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-main);
}

.social-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 64px;
}

.home-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-color) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.home-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.home-card:hover::before {
    transform: scaleX(1);
}

.home-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 40px var(--shadow);
}

.home-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.home-label {
    color: var(--text-main);
}

/* --- 2. 说说 --- */
.moments-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.moment-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.moment-card:hover {
    border-left-color: var(--accent);
    transform: translateX(8px);
}

.moment-content {
    margin-bottom: 16px;
    color: var(--text-main);
    font-size: 1rem;
    white-space: pre-line;
}

.moment-tags {
    display: flex;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    background: var(--bg-color);
    color: var(--primary);
}

.tag:hover {
    color: var(--accent);
}

.moment-footer {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.like-btn:hover {
    color: var(--danger);
}

.like-btn:disabled {
    color: var(--danger);
    cursor: not-allowed;
}

.like-btn.liked {
    color: var(--danger);
    animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* --- 3. 博客 --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    color: var(--text-main);
    cursor: pointer;
}

.blog-card:hover {
    box-shadow: 0 16px 40px var(--shadow);
}

.blog-item {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-item img {
    transform: scale(1.05);
}

.blog-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
}

.blog-title:hover {
    color: var(--primary);
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.blog-views {
    font-size: 14px;
    color: var(--text-secondary);
}

.blog-date {
    font-size: 14px;
    color: var(--text-secondary);
}

/* --- 分页样式 --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 10px;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- 博客详情页 --- */
.article-header { text-align: center; margin-bottom: 20px; }
.article-title { 
    background: rgba(255, 255, 255, 0.9); 
    font-size: 2rem; 
    font-weight: 700;
    padding: 10px; 
    border-bottom: 1px solid var(--border); 
    margin-bottom: 16px;
    font-family: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
}
.article-cover { 
    max-width: 800px; 
    width: 100%;
    object-fit: cover; 
    border-radius: var(--radius); 
    margin: 0 auto 40px; 
    display: block; 
}
.article-content { 
    max-width: 800px; 
    margin: 0 auto; 
    font-size: 1rem; 
    line-height: 1.9; 
    color: var(--text-main); 
}
.article-content p {
    margin-bottom: 20px;
}
.back-btn { 
    margin-bottom: 32px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--border);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-main);
}

.back-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- 4. 收藏 --- */
.fav-category {
    margin-bottom: 40px;
}

.fav-category-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--fg-main);
    margin-bottom: 20px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}
    
.fav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}
    
.fav-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #e0e0e0;
}
    
.fav-item-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    font-size: 22px;
    flex-shrink: 0;
}
    
.fav-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fav-item-info {
    flex: 1;
}
    
.fav-item-title {
    flex: 1;
    font-size: 1rem;
    color: var(--fg-main);
    word-break: break-all;
}

.fav-item-description {
    flex: 1;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
    
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-main);
}
    
.empty-state .icon {
    font-size: 48px;
    margin-bottom: 15px;
}
    
.no-categories {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-main);
}

/* --- 5. 相册 --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-card:hover {
    box-shadow: 0 8px 30px rgba(44, 62, 62, 0.12);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.gallery-info {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

.gallery-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
}

.gallery-title:hover {
    color: var(--primary);
}

.gallery-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.gallery-views {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.gallery-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 相册详情页面 */
.gallery-detail-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-color) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.gallery-detail-cover {
    flex-shrink: 0;
    width: 30%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.gallery-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-detail-info {
    flex: 1;
    padding: 30px;
}

.gallery-detail-meta {
    color: var(--text-secondary);
    margin: 10px 0;
}

.gallery-detail-desc {
    color: var(--text-secondary);
    margin-top: 10px;
}

.gallery-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-detail-list {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.gallery-detail-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .gallery-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .gallery-detail-cover {
        width: 100%;
        max-width: 300px;
    }

    .gallery-detail-info {
        width: 100%;
    }
}

/* 关闭按钮（右上角） */
.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transition: all 0.25s ease;
    line-height: 1;
    backdrop-filter: blur(4px);
}
.lightbox-close-btn:hover {
    background: rgba(255, 80, 80, 0.7);
}

/* 左右导航按钮 */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.65);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 24px;
}

.lightbox-nav.next {
    right: 24px;
}

/* 图片计数器 */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    color: white;
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* Lightbox (相册大图) */
.lightbox { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(44, 62, 62, 0.9); 
    z-index: 1000; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    flex-direction: column; 
    backdrop-filter: blur(8px);
}
.lightbox.active { 
    display: flex; 
    animation: fadeIn 0.2s; 
}
.lightbox img { 
    max-height: 85vh; 
    max-width: 90vw; 
    border-radius: var(--radius-sm); 
}

/* --- 6.毒汤 --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.soup-item {
    position: relative;
    margin-bottom: 40px;
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
}

.soup-item:hover {
    border-left-color: var(--accent);
    box-shadow: 0 8px 30px rgba(44, 62, 62, 0.12);
}

.soup-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 25px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.soup-text {
    color: var(--text-main);
    font-size: 1rem;
    white-space: pre-line;
}

/* --- 7.视频 --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.video-card:hover { 
    box-shadow: 0 16px 40px var(--shadow);
}

.video-wrapper {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: transform 0.5s ease;
}

.video-card:hover .video-wrapper img {
    transform: scale(1.1);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.play-btn::after {
    content: '';
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent var(--primary);
    margin-left: 4px;
}

.video-card:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.video-info {
    padding: 16px;
    background: var(--bg-card);
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
}

.video-title:hover {
    color: var(--primary);
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 12px;
}

.video-views {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.video-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 视频播放 */
.video-player-container {
    max-width: var(--container-width);
    margin: 20px auto;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    }
.video-player-info {
    margin-bottom: 20px;
    }
.video-player-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    }
.video-player-meta {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    }

/* 确保16:9比例 */
@media (max-width: 768px) {
    .video-container {
        width: 95vw;
        height: 53.4375vw;
    }
}

@media (max-height: 600px) {
    .video-container {
        height: 90vh;
        width: 160vh;
        max-width: none;
    }
}
.play-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-size: 4rem; 
    cursor: pointer; 
}

/* --- 页脚 --- */
footer {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    padding: 32px 0;
    text-align: center;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 管理登录页 */
.login-view { 
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-color);
    padding: 20px;
}

.login-box { 
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border);
}

.login-box h2 {
    color: var(--text-main);
    font-size: 24px;
    font-weight: 700;
    font-family: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
    margin-bottom: 20px;
}

.login-error {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px;
    color: var(--danger);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease-out;
}

.login-group {
    margin-top: 20px;
    position: relative;
}

.login-group span {
    position: absolute;
    left: 20px;
    top: 13px;
    font-size: 15px;
}

.login-group input {
    width: 100%;
    padding: 14px 18px 14px 60px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.login-group input:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 4px rgba(125, 154, 140, 0.1);
}

.login-footer {
    margin-top: 20px;
    font-size: 0.85rem;
}

.login-box .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-top: 20px;
    transition: all 0.3s ease;
    background: var(--primary);
    color: white;
    border: none;
}

.login-box .btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(125, 154, 140, 0.3);
}

/* --- 管理后台布局 --- */
.admin-view { 
    min-height: 100vh; 
    display: flex;
    max-width: var(--container-width);
    margin: 0 auto;
}

.admin-sidebar { 
    width: var(--sidebar-width); 
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0;
    padding: 0 16px;
}

.admin-logo {
    height: var(--header-height);
    display: flex; 
    align-items: center; 
    padding: 0 24px; 
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    font-family: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
}

.admin-menu { 
    padding: 20px 0; 
    flex: 1; 
}

.admin-menu li a { 
    display: flex; 
    align-items: center; 
    padding: 14px 16px;
    gap: 12px; 
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
    margin: 4px 0;
    color: var(--text-secondary);
}

.admin-menu li a:hover, .admin-menu li a.active { 
    background: var(--bg-color);
    color: var(--primary);
}

.admin-main { 
    background: var(--bg-color);
    width: 100%;
}

.admin-header { 
    height: var(--header-height); 
    background: var(--bg-card); 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 30px;
}
.admin-header-info {
    display: flex; 
    align-items: center; 
    gap: 16px;
}
.admin-info {
    color: var(--text-main); 
    font-weight: 500;
}

.menu-btn {
    display: none;
    font-size: 2rem;
    cursor: pointer;
}

.admin-content { 
    padding: 30px; 
    overflow-y: auto;
    background: var(--bg-color);
}
.admin-content-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px;
}

/* 管理卡片 */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.admin-grid p {
    color:#666;
    text-align:center;
    padding:40px;
}

.admin-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
    border-left: 4px solid var(--primary);
}

/* 搜索框样式 */
.search-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-group input {
    padding: 6px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.search-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(125, 154, 140, 0.1);
}

.search-group form {
    display: flex;
    gap: 10px;
}

/* 系统概览 */
.stat‌-label { 
    text-align: center; 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
}

.stat‌-value { 
    text-align: center; 
    font-size: 28px;
    font-weight: 700;
    margin-top: 5px;
}

.quick-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.quick‌-card {
    display: block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 20px;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.quick‌-icon {
    font-size: 2rem; 
    margin-bottom: 10px; 
}

.quick‌-label {
    font-weight: 500;
}

/* 卡片样式 */
.item-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
}

.item-card-main {
    display: flex;
    gap: 15px;
    align-items: center;
}

.item-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    overflow: hidden;
}

.item-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-card-info {
    flex: 1;
}

.item-card-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 10px;
}

.item-card-info img {
    width: 100%;
    height: 100%;
    object-fit:cover;
}

.item-card-info span {
    color: var(--text-main);
}

.item-card-info small {
    color: var(--text-secondary);
}

.item-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.item-card-category {
    font-size: 12px;
    color: var(--text-main);
    background: var(--bg-color);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.item-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-word;
}

.item-card-url {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card-url a {
    color: var(--text-secondary);
    text-decoration: none;
}

.item-card-url a:hover {
    text-decoration: underline;
}

.item-card-meta {
    padding-top: 10px;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.item-card-actions {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 62, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* 确保模态框能够通过display属性显示 */
.modal-overlay[style*="display: block"] {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px var(--shadow);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-box-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-box-header h3 {
    margin: 0;
    color: var(--text-main);
    font-family: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 50%;
    padding: 0 10px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-box-body {
    padding: 20px;
}

.modal-box-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 通知提示框样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}
    
.notification.warning {
    background: var(--danger-dark);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 确认对话框样式 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.confirm-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.confirm-content h3 {
    margin-top: 0;
    color: #333;
}

.confirm-content p {
    margin-bottom: 20px;
    color: #666;
}

.confirm-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 表单样式 */
.form-group {
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(125, 154, 140, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-footer {
    display:flex;
    justify-content: flex-end;
    gap:10px;
    margin-top:20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(125, 154, 140, 0.3);
}

.btn-secondary {
    background: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-dark);
    box-shadow: 0 8px 20px rgba(125, 154, 140, 0.3);
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-dark);
    box-shadow: 0 8px 20px rgba(125, 154, 140, 0.3);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* 动画 */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-1 { animation-delay: 0.1s; opacity: 0; }
.stagger-2 { animation-delay: 0.2s; opacity: 0; }
.stagger-3 { animation-delay: 0.3s; opacity: 0; }
.stagger-4 { animation-delay: 0.4s; opacity: 0; }
.stagger-5 { animation-delay: 0.5s; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .home-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .blog-grid,
    .video-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mnavh {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        right: 0;
        width: 200px;
        background: white;
        box-shadow: 0 4px 20px var(--shadow);
        padding: 20px;
        border-radius: var(--radius-sm);
    }

    nav.mobile-active { 
        display: block; 
    }

    nav ul {
        width: 100%;
        flex-direction: column;
        gap: 5px;
    }

    nav li {
        width: 100%;
        text-align: center; 
    }

    nav a {
        width: 100%;
        display: block;
        padding: 12px 16px;
        font-size: 16px;
    }

    nav a:hover, nav a.active {
        background-color: var(--bg-color);
        border-radius: 8px;
        padding: 12px 16px;
        border-bottom: none;
    }

    nav a::after {
        display: none;
    }

    .home-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid,
    .video-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero-name {
        margin-top: 20px;
        font-size: 28px;
    }

    .home-number {
        font-size: 36px;
    }

    .article-title {
        font-size: 24px;
    }

    .admin-view { 
        flex-direction: column; 
    }

    .admin-header { 
        padding: 0 10px; 
    }

    .menu-btn { 
        display: block; 
    }

    .admin-sidebar { 
        position: absolute; 
        height: 100%; 
        z-index: 200; 
        transform: translateX(-100%); 
        transition: transform 0.3s; 
    }

    .admin-sidebar.open { 
        transform: translateX(0); 
    }

    .search-group form { 
        display: none; 
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }
}