/* ================================
   Homepage.css - 首页特定样式
   ================================ */

/* 现代化轮播图区域 */
.carousel-container {
    margin: 20px 30px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-main {
    width: 100%;
    height: 520px;
    overflow: hidden;
    position: relative;
}

.carousel-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        transparent 50%, 
        rgba(118, 75, 162, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

.banner-img {
    width: calc(100% - 40px);
    height: 100%;
    object-fit: cover;
    background-color: #000;
    margin: 0 auto;
    display: block;
    border-radius: 16px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9) saturate(1.1);
}

.banner-img:hover {
    filter: brightness(1) saturate(1.2);
    transform: scale(1.02);
}

/* 横幅加载状态 */
.carousel-main {
    position: relative;
}

.carousel-main::after {
    content: '加载中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.carousel-main.loading::after {
    opacity: 1;
}

.carousel-main.loading .banner-img {
    opacity: 0.3;
}

/* 现代化轮播导航 */
.carousel-nav {
    display: flex;
    overflow-x: hidden;
    background: rgba(34, 34, 34, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 0;
}

.carousel-item {
    position: relative;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    background: rgba(51, 51, 51, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    flex-shrink: 0;
    width: calc((100% / 6) - 8px);
    margin: 0 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.carousel-item.active::before,
.carousel-item:hover::before {
    opacity: 1;
}

.carousel-item.active,
.carousel-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.carousel-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.carousel-item:hover img {
    filter: brightness(1.1) saturate(1.2);
}

.carousel-item p {
    color: white;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 6px;
    height: calc(12px * 1.4 * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

/* 游戏评测区域 */
.game-reviews {
    margin: 30px 5%;
}

/* 内容模块 */
.content-module {
    margin: 0 0 30px 0;
    position: relative;
}

/* 首页特定的游戏卡片布局 */
#home-pinweiyouxi .game-card,
#home-lottery-main .lottery-card {
    width: calc(33.333% - 6.67px); /* 3张卡片一行 */
}

/* 现代化侧边栏模块 */
.sidebar-module {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.sidebar-module:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar-module:hover::before {
    left: 100%;
}

.sidebar-module .section-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sidebar-module .section-title {
    font-size: 18px;
}

.sidebar-module .section-title:after {
    width: 30px;
}

/* 现代化侧边栏列表项 */
.sidebar-list-item {
    display: flex;
    align-items: center;
    padding: 15px 8px;
    border-bottom: 1px solid rgba(240, 240, 240, 0.5);
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sidebar-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transition: left 0.4s ease;
}

.sidebar-list-item:last-child {
    border-bottom: none;
}

.sidebar-list-item:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.sidebar-list-item:hover::before {
    left: 100%;
}

.sidebar-list-item:hover .sidebar-item-title {
    color: #667eea;
    font-weight: 600;
}

.sidebar-item-info {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.sidebar-item-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-bottom: 5px;
}

.sidebar-item-meta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.sidebar-item-meta {
    font-size: 12px;
    color: #777;
    display: flex;
    align-items: center;
}

.sidebar-item-meta i {
    margin-right: 4px;
}

/* 版块标题 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #3366cc;
}

.more-link {
    color: #3366cc;
    font-size: 14px;
}

/* 分页控制 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
    position: static;
}

.page-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(238, 238, 238, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
}

.page-btn:hover {
    background-color: #3366cc;
    color: white;
}

.page-btn.prev {
    left: -15px;
}

.page-btn.next {
    right: -15px;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
    color: #aaa;
}

/* 隐藏新闻模块的水平分页 */
#home-zixun > .page-btn {
    display: none !important;
}

/* 首页背景样式覆盖 */
body.homepage {
    background-image: url('/images/background.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

/* 首页特定的内容模块样式 */
.homepage .content-modules {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

/* 首页轮播图特效 */
.carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(51, 102, 204, 0.1), rgba(255, 102, 0, 0.1));
    pointer-events: none;
    z-index: 2;
}

/* 首页卡片特殊效果 */
.homepage .game-card,
.homepage .news-card,
.homepage .lottery-card {
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 首页标题特效 */
.homepage .section-title {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.homepage .section-title:after {
    background: linear-gradient(45deg, #3366cc, #ff6600);
}