/* 分类信息管理系统前台样式 */
/* 现代化大气界面设计 */

/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8f9fa;
    font-size: 16px;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

nav ul li a:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 搜索栏样式 */
.search-bar {
    background: white;
    padding: 2rem;
    margin: -2rem auto 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 1200px;
    position: relative;
    z-index: 2;
}

.search-bar form {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 18px 25px;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
}

.search-bar input[type="text"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.search-bar input[type="submit"] {
    padding: 18px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}

.search-bar input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* 内容区域样式 */
main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin: 40px 0;
}

/* 侧边栏样式 */
.sidebar {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f4;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: #495057;
    text-decoration: none;
    display: block;
    padding: 12px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar ul li a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.sidebar ul li ul {
    margin-left: 20px;
    margin-top: 8px;
}

.sidebar ul li ul li a {
    color: #6c757d;
    font-size: 0.95rem;
    padding: 8px 15px;
}

.sidebar ul li ul li a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 主内容区样式 */
.content {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
}

.content h2 {
    margin-bottom: 2rem;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    display: inline-block;
}

/* 信息列表样式 */
.post-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.post-item {
    padding: 25px;
    border-radius: 12px;
    background: #fafbfc;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border-color: #667eea;
    background: white;
}

.post-item h3 {
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.4;
}

.post-item h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-item h3 a:hover {
    color: #667eea;
}

.post-meta {
    color: #868e96;
    font-size: 0.95rem;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta span::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #868e96;
}

.post-meta span:first-child::before {
    display: none;
}

.post-excerpt {
    color: #495057;
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 15px;
}

/* 详情页样式 */
.post-detail {
    padding: 30px 0;
}

.post-detail h1 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.post-detail .post-meta {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    font-size: 1rem;
}

.post-detail .post-content {
    line-height: 2.2;
    margin-bottom: 40px;
    font-size: 1.1rem;
    color: #2c3e50;
}

/* 分页样式 */
.pagination {
    text-align: center;
    margin: 40px 0 20px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    margin: 0 8px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 50px;
}

.pagination a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.pagination .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* 底部样式 */
footer {
    background: #2c3e50;
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

footer p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

footer .social-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

footer .social-links a {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
    
    main {
        grid-template-columns: 250px 1fr;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    nav ul {
        gap: 20px;
    }
    
    nav ul li a {
        font-size: 1rem;
        padding: 8px 15px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem 0;
    }
    
    header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-bar {
        padding: 1.5rem;
        margin: -1.5rem auto 2rem;
    }
    
    .search-bar form {
        flex-direction: column;
    }
    
    .search-bar input[type="text"],
    .search-bar input[type="submit"] {
        width: 100%;
    }
    
    main {
        margin: 20px 0;
    }
    
    .content, .sidebar {
        padding: 1.5rem;
    }
    
    .post-list {
        gap: 15px;
    }
    
    .post-item {
        padding: 20px;
    }
    
    .post-item h3 {
        font-size: 1.2rem;
    }
    
    .pagination a, .pagination span {
        padding: 10px 16px;
        margin: 0 5px;
        min-width: 45px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    nav ul {
        gap: 10px;
    }
    
    nav ul li a {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .search-bar {
        padding: 1rem;
        margin: -1rem auto 1.5rem;
        border-radius: 10px;
    }
    
    .search-bar input[type="text"] {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .search-bar input[type="submit"] {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .content, .sidebar {
        padding: 1rem;
    }
    
    .content h2 {
        font-size: 1.4rem;
    }
    
    .post-item {
        padding: 15px;
    }
    
    .post-meta {
        gap: 10px;
        font-size: 0.85rem;
    }
}
