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

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

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #ffeb3b;
    border-radius: 10px;
    color: #333;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #e91e63;
}

.subtitle {
    font-size: 1.2rem;
    color: #555;
}

/* 导航样式 */
nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn, .print-btn, .plan-btn {
    padding: 10px 20px;
    margin: 0 10px 10px 0;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover, .print-btn:hover, .plan-btn:hover {
    background-color: #388e3c;
    transform: scale(1.05);
}

.nav-btn.active {
    background-color: #2196f3;
}

.print-btn {
    background-color: #ff9800;
}

.print-btn:hover {
    background-color: #f57c00;
}

/* 内容区域样式 */
.content-section {
    display: none;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px dashed #2196f3;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    color: #2196f3;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem;
}

/* 卡片样式 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    width: 200px;
    height: 250px;
    perspective: 1000px;
    cursor: pointer;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-front {
    background-color: #bbdefb;
    border: 3px solid #2196f3;
}

.card-back {
    background-color: #e3f2fd;
    border: 3px solid #2196f3;
    transform: rotateY(180deg);
}

.card:hover .card-front {
    transform: rotateY(180deg);
}

.card:hover .card-back {
    transform: rotateY(0deg);
}

.card h3 {
    margin: 10px 0;
    color: #0d47a1;
}

/* 图片占位符样式 */
.img-placeholder {
    width: 120px;
    height: 120px;
    background-color: #e1f5fe;
    border: 2px dashed #03a9f4;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #0288d1;
    font-size: 0.9rem;
    text-align: center;
    padding: 5px;
}

.img-placeholder.large {
    width: 200px;
    height: 150px;
}

/* 活动区域样式 */
.activity {
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    border: 2px solid #4caf50;
}

.activity h3 {
    color: #2e7d32;
    margin-bottom: 15px;
}

/* 连线游戏样式 */
.matching-game {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.left-items, .right-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-item {
    padding: 10px 20px;
    background-color: #c8e6c9;
    border-radius: 20px;
    text-align: center;
    border: 2px solid #4caf50;
}

/* 数学部分样式 */
.number-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.number-card {
    width: 150px;
    text-align: center;
    padding: 15px;
    background-color: #e1bee7;
    border-radius: 10px;
    border: 3px solid #9c27b0;
}

.number-card h3 {
    margin: 10px 0;
    color: #4a148c;
}

.math-problem {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f3e5f5;
    border-radius: 10px;
    text-align: center;
}

.math-problem p {
    font-size: 1.5rem;
    margin: 10px 0;
    font-weight: bold;
    color: #6a1b9a;
}

/* 选项按钮样式 */
.options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.option-btn {
    padding: 8px 20px;
    background-color: #ce93d8;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #4a148c;
    transition: all 0.3s;
}

.option-btn:hover {
    background-color: #ba68c8;
    transform: scale(1.1);
}

.option-btn.correct {
    background-color: #81c784;
    color: #1b5e20;
}

/* 阅读部分样式 */
.story {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #ffecb3;
    border-radius: 10px;
    border: 3px solid #ffc107;
}

.story-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #5d4037;
}

.story-text p {
    margin-bottom: 10px;
}

.question {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff9c4;
    border-radius: 10px;
}

.question p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #827717;
    font-weight: bold;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background-color: #ffeb3b;
    border-radius: 10px;
    color: #333;
}

/* 打印样式 */
@media print {
    nav {
        display: none;
    }

    .content-section {
        display: block !important;
        page-break-after: always;
        border: none;
    }

    .container {
        box-shadow: none;
    }

    .card:hover .card-front {
        transform: none;
    }

    .card:hover .card-back {
        transform: rotateY(180deg);
    }

    .card {
        page-break-inside: avoid;
    }

    .activity {
        page-break-inside: avoid;
    }
}
