/*
Theme Name: APKUP
Theme URI: https://apktemplates.com/
Author: APKTEMPLATES
Author URI: https://apktemplates.com/
Description: A custom wordpress theme for MOD apk site that helps you to create a MOD apk site. inbuilt lot of features such as apk updates checker, auto google play extractor etc
Version: 2.15.0
Tags: apkup, apktemplates, blog-theme, customization, news-website, light-weight-theme
Requires at least: 6.0
Tested up to: 6.8.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apkup
Domain Path: /languages
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap');

html {
    scroll-behavior: smooth;
}

/* Skeleton Loading */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-bg {
    background: #e5e7eb;
    background: linear-gradient(90deg, #e5e7eb, #f3f4f6, #e5e7eb);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.dark .skeleton-bg {
    background: #374151;
    background: linear-gradient(90deg, #374151, #4b5563, #374151);
    background-size: 200% 100%;
}

/* Ensure images fade in over skeleton */
.lazyload {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.lazyload.loaded {
    opacity: 1;
}

/* Custom Scrollbar for Search Results */
#ajax-search-results::-webkit-scrollbar {
    width: 6px;
}

#ajax-search-results::-webkit-scrollbar-track {
    background: transparent;
}

#ajax-search-results::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 20px;
}

.dark #ajax-search-results::-webkit-scrollbar-thumb {
    background-color: rgba(75, 85, 99, 0.5);
}

/* Custom App Theme Classes */
.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 85%;
    background: linear-gradient(180deg, #6ee06e 0%, #2db82d 45%, #1f9e1f 100%);
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    padding: 10px 0;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 0 #177817, 0 10px 30px rgba(30, 158, 30, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
    letter-spacing: 0.3px;
    margin: 0 auto 16px;
    text-decoration: none;
}

.btn-download:hover {
    background: linear-gradient(180deg, #81e481 0%, #35c535 45%, #23ab23 100%);
}

.btn-download::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 100%);
    border-radius: 0 0 50% 50%;
}

.btn-download:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #177817, 0 4px 12px rgba(30, 158, 30, 0.3);
}

.btn-download svg {
    width: 26px;
    height: 26px;
    position: relative;
    z-index: 1;
}

.btn-download span {
    position: relative;
    z-index: 1;
}

/* Tag Row & Dots Grid (Android Version / Dates) */
.tag-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.tags {
    display: flex;
    gap: 8px;
}

.tag {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #444;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dark .tag {
    background: rgba(30, 41, 59, 0.75);
    color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tag.green {
    color: #1a9c1a;
}

.dark .tag.green {
    color: #4ade80;
}

.dots-grid {
    display: grid;
    grid-template-columns: repeat(2, 8px);
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5aaee8;
    opacity: 0.7;
}

/* Premium Progress Bar */
.progress-container-premium {
    position: relative;
    height: 3.5rem;
    /* 56px */
    border-radius: 9999px;
    background: #e5e7eb;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.1), inset 0 -2px 3px rgba(255, 255, 255, 0.8), 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .progress-container-premium {
    background: #374151;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.4), inset 0 -1px 2px rgba(255, 255, 255, 0.05), 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill-premium {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--app-primary) 70%, white) 0%, var(--app-primary) 50%, color-mix(in srgb, var(--app-primary) 85%, black) 100%);
    box-shadow: inset 0 -4px 6px color-mix(in srgb, var(--app-primary) 60%, black), inset 0 4px 6px rgba(255, 255, 255, 0.4);
    transition: width 0.2s linear;
}

.progress-fill-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 9999px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 800 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 C150,100 250,0 400,50 C550,100 650,0 800,50 L800,100 L0,100 Z' fill='rgba(255,255,255,0.25)'/%3E%3C/svg%3E");
    background-size: 120px 140%;
    background-position: 0 bottom;
    background-repeat: repeat-x;
    z-index: 1;
    pointer-events: none;
    animation: waveFlow 2s linear infinite;
}

.progress-fill-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 9999px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 800 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 C150,0 250,100 400,50 C550,0 650,100 800,50 L800,100 L0,100 Z' fill='rgba(255,255,255,0.15)'/%3E%3C/svg%3E");
    background-size: 180px 120%;
    background-position: 0 bottom;
    background-repeat: repeat-x;
    z-index: 1;
    pointer-events: none;
    animation: waveFlow 3s linear infinite reverse;
}

@keyframes waveFlow {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: 360px;
    }
}

.btn-telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 85%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    color: #1a6ec8;
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    padding: 10px 0;
    border-radius: 50px;
    border: 2.5px solid rgba(80, 160, 240, 0.5);
    border-bottom: 5px solid #0088CC;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(80, 160, 240, 0.2), 0 2px 8px rgba(0, 0, 0, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.1s, background 0.2s;
    letter-spacing: 0.2px;
    margin: 0 auto 16px;
    text-decoration: none;
}

.btn-telegram:hover {
    background: #e7f7ff;
    /* color: #fff; */
}

.btn-telegram:active {
    transform: translateY(2px);
}

.btn-telegram svg {
    width: 24px;
    height: 24px;
}

/* Back to Home Button */
.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 70%;
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    color: #444;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    padding: 12px 0;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    letter-spacing: 0.8px;
    transition: transform 0.1s, background 0.2s;
    text-transform: uppercase;
    text-decoration: none;
}

