/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏样式 */
header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1.5rem 0;
    border-bottom: 2px solid #c41e3a;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.site-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-title {
    font-size: 2rem;
    color: #c41e3a;
    font-weight: bold;
    letter-spacing: 2px;
}

.site-meta {
    font-size: 0.9rem;
    color: #666;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.3rem;
}

nav a:hover {
    color: #c41e3a;
    transition: color 0.3s ease;
}

nav a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #c41e3a;
    transition: width 0.3s ease;
}

/* Banner区域 */
.banner {
    position: relative;
    text-align: center;
    color: #fff;
    overflow: hidden;
    height: 400px;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* 轮播图样式 */
.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.banner img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: #fff;
    transform: scale(1.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.carousel-item.fade-in {
    animation: fadeIn 0.6s ease-in-out forwards;
}

.carousel-item.fade-out {
    animation: fadeOut 0.6s ease-in-out forwards;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 90%;
    max-width: 800px;
}

.banner-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #c41e3a;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #a01830;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.decorative-line {
    position: absolute;
    width: 2px;
    height: 60%;
    background: rgba(255,255,255,0.3);
    z-index: 1;
}

.decorative-line.left {
    left: 10%;
    top: 20%;
}

.decorative-line.right {
    right: 10%;
    top: 20%;
}

/* 标题装饰 */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    margin: 0 1rem;
    color: #333;
    position: relative;
}

.title-decoration {
    color: #c41e3a;
    font-size: 0.8rem;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.feature-item, .news-item, .link-item {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.feature-item:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.4s;
}

/* 内容区域 */
.intro {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
    border-radius: 12px;
}

.intro img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.intro-content {
    max-width: 800px;
    margin: 2rem auto;
    text-align: left;
    line-height: 1.8;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 特色板块 */
.features {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1rem;
    text-align: center;
    position: relative;
}

.features::before,
.features::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, transparent, #c41e3a, transparent);
    left: 50%;
    transform: translateX(-50%);
}

.features::before {
    top: -20px;
}

.features::after {
    bottom: -20px;
}

.features h2 {
    color: #333;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #c41e3a;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.feature-item:hover::before {
    opacity: 1;
}

.feature-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
}

/* 最新动态 */
.news {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1rem;
    position: relative;
}

.news h2 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-item {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.news-item:hover {
    border-color: #c41e3a;
    transform: translateY(-5px);
}

.news-item h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.news-item .date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: #c41e3a;
    text-decoration: none;
    margin-top: 1rem;
    font-weight: bold;
    position: relative;
    padding-right: 20px;
}

.read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.read-more:hover::after {
    opacity: 1;
    right: -10px;
}

/* 快速链接 */
.quick-links {
    max-width: 1200px;
    margin: 4rem auto 5rem;
    padding: 0 1rem;
    position: relative;
}

.quick-links h2 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.link-item {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(196, 30, 58, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-item:hover {
    transform: translateY(-5px);
    border-color: rgba(196, 30, 58, 0.2);
}

.link-item:hover::before {
    opacity: 1;
}

.link-item h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
}

.link-item p {
    color: #666;
}

/* 页脚样式 */
footer {
    background: #f5f5f5;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* 表单页面样式 */
.form-page {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 1rem;
}

.form-page h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.form-page h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #c41e3a, transparent);
}

.contact-form {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: fadeInUp 0.6s ease-out forwards;
}

.form-group {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: calc(var(--i) * 0.1s);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-group label, .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

input[type="radio"], input[type="checkbox"] {
    cursor: pointer;
}

textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #c41e3a;
}

button {
    background: #c41e3a;
    color: #fff;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: block;
    margin: 0 auto;
}

button:hover {
    background: #a01830;
}

/* 教程页面样式 */
.tutorial-page {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.tutorial-page h1 {
    text-align: center;
    color: #c41e3a;
    margin-bottom: 2rem;
}

.tutorial-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tutorial-content h2 {
    color: #333;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.tutorial-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* 作品展示页面样式 */
.works-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.works-page h1 {
    text-align: center;
    color: #c41e3a;
    margin-bottom: 2rem;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.work-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.work-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.work-item h3 {
    padding: 1rem;
    margin: 0;
    color: #333;
}

.work-item p {
    padding: 0 1rem 1rem;
    color: #666;
}

/* 学习心得页面样式 */
.experience-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.experience-page h1 {
    text-align: center;
    color: #c41e3a;
    margin-bottom: 2rem;
}

.experience-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.experience-item h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.experience-item .meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.experience-item p {
    line-height: 1.8;
}

.chinese-pattern {
    position: absolute;
    width: 100px;
    height: 200px;
    background-image: url('../images/pattern.png');
    background-size: contain;
    background-repeat: repeat-y;
    opacity: 0.1;
}

.chinese-pattern.left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.chinese-pattern.right {
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
}

/* 每日一字 */
.daily-character {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #fff5f5, #fff);
    border-radius: 8px;
    border: 1px solid rgba(196, 30, 58, 0.1);
}

.character-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.character-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.character {
    font-size: 5rem;
    font-family: "KaiTi", "楷体", serif;
    color: #c41e3a;
    line-height: 1;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: floatAnimation 3s ease-in-out infinite;
}

.character:hover {
    transform: scale(1.1);
}

.character-info {
    flex: 1;
}

.character-info h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.stroke-order {
    flex: 1;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stroke-order h4 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.stroke-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stroke {
    padding: 0.5rem;
    background: #f5f5f5;
    border-radius: 4px;
    color: #666;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stroke::after {
    content: '→';
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stroke:hover::after {
    opacity: 1;
}

.stroke:hover {
    background: #c41e3a;
    color: #fff;
    transform: translateX(10px);
} 