/* Ultra-Premium, Clean Glassmorphic Theme */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-base: #0a0a0c;
    --bg-surface: rgba(20, 20, 24, 0.65);
    --bg-surface-hover: rgba(30, 30, 35, 0.8);
    --border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(0, 229, 255, 0.3);
    
    --accent: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.4);
    --accent-gradient: linear-gradient(135deg, #00e5ff 0%, #0077ff 100%);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: linear-gradient(135deg, #050505 0%, #0d111a 50%, #050505 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
body::before {
    content: ''; position: fixed; top: -20%; left: -10%; width: 60%; height: 60%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, transparent 60%);
    pointer-events: none; z-index: -1;
}

body::after {
    content: ''; position: fixed; bottom: -20%; right: -10%; width: 60%; height: 60%;
    background: radial-gradient(circle, rgba(155, 0, 255, 0.08) 0%, transparent 60%);
    pointer-events: none; z-index: -1;
}

a { text-decoration: none; }

/* Navigation */
.topnav {
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topnav-inner {
    max-width: 1350px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 24px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.footer-logo-img {
    height: 32px;
    width: auto;
    opacity: 0.85;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 600px) {
    .topnav-inner {
        padding: 12px 16px;
    }
    .nav-logo {
        font-size: 18px;
    }
    .nav-right {
        gap: 8px;
    }
    .nav-icon-btn {
        width: 36px;
        height: 36px;
    }
}

.nav-icon-btn {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-icon-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.nav-desktop-links {
    display: none;
    align-items: center;
    gap: 24px;
    margin-right: 16px;
}

.nav-desktop-links a {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.nav-desktop-links a:hover {
    color: var(--accent);
}

@media (min-width: 900px) {
    .nav-desktop-links {
        display: flex;
    }
    #hamburger {
        display: none;
    }
}

/* Drawer / Mobile Menu */
.drawer-ovl {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.drawer-ovl.open { opacity: 1; pointer-events: auto; }

.mobile-drawer {
    position: fixed; top: 0; right: -300px; width: 280px; height: 100%;
    background: var(--bg-surface); backdrop-filter: blur(20px); border-left: 1px solid var(--border);
    z-index: 1001; padding: 24px; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; gap: 8px; box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.mobile-drawer.open { right: 0; }

.d-section { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; font-weight: 800; letter-spacing: 1px; margin: 20px 0 8px 8px; }
.d-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; color: var(--text-primary); font-weight: 700; font-size: 16px; transition: all 0.2s; }
.d-link:hover, .d-link.active { background: rgba(0, 229, 255, 0.1); color: var(--accent); }
.d-link .material-icons-round { color: var(--text-secondary); transition: all 0.2s; }
.d-link:hover .material-icons-round { color: var(--accent); }

.drawer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1002;
}

@media (max-width: 900px) {
    .drawer-close { display: flex; }
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    transform: rotate(90deg);
}

/* Hero Section */
.hero {
    position: relative;
    max-width: 1350px;
    margin: 40px auto;
    padding: 80px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    background-image: url('hero-bg.png');
    background-position: center;
    background-size: cover;
    z-index: 0;
    opacity: 0.35;
    filter: blur(1px);
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,12,1) 0%, rgba(10,10,12,0.2) 100%);
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero-tagline {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

.ms-wrap {
    width: 100%;
    max-width: 500px;
    position: relative;
    margin-bottom: 30px;
}

.ms-wrap input {
    width: 100%;
    padding: 18px 24px 18px 50px;
    font-size: 16px;
    font-family: var(--font-main);
    background: rgba(15, 15, 20, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.ms-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.1);
    background: rgba(30, 30, 35, 0.9);
}

.ms-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.hero-features {
    display: flex;
    gap: 24px;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-features div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-features .material-icons-round {
    color: var(--accent);
    font-size: 18px;
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 16px;
        margin: 20px 10px; /* Reduced margin */
        border-radius: var(--radius-md);
    }
    .main-layout {
        padding: 0 10px 40px; /* Reduced layout padding for more width */
    }
    .hero-tagline {
        font-size: 28px;
    }
    .hero-desc {
        font-size: 15px;
        margin-bottom: 24px;
    }
    .ms-wrap input {
        padding: 14px 20px 14px 44px;
        font-size: 15px;
        border-color: rgba(255, 255, 255, 0.25); /* More visible on mobile */
    }
    .ms-icon {
        left: 16px;
    }
    .hero-features {
        gap: 12px;
        font-size: 12px;
        flex-wrap: wrap;
        margin-top: 10px;
    }
    .app-grid {
        gap: 10px;
    }
    .card-body {
        padding: 8px 10px 10px;
        gap: 5px;
    }
    .card-title-center {
        font-size: 12px;
        font-weight: 700;
        min-height: 2.5em;
    }
    .card-meta-split {
        font-size: 10px;
    }
    .card-action {
        padding-top: 7px;
    }
    .dl-btn-full {
        padding: 8px 0;
        font-size: 11px;
        border-radius: 8px;
    }
    .card-genre-badge {
        font-size: 8px;
        padding: 2px 5px;
    }
}

/* Layout */
.main-layout {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 1024px) {
    .main-layout { flex-direction: row; }
    .left-col { flex: 1; min-width: 0; }
    .right-col { width: 340px; flex-shrink: 0; }
}

.sec-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sec-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 4px;
}



/* ============================================
   APP GRID & CARDS — Complete Redesign
   ============================================ */

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 900px) { .app-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1400px) { .app-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* --- Card Shell --- */
.app-card {
    position: relative;
    background: rgba(18, 18, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.app-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 229, 255, 0.45);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(0, 229, 255, 0.15),
                0 0 30px rgba(0, 229, 255, 0.08);
}

/* --- Icon Section (top full-bleed area) --- */
.card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.04);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon-top {
    width: 80%;
    height: 80%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-card:hover .card-icon-top {
    transform: scale(1.08);
}

/* Genre badge on top of icon */
.card-genre-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 229, 255, 0.15);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 20px;
    backdrop-filter: blur(6px);
    transition: background 0.3s;
}