.btn-back svg {
    transition: transform 0.3s ease;
}

.btn-back:hover svg {
    transform: translateX(-5px);
}

.btn-back:active {
    transform: translateY(2px);
}

.info-card {
    background: white;
    border-radius: 18px;
    padding: 20px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.dark .info-card {
    background: #1f2937;
}

.info-card h2 {
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    color: #1a1a1a !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
}

.dark .info-card h2 {
    color: #f9fafb !important;
}

.info-card p {
    font-size: 0.92rem !important;
    color: #555 !important;
    line-height: 1.6 !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
}

.dark .info-card p {
    color: #d1d5db !important;
}

.leer-mas {
    color: var(--app-primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
}

.leer-mas:hover {
    text-decoration: underline;
}

.telegram-banner {
    border-radius: 18px;
    padding: 35px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #e8f5ff 0%, #fff 40%, color-mix(in srgb, var(--app-primary) 5%, #fff) 70%, #fffde8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.telegram-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.dark .telegram-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #1f2937 40%, color-mix(in srgb, var(--app-primary) 15%, #1f2937) 70%, #1f2937 100%);
}

.telegram-banner::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(100, 200, 255, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.telegram-banner::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(100, 255, 150, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.telegram-banner h3 {
    font-size: 1.25rem !important;
    font-weight: 900 !important;
    color: #1a1a1a !important;
    margin-bottom: 16px !important;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.dark .telegram-banner h3 {
    color: #f9fafb !important;
}

.telegram-banner h3 span {
    font-style: italic;
}

.btn-join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--app-primary) 70%, white) 0%, var(--app-primary) 60%, color-mix(in srgb, var(--app-primary) 85%, black) 100%);
    color: white;
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    padding: 13px 32px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 5px 0 color-mix(in srgb, var(--app-primary) 60%, black), 0 7px 18px color-mix(in srgb, var(--app-primary) 40%, transparent), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.3s ease;
    overflow: hidden;
}

.btn-join::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 100%);
    border-radius: 0 0 50% 50%;
    pointer-events: none;
}

.btn-join:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 0 color-mix(in srgb, var(--app-primary) 60%, black), 0 10px 22px color-mix(in srgb, var(--app-primary) 50%, transparent), inset 0 2px 3px rgba(255, 255, 255, 0.5);
    filter: brightness(1.08);
}

.btn-join:active {
    transform: translateY(3px) scale(0.98);
    box-shadow: 0 2px 0 color-mix(in srgb, var(--app-primary) 60%, black), 0 3px 10px color-mix(in srgb, var(--app-primary) 30%, transparent);
    filter: brightness(0.95);
}

.btn-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--app-primary) 75%, white) 0%, var(--app-primary) 60%, color-mix(in srgb, var(--app-primary) 85%, black) 100%);
    color: white;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 2px 0 color-mix(in srgb, var(--app-primary) 60%, black), 0 6px 12px color-mix(in srgb, var(--app-primary) 40%, transparent), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.3s ease;
    border: none;
    outline: none;
    overflow: hidden;
}

.btn-primary-action::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 100%);
    border-radius: 0 0 50% 50%;
    pointer-events: none;
}

.btn-primary-action:hover {
    /* transform: translateY(-2px) scale(1.02); */
    /* box-shadow: 0 5px 0 color-mix(in srgb, var(--app-primary) 60%, black), 0 8px 16px color-mix(in srgb, var(--app-primary) 50%, transparent), inset 0 2px 3px rgba(255, 255, 255, 0.5); */
    filter: brightness(1.08);
}

.btn-primary-action:active {
    /* transform: translateY(3px) scale(0.98); */
    box-shadow: 0 2px 0 color-mix(in srgb, var(--app-primary) 60%, black), 0 3px 6px color-mix(in srgb, var(--app-primary) 30%, transparent);
    filter: brightness(0.95);
}

/* Dark Mode Expanding Circle Animation Overrides */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(180deg, #5aadee 0%, #2186d9 60%, #1470c0 100%);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: none;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    border: none;
    outline: none;
    overflow: hidden;
}

.btn-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 45%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, transparent 100%);
    border-radius: 0 0 50% 50%;
    pointer-events: none;
}

.btn-icon:hover {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.1);
}

.btn-icon:active {
    transform: translateY(2px) scale(0.95);
    filter: brightness(0.9);
}

.btn-icon-green {
    background: linear-gradient(180deg, #5fd65f 0%, #28a428 60%, #1e8a1e 100%);
}

.btn-icon-yellow {
    background: linear-gradient(180deg, #fde047 0%, #eab308 60%, #ca8a04 100%);
    color: white;
}

/* Shutter Animation */
.search-shutter {
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.search-shutter.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .telegram-banner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 32px 40px;
        text-align: left;
    }

    .telegram-banner h3 {
        margin-bottom: 6px !important;
        font-size: 1.6rem !important;
    }

    .btn-join {
        font-size: 1.15rem;
        padding: 16px 40px;
    }
}

/* BOTTOM NAVIGATION */
#mobileNav.collapsed {
    transform: translateY(150%);
}

body {
    padding-bottom: 90px;
}