/*
Theme Name: AI化学教育主题
Theme URI: https://aihx.top
Description: 专为AI化学教育案例收集网站设计的WordPress主题
Version: 1.0
Author: AI化学教育团队
Author URI: https://aihx.top
Tags: 教育, 化学, AI, 案例研究
Text Domain: aichem
*/

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: #2c7db1;
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: #1c5a8b;
}

img {
    max-width: 100%;
    height: auto;
}

/* 头部样式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo a {
    color: #2c7db1;
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 50px;
    margin-right: 10px;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    color: #333;
    font-weight: 500;
}

.main-nav ul li a:hover {
    color: #2c7db1;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #2c7db1 0%, #6ac4c8 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px 0 0 4px;
}

.search-box button {
    padding: 12px 20px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 内容区域 */
.content-area {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: #2c7db1;
    font-size: 2rem;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #2c7db1;
    margin: 15px auto 0;
}

/* 案例网格 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.case-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.case-card:hover {
    transform: translateY(-5px);
}

.case-image {
    height: 200px;
    background-color: #6ac4c8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    background-size: cover;
    background-position: center;
}

.case-content {
    padding: 20px;
}

.case-content h3 {
    margin-bottom: 10px;
    color: #2c7db1;
}

.case-meta {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.case-meta span {
    margin-right: 15px;
}

.case-tags {
    margin-top: 15px;
}

.case-tags span {
    display: inline-block;
    background: #e8f4fc;
    color: #2c7db1;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #2c7db1;
    color: white;
    border-radius: 4px;
    font-weight: 500;
}

.read-more:hover {
    background: #1c5a8b;
    color: white;
}

/* 分类区域 */
.categories {
    background: white;
    padding: 60px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s;
}

.category-card:hover {
    background: #2c7db1;
    color: white;
    transform: translateY(-5px);
}

.category-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.category-card h3 {
    margin-bottom: 10px;
}

/* 行动号召区域 */
.cta {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin: 40px 0;
}

.cta h2 {
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #ff6b6b;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 页脚 */
footer {
    background: #333;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #6ac4c8;
}

.footer-section p, .footer-section a {
    color: #ccc;
    margin-bottom: 10px;
    display: block;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    font-size: 0.9rem;
    color: #999;
}

/* 登录注册模态窗口 */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.auth-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.auth-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    z-index: 1;
}

.auth-close:hover,
.auth-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.auth-tablink {
    flex: 1;
    background-color: #f1f1f1;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.auth-tablink:hover {
    background-color: #ddd;
}

.auth-tablink.active {
    background-color: #fff;
    border-bottom: 3px solid #2c7db1;
    font-weight: bold;
}

.auth-tab-content {
    padding: 20px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h3 {
    margin-bottom: 20px;
    color: #2c7db1;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.forgot-password {
    color: #2c7db1;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: #2c7db1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-submit-btn:hover {
    background: #1c5a8b;
}

.registration-closed {
    text-align: center;
    color: #ff6b6b;
    font-weight: 500;
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    background: white;
    border-radius: 4px;
    text-decoration: none;
    color: #2c7db1;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-numbers.current {
    background: #2c7db1;
    color: white;
}

/* 错误提示样式 */
.auth-error {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.auth-form input.error {
    border-color: #ff6b6b;
}

/* 加载状态 */
.auth-submit-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 99;
    }
    
    .main-nav ul.show {
        display: flex;
    }
    
    .main-nav ul li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 15px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}