.recommendations-container {
    /* 基础样式 */
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 20px 15px;
    box-sizing: border-box;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: visible;
    
    /* 默认：底部全屏宽度布局 */
    position: relative;
    top: auto;
    right: auto;
    width: 98%;
    height: auto;
    max-width: none;
    margin: 20px auto 0 auto;
    transform: none;
    transition: all 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .recommendations-container {
        width: 95%;
        margin: 15px auto 0 auto;
        padding: 12px 10px;
    }
}

/* ===================================================== */
/* ========= 标题区域 ===================================== */
/* ===================================================== */

.recommendations-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(106, 17, 203, 0.1);
    text-align: center;
}

.recommendations-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recommendations-subtitle {
    font-size: 14px;
    color: #666;
    opacity: 0.8;
    margin: 0;
}

/* 移动端标题调整 */
@media (max-width: 768px) {
    .recommendations-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .recommendations-title {
        font-size: 20px;
    }
    
    .recommendations-subtitle {
        font-size: 12px;
    }
}

/* ===================================================== */
/* ========= 推荐列表 - 响应式网格布局 =================== */
/* ===================================================== */

.recommendations-list {
    overflow: visible;
}

/* 超大屏幕：8列1行网格 */
@media (min-width: 1280px) {
    .recommendations-list {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        grid-template-rows: 1fr;
        gap: 15px 18px;
        max-width: 100%;
        margin: 0 auto;
    }
}

/* 大屏幕：6列1行 - iPad Pro等设备 */
@media (max-width: 1279px) and (min-width: 1000px) {
    .recommendations-list {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 15px 20px;
        max-width: 100%;
        margin: 0 auto;
    }
}

/* 中等屏幕：4列1行 */
@media (max-width: 999px) and (min-width: 769px) {
    .recommendations-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px 15px;
    }
}

/* 移动端：2列多行 */
@media (max-width: 768px) {
    .recommendations-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 8px;
    }
}

/* ===================================================== */
/* ========= 推荐项目卡片 =============================== */
/* ===================================================== */

.recommendation-item {
    background: #fafafa;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    
    /* 默认：垂直卡片布局 */
    display: flex;
    flex-direction: column;
}

.recommendation-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    background: white;
}

/* 超大屏幕：8列布局卡片 */
@media (min-width: 1280px) {
    .recommendation-item {
        height: 270px;
        border-radius: 10px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    }
    
    .recommendation-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    }
}

/* 大屏幕：6列布局卡片 - iPad Pro等设备优化 */
@media (max-width: 1279px) and (min-width: 1000px) {
    .recommendation-item {
        height: 300px;
        border-radius: 10px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    }
    
    .recommendation-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    }
}

/* 中等屏幕：4列布局优化 */
@media (max-width: 999px) and (min-width: 769px) {
    .recommendation-item {
        height: 320px;
        border-radius: 10px;
    }
    
    .recommendation-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    }
}

/* 移动端：垂直卡片 */
@media (max-width: 768px) {
    .recommendation-item {
        height: 240px;
        border-radius: 10px;
    }
    
    .recommendation-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    }
}

/* ===================================================== */
/* ========= 封面图片区域 =============================== */
/* ===================================================== */

.recommendation-cover {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    
    /* 默认：全宽封面 */
    width: 100%;
    border-radius: 10px 10px 0 0;
}

/* 超大屏幕：标准封面 */
@media (min-width: 1280px) {
    .recommendation-cover {
        height: 160px;
    }
}

/* 大屏幕：增大封面 - iPad Pro等设备优化 */
@media (max-width: 1279px) and (min-width: 1000px) {
    .recommendation-cover {
        height: 180px;
    }
}

/* 中等屏幕：大封面 */
@media (max-width: 999px) and (min-width: 769px) {
    .recommendation-cover {
        height: 200px;
    }
}

/* 移动端：中等封面 */
@media (max-width: 768px) {
    .recommendation-cover {
        height: 140px;
    }
}

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

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

/* ===================================================== */
/* ========= 悬停遮罩效果 =============================== */
/* ===================================================== */

