/* ==========================
   合并 a.css + b.css
   文件名：style.css
   ========================== */

/* ---------- 通用头部（a.css 更全，保留） ---------- */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    text-align: center;
    margin-bottom: 1rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- 区域头部样式 ---------- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-desc {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- 课本简介区域样式（b.css） ---------- */
.intro-section {
    padding: 0;
    overflow: hidden;
}

.intro-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2.5rem;
    text-align: center;
    position: relative;
}

.intro-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="rgba(255,255,255,0.1)"><circle cx="20" cy="20" r="5"/><circle cx="80" cy="30" r="8"/><circle cx="40" cy="70" r="6"/><circle cx="70" cy="80" r="4"/></svg>');
}

.intro-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    backdrop-filter: blur(10px);
}

.intro-title {
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

.intro-text {
    line-height: 1.8;
}

.intro-text p {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* 关键特性样式（b.css） */
.key-features {
    margin-top: 2.5rem;
}

.key-features h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #4a6491;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.feature-content h5 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.feature-content p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 侧边栏样式（b.css） */
.intro-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.sidebar-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

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

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

.info-label {
    color: #666;
    font-size: 0.9rem;
}

.info-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 学习建议列表（b.css） */
.suggestion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestion-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: #555;
    line-height: 1.5;
}

.suggestion-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.suggestion-list li:last-child {
    margin-bottom: 0;
}

/* 相关推荐样式更新（b.css） */
.related-books {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem;
}

.related-book {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.5rem;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.related-book:hover {
    border-color: #4a6491;
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.book-icon {
    font-size: 2rem;
    flex-shrink: 0;
    color: #4a6491;
}

.book-info h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.book-info p {
    color: #666;
    margin-bottom: 0.1rem;
    font-size: 0.9rem;
}

.book-meta {
    color: #999;
    font-size: 0.8rem;
    background: #f8f9fa;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

/* ---------- 年级选择器样式（b.css） ---------- */
.grade-section {
    margin-bottom: 4rem;
}

.grades-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.grade-group {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.group-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.group-name {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.grade-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.grade-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.grade-level:hover {
    background: white;
    border-color: #4a6491;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 100, 145, 0.2);
    text-decoration: none;
    color: #2c3e50;
}

.level-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.level-arrow {
    color: #4a6491;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.grade-level:hover .level-arrow {
    transform: translateX(3px);
}

/* ---------- 科目网格（a.css） ---------- */
.subject-section {
    margin-bottom: 0.5rem;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5px, 1fr));
    gap: 0.1rem;
    margin: 0.5rem 0;
}

.subject-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid #f8f9fa;
    background: white;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #4a6491, #2c3e50);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    border-color: #4a6491;
    box-shadow: 0 10px 25px rgba(74, 100, 145, 0.15);
}

.subject-card:hover::before {
    transform: scaleX(1);
}

.subject-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.subject-card:hover .subject-icon {
    transform: scale(1.1);
}

.subject-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
}

.subject-count {
    color: #666;
    font-size: 0.9rem;
    background: #e9ecef;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
}

/* ---------- 科目选择器（a.css） ---------- */
.subject-selector {
    background: white;
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.selector-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
}

.current-subject {
    color: #666;
    font-size: 1rem;
}

.current-subject strong {
    color: #4a6491;
    font-size: 1.1rem;
}

.subject-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.2rem 0.2rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid #f8f9fa;
    background: white;
    position: relative;
    overflow: hidden;
}

.subject-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #4a6491, #2c3e50);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.subject-item:hover,
.subject-item.active {
    text-decoration: none;
    color: inherit;
    transform: translateY(-5px);
    border-color: #4a6491;
    box-shadow: 0 8px 25px rgba(74, 100, 145, 0.15);
}

.subject-item:hover::before,
.subject-item.active::before {
    transform: scaleX(1);
}

.subject-item.active {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.subject-item .subject-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.subject-item:hover .subject-icon {
    transform: scale(1.1);
}

.subject-item .subject-name {
    font-weight: 600;
    margin-bottom: 0.1rem;
    color: #2c3e50;
    font-size: 1.1rem;
    text-align: center;
}

.subject-item .subject-count {
    font-size: 0.85rem;
    color: #666;
    background: #e9ecef;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
}

/* ---------- 当前科目内容区域（a.css） ---------- */
.current-subject-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.current-subject-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
    text-align: left;
}

.current-subject-section .section-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 600;
}

.result-count {
    color: #666;
    font-size: 1rem;
}

.result-count strong {
    color: #4a6491;
    font-size: 1.2rem;
}

/* ---------- 课本列表（a.css + b.css 合并） ---------- */
.breadcrumb {
    background: #f8f9fa;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: #4a6491;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.textbooks-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.textbook-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #f8f9fa;
}

.textbook-item:hover {
    border-color: #e9ecef;
    transform: translateY(-2px);
}

