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

body {
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.header-subtitle {
    font-size: 1.1rem;
    color: #bdc3c7;
    margin-bottom: 1rem;
    text-align: center;
}

/* 导航栏样式 */
.navbar {
    width: 100%;
    background-color: #34495e;
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-item {
    margin: 0 1rem;
}

.nav-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-link:hover {
    background-color: #2c3e50;
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: #e74c3c;
    font-weight: bold;
}

/* 主内容区域 */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* 轮播图样式 */
.carousel-container {
    width: 100%;
    height: 500px;
    overflow: hidden;
    position: relative;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    display: block;
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.carousel-caption h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.carousel-caption p {
    font-size: 1.1rem;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
}

.carousel-control {
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    background-color: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.carousel-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background-color: white;
    transform: scale(1.2);
}

/* 功能模块样式 */
.module-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.module {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.module h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
}

.module p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    text-align: center;
}

.module-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.module-link {
    display: block;
    padding: 0.8rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.module-link:hover {
    background-color: #2980b9;
}

/* 公告栏样式 */
.announcements {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 3rem;
}

.announcements h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
}

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

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

.announcement-date {
    color: #e74c3c;
    font-weight: bold;
    font-size: 0.9rem;
}

/* 留言板样式 */
.guestbook {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 3rem;
}

.guestbook h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
}

.guestbook-form {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #229954;
}

.messages-container {
    max-width: 800px;
    margin: 0 auto;
}

.message-item {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: #fafafa;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.message-author {
    font-weight: bold;
    color: #2c3e50;
}

.message-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-info {
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

.footer-copyright {
    color: #95a5a6;
    font-size: 0.9rem;
}

/* AI应用页面样式 */
.ai-apps-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.ai-app-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
}

.ai-app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.app-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.app-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ai-app-card:hover .app-thumbnail img {
    transform: scale(1.1);
}

.app-grade {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.app-title {
    padding: 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    color: #2c3e50;
}

/* 数字化工具集页面样式 */
.teaching-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 3rem;
}

.section-title {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: left;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.filter-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-title {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.filter-tag {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    color: #495057;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.filter-tag.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.tool-info {
    display: flex;
    flex-direction: column;
}

.tool-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.subject-tag,
.grade-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.subject-tag {
    background-color: #e3f2fd;
    color: #1976d2;
}

.grade-tag {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.tool-title {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tool-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.5rem;
    }
    
    .header-subtitle {
        font-size: 1rem;
    }
    
    .nav-list {
        flex-wrap: wrap;
        padding: 0 1rem;
    }
    
    .nav-item {
        margin: 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .carousel-container {
        height: 300px;
    }
    
    .carousel-caption h2 {
        font-size: 1.3rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .module-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* 数字化工具集页面响应式调整 */
    .teaching-section {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .filter-container {
        padding: 1rem;
    }
    
    .filter-title {
        font-size: 1.1rem;
    }
    
    .filter-tag {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tool-card {
        padding: 1.2rem;
    }
}