/* ==================== Game Home Page Styles ==================== */

.game-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 40px;
    flex: 1;
    width: 100%;
}

/* ====== Section Common ====== */
.section-block {
    margin-top: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.section-title {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.5px;
}

.section-more {
    font-size: 13px;
    color: #66c0f4;
    text-decoration: none;
    transition: color 0.2s;
}

.section-more:hover {
    color: #fff;
}

/* ====== 1. Hero Carousel ====== */
.hero-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 2.8 / 1;
    border-radius: 6px;
    overflow: hidden;
    background: #1b2838;
    margin-top: 24px;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.carousel-slide-content {
    position: absolute;
    bottom: 40px;
    left: 40px;
    max-width: 500px;
    z-index: 2;
}

.carousel-slide-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.carousel-slide-content p {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin: 0 0 16px;
    line-height: 1.5;
}

.carousel-btn {
    display: inline-block;
    background: rgba(103,193,245,0.2);
    border: 1px solid rgba(103,193,245,0.5);
    color: #66c0f4;
    padding: 8px 20px;
    border-radius: 3px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: rgba(103,193,245,0.35);
    color: #fff;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 60px;
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    background: rgba(0,0,0,0.7);
}

.carousel-prev { left: 0; border-radius: 0 4px 4px 0; }
.carousel-next { right: 0; border-radius: 4px 0 0 4px; }

.carousel-dots {
    position: absolute;
    bottom: 16px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #66c0f4;
    transform: scale(1.2);
}

/* ====== 2. Recommend Grid (2 rows x 5 cols) ====== */
.recommend-scroll {
    overflow: visible;
}

.recommend-track {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 12px;
}

.recommend-card {
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

.recommend-card:hover {
    background: rgba(0,0,0,0.35);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.recommend-img {
    position: relative;
    aspect-ratio: 616/353;
    overflow: hidden;
}

.recommend-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

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

.recommend-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #a1cd44;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
}

.recommend-info {
    padding: 12px;
}

.recommend-info h3 {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommend-desc {
    font-size: 12px;
    color: #8f98a0;
    margin: 0 0 8px;
}

.recommend-price {
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-original {
    font-size: 12px;
    color: #5c7a99;
    text-decoration: line-through;
}

.price-current {
    font-size: 15px;
    font-weight: 700;
    color: #c6d4df;
}

/* ====== 3. Latest Updates (list.html style) ====== */
.update-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.update-card {
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: visible;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    position: relative;
}

.update-card:hover {
    background: rgba(0,0,0,0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 10;
}

.update-img {
    width: 100%;
    aspect-ratio: 231/87;
    overflow: hidden;
    background: #1b2838;
}

.update-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

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

.update-info {
    padding: 10px;
}

.update-info h3 {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-tag {
    font-size: 11px;
    color: #66c0f4;
    margin: 0 0 4px;
}

.update-date {
    font-size: 10px;
    color: #5c7a99;
    margin: 0;
}

/* Hover description popup */
.update-desc {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1b2838;
    border: 1px solid rgba(103,193,245,0.2);
    border-radius: 0 0 6px 6px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.6;
    color: #8f98a0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    pointer-events: none;
    z-index: 20;
}

.update-desc::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #66c0f4, #4fc1e8, #66c0f4);
    border-radius: 2px;
}

.update-card:hover .update-desc {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ====== 4. Hot Games (Large Card Style) ====== */
.hot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.hot-card {
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
}

.hot-card:hover {
    background: rgba(0,0,0,0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.hot-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 5;
    border: 2px solid rgba(255,255,255,0.2);
}

.hot-card:nth-child(1) .hot-rank { background: linear-gradient(135deg, #ffd700, #ffb700); color: #000; border-color: #ffd700; }
.hot-card:nth-child(2) .hot-rank { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #000; border-color: #c0c0c0; }
.hot-card:nth-child(3) .hot-rank { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; border-color: #cd7f32; }

.hot-img {
    width: 100%;
    aspect-ratio: 460/215;
    overflow: hidden;
    position: relative;
}

.hot-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.hot-card:hover .hot-img::after {
    opacity: 1;
}

.hot-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.hot-card:hover .hot-img img {
    transform: scale(1.08);
}

.hot-info {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hot-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.hot-tags span {
    font-size: 11px;
    color: #8f98a0;
    background: rgba(255,255,255,0.06);
    padding: 3px 8px;
    border-radius: 3px;
}

.hot-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.hot-review {
    font-size: 12px;
    font-weight: 500;
}

.hot-review.positive { color: #a1cd44; }
.hot-review.mixed { color: #c7a531; }
.hot-review.negative { color: #e05d5d; }

.hot-price {
    font-size: 16px;
    font-weight: 700;
    color: #66c0f4;
}

/* ====== Responsive ====== */
@media (max-width: 1024px) {
    .hot-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 860px) {
    .hero-carousel {
        aspect-ratio: 2 / 1;
    }

    .carousel-slide-content {
        bottom: 24px;
        left: 24px;
    }

    .carousel-slide-content h2 {
        font-size: 24px;
    }

    .update-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .recommend-track {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, auto);
    }
}

@media (max-width: 600px) {
    .hero-carousel {
        aspect-ratio: 1.6 / 1;
        border-radius: 4px;
    }

    .carousel-slide-content h2 {
        font-size: 20px;
    }

    .carousel-slide-content p {
        font-size: 12px;
    }

    .carousel-arrow {
        width: 30px;
        height: 40px;
        font-size: 20px;
    }

    .section-title {
        font-size: 16px;
    }

    .update-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hot-rank {
        width: 28px;
        height: 28px;
        font-size: 12px;
        top: 8px;
        left: 8px;
    }

    .hot-info {
        padding: 10px;
    }

    .hot-info h3 {
        font-size: 13px;
    }

    .hot-price {
        font-size: 14px;
    }

    .recommend-track {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, auto);
    }

    .update-img,
    .hot-img {
        width: 90px;
        min-width: 90px;
    }
}