.textbook-cover {
    width: 120px;
    height: 140px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.textbook-item:hover .textbook-cover {
    transform: scale(1.05);
}

.textbook-info {
    flex: 1;
}

.textbook-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
    font-weight: 600;
}

.textbook-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 0.9rem;
}

.textbook-meta span {
    display: flex;
    align-items: center;
}

.textbook-meta strong {
    color: #2c3e50;
    margin-right: 0.25rem;
}

.textbook-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.textbook-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.primary-btn {
    background: linear-gradient(135deg, #4a6491, #2c3e50);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 100, 145, 0.3);
    color: white;
    text-decoration: none;
}

.download-btn {
    background: #28a745;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn:hover {
    background: #f8f9fa;
    transform: scale(1.1);
}

/* ---------- 空状态（a.css + b.css 合并） ---------- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.empty-state p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.secondary-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* ---------- 详情页（a.css） ---------- */
.textbook-detail {
    max-width: 800px;
    margin: 0 auto;
}

.detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.detail-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    text-align: center;
}

.meta-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.download-section {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.download-btn.large {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: #28a745;
    color: white;
    padding: 1.5rem 3rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin: 1rem 0;
}

.download-btn.large:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

.download-icon {
    font-size: 2rem;
}

.download-text {
    font-weight: 600;
}

.file-size {
    font-size: 0.9rem;
    opacity: 0.9;
}

.download-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 5px;
    border-left: 4px solid #28a745;
}

.download-tips p {
    margin: 0;
    font-size: 0.9rem;
    color: #2d5016;
}

/* ---------- 相关推荐 ---------- */
.related-section {
    margin-top: 3rem;
}

.related-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #eef2f7;
    padding-bottom: 0.5rem;
}

/* ---------- 使用说明样式（b.css） ---------- */
.guide-section {
    margin-bottom: 4rem;
}

.guide-content {
    padding: 2.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.guide-header {
    text-align: center;
    margin-bottom: 2rem;
}

.guide-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    background: linear-gradient(135deg, #4a6491, #2c3e50);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step-content p {
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* ---------- 模态框 ---------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

/* ---------- 消息提示 ---------- */
.message-toast {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ---------- 搜索功能 ---------- */
.search-box {
    margin: 2rem 0;
    text-align: center;
}

.search-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 1rem;
    width: 100%;
    max-width: 400px;
    margin-right: 0.5rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4a6491;
}

.search-button {
    background: #4a6491;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: #3a5471;
}

/* ---------- 加载动画 ---------- */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.cover-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}
/* 图片加载动画 */
.cover-large, .cover-image {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* 图片加载失败样式 */
.cover-large:before, .cover-image:before {
    content: '📚';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #ccc;
    z-index: 1;
}

.cover-large[src*="default.jpg"]:before, 
.cover-image[src*="default.jpg"]:before {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------- 响应式（a.css + b.css 合并） ---------- */
@media (max-width: 1024px) {
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .intro-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .intro-header {
        padding: 2rem 1.5rem;
    }
    
    .intro-title {
        font-size: 1.6rem;
    }
    
    .intro-content {
        padding: 2rem 1.5rem;
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        padding: 1.2rem;
    }
    
    .related-books {
        grid-template-columns: 1fr;
    }

    .selector-header,
    .current-subject-section .section-header,
    .group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .subjects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .subject-card,
    .subject-item {
        padding: 1rem 0.5rem;
    }

    .subject-icon {
        font-size: 2.5rem;
    }

    .grade-group {
        padding: 1.5rem;
    }

    .group-header {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .grade-levels {
        grid-template-columns: repeat(2, 1fr);
    }

    .grade-level {
        padding: 1rem;
    }

    .textbook-item {
        flex-direction: column;
        text-align: center;
    }

    .textbook-cover {
        align-self: center;
        margin-bottom: 1rem;
    }

    .textbook-meta {
        justify-content: center;
    }

    .textbook-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .empty-actions {
        flex-direction: column;
        align-items: center;
    }

    .modal-actions {
        flex-direction: column;
    }

    .detail-meta {
        gap: 1rem;
    }

    .meta-item {
        flex: 1;
        min-width: 120px;
    }

    .guide-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .intro-header {
        padding: 1.5rem 1rem;
    }
    
    .intro-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .intro-title {
        font-size: 1.4rem;
    }
    
    .intro-content {
        padding: 1.5rem 1rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .sidebar-card {
        padding: 1.2rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .subject-card,
    .subject-item {
        padding: 0.75rem 0.5rem;
    }

    .subject-icon {
        font-size: 2rem;
    }

    .grade-levels {
        grid-template-columns: 1fr;
    }

    .textbook-actions {
        flex-direction: column;
        width: 100%;
    }

    .textbook-actions .primary-btn,
    .textbook-actions .download-btn {
        width: 100%;
        text-align: center;
    }

    .subject-name {
        font-size: 1rem;
    }

    .subject-count {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
}