/* 医疗图书馆样式文件 */

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #8B4513 0%, #D2B48C 100%);
    min-height: 100vh;
}

.library-bg {
    background-image: 
        linear-gradient(rgba(139, 69, 19, 0.1), rgba(210, 180, 140, 0.1)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0 0h100v100H0z" fill="%23D2B48C"/><path d="M0 0l100 100M100 0L0 100" stroke="%23B8860B" stroke-width="0.5" opacity="0.3"/></svg>');
    background-size: 200px 200px;
}

/* 导航栏样式 */
.library-navbar {
    background: linear-gradient(135deg, #8B4513, #A0522D) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-bottom: 3px solid #D2691E;
}

.library-navbar .navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #F5DEB3 !important;
}

.search-input {
    border-radius: 20px;
    border: 2px solid #D2691E;
}

.search-input:focus {
    border-color: #FF6347;
    box-shadow: 0 0 0 0.2rem rgba(255, 99, 71, 0.25);
}

/* 主内容区域 */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* 书架样式 */
.bookshelf {
    background: linear-gradient(to bottom, #8B4513, #D2B48C);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    border: 3px solid #A0522D;
    position: relative;
}

.bookshelf::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #8B4513, #D2691E, #CD853F, #DEB887);
    border-radius: 18px;
    z-index: -1;
}

/* 书架标题 */
.shelf-title {
    color: #F5DEB3;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 分类卡片 */
.category-shelf {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.category-card {
    background: linear-gradient(145deg, #F5DEB3, #DDBF94);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #D2691E;
    box-shadow: 
        0 5px 15px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 
        0 15px 30px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.category-icon {
    font-size: 3rem;
    color: #8B4513;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.category-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.9rem;
    color: #A0522D;
    background: rgba(139, 69, 19, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
}

/* 书籍网格 */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.book-card {
    background: #F5F5DC;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 1px solid #D2B48C;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.book-cover {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, #E6E6FA, #D8BFD8);
}

.book-info {
    padding: 1rem;
}

.book-title {
    font-size: 1rem;
    font-weight: bold;
    color: #2F4F4F;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    height: 2.6rem;
    overflow: hidden;
}

.book-author {
    font-size: 0.85rem;
    color: #696969;
    margin-bottom: 0.5rem;
}

.book-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #999;
}

/* PDF阅读器样式 */
.pdf-viewer {
    background: #2F1B14;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.pdf-header {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: #F5DEB3;
    padding: 1rem;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.pdf-content {
    background: #F5F5DC;
    min-height: 600px;
    border-radius: 0 0 10px 10px;
    padding: 2rem;
    text-align: center;
}

.pdf-frame {
    width: 100%;
    height: 700px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 面包屑导航 */
.breadcrumb {
    background: rgba(245, 222, 179, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: #8B4513;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #A0522D;
}

/* 页脚样式 */
.library-footer {
    background: linear-gradient(135deg, #2F1B14, #8B4513);
    color: #F5DEB3;
    border-top: 3px solid #D2691E;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-shelf {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .shelf-title {
        font-size: 1.5rem;
    }
    
    .bookshelf {
        padding: 1rem;
    }
}

/* 动画效果 */
@keyframes bookAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card, .category-card {
    animation: bookAppear 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(139, 69, 19, 0.3);
    border-radius: 50%;
    border-top-color: #8B4513;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
} 