.app-card:hover .card-genre-badge {
    background: rgba(0, 229, 255, 0.3);
}

/* Rating badge on top left of icon */
.card-rating-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 202, 40, 0.3);
    color: #ffca28;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.card-rating-badge .material-icons-round {
    font-size: 12px;
}

/* --- Card Body (below icon) --- */
.card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Title */
.card-title-center {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

/* Meta row (Size + Downloads) */
.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 6px;
    margin-top: 0;
}

.card-meta-row .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

.card-meta-row .meta-item .material-icons-round {
    font-size: 13px;
    color: var(--accent);
}

/* Divider + Install button */
.card-action {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dl-btn-full {
    display: block;
    width: 100%;
    background: var(--accent-gradient);
    color: #000;
    padding: 9px 0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.5px;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 10px rgba(0, 229, 255, 0.2);
}

.app-card:hover .dl-btn-full {
    opacity: 0.92;
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 229, 255, 0.35);
}

/* Side Grid */
.side-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.side-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.side-card:hover {
    transform: translateX(8px);
    border-color: var(--accent);
    background: var(--bg-surface-hover);
    box-shadow: -5px 10px 20px rgba(0,0,0,0.3);
}

.side-img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
}

.side-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.side-info p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Footer */
/* Category Navigation */
.cat-row {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }

.cat {
    padding: 10px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.cat:hover {
    border-color: var(--border-highlight);
    color: var(--text-primary);
    transform: translateY(-2px);
    background: var(--bg-surface-hover);
}

.cat.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #000;
    box-shadow: 0 8px 20px var(--accent-glow);
}

footer {
    background: linear-gradient(180deg, rgba(10, 14, 20, 0.95), #020202);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: none;
    padding: 60px 24px 30px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), #9b00ff, transparent);
    opacity: 0.8;
}

.footer-container {
    max-width: 1350px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-left {
    max-width: 400px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.footer-left p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.footer-right h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 15px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

.footer-links a::before {
    content: '→';
    margin-right: 8px;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-bottom {
    max-width: 1350px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    color: rgba(148, 163, 184, 0.6);
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer-container {
    }
}

.premium-section {
    background: linear-gradient(145deg, var(--bg-surface), rgba(0,229,255,0.05));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.premium-section::before, .premium-section::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, transparent, var(--accent), #9b00ff, transparent);
    opacity: 0.9;
    z-index: 50; /* Ensure visibility on top of content */
    pointer-events: none;
}

.premium-section::before { left: 0; }
.premium-section::after { right: 0; }


/* Final Cleanup of duplicate styles */



/* Hide unused */
.mesh, .grid-lines, .hero-visual, .hero-stats { display: none !important; }
.cats { display: none; }
.bottom-nav { display: none; }

/* Global Section Titles */
.sec-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 32px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    letter-spacing: -0.5px;
    position: relative;
    padding-left: 16px;
}

.sec-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 4px;
}



/* ==========================================
   TIKTOK OVERLAY - Strict TikTok Only Mode
   ========================================== */

/* Hidden by default in ALL browsers */
#tiktokOverlay {
    display: none !important;
}

/* Wipe body layout for TikTok */
body.tiktok-body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden !important;
    background: #000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show overlay ONLY when body has tiktok-body class */
body.tiktok-body #tiktokOverlay {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: #000 !important;
    align-items: center;
    justify-content: center;
}

/* Responsive GIF - stretches to full device width */
.tiktok-gif {
    display: block;
    width: 100vw;   /* Always fills the full screen width */
    height: 100vw;  /* Square - matches 320x320 ratio */
    object-fit: cover;
    border-radius: 0;
}