/**
 * RelaxModAPK - Additional Custom Styles
 *
 * @package RelaxModAPK
 */


/* ============================================
   SEARCH DROPDOWN STYLES
   ============================================ */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--rm-bg-secondary);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius-md);
    box-shadow: var(--rm-shadow-lg);
    z-index: var(--rm-z-dropdown);
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item:hover {
    background: var(--rm-bg-card-hover) !important;
}

.search-result-item:not(:last-child) {
    border-bottom: 1px solid var(--rm-border-light);
}

/* ============================================
   STAR RATING STYLES
   ============================================ */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--rm-warning);
    font-size: 0.85rem;
}

.star-rating .rating-number {
    margin-left: 6px;
    color: var(--rm-text-primary);
    font-weight: 600;
    font-size: var(--rm-font-size-sm);
}

/* ============================================
   MOD FEATURES BOX
   ============================================ */
.mod-features-box {
    background: var(--rm-bg-card);
    border: 1px solid var(--rm-border-light);
    border-radius: var(--rm-radius-lg);
    padding: var(--rm-spacing-xl);
    margin-bottom: var(--rm-spacing-xl);
}

.mod-features-box h3 {
    font-size: var(--rm-font-size-lg);
    font-weight: 700;
    margin-bottom: var(--rm-spacing-md);
    display: flex;
    align-items: center;
    gap: var(--rm-spacing-sm);
}

.mod-features-box .features-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--rm-spacing-sm);
}

.mod-features-box .feature-item {
    padding: 8px 12px;
    background: var(--rm-bg-elevated);
    border-radius: var(--rm-radius-sm);
    border-left: 3px solid var(--rm-accent);
}

.mod-features-box .feature-item i {
    color: var(--rm-accent);
    font-size: 0.9rem;
}

/* ============================================
   CATEGORY CARD HOVER
   ============================================ */
.category-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--rm-shadow-lg) !important;
    border-color: var(--rm-accent) !important;
}

/* ============================================
   HEADER ENHANCEMENTS
   ============================================ */
.site-header .header-search {
    position: relative;
}

/* Admin bar adjustment */
.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* ============================================
   COMMENTS STYLING
   ============================================ */
.comments-area {
    background: var(--rm-bg-card);
    border: 1px solid var(--rm-border-light);
    border-radius: var(--rm-radius-lg);
    padding: var(--rm-spacing-xl);
}

.comments-area .comments-title {
    font-size: var(--rm-font-size-xl);
    font-weight: 700;
    margin-bottom: var(--rm-spacing-lg);
    padding-bottom: var(--rm-spacing-sm);
    border-bottom: 1px solid var(--rm-border-light);
}

.comments-area .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comments-area .comment {
    padding: var(--rm-spacing-md) 0;
    border-bottom: 1px solid var(--rm-border-light);
}

.comments-area .comment:last-child {
    border-bottom: none;
}

.comments-area .comment-author {
    display: flex;
    align-items: center;
    gap: var(--rm-spacing-sm);
    margin-bottom: var(--rm-spacing-sm);
}

.comments-area .comment-author img {
    border-radius: var(--rm-radius-circle);
    width: 36px;
    height: 36px;
}

.comments-area .comment-author .fn {
    font-weight: 600;
    color: var(--rm-text-primary);
}

.comments-area .comment-metadata {
    font-size: var(--rm-font-size-xs);
    color: var(--rm-text-muted);
    margin-bottom: var(--rm-spacing-sm);
}

.comments-area .comment-content p {
    color: var(--rm-text-secondary);
    line-height: 1.7;
}

.comments-area .reply a {
    font-size: var(--rm-font-size-xs);
    color: var(--rm-accent);
    font-weight: 500;
}

/* Comment Form */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--rm-bg-input);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius-sm);
    color: var(--rm-text-primary);
    font-size: var(--rm-font-size-sm);
    font-family: var(--rm-font-family);
    transition: border-color var(--rm-transition-fast);
    margin-bottom: var(--rm-spacing-md);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--rm-accent);
    box-shadow: 0 0 0 3px var(--rm-accent-glow);
}

.comment-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: var(--rm-font-size-sm);
    color: var(--rm-text-secondary);
}

.comment-form .form-submit .submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--rm-accent);
    color: var(--rm-text-on-accent);
    border: none;
    border-radius: var(--rm-radius-pill);
    font-size: var(--rm-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--rm-transition-base);
}

.comment-form .form-submit .submit:hover {
    background: var(--rm-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 214, 143, 0.3);
}

/* ============================================
   WORDPRESS GALLERY OVERRIDES
   ============================================ */
