/* ==========================================================================
   apk-list.css
   Icon + row list layout for home page sections (Editor's Choice, Best
   Updated Games, Best Updated Apps, Trending), plus matching header/footer
   chrome. Loaded after front.css (Tailwind build) so these rules can
   coexist with the utility classes already on the page.
   ========================================================================== */

/* ---- Section wrapper ---------------------------------------------------- */
.secbox {
    max-width: 1280px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.sbheader {
    margin-bottom: 1.25rem;
}

.sbhTitle span {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #191919;
    line-height: 1.2;
}

html.dark .sbhTitle span {
    color: #f9fafb;
}

.sbhTitle .underlined {
    width: 100%;
    height: 3px;
    border-radius: 0;
    margin-top: 10px;
    background: var(--accent-color, #ed1b1b);
}



/* ---- Row list ------------------------------------------------------------ */
ul.apks {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.5rem 1.5rem;
    margin: 0;
    padding: 0;
}

@media (min-width: 640px) {
    ul.apks.w3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    ul.apks.w3 { grid-template-columns: repeat(3, 1fr); }
}

ul.apks > li {
    border-bottom: 1px solid #eef0f2;
}

html.dark ul.apks > li {
    border-bottom: 1px solid #1f2937;
}

ul.apks > li > .apk-icon {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    text-decoration: none;
}

.apk-icon .thumb {
    flex: 0 0 auto;
    width: 78px;
    height: 78px;
    border-radius: 18px;
    overflow: hidden;
    background: #f1f2f4;
    margin: 0;
}

@media (min-width: 768px) {
    .apk-icon .thumb {
        width: 100px;
        height: 100px;
        border-radius: 20px;
    }
}

@media (min-width: 1024px) {
    .apk-icon .thumb {
        width: 120px;
        height: 120px;
        border-radius: 22px;
    }
}

html.dark .apk-icon .thumb {
    background: #1f2937;
}

.apk-icon .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.apk-icon .info {
    min-width: 0;
    flex: 1 1 auto;
}

.apk-icon .info .title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #191919;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

@media (min-width: 1024px) {
    .apk-icon .info .title {
        font-size: 1.15rem;
    }
    .apk-icon .info .version,
    .apk-icon .info .mod {
        font-size: 0.875rem;
    }
}

html.dark .apk-icon .info .title {
    color: #f3f4f6;
}

.apk-icon .info .version {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8125rem;
    color: #212121;
    margin-top: 2px;
}

.apk-icon .info .version svg {
    flex: 0 0 auto;
}

html.dark .apk-icon .info .version {
    color: #d1d5db;
}

.apk-icon .info .mod {
    display: block;
    margin-top: 4px;
    font-size: 0.8125rem;
    font-weight: 400;
    color: #212121;
    white-space: normal;
    overflow: visible;
    word-break: break-word;
}

html.dark .apk-icon .info .mod {
    color: #9ca3af;
}

.apk-icon .info .badge-nomod {
    color: #212121;
    font-weight: 400;
}

html.dark .apk-icon .info .badge-nomod {
    color: #9ca3af;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Pagination / "See more" --------------------------------------------- */
.pagination {
    margin-top: 0.75rem;
    text-align: center;
}

.seemoreapk {
    display: inline-block;
    padding: 0.6rem 1.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
    color: #111827;
    background: #f1f2f4;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.seemoreapk:hover {
    background: #e5e7eb;
}

html.dark .seemoreapk {
    color: #f3f4f6;
    background: #1f2937;
}

html.dark .seemoreapk:hover {
    background: #374151;
}

/* ---- Simple header -------------------------------------------------------- */
.mc-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eef0f2;
}

html.dark .mc-header {
    background: rgba(11, 15, 20, 0.92);
    border-bottom: 1px solid #1f2937;
}

.mc-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #374151;
    flex: 0 0 auto;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mc-icon-btn:hover {
    background: #f3f4f6;
}

html.dark .mc-icon-btn {
    color: #d1d5db;
}

html.dark .mc-icon-btn:hover {
    background: #1f2937;
}

.mc-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex: 0 0 auto;
}

.mc-logo img {
    height: 34px;
    width: auto;
}

.mc-logo span {
    font-weight: 800;
    font-size: 1.15rem;
    color: #111827;
}

html.dark .mc-logo span {
    color: #f9fafb;
}

.mc-nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

@media (min-width: 1024px) {
    .mc-nav { display: flex; }
    .mc-hamburger { display: none; }
}

.mc-nav button {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mc-nav button.active {
    color: #fff;
    background: var(--accent-color, #ed1b1b);
}

html.dark .mc-nav button {
    color: #d1d5db;
}

.mc-header-spacer {
    flex: 1 1 auto;
}

.mc-mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid #eef0f2;
}

html.dark .mc-mobile-menu {
    border-top: 1px solid #1f2937;
}

.mc-mobile-menu.open {
    display: flex;
}

.mc-mobile-menu button {
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mc-mobile-menu button.active {
    color: #fff;
    background: var(--accent-color, #ed1b1b);
}

html.dark .mc-mobile-menu button {
    color: #d1d5db;
}

@media (min-width: 1024px) {
    .mc-mobile-menu { display: none !important; }
}

/* ---- Footer ---------------------------------------------------------------- */
.mc-footer {
    margin-top: 3rem;
    border-top: 1px solid #eef0f2;
    background: #fafafa;
}

html.dark .mc-footer {
    border-top: 1px solid #1f2937;
    background: #0b0f14;
}

.mc-footer-top {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 900px) {
    .mc-footer-top {
        grid-template-columns: 1.3fr 1fr 1fr;
    }
}

.mc-footer-brand img {
    height: 32px;
    margin-bottom: 0.75rem;
}

.mc-footer-brand .sitename {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
    margin-bottom: 0.75rem;
}

html.dark .mc-footer-brand .sitename {
    color: #f3f4f6;
}

.mc-footer-brand p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
}

.mc-footer-col span.h {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #111827;
    margin-bottom: 0.75rem;
}

html.dark .mc-footer-col span.h {
    color: #f3f4f6;
}

.mc-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mc-footer-col ul li a {
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
}

.mc-footer-col ul li a:hover {
    color: var(--accent-color, #ed1b1b);
}

.mc-footer-bottom {
    border-top: 1px solid #eef0f2;
}

html.dark .mc-footer-bottom {
    border-top: 1px solid #1f2937;
}

.mc-footer-bottom-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    text-align: center;
}

.mc-footer-bottom-inner p {
    font-size: 0.8rem;
    color: #9ca3af;
}
