/* ============================================================
   CodeByTushu — Mobile Apps Hub Dedicated Stylesheet
   Path: /apps/apps.css
   ============================================================ */

/* ── Page Layout (Uses Main Website .cbt-navbar from styles.css) ── */
#mainNavbar.cbt-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    transition: padding 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#mainNavbar.cbt-navbar.sticky {
    position: fixed !important;
    top: 0 !important;
    background: rgba(5, 5, 8, 0.96) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8) !important;
    padding-top: 12px !important;
}

.apps-page {
    width: 100%;
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

.apps-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Hero Section ─────────────────────────────────────────── */
.apps-hero {
    text-align: center;
    padding: 20px 0 40px;
    position: relative;
}

.apps-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 9999px;
    background: rgba(255, 196, 0, 0.08);
    border: 1px solid rgba(255, 196, 0, 0.3);
    color: #ffc400;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.apps-badge .badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffc400;
    box-shadow: 0 0 8px #ffc400;
    animation: cbtPulse 2s infinite ease-in-out;
}

@keyframes cbtPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.apps-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.18;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.apps-title .gold-accent {
    color: #ffc400;
    text-shadow: 0 0 30px rgba(255, 196, 0, 0.25);
}

.apps-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.12rem);
    color: #a3a3a3;
    max-width: 760px;
    margin: 0 auto 34px;
    line-height: 1.65;
}

/* ── Search & Upgraded Category Presentation ───────────────── */
.apps-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    margin-bottom: 46px;
}

.apps-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.apps-search-input {
    width: 100%;
    padding: 15px 22px;
    background: rgba(18, 18, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: #ffffff;
    font-size: 0.96rem;
    outline: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(12px);
}

.apps-search-input:focus {
    border-color: #ffc400;
    box-shadow: 0 0 20px rgba(255, 196, 0, 0.22);
    background: rgba(22, 22, 26, 0.95);
}

.apps-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #777777;
    pointer-events: none;
    font-size: 1.25rem;
}

/* Upgraded Glass Category Segmented Bar */
.apps-categories {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 6px;
    background: rgba(18, 18, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    backdrop-filter: blur(12px);
    max-width: 100%;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 9999px;
    background: transparent;
    border: 1px solid transparent;
    color: #b5b5b5;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    white-space: nowrap;
}

.category-pill:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.category-pill.active {
    background: linear-gradient(135deg, #ffc400 0%, #e5a800 100%);
    color: #000000;
    font-weight: 700;
    border-color: #ffc400;
    box-shadow: 0 4px 18px rgba(255, 196, 0, 0.35);
}

.category-count {
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-weight: 600;
}

.category-pill.active .category-count {
    background: rgba(0, 0, 0, 0.2);
    color: #000000;
}

/* ── App Cards Grid ───────────────────────────────────────── */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 26px;
    margin-bottom: 60px;
}

.app-card {
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.88) 0%, rgba(13, 13, 16, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.app-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 196, 0, 0.4);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 196, 0, 0.15);
}

.app-card-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.app-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    background: #111115;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.app-meta-header {
    flex: 1;
}

.app-category-tag {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffc400;
    letter-spacing: 0.6px;
    margin-bottom: 3px;
}

.app-title-card {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 6px;
}

.app-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.app-mini-badge {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #bbbbbb;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-mini-badge.badge-offline {
    background: rgba(0, 229, 255, 0.1);
    color: #00e5ff;
    border-color: rgba(0, 229, 255, 0.25);
}

.app-tagline {
    font-size: 0.92rem;
    color: #a3a3a3;
    line-height: 1.55;
    margin-bottom: 18px;
}

