/* 设置全局字体 */
body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #e53e3e;
    border-radius: 4px;
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 动画过渡 */
.transition-all {
    transition: all 0.3s ease-in-out;
}

/* 鼠标悬停蓝色字体 */
.hover-blue:hover {
    color: #3182ce !important;
}

/* 小卡片悬停效果 */
.small-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.small-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* 底部快速按钮 */
.quick-btn {
    transition: all 0.3s ease;
}

.quick-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Tab标签字体加粗 */
.news-tab-link, .result-tab-link {
    font-weight: 600 !important;
    white-space: nowrap;
}

/* 企业列表滚动容器 */
.company-scroll-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    height: 160px;
}

/* 企业列表滚动内容 */
#company-scroll-list {
    padding: 0.5rem 0;
}

/* 新闻标题悬停气泡 */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* 文本截断 */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 登录模块按钮切换优化 */
.login-tab-btn {
    transition: all 0.2s ease;
    will-change: transform, background-color;
}

.login-tab-btn:hover {
    transform: translateY(-1px);
}

.login-tab-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 登录表单输入框焦点效果 */
input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* 模块容器统一高度和宽度 */
.module-container {
    height: 480px;
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
}

/* 模块头部样式 */
.module-header {
    background: linear-gradient(135deg, #f0f2f5, #e2e8f0);
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-icon {
    color: #e53e3e;
    font-size: 1.2rem;
    margin-right: 8px;
}

.module-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

/* 登录表单容器 - 自适应高度 */
.login-form-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 登录表单 - 自适应高度 */
.login-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Tab内容容器 */
.tab-content-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    height: 220px;
}

/* 统计图表容器 */
.chart-container {
    flex: 1;
    min-height: 280px;
}

/* 企业列表滚动容器调整 */
.company-scroll-container {
    flex: 1;
    min-height: 160px;
    max-height: 160px;
}

/* 主内容区域 */
main {
    flex: 1;
}

/* 页脚固定到底部 */
footer {
    margin-top: auto;
}

/* 导航栏样式优化 - 重新布局，美化样式 */
.navbar {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #c53030, #e53e3e);
}

.nav-link {
    color: rgba(255,255,255,0.9);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.nav-link-mobile {
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.nav-link-mobile:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

/* 移动端菜单样式 */
.mobile-menu {
    background: linear-gradient(135deg, #c53030, #e53e3e);
    border-radius: 0 0 0.5rem 0.5rem;
}

/* 图文新闻时间线容器 - PC端优化 */
.news-timeline {
    flex: 1;
    overflow: hidden;
    padding: 0;
    border-radius: 0.5rem;
    background-color: #f8fafc;
}

/* 时间线包装器 */
.timeline-wrapper {
    height: 100%;
    overflow-y: auto;
    padding: 5px;
}

/* 时间线项目样式 - 优化不超出模块边缘 */
.timeline-item {
    position: relative;
    margin: 5px; /* 上下左右留出5px空间 */
    flex-shrink: 0;
}

/* 时间线连接线样式 */
.timeline-item .absolute.left-3 {
    background-color: #e2e8f0;
    left: 0.75rem;
    top: 1.5rem;
    width: 0.125rem;
    height: calc(100% + 0.5rem);
}

/* 时间线圆点样式 */
.timeline-item .absolute.left-0 {
    background-color: #e53e3e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    left: 0;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* 时间线内容卡片样式 */
.timeline-item .bg-white {
    margin: 5px; /* 上下左右留出5px空间 */
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.timeline-item .bg-white:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 时间线图片样式优化 */
.timeline-item img {
    object-fit: cover;
    border-radius: 0.375rem;
}

/* 时间线标题样式优化 */
.timeline-item h3 {
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* 时间线分类标签样式优化 */
.timeline-item span.bg-red-100,
.timeline-item span.bg-green-100,
.timeline-item span.bg-purple-100,
.timeline-item span.bg-blue-100 {
    border-radius: 0.25rem;
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .hidden.md\\:flex {
        display: none;
    }
    
    .md\\:hidden {
        display: block;
    }
    
    /* 移动端调整高度 */
    .module-container {
        height: auto;
        min-height: 320px;
    }
    
    /* 移动端新闻标题不截断 */
    .truncate {
        white-space: normal;
        text-overflow: clip;
    }
    
    /* 移动端Tab内容高度调整 */
    .tab-content-container {
        height: auto;
        min-height: 180px;
    }
    
    /* 移动端图表高度调整 */
    .chart-container {
        min-height: 220px;
    }
    
    /* 移动端时间线高度调整 */
    .news-timeline {
        height: auto;
        min-height: 250px;
    }
    
    /* 导航栏高度调整 */
    .navbar .container {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    /* 移动端时间线项目样式调整 */
    .timeline-wrapper {
        max-height: 300px;
    }
    
    .line-clamp-2 {
        -webkit-line-clamp: 3;
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: none;
        color: black;
    }
}

/* 防止内容溢出 */
* {
    box-sizing: border-box;
}

/* 确保所有模块内容不溢出 */
.module-container > * {
    max-width: 100%;
}

/* 鼠标特效粒子 */
.mouse-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    user-select: none;
}

/* 登录按钮悬停效果 */
.bg-gradient-to-r:hover {
    transform: translateY(-1px);
}

/* 验证码样式优化 */
.captcha-code {
    user-select: none;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 登录标签容器 */
.login-tab-container {
    border-radius: 0.5rem;
}

/* 时间线项目样式 */
.timeline-item {
    position: relative;
    flex-shrink: 0;
}

/* 模块内边距优化 */
.module-container .p-4 {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 图标样式优化 */
.fas, .far, .fab {
    display: inline-block;
    text-align: center;
}

/* 确保快捷链接不超出模块高度 */
.module-container .flex.justify-between.text-sm.pt-3 {
    margin-top: auto;
}

/* 回到顶部按钮样式 */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 图文新闻标题样式优化 */
.hover-blue a {
    transition: color 0.3s ease;
}

/* 天气时间信息样式优化 */
.navbar .text-sm {
    font-size: 0.875rem;
}

.navbar .font-mono {
    font-family: 'Courier New', monospace;
}

/* 确保时间线内容不溢出容器 */
.news-timeline .flex {
    min-width: 0;
}

.news-timeline .min-w-0 {
    min-width: 0;
}

/* 时间线滚动条样式优化 */
.timeline-wrapper::-webkit-scrollbar {
    width: 6px;
}

.timeline-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.timeline-wrapper::-webkit-scrollbar-thumb {
    background: #e53e3e;
    border-radius: 3px;
}

.timeline-wrapper::-webkit-scrollbar-thumb:hover {
    background: #c53030;
}

/* 时间线项目内边距优化 */
.timeline-item {
    padding: 5px;
}

/* 时间线内容卡片内边距优化 */
.timeline-item .bg-white {
    padding: 0.75rem;
}

/* 时间线标题行数限制 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 时间线最后一项隐藏连接线 */
.timeline-item:last-child .absolute.left-3 {
    display: none;
}

/* 时间线项目悬停效果 */
.timeline-item .bg-white:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 时间线项目过渡效果 */
.timeline-item .bg-white {
    transition: all 0.3s ease;
}

/* 时间线项目分类标签样式 */
.timeline-item .bg-red-100,
.timeline-item .bg-green-100,
.timeline-item .bg-purple-100,
.timeline-item .bg-blue-100 {
    border-radius: 0.25rem;
    font-weight: 500;
}

/* 时间线项目时间信息样式 */
.timeline-item .text-xs {
    font-size: 0.75rem;
}

/* 时间线项目链接样式 */
.timeline-item a {
    text-decoration: none;
}

/* 时间线项目图标样式 */
.timeline-item .fas {
    font-size: 0.75rem;
}

/* 时间线项目图片尺寸优化 */
.timeline-item img {
    width: 5rem;
    height: 5rem;
}

/* 时间线项目响应式调整 */
@media (max-width: 768px) {
    .timeline-item img {
        width: 100%;
        height: auto;
        margin-bottom: 0.75rem;
    }
    
    .timeline-item .flex {
        flex-direction: column;
    }
    
    .timeline-item .flex-col.sm\\:flex-row {
        flex-direction: column;
    }
    
    .timeline-item .mb-3.sm\\:mb-0 {
        margin-bottom: 0.75rem;
    }
    
    .timeline-item .sm\\:mr-3 {
        margin-right: 0;
    }
    
    .line-clamp-2 {
        -webkit-line-clamp: 3;
    }
}

/* 导航栏响应式调整 */
@media (max-width: 768px) {
    .navbar .h-16 {
        height: 4rem;
    }
    
    .navbar .text-xl {
        font-size: 1.125rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .nav-link-mobile {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* 模块容器圆角优化 */
.module-container {
    border-radius: 1rem;
    overflow: hidden;
}

/* 模块头部圆角优化 */
.module-header {
    border-radius: 1rem 1rem 0 0;
}

/* 登录模块按钮圆角优化 */
.login-tab-container {
    border-radius: 0.5rem;
}

.login-tab-btn {
    border-radius: 0.375rem;
}

/* 时间线项目圆角优化 */
.timeline-item .bg-white {
    border-radius: 0.5rem;
}

/* 时间线圆点圆角优化 */
.timeline-item .absolute.left-0 {
    border-radius: 9999px;
}

/* 时间线连接线圆角优化 */
.timeline-item .absolute.left-3 {
    border-radius: 0.125rem;
}

/* 确保所有元素正确显示 */
* {
    box-sizing: border-box;
}

/* 确保模块内容不溢出 */
.module-container > * {
    max-width: 100%;
}

/* 确保时间线内容不溢出 */
.news-timeline > * {
    max-width: 100%;
}

/* 确保时间线包装器不溢出 */
.timeline-wrapper {
    max-width: 100%;
}

/* 确保时间线项目不溢出 */
.timeline-item {
    max-width: 100%;
}

/* 确保时间线内容卡片不溢出 */
.timeline-item .bg-white {
    max-width: 100%;
}

/* 确保时间线图片不溢出 */
.timeline-item img {
    max-width: 100%;
    height: auto;
}

/* 确保时间线标题不溢出 */
.timeline-item h3 {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 确保时间线分类标签不溢出 */
.timeline-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 确保时间线时间信息不溢出 */
.timeline-item .text-xs {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}