/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 主内容区 */
main {
    margin-bottom: 40px;
}

/* 书架区域 */
.bookshelf {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.bookshelf h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-description {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* 书籍网格 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* 书籍卡片 */
.book-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.book-cover {
    position: relative;
    height: 250px;
    overflow: hidden;
}

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

.book-card:hover .cover-img {
    transform: scale(1.05);
}

.book-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.book-info {
    padding: 25px;
}

.book-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.book-description {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 1rem;
}

/* 按钮样式 */
.book-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.view-btn {
    background: #3498db;
    color: white;
    flex: 1;
}

.view-btn:hover {
    background: #2980b9;
}

.download-btn {
    background: #2ecc71;
    color: white;
    flex: 1;
}

.download-btn:hover {
    background: #27ae60;
}

/* 特色功能区域 */
.features {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.features h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.feature {
    text-align: center;
    padding: 25px 20px;
    border-radius: 10px;
    background: #f8f9fa;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.feature p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 25px;
    color: #7f8c8d;
    font-size: 0.95rem;
    border-top: 1px solid #eaeaea;
}

/* PDF查看器模态框 */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.pdf-modal-content {
    width: 95%;
    height: 95%;
    background: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pdf-modal-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-modal-header h3 {
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.pdf-modal-body {
    flex: 1;
    padding: 0;
}

.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-modal-footer {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.fullscreen-btn {
    background: #3498db;
    color: white;
}

.close-viewer-btn {
    background: #e74c3c;
    color: white;
}

/* 全屏样式 */
:-webkit-full-screen .pdf-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

:-moz-full-screen .pdf-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

:-ms-fullscreen .pdf-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

:fullscreen .pdf-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .book-grid {
        grid-template-columns: 1fr;
    }
    
    .book-actions {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .pdf-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}