/* ===== Pre-Register Page - Exact target site styles ===== */

/* Override layout main-content padding */
.main-content {
    padding: 0;
}

/* Main container */
main.pre-register {
    width: 1100px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    background: rgb(255, 255, 255);
}

/* Category Swiper (Banner section) */
.category-apk-swiper {
    margin: 0 0 4px;
    padding: 16px 0 8px;
    position: relative;
}

/* Screen buttons (prev/next navigation) */
.category-apk-swiper .screen-btn {
    width: 40px;
    height: 40px;
    background: rgb(255, 255, 255);
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.12);
    cursor: pointer;
    position: absolute;
    top: 50%;
    z-index: 6;
    display: none;
}
.category-apk-swiper.show-button .screen-btn {
    display: block;
}
.category-apk-swiper .screen-btn.prev {
    left: 0;
}
.category-apk-swiper .screen-btn.next {
    right: 0;
}
.category-apk-swiper .screen-btn::before {
    content: "";
    width: 10px;
    height: 10px;
    border-top: 2px solid rgb(134, 134, 134);
    border-left: 2px solid rgb(134, 134, 134);
    display: block;
    position: absolute;
    top: 14px;
    left: 16px;
}
.category-apk-swiper .screen-btn.prev::before {
    transform: rotate(-45deg);
}
.category-apk-swiper .screen-btn.next::before {
    transform: rotate(135deg);
}

/* Swiper list */
.swiper-list {
    display: block;
    padding: 0 16px;
    overflow-x: auto;
    white-space: nowrap;
    list-style: none;
    margin: 0;
    scrollbar-width: none;
    box-sizing: content-box;
    width: calc(100% - 32px);
}
.swiper-list::-webkit-scrollbar {
    display: none;
}
.no-scrollbar-x {
    overflow-x: auto;
    scrollbar-width: none;
}
.no-scrollbar-x::-webkit-scrollbar {
    display: none;
}