.wp-block-gallery {
    gap: var(--rm-spacing-sm) !important;
}

.wp-block-gallery .wp-block-image {
    border-radius: var(--rm-radius-md);
    overflow: hidden;
}

/* ============================================
   WORDPRESS ALIGNMENT
   ============================================ */
.alignwide {
    margin-left: -5%;
    margin-right: -5%;
    max-width: 110%;
    width: 110%;
}

.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {

    .site-header,
    .site-footer,
    .sidebar,
    .back-to-top,
    .mobile-menu,
    .mobile-menu-overlay,
    .category-nav,
    .breadcrumbs,
    .btn-download,
    .btn-outline,
    .download-box,
    .related-posts-section,
    .comments-area {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .post-content {
        background: none;
        border: none;
        padding: 0;
    }
}

/* ============================================
   REDUCED MOTION PREFERENCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .app-card:hover {
        transform: none;
    }
}

/* ============================================
   MOBILE STICKY FOOTER BAR
   ============================================ */
@media (max-width: 760px) {
    body {
        padding-bottom: 70px !important;
        /* Space for sticky footer */
    }

    .mobile-footer-navbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: var(--rm-bg-secondary, #161b22) !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
        z-index: 9999;
        border-top: 1px solid var(--rm-border-light, #21262d) !important;
        display: block !important;
    }

    .mobile-footer-inner {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
        padding: 0 5px;
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none !important;
        color: var(--rm-text-muted, #8b949e);
        transition: all 0.2s ease;
        gap: 4px;
        background: none;
        border: none;
    }

    .mobile-nav-item i {
        font-size: 1.3rem;
        line-height: 1;
    }

    .mobile-nav-item span {
        font-size: 0.65rem;
        font-weight: 600;
        text-transform: capitalize;
    }

    .mobile-nav-item.active {
        color: var(--rm-accent, #00d68f) !important;
    }

    .mobile-nav-item:hover {
        color: var(--rm-accent, #00d68f) !important;
    }
}

/* Hide on Desktop */
@media (min-width: 761px) {
    .mobile-footer-navbar {
        display: none !important;
    }
}

/* ============================================
   SCREENSHOT LIGHTBOX
   ============================================ */
.rm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rm-lightbox.active {
    display: flex;
    opacity: 1;
}

.rm-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rm-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.rm-lightbox.active .rm-lightbox-img {
    transform: scale(1);
}

.rm-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.rm-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.rm-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    z-index: 10;
}

.rm-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.15);
}

.rm-lightbox-prev {
    left: -80px;
}

.rm-lightbox-next {
    right: -80px;
}

@media (max-width: 991px) {
    .rm-lightbox-prev {
        left: 10px;
    }

    .rm-lightbox-next {
        right: 10px;
    }

    .rm-lightbox-close {
        top: 20px;
        right: 20px;
        position: fixed;
    }
}

/* Lightbox items cursors */
.lightbox-trigger {
    cursor: zoom-in;
}

/* ============================================
   HERO SEARCH UI & TRENDING CARDS ENHANCEMENTS
   ============================================ */
/* Hero Search Box — single focus rule */
.hero-search-form:focus-within {
    border-color: var(--rm-accent, #00d68f) !important;
    box-shadow: 0 0 25px rgba(0, 214, 143, 0.35) !important;
}

.rm-hero-search-input,
.rm-hero-search-input:focus,
.rm-hero-search-input:active,
.hero-search-form input[type="search"],
.hero-search-form input[type="search"]:focus {
    background-color: transparent !important;
    background: transparent !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none;
}

.rm-hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Chrome/Safari Search Input Reset */
.rm-hero-search-input::-webkit-search-cancel-button,
.rm-hero-search-input::-webkit-search-decoration,
.rm-hero-search-input::-webkit-search-results-button,
.rm-hero-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

/* Trending Now Horizontal Slider */
.trending-slider-track::-webkit-scrollbar {
    display: none;
}

.trending-slider-track {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.slider-prev-btn,
.slider-next-btn {
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.slider-prev-btn:hover,
.slider-next-btn:hover {
    background: var(--rm-accent, #00d68f) !important;
    color: #000 !important;
    border-color: var(--rm-accent, #00d68f) !important;
    transform: scale(1.08);
}

/* Card Hover Enhancements */
.lp-land-card:hover .lp-land-inner {
    transform: translateY(-5px);
    border-color: var(--rm-accent, #00d68f) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 214, 143, 0.2) !important;
}

.lp-land-card:hover .lp-land-banner img {
    transform: scale(1.06);
}

.lp-land-card:hover .lp-land-dl-btn {
    background: #00ffac !important;
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 214, 143, 0.6) !important;
}

.lp-trend-card:hover {
    transform: translateY(-3px);
    border-color: var(--rm-accent, #00d68f) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 214, 143, 0.15) !important;
}

/* ============================================
   RM-TCARD — Trending List Card System
   ============================================ */
.rm-tcard {
    display: flex;
}

.rm-tcard-link {
    display: flex;
    width: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
}

.rm-tcard-inner {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 84px;
    padding: 12px 14px;
    background: var(--rm-bg-card, #1c2333);
    border: 1px solid var(--rm-border-light, #21262d);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    gap: 12px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

/* Left accent bar (top 3 only) */
.rm-tcard-accent-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 2px 2px 0;
}

/* Hover state */
.rm-tcard-link:hover .rm-tcard-inner {
    transform: translateY(-3px) translateX(2px);
    border-color: rgba(0, 214, 143, 0.4);
    background: #1e2a3a;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 16px rgba(0, 214, 143, 0.14);
}

/* Rank badge */
.rm-tcard-rank {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -0.5px;
    line-height: 1;
}

/* Icon */
.rm-tcard-icon-wrap {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 13px;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.rm-tcard-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.rm-tcard-link:hover .rm-tcard-icon {
    transform: scale(1.07);
}

/* Info block */
.rm-tcard-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.rm-tcard-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--rm-text-primary, #ffffff);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rm-tcard-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

/* Category pill */
.rm-tcard-cat {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rm-accent, #00d68f);
    background: rgba(0, 214, 143, 0.1);
    border: 1px solid rgba(0, 214, 143, 0.2);
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

/* Stats row */
.rm-tcard-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rm-tcard-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--rm-text-muted, #8b949e);
}

.rm-tcard-rating .bi-star-fill {
    color: #f5c518;
    font-size: 0.65rem;
}

.rm-tcard-version {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--rm-text-muted, #8b949e);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 1px 6px;
    white-space: nowrap;
}

/* Minimal Category Navigation */
.minimal-cat-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
}

.minimal-cat-nav::-webkit-scrollbar {
    display: none;
}

.minimal-cat-item {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rm-text-secondary, #c9d1d9);
    background: var(--rm-bg-card, #1c2333);
    border: 1px solid var(--rm-border-light, #21262d);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.minimal-cat-item:hover {
    color: #000;
    background: var(--rm-accent, #00d68f);
    border-color: var(--rm-accent, #00d68f);
    transform: translateY(-1px);
}

/* ============================================
   RM-VCARD — Related / Dev Posts Card System
   ============================================ */
.rm-vcard {
    display: flex;
    height: 100%;
    width: 100%;
}

.rm-vcard-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    overflow: hidden;
}

.rm-vcard-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #161d2e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.rm-vcard-link:hover .rm-vcard-inner {
    transform: translateY(-5px);
    border-color: rgba(0, 214, 143, 0.5);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 214, 143, 0.18);
}

/* Banner — blurred bg + centred icon */
.rm-vcard-banner {
    position: relative;
    height: 110px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0d1117;
}

.rm-vcard-blur {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(28px) brightness(0.55) saturate(1.3);
    transform: scale(1.6);
    z-index: 1;
}

.rm-vcard-icon {
    position: relative;
    z-index: 2;
    width: 68px;
    height: 68px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.rm-vcard-link:hover .rm-vcard-icon {
    transform: scale(1.09);
}

/* Body */
.rm-vcard-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 11px 13px 13px;
    background: #161d2e;
    min-width: 0;
}

/* Title — clean white, 2-line clamp */
.rm-vcard-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f0f4ff;
    line-height: 1.4;
    margin: 0 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(0.85rem * 1.4 * 2);
}

/* Mod tag */
.rm-vcard-mod {
    font-size: 0.7rem;
    font-weight: 600;
    color: #00d68f;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
}

/* Footer */
.rm-vcard-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 9px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
}

.rm-vcard-version {
    font-size: 0.68rem;
    font-weight: 600;
    color: #7a8599;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 5px;
    padding: 2px 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 62%;
}

.rm-vcard-rating {
    font-size: 0.72rem;
    font-weight: 700;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.rm-vcard-rating .bi-star-fill {
    color: #f5c518;
    font-size: 0.65rem;
}

/* ============================================
   RM-SECTION-HEADING — Minimal Highlight Style
   ============================================ */
.rm-section-heading {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 0;
}

.rm-section-heading-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #000000;
    background: linear-gradient(90deg, rgba(0, 214, 143, 0.18) 0%, transparent 100%);
    border-left: 3px solid var(--rm-accent, #00d68f);
    padding: 5px 14px 5px 11px;
    border-radius: 0 6px 6px 0;
}