.recommendation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(106, 17, 203, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recommendation-item:hover .recommendation-overlay {
    opacity: 1;
}

.view-btn {
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    border: 1px solid white;
    border-radius: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.view-btn:hover {
    background: white;
    color: #6a11cb;
}

/* ===================================================== */
/* ========= 信息区域 =================================== */
/* ===================================================== */

.recommendation-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* 超大屏幕：标准高度 */
@media (min-width: 1280px) {
    .recommendation-info {
        height: 110px;
        padding: 12px 14px;
    }
}

/* 大屏幕：增加高度和内边距 - iPad Pro等设备优化 */
@media (max-width: 1279px) and (min-width: 1000px) {
    .recommendation-info {
        height: 120px;
        padding: 15px 16px;
    }
}

/* 中等屏幕：标准配置 */
@media (max-width: 999px) and (min-width: 769px) {
    .recommendation-info {
        height: 120px;
        padding: 12px 16px;
    }
}

/* 移动端：固定高度 */
@media (max-width: 768px) {
    .recommendation-info {
        height: 100px;
        padding: 10px 12px;
    }
}

.recommendation-book-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 大屏幕：增大字体 - iPad Pro等设备优化 */
@media (max-width: 1279px) and (min-width: 1000px) {
    .recommendation-book-title {
        font-size: 15px;
        margin-bottom: 6px;
    }
}

/* 中等屏幕：更大字体 */
@media (max-width: 999px) and (min-width: 769px) {
    .recommendation-book-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
}

/* ===================================================== */
/* ========= 评分系统 =================================== */
/* ===================================================== */

.recommendation-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    /* 移除右对齐，保持默认左对齐 */
}

.recommendation-rating .stars {
    font-size: 14px;
    color: #ffc107;
}

.rating-score {
    font-size: 12px;
    color: #666;
    font-weight: bold;
    background: rgba(106, 17, 203, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 超大屏幕：隐藏发布商信息节省空间 */
@media (min-width: 1280px) {
    .recommendation-publisher {
        display: none;
    }
}

/* 大屏幕：显示发布商信息 - iPad Pro等设备优化 */
@media (max-width: 1279px) and (min-width: 1000px) {
    .recommendation-publisher {
        display: inline-block;
    }
}

/* 中等屏幕：显示发布商信息 */
@media (max-width: 999px) and (min-width: 769px) {
    .recommendation-publisher {
        display: inline-block;
    }
}

/* 移动端：隐藏发布商信息 */
@media (max-width: 768px) {
    .recommendation-publisher {
        display: none;
    }
}

/* ===================================================== */
/* ========= 状态显示 =================================== */
/* ===================================================== */

.loading, .error-message, .no-recommendations {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0f0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
    color: transparent;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.error-message svg,
.no-recommendations svg {
    margin-bottom: 16px;
}

.error-message button {
    margin-top: 12px;
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.error-message button:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* ===================================================== */
/* ========= 入场动画 =================================== */
/* ===================================================== */

.recommendation-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 错开动画延迟 */
.recommendation-item:nth-child(1) { animation-delay: 0.05s; }
.recommendation-item:nth-child(2) { animation-delay: 0.1s; }
.recommendation-item:nth-child(3) { animation-delay: 0.15s; }
.recommendation-item:nth-child(4) { animation-delay: 0.2s; }
.recommendation-item:nth-child(5) { animation-delay: 0.25s; }
.recommendation-item:nth-child(6) { animation-delay: 0.3s; }
.recommendation-item:nth-child(7) { animation-delay: 0.35s; }
.recommendation-item:nth-child(8) { animation-delay: 0.4s; }

/* ===================================================== */
/* ========= 可访问性优化 =============================== */
/* ===================================================== */

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .recommendation-item,
    .recommendations-container,
    .recommendation-cover img,
    .view-btn {
        animation: none !important;
        transition: none !important;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    .recommendation-item {
        border: 2px solid #333;
    }
    
    .recommendation-book-title {
        color: #000;
    }
    
    .view-btn {
        border-width: 2px;
    }
}

/* ===================================================== */
/* ========= 附加信息 - 完全隐藏 ======================== */
/* ===================================================== */

.recommendation-game,
.recommendation-publisher {
    display: none !important;
}