/* Swiper item */
.swiper-item {
    display: inline-block;
    width: 350px;
    height: 199px;
    margin: 0;
    padding: 0;
    flex-shrink: 1;
    vertical-align: baseline;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Swiper banner (height:0 + padding-bottom creates visible area for background image) */
.swiper-banner {
    width: 100%;
    height: 0;
    padding: 0 0 199px;
    margin: 0;
    background-size: cover;
    background-position: 50% 50%;
    border-radius: 0;
    position: static;
    display: block;
    overflow: visible;
    box-sizing: content-box;
}

/* Swiper banner background (visible banner, absolutely positioned at bottom) */
.swiper-banner-bg {
    width: 100%;
    height: 66px;
    padding: 0;
    margin: 0;
    background-size: cover;
    background-position: 50% 100%;
    border-radius: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: block;
    overflow: visible;
    z-index: 4;
}

/* Swiper item info (absolutely positioned at bottom) */
.swiper-item-info {
    width: 100%;
    padding: 4px 12px;
    margin: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    background: transparent;
    display: block;
    overflow: visible;
    box-sizing: border-box;
}

/* Text info container */
.text-info {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: normal;
    justify-content: space-between;
}

/* Swiper item title link */
.swiper-item-info-link {
    text-decoration: none;
    display: inline;
    flex: 0 1 auto;
    overflow: visible;
    margin: 0;
    padding: 0;
}
.swiper-item-info-title {
    font-size: 14px;
    color: rgb(255, 255, 255);
    font-weight: 500;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Preregister button (swiper) */
.swiper-item-button.preregister {
    display: block;
    padding: 5px 8px;
    background: rgb(36, 205, 119);
    color: rgb(255, 255, 255);
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 1;
    margin: 0;
    line-height: 16px;
}
.swiper-item-button.preregister img {
    vertical-align: text-bottom;
    margin: 0;
    width: 11px;
    height: 13px;
}

/* Category module sections */
.category-apk-list-box {
    margin: 0 0 4px;
    padding: 8px 0 12px;
}

/* Category module title */
.category-module-title {
    padding: 0 16px;
}
.category-module-title .title-text {
    font-size: 20px;
    color: rgb(60, 64, 67);
    font-weight: 500;
    text-decoration: none;
}

/* APK Grid Item */
.apk-grid-item {
    margin: 10px 0 0;
    padding: 0;
}

/* Grid list (base) */
.apk-grid-item ul.no-scrollbar-x {
    display: block;
    padding: 0 16px;
    list-style: none;
    margin: 0;
    box-sizing: content-box;
    width: 1068px;
}

/* Popular games UL: nowrap (matches target site) */
.dt-hot-module .no-scrollbar-x {
    white-space: nowrap;
}

/* Best games UL: normal (matches target site) */
.dt-newest-sort .no-scrollbar-x {
    white-space: normal;
}

/* Grid column */
.grid-col {
    width: 348px;
    display: inline-block;
    vertical-align: top;
    white-space: normal;
    padding: 0;
    margin: 0;
}

/* Grid row */
.grid-row {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    border-bottom: none;
    box-sizing: content-box;
    overflow: visible;
}

/* Grid icon */
.grid-row > a:first-child img {
    width: 64px;
    height: 64px;
    border-radius: 15%;
    flex-shrink: 1;
    display: inline;
    object-fit: fill;
}

/* Grid text box */
.grid-text-box {
    display: block;
    flex: 1 1 0%;
    margin: 0 12px;
    padding: 0;
    text-decoration: none;
    overflow: visible;
    min-width: 0;
}

/* Grid item title */
.grid-item-title {
    font-size: 14px;
    color: rgb(75, 75, 75);
    font-weight: 500;
    margin: 0;
    line-height: 22px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Grid item developer */
.grid-item-developer {
    font-size: 12px;
    color: rgb(94, 94, 94);
    margin: 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Grid item preregister count */
.grid-item-preregister {
    font-size: 12px;
    color: rgb(94, 94, 94);
    margin: 4px 0;
    display: block;
}

/* Grid preregister button (hidden on desktop) */
.apk-grid-button.preregister {
    display: none;
    padding: 6px 8px;
    background: rgb(36, 205, 119);
    color: rgb(255, 255, 255);
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    margin-left: 0;
}

/* Tab items */
.tab-items {
    padding: 0;
}

/* More list container */
.more-list {
    min-height: 0;
}

/* Show more button */
.show-more {
    display: block;
    width: 348px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    background: rgb(36, 205, 119);
    color: rgb(255, 255, 255);
    font-size: 13px;
    border: none;
    border-radius: 4px;
    margin: 16px auto 0;
    cursor: pointer;
    text-align: center;
}
.show-more:hover {
    opacity: 0.9;
}

/* Disable stars */
.disable-stars-0 .grid-row::after {
    display: none;
}

/* ===== Notícias Populares (Horizontal Article Module) ===== */

/* Article list wrapper */
.horizontal-article-list-wrapper {
    margin: 10px 16px 0;
    padding: 0;
    overflow: visible;
}

/* Article list container */
.horizontal-article-list-container {
    overflow: hidden;
}

/* Article list (flex row) */
.article-list.horizontal-article-list {
    display: flex;
    flex-wrap: nowrap;
}

/* Article list item */
.article-list-item {
    width: 261px;
    margin: 0 8px 0 0;
    display: block;
    flex-shrink: 0;
}

/* Article image */
.article-image-link {
    display: block;
    text-decoration: none;
}
.article-image-link img {
    width: 261px;
    height: 147px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

/* Article info */
.article-list-item .info {
    padding: 8px;
}

/* Article title */
.article-list-item .info .title {
    font-size: 14px;
    color: rgb(75, 75, 75);
    font-weight: 400;
    line-height: 22px;
    margin: 0;
    display: block;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Article tags */
.article-list-item .tags {
    margin: 8px 0 0;
}

/* Article tag */
.article-list-item .tag {
    font-size: 12px;
    color: rgb(250, 139, 22);
    background: rgba(250, 139, 22, 0.1);
    padding: 2px 8px;
    border-radius: 2px;
    margin: 4px 8px 0 0;
    display: inline-block;
    text-decoration: none;
}

/* MOBILE ADAPTATION - Only touches screens <= 720px */
@media (max-width: 720px) {
    main.pre-register {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    /* Swiper Mobile */
    .category-apk-swiper {
        margin: 0 -16px 12px !important;
        padding: 8px 0 !important;
    }
    .swiper-list {
        width: 100% !important;
        padding: 0 16px !important;
        box-sizing: border-box !important;
    }
    .swiper-item {
        width: 90% !important;
        height: auto !important;
        margin-right: 12px !important;
    }
    .swiper-banner {
        padding: 0 0 50% !important; /* Aspect ratio for mobile */
        border-radius: 8px !important;
    }

    /* Popular Games Section (Horizontal Scroll with 3 items per column) */
    .dt-hot-module .apk-grid-item ul.no-scrollbar-x {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 0 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .dt-hot-module .apk-grid-item ul.no-scrollbar-x::-webkit-scrollbar {
        display: none;
    }
    .dt-hot-module .grid-col {
        width: 85% !important; /* Show part of next column */
        flex-shrink: 0 !important;
        display: block !important;
        margin-right: 12px !important;
        padding: 0 !important;
    }
    .dt-hot-module .grid-col:last-child {
        margin-right: 0 !important;
    }
    .dt-hot-module .grid-row {
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid #f2f2f2 !important;
        width: 100% !important;
        display: flex !important;
    }
    .dt-hot-module .grid-row:last-child {
        border-bottom: none !important;
    }
    .dt-hot-module .grid-row > a:first-child img {
        width: 52px !important;
        height: 52px !important;
        border-radius: 10px !important;
    }
    .dt-hot-module .grid-text-box {
        margin: 0 10px !important;
    }

    /* Popular News Section (Notícias Populares) - Matches PC horizontal scroll */
    .horizontal-article-module .horizontal-article-list-wrapper {
        margin: 10px 0 0 !important;
        padding: 0 !important;
    }
    .horizontal-article-module .article-list.horizontal-article-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 0 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .horizontal-article-module .article-list.horizontal-article-list::-webkit-scrollbar {
        display: none;
    }
    .horizontal-article-module .article-list-item {
        width: 240px !important; /* Fixed width for mobile cards */
        flex-shrink: 0 !important;
        margin-right: 12px !important;
        display: block !important;
    }
    .horizontal-article-module .article-image-link img {
        width: 100% !important;
        height: 135px !important; /* Maintain aspect ratio */
        border-radius: 6px !important;
    }
    .horizontal-article-module .article-list-item .info {
        padding: 6px 0 !important;
    }
    .horizontal-article-module .article-list-item .info .title {
        font-size: 13px !important;
        line-height: 1.4 !important;
        -webkit-line-clamp: 2 !important;
    }

    /* Best Games Section (Vertical List) */
    .dt-newest-sort .apk-grid-item ul.no-scrollbar-x {
        display: block !important;
        padding: 0 16px !important;
        width: 100% !important;
    }
    .dt-newest-sort .grid-col {
        width: 100% !important;
        display: block !important;
        border-bottom: 1px solid #eee !important;
    }
    .dt-newest-sort .grid-col:last-child {
        border-bottom: none !important;
    }
    .dt-newest-sort .grid-row {
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        padding: 12px 0 !important;
        display: flex !important;
    }
    .dt-newest-sort .grid-row > a:first-child img {
        width: 64px !important;
        height: 64px !important;
        border-radius: 12px !important;
    }
    .dt-newest-sort .apk-grid-button.preregister {
        min-width: 90px !important;
    }

    .show-more {
        width: calc(100% - 32px) !important;
        margin: 16px !important;
    }
}
