/* 全局样式 */
* {
    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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #4a6fa5;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #555;
    padding: 10px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* 搜索区域 */
.search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 50px 0;
    text-align: center;
}

.search-section h2 {
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 300;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-form button {
    padding: 15px 25px;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-form button:hover {
    background-color: #ff5252;
}

/* 分类浏览 */
.categories-section {
    padding: 50px 0;
    background-color: #f8f9fa;
}

.categories-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #333;
    font-weight: 500;
}

.categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.category-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.category-item h3 {
    margin-bottom: 10px;
}

.category-item h3 a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

.category-item h3 a:hover {
    color: #1976d2;
}

.category-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* 子分类样式 */
.sub-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sub-category-link {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sub-category-link:hover {
    background-color: #bbdefb;
    transform: translateY(-1px);
}

.category-meta {
    font-size: 12px;
    color: #999;
}

/* 分类页面 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.category-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.category-card h3 {
    margin-bottom: 15px;
}

.category-card h3 a {
    color: #333;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
}

.category-card h3 a:hover {
    color: #1976d2;
}

.category-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* 多级分类 */
.category-breadcrumb {
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.category-breadcrumb a {
    color: #1976d2;
    text-decoration: none;
}

.category-breadcrumb a:hover {
    text-decoration: underline;
}

.category-breadcrumb span {
    margin: 0 8px;
    color: #999;
}

.category-children {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.category-children h3 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}

.category-children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.child-category {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    transition: background-color 0.3s ease;
}

.child-category:hover {
    background-color: #e9ecef;
}

.child-category a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.child-category a:hover {
    color: #1976d2;
}

/* 网站列表 */
.websites-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.website-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    gap: 25px;
    border: 1px solid #eee;
}

.website-item .website-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.website-item .website-logo img {
    max-width: 80%;
    max-height: 80%;
}

.placeholder-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.website-item .website-details {
    flex: 1;
}

.website-item h3 {
    margin-bottom: 10px;
}

.website-item h3 a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

.website-item h3 a:hover {
    color: #1976d2;
}

.website-item p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.website-url a {
    color: #1976d2;
    text-decoration: none;
    font-size: 14px;
}

.website-url a:hover {
    text-decoration: underline;
}

.website-category {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 10px;
}

/* 搜索页面 */
.search-results {
    margin-top: 30px;
}

.search-results h3 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}

.search-tips {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: 30px;
    border: 1px solid #eee;
}

.search-tips h3 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
}

.search-tips ul {
    list-style-position: inside;
    color: #666;
}

.search-tips ul li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* 登录/注册页面 */
.login-container,
.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 20px;
}

.login-form,
.register-form {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 450px;
    border: 1px solid #eee;
}

.login-form h2,
.register-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-group button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.form-group button:hover {
    transform: translateY(-2px);
}

.form-group button.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.form-group button.danger:hover {
    transform: translateY(-2px);
}

/* 消息提示 */
.success-message,
.error-message,
.info-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.info-message {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* 提交网站页面 */
.form-section {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.form-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}

/* 关于我们页面 */
.about-content {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.about-content h3 {
    margin: 25px 0 15px 0;
    color: #333;
    font-weight: 500;
}

.about-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-content ul {
    color: #666;
    margin-bottom: 15px;
    padding-left: 20px;
}

.about-content ul li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 信息资讯模块 */
.info-section {
    padding: 50px 0;
    background-color: #ffffff;
}

.info-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.info-section .section-header h2 {
    font-size: 24px;
    color: #333;
    font-weight: 500;
}

.info-section .section-header .more-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.info-section .section-header .more-link:hover {
    text-decoration: underline;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.info-item h3 {
    margin-bottom: 15px;
}

.info-item h3 a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

.info-item h3 a:hover {
    color: #1976d2;
}

.info-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.info-category {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.info-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-stats {
    display: flex;
    gap: 15px;
}

.info-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 页脚 */
footer {
    background-color: #ffffff;
    color: #666;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #eee;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: #1976d2;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        padding: 15px;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin: 0 5px;
    }
    
    nav ul li a {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form input,
    .search-form button {
        border-radius: 8px;
        width: 100%;
    }
    
    .search-form input {
        margin-bottom: 10px;
    }
    
    .websites-grid,
    .categories-list,
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .website-item {
        flex-direction: column;
        text-align: center;
    }
    
    .website-item .website-logo {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
    
    .login-container,
    .register-container {
        min-height: auto;
    }
    
    .login-form,
    .register-form {
        padding: 30px 20px;
    }
    
    .sub-categories {
        justify-content: center;
    }
    
    .info-section .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .info-meta {
        flex-direction: column;
        gap: 10px;
    }
}