.app-features-preview {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: #d1d5db;
    margin-bottom: 8px;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.feature-dot-free {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

.feature-dot-vip {
    background: #ffc400;
    box-shadow: 0 0 8px rgba(255, 196, 0, 0.45);
}

.app-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-download-apk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 12px;
    background: #ffc400;
    color: #000000;
    font-weight: 700;
    font-size: 0.94rem;
    text-decoration: none;
    border: 1.5px solid #ffc400;
    box-shadow: 0 4px 16px rgba(255, 196, 0, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-download-apk span,
.btn-download-apk i {
    color: #000000;
    transition: color 0.25s ease, transform 0.25s ease;
}

.btn-download-apk:hover {
    background: #17171d !important;
    color: #ffffff !important;
    border-color: #ffc400 !important;
    box-shadow: 0 10px 25px rgba(255, 196, 0, 0.35);
    transform: translateY(-3px);
}

.btn-download-apk:hover span,
.btn-download-apk:hover i {
    color: #ffffff !important;
}

.btn-view-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-view-details span,
.btn-view-details i {
    color: #ffffff;
    transition: color 0.25s ease;
}

.btn-view-details:hover,
.btn-view-details:active,
.btn-view-details:focus,
.btn-view-details.active {
    background: rgba(255, 196, 0, 0.12) !important;
    border-color: #ffc400 !important;
    color: #ffc400 !important;
    box-shadow: 0 6px 18px rgba(255, 196, 0, 0.20);
    transform: translateY(-2px);
}

.btn-view-details:hover span,
.btn-view-details:hover i,
.btn-view-details:active span,
.btn-view-details:active i,
.btn-view-details:focus span,
.btn-view-details:focus i,
.btn-view-details.active span,
.btn-view-details.active i {
    color: #ffc400 !important;
}

/* ── Upgraded Step-by-Step Installation Guide ────────────── */
.install-guide-section {
    background: linear-gradient(180deg, rgba(18, 18, 22, 0.75) 0%, rgba(10, 10, 12, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px 30px;
    margin-bottom: 60px;
    backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.guide-header {
    text-align: center;
    margin-bottom: 36px;
}

.guide-title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.guide-subtitle {
    color: #9ca3af;
    font-size: 0.95rem;
    max-width: 640px;
    margin: 0 auto;
}

.guide-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.guide-step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 26px 22px;
    transition: all 0.25s ease;
}

.guide-step-card:hover {
    border-color: rgba(255, 196, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.step-num-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 196, 0, 0.15);
    border: 1px solid rgba(255, 196, 0, 0.4);
    color: #ffc400;
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.step-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.step-card-desc {
    font-size: 0.88rem;
    color: #9ca3af;
    line-height: 1.55;
}

/* ── Modal Styles ────────────────────────────────────────── */
.app-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1000000 !important; /* Higher than .cbt-navbar's 10000 so navbar never overlaps modal */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
}

.app-modal-content {
    background: #111115;
    border: 1px solid rgba(255, 196, 0, 0.3);
    border-radius: 22px;
    max-width: 680px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 32px 28px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 196, 0, 0.18);
    margin: auto;
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.2s ease;
    z-index: 20;
}

.modal-close-btn:hover {
    background: rgba(255, 196, 0, 0.2);
    border-color: #ffc400;
    color: #ffc400;
    transform: rotate(90deg);
}

.modal-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 22px 0;
}

.comparison-col {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 18px;
}

.comparison-col.pro-col {
    background: rgba(255, 196, 0, 0.05);
    border-color: rgba(255, 196, 0, 0.3);
}

.col-header {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.col-header.free-title { color: #9ca3af; }
.col-header.pro-title { color: #ffc400; }

/* ── Secondary Outline PDF Download Button ───────────────── */
.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    background: rgba(255, 196, 0, 0.05);
    border: 1px solid rgba(255, 196, 0, 0.25);
    color: #ffc400;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-download-pdf:hover,
.btn-download-pdf:active,
.btn-download-pdf:focus {
    background: rgba(255, 196, 0, 0.16) !important;
    border-color: #ffc400 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(255, 196, 0, 0.25);
    transform: translateY(-2px);
}

/* ── Clean & Professional Dedicated Apps Footer ──────────── */
.apps-footer {
    width: 100%;
    background: #08080a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 50px 0 24px;
    position: relative;
    z-index: 10;
}

.apps-footer-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 36px;
}

.apps-ft-col h3 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffc400;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.apps-ft-brand .apps-ft-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #ffffff;
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 12px;
}

.apps-ft-desc {
    color: #888888;
    font-size: 0.88rem;
    line-height: 1.6;
    max-width: 380px;
}

.apps-ft-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.apps-ft-links a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.25s ease, transform 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.apps-ft-links a i.fa-chevron-right {
    font-size: 9px;
    color: #ffc400 !important;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.apps-ft-links a:hover {
    color: #ffc400;
    transform: translateX(4px);
}

.apps-ft-links a:hover i.fa-chevron-right {
    transform: translateX(2px);
}

.apps-ft-copyright {
    max-width: 1240px;
    margin: 40px auto 0;
    padding: 20px 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    color: #666666;
    font-size: 0.82rem;
}

.apps-ft-copyright span {
    color: #ffc400;
}

/* ── Responsive Rules ────────────────────────────────────── */
@media (max-width: 1024px) {
    .apps-footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .apps-page {
        padding-top: 96px;
    }
    .apps-grid {
        grid-template-columns: 1fr;
    }
    .modal-comparison-grid {
        grid-template-columns: 1fr;
    }
    .modal-sub-actions {
        grid-template-columns: 1fr !important;
    }
    .apps-footer-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .apps-categories {
        border-radius: 16px;
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 8px;
        -webkit-overflow-scrolling: touch;
    }
}
