/* Logo区域 */
.logo-container {
    text-align: center;
    margin: 20px 0 40px;
}

.logo {
    max-width: 180px;
    height: auto;
}

/* 搜索区域 */
.search-section {
    padding: auto 0 20px;
    background-color: transparent;
    margin-bottom: 5px;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

/* 消息通知样式 - 容器框架 */
.notifications-section {
    margin: 15px auto 30px;
    max-width: 800px;
    padding: 0 15px;
}

.notifications-container {
    background-color: #f8f9fa;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.notification-item {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid #e2e6ea;
    position: relative;
}

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

.notification-text {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 通知类型样式 */
.notification-info {
    background-color: #f0f7ff;
    border-left: 4px solid #0d6efd;
}

.notification-warning {
    background-color: #fff8e6;
    border-left: 4px solid #ffc107;
}

.notification-success {
    background-color: #f0fff4;
    border-left: 4px solid #198754;
}

.notification-danger {
    background-color: #fff0f0;
    border-left: 4px solid #dc3545;
}

/* 热门书籍区域 */
.popular-books-section {
    margin-top: 40px;
}

.section-header {
    margin: 2rem 0 1rem;
}

.header-content {
    margin-bottom: 0.5rem;
    padding: 0;
}

.header-content h2 {
    font-size: 22px;
    color: #333;
    font-weight: normal;
    margin: 0;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
    
.subtitle {
    color: #666;
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 12px;
    margin-left: auto;
    padding-left: 50px;
}

.highlight {
    color: #1E90FF;
    font-weight: normal;
}

.divider {
    height: 1px;
    width: 100%;
    background: #1E90FF;
    opacity: 1;
    margin-top: 8px;
}

/* 书籍卡片样式 */
.popular-books {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 大屏默认5列 */
    gap: 15px;
    margin-top: 20px;
}

.book-card {
    transition: transform 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.book-cover {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.no-books {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #666;
}

/* 响应式布局调整 */
@media (max-width: 1199px) {
    .popular-books {
        grid-template-columns: repeat(4, 1fr); /* 中大屏4列 */
    }
}

@media (max-width: 991px) {
    .popular-books {
        grid-template-columns: repeat(4, 1fr); /* 平板设备4列 */
        gap: 12px;
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .notification-icon {
        flex: 0 0 30px;
        font-size: 20px;
        margin-right: 10px;
    }
    
    .notification-title {
        font-size: 16px;
    }
    
    .notification-text {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .popular-books {
        grid-template-columns: repeat(3, 1fr); /* 小屏设备3列 */
        gap: 12px;
    }
    
    .book-card-title {
        font-size: 0.8rem;
        margin-top: 6px;
        -webkit-line-clamp: 1; /* 移动端只显示一行 */
        max-height: 1.3rem;
    }
    
    .notification-text {
        font-size: 14px;
        line-height: 1.7;
        padding: 0 10px;
    }
    
    .notification-item {
        padding: 18px 15px;
    }
}

@media (max-width: 480px) {
    .popular-books {
        grid-template-columns: repeat(3, 1fr); /* 小屏幕固定3列 */
        gap: 8px;
    }
    
    .notification-text {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .notifications-section {
        margin: 12px auto 25px;
    }
}

/* 根据设备类型添加自定义样式 */
.popular-books.desktop {
    grid-template-columns: repeat(5, 1fr); /* 大屏5列 */
}

.popular-books.tablet {
    grid-template-columns: repeat(4, 1fr); /* 平板4列 */
}

.popular-books.mobile {
    grid-template-columns: repeat(3, 1fr); /* 手机3列 */
}

@media (max-width: 1199px) {
    .popular-books.desktop {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .popular-books.tablet,
    .popular-books.desktop {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .popular-books.mobile,
    .popular-books.tablet,
    .popular-books.desktop {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 搜索框容器样式 */
.search-input-container {
    position: relative;
    display: block;
    margin-bottom: 5px;
}

/* 修复图标样式 */
.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--apple-text-secondary);
    font-size: 18px;
    z-index: 10;
}

/* 修复按钮样式 */
.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 8px !important;
    padding: 8px 16px !important;
    background-color: var(--apple-blue);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 5;
}

/* 高级搜索样式 */
.advanced-search-toggle {
    color: #4a90e2;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    display: block;
    margin-top: 15px;
    clear: both;
}

.advanced-search-toggle:hover {
    text-decoration: underline;
}

.advanced-search {
    margin-top: 15px;
    display: none;
    padding-top: 15px;
    border-top: 1px solid #eee;
    clear: both;
}

.advanced-search .row {
    margin-top: 10px;
}

/* 多选下拉框样式 */
.multi-select-container {
    position: relative;
}

.multi-select-options {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 5px;
    margin-top: 5px;
    max-height: 150px;
    overflow-y: auto;
}

.multi-select-option {
    padding: 3px 8px;
    margin: 2px 0;
}

.multi-select-option label {
    display: block;
    margin-bottom: 0;
    cursor: pointer;
}

.multi-select-option input[type="checkbox"] {
    margin-right: 5px;
}

@media (max-width: 768px) {
    .advanced-search .col-md-6 {
        margin-bottom: 10px;
    }
}

/* 广告样式 */
.ad-container {
    margin: 15px 0;
    text-align: center;
}

.ad-container img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.ad-container img:hover {
    transform: translateY(-5px);
}

.ad-container a {
    display: inline-block;
}

/* 广告书籍卡片样式 */
.book-card.ad-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.book-card.ad-card .book-cover {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.book-card.ad-card .book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

/* 广告标识标签样式 */
.ad-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
} 
/* 小屏幕设备上的广告标签样式 */
@media (max-width: 767px) {
    .ad-label {
        font-size: 10px;
        padding: 1px 4px;
        top: 2px;
        right: 2px;
        border-radius: 2px;
    }
}

/* 更小的屏幕设备上的广告标签样式 */
@media (max-width: 480px) {
    .ad-label {
        font-size: 8px;
        padding: 1px 3px;
        top: 2px;
        right: 2px;
    }
}