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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    text-align: center;
    color: white;
    padding: 40px 20px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

/* 主内容区 */
main {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Tab内容 */
.tab-content {
    display: none;
}

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

/* 章节标题 */
.section-title {
    margin-bottom: 25px;
}

.section-title h2 {
    font-size: 1.8em;
    color: #667eea;
    margin-bottom: 5px;
}

.section-subtitle {
    color: #999;
    font-size: 0.95em;
}

/* 古诗卡片 */
.poem-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.poem-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.poem-header {
    margin-bottom: 20px;
}

.poem-title {
    font-size: 2em;
    margin-bottom: 10px;
}

.poem-meta {
    display: flex;
    gap: 15px;
    font-size: 0.95em;
    opacity: 0.9;
}

.poem-meta .grade {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
}

.poem-content {
    font-size: 1.3em;
    line-height: 2;
    margin-bottom: 25px;
    text-align: center;
}

.poem-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn.primary {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

.btn.small {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* 进度卡片 */
.progress-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.progress-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.progress-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.progress-value {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.progress-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* 成就 */
.achievements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.achievement {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px dashed #dee2e6;
}

.achievement.unlocked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid #667eea;
}

.achievement-icon {
    font-size: 2em;
    display: block;
    margin-bottom: 10px;
}

.achievement-title {
    font-weight: bold;
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 0.85em;
    opacity: 0.9;
}

/* 筛选按钮 */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.filter-btn:hover {
    background: #667eea;
    color: white;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

/* 古诗列表 */
.poem-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.poem-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.poem-item:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.poem-item h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.poem-item-meta {
    display: flex;
    gap: 10px;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.poem-item-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
}

/* 艾宾浩斯信息 */
.ebbinghaus-info {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.ebbinghaus-info h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.review-schedule {
    list-style: none;
    padding: 0;
}

.review-schedule li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
}

.review-schedule li:last-child {
    border-bottom: none;
}

.review-schedule .time {
    font-weight: bold;
    color: #667eea;
    min-width: 120px;
    display: inline-block;
}

/* 复习列表 */
.review-list,
.completed-list {
    margin-bottom: 30px;
}

.review-list h3,
.completed-list h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.review-item,
.completed-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.completed-item {
    background: #e8f5e9;
}

.review-poem-info h4,
.completed-item h4 {
    margin-bottom: 5px;
    color: #333;
}

.review-meta,
.completed-meta {
    font-size: 0.9em;
    color: #666;
}

.review-count,
.completed-count {
    color: #667eea;
    font-weight: bold;
}

.review-urgent {
    color: #ff6b6b;
    font-weight: bold;
    margin-right: 10px;
}

.review-normal {
    color: #ffa502;
    margin-right: 10px;
}

.review-later {
    color: #2ed573;
    margin-right: 10px;
}

.review-actions {
    display: flex;
    align-items: center;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-btn {
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 20px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
}

.nav-btn.active {
    color: #667eea;
}

.nav-btn.active .nav-icon {
    transform: scale(1.2);
}

.nav-icon {
    font-size: 1.5em;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.nav-label {
    font-size: 0.85em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2em;
    }

    .poem-title {
        font-size: 1.5em;
    }

    .poem-content {
        font-size: 1.1em;
    }

    .poem-list {
        grid-template-columns: 1fr;
    }

    .review-item,
    .completed-item {
        flex-direction: column;
        text-align: left;
    }

    .review-actions {
        margin-top: 15px;
        width: 100%;
        justify-content: flex-end;
    }
}
