/* 时政术语管理系统样式 - 参考中国关键词网站风格 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 头部区域 */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-top {
    background: #2c3e50;
    color: #fff;
    padding: 5px 0;
    font-size: 12px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lang-switch a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 3px;
    font-size: 11px;
}

.lang-switch a:hover,
.lang-switch a.active {
    color: #fff;
}

.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 50px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 2px solid #3498db;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #3498db;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.search-btn:hover {
    background: #2980b9;
}

/* 导航菜单 */
.navbar {
    background: #34495e;
    padding: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 25px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 14px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #2c3e50;
}

/* 主要内容区域 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-content {
    padding: 30px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* 内容模块 */
.content-section {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #e74c3c;
}

/* 术语列表 */
.term-list {
    list-style: none;
}

.term-item {
    padding: 15px 0;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.term-item:last-child {
    border-bottom: none;
}

.term-name {
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    font-size: 16px;
}

.term-name:hover {
    color: #3498db;
}

.term-translation {
    color: #7f8c8d;
    font-size: 14px;
    margin-left: 10px;
}

.term-category {
    background: #3498db;
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* 分类列表 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-item {
    background: #fff;
    color: #2c3e50;
    padding: 25px 20px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #ecf0f1;
    position: relative;
    overflow: hidden;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.category-item:nth-child(1)::before { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.category-item:nth-child(2)::before { background: linear-gradient(90deg, #f39c12, #e67e22); }
.category-item:nth-child(3)::before { background: linear-gradient(90deg, #3498db, #2980b9); }
.category-item:nth-child(4)::before { background: linear-gradient(90deg, #27ae60, #229954); }
.category-item:nth-child(5)::before { background: linear-gradient(90deg, #9b59b6, #8e44ad); }

.category-item:hover {
    transform: translateY(-5px);
    color: #2c3e50;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.category-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.category-count {
    font-size: 14px;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
}

/* 搜索结果 */
.search-results {
    margin-top: 20px;
}

.result-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
}

.result-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.result-title {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.result-title a {
    color: #2c3e50;
    text-decoration: none;
}

.result-title a:hover {
    color: #3498db;
}

.result-meta {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.result-excerpt {
    color: #555;
    line-height: 1.6;
}

/* 侧边栏 */
.sidebar .content-section {
    padding: 20px;
}

.hot-words {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.hot-word {
    background: linear-gradient(135deg, #f8f9fa, #ecf0f1);
    color: #2c3e50;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
    position: relative;
    overflow: hidden;
}

.hot-word::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.5s;
}

.hot-word:hover::before {
    left: 100%;
}

.hot-word:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 统计数据 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border-radius: 8px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 5px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.pagination a:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination .current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

.footer a {
    color: #3498db;
    text-decoration: none;
}

.footer a:hover {
    color: #5dade2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-main .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box {
        margin: 0;
        max-width: 100%;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 提示信息 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* 中国关键词风格装饰元素 */
.section-decoration {
    position: relative;
    overflow: hidden;
}

.section-decoration::after {
    content: '';
    position: absolute;
    top: 0;
    right: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

/* 中国风装饰图案 */
.chinese-pattern {
    position: relative;
}

.chinese-pattern::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #e74c3c 25%, transparent 25%), 
                linear-gradient(-45deg, #e74c3c 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #e74c3c 75%), 
                linear-gradient(-45deg, transparent 75%, #e74c3c 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    opacity: 0.1;
    border-radius: 50%;
}

/* 官网风格的标题装饰 */
.official-title {
    position: relative;
    display: inline-block;
    padding-left: 20px;
}

.official-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #e74c3c, #c0392b);
    border-radius: 2px;
}

/* 首页特色模块样式 */
.featured-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #ecf0f1;
    position: relative;
    overflow: hidden;
}

.featured-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #3498db, #27ae60, #9b59b6);
}

/* 数据统计美化 */
.stat-item {
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 术语列表项美化 */
.term-item {
    position: relative;
    transition: all 0.3s ease;
}

.term-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, #3498db, #2980b9);
    transition: height 0.3s ease;
}

.term-item:hover::before {
    height: 60%;
}

.term-item:hover {
    background: #f8f9fa;
    padding-left: 20px;
}

/* 搜索建议框样式 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-suggestions li {
    border-bottom: 1px solid #f0f0f0;
}

.search-suggestions li:last-child {
    border-bottom: none;
}

.search-suggestions a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.search-suggestions a:hover {
    background: #f8f9fa;
}

.suggestion-name {
    font-weight: 500;
    color: #2c3e50;
}

.suggestion-translation {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 3px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

/* 响应式菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 18px;
    padding: 10px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #34495e;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .nav-menu.active {
        display: flex;
    }
}

/* 页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #ecf0f1;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 官网风格的引用块 */
.quote-block {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-left: 4px solid #e74c3c;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
    position: relative;
}

.quote-block::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 60px;
    color: #e74c3c;
    opacity: 0.3;
    line-height: 1;
}

 