/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

/* 基础配色 */
:root {
    --deep-green: #07624e;
    --light-green: #2e7d32;
    --white: #ffffff;
    --gray: #f5f5f5;
}

body {
    background-color: var(--white);
    color: #333;
}

/* 顶部导航栏 */
.top-nav {
    background-color: var(--deep-green);
    color: var(--white);
    padding: 6px 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.logo-container {
    width: 120px;
    height: 60px;
    margin-right: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}
.logo-container > span {
    position: relative;
    white-space: nowrap;
    font-size:large;
    margin-left: 20px;
    color: #ffffff;
}

.logo-container img {
    filter: grayscale(100%) contrast(1000%) brightness(0) invert(1);
    width: 40px;
    height:40px;
}
.nav-links {
    display: flex;
    gap: 32px;
    margin-left: 140px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #a5d6a7;
}

/* 登录弹窗 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 24px;
    color: #333;
}

.login-tabs {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.login-tabs .tab {
    font-size: 16px;
    cursor: pointer;
    color: #999;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.login-tabs .tab.active {
    color: var(--light-green);
    border-bottom-color: var(--light-green);
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group input {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.input-group .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.input-group .clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
}

.input-group .eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
}

.login-links {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    margin-bottom: 24px;
    font-size: 14px;
}

.login-links a {
    color: var(--light-green);
    text-decoration: none;
}

.agreement {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-bottom: 24px;
}

.agreement a {
    color: var(--light-green);
    text-decoration: none;
}

.login-btn {
    width: 100%;
    height: 48px;
    background: var(--light-green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: var(--deep-green);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 12px;
    right: 16px;
    color: #666;
}

/* Banner 容器 */
.banner {
    position: relative;
    width: 100%;
    height: 280px; /* 高度可根据你的需求调整 */
    background: url("1.png") no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

/* 半透明蒙版，提升文字可读性 */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
}

/* 文字内容容器 */
.banner-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

/* 主标题 */
.banner-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* 副标题 */
.banner-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}

/* 行动按钮 */
.banner-btn {
    background: #07624e; /* 农大绿，和导航栏颜色统一 */
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.banner-btn:hover {
    background: #034605; /* 鼠标悬停时加深颜色 */
}

/* 首页下方三栏 */
.home-bottom {
    position: relative;
    background: #ffffff;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* 左侧深绿色半圆装饰 */
.bg-decoration {
    position: absolute;
    top: 350px;
    left: -100px; /* 调整偏移，匹配参考图的半圆露出效果 */
    width: 250px;
    height: 500px;
    background: #0F4835; /* 参考图的深绿色 */
    border-radius: 0 250px 250px 0; /* 右侧半圆 */
    z-index: 0;
}

/* 核心布局：左右两列，宽度比例和参考图一致 */
.main-layout {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 0px; /* 新增：左右列之间的间距，默认没有，加了更美观，可改30px/40px */
}
/* 配合调整左右列宽度 */
.left-column {
    flex: 0 0 2%; /* 原40%，改35%让左侧更窄 */
}
.right-column {
    flex: 0 0 98%; /* 原60%，改65%让右侧更宽 */
}

/* 左侧列：图片+数据卡片，宽度占比约40% */
.left-column {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
}

/* 左侧上半部分图片 */
.left-img {
    width: 100%;
    height: 320px; /* 匹配参考图高度 */
    overflow: hidden;
}
.left-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 左侧下半部分数据卡片 */
.data-card {
    background: #ffffff;
    padding: 20px 30px;
}
.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-item {
    text-align: center;
}
.card-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #0F4835; /* 深绿色数字 */
    margin-bottom: 5px;
}
.card-label {
    font-size: 14px;
    color: #666666;
}

/* 右侧列：文字+视频，宽度占比约60% */
.right-column {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
}

/* 右侧上半部分：文字+按钮 */
.text-block {
    padding: 30px 40px;
}
.text-block h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}
.text-block p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}
.action-btn {
    background: #0F4835; /* 深绿色按钮 */
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

/* 右侧下半部分：视频/图片 */
.media-block {
    position: relative;
    width: 100%;
    height: 280px; /* 匹配参考图高度 */
    overflow: hidden;
}
.media-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 播放按钮（和参考图位置一致） */
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    color: #0F4835;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

/* 资源库页面 */
.resource-page {
    display: flex;
    gap: 24px;
    padding: 24px;
}

.resource-sidebar {
    width: 33.333%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--gray);
    padding: 20px;
    border-radius: 12px;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--deep-green);
}

.filter-group select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: var(--white);
}

.upload-btn {
    background: var(--light-green);
    color: var(--white);
    cursor: pointer;
    height: 48px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin-top: 16px;
}

.resource-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.resource-item {
    height: 200px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray);
}
/* 搜索框整体容器 */
.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 12px;
    gap: 8px;
}

/* 放大镜图标 */
.search-icon img {
    width: 16px;
    height: 16px;
    vertical-align: middle; /* 对齐文字/输入框 */
}
/* 收藏/录音按钮样式 */
.save-btn {
    border: none;
    background: none;
    padding: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 录音图标样式 */
.save-btn img {
    width: 16px;
    height: 16px;
    /* 让图标颜色和搜索框整体风格统一 */
    filter: grayscale(100%) brightness(80%);
    /* 鼠标悬停时高亮 */
    transition: filter 0.2s;
}

.save-btn:hover img {
    filter: grayscale(0%) brightness(100%);
}
/* 输入框 */
.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
}

/* 清除按钮 */
.clear-btn {
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 收藏按钮 */
.save-btn {
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 知识库页面 */
.knowledge-page {
    padding: 24px;
}

.knowledge-search {
    width: 100%;
    height: 48px;
    margin-bottom: 24px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.knowledge-content {
    display: flex;
    gap: 24px;
}

.knowledge-catalog {
    width: 240px;
    border-right: 1px solid #e0e0e0;
    padding-right: 16px;
}

.knowledge-papers {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.paper-item {
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* AI智能体页面 */
.ai-agent-page {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ai-chat-container {
    height: 500px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    overflow-y: auto;
    background: var(--gray);
}

.ai-input-area {
    display: flex;
    gap: 12px;
}

.ai-input-area input {
    flex: 1;
    height: 48px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.ai-input-area button {
    width: 100px;
    background: var(--light-green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* 数据大屏页面 */
.dashboard-page {
    padding: 24px;
}

.dashboard-frame {
    width: 100%;
    height: 600px;
    border: 2px dashed var(--light-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-green);
    background: rgba(46, 125, 50, 0.05);
}

/* 热点新闻页面 */
.news-page {
    padding: 24px;
}

.news-carousel {
    width: 100%;
    height: 300px;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.news-content {
    display: flex;
    gap: 24px;
}

.news-list {
    width: 66.666%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.hot-headlines {
    width: 33.333%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-item {
    padding: 12px;
    border-left: 4px solid var(--light-green);
    background: var(--gray);
}

/* 我的页面 */
.profile-page {
    padding: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--light-green);
}

.profile-stats {
    display: flex;
    gap: 32px;
    margin-top: 16px;
}

.stat-item {
    text-align: center;
}

/* 页脚 */
footer {
    background-color: var(--deep-green);
    color: var(--white);
    padding: 24px;
    text-align: center;
    margin-top: 40px;
}

/* 页面隐藏类 */
.page {
    display: none;
}

.page.active {
    display: block;
}
