/* ==========================================================================
   3Patti Guru — Ultra Premium App Store Design System
   Modern, SEO-optimized, Core Web Vitals friendly, Responsive CSS
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Root Variables
   -------------------------------------------------------------------------- */
:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #fef2f2;
    --primary-glow: rgba(220, 38, 38, 0.25);
    --secondary: #ea580c;
    --accent: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;
    
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    --text: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 8px 24px -4px var(--primary-glow);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
    --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Global Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   3. Header & Navigation (Glassmorphic)
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 20px;
}

/* Brand Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text);
    white-space: nowrap;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: var(--shadow-glow);
}

.logo-text span {
    background: linear-gradient(135deg, var(--text) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 440px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    height: 42px;
    padding: 0 6px 0 16px;
    transition: var(--transition);
}

.search-input-wrap:focus-within {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-input-wrap i {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.88rem;
    padding: 0 10px;
    color: var(--text);
}

.search-input-wrap input::placeholder {
    color: var(--text-dim);
}

.search-btn {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Header Nav Menu */
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: none;
    flex-direction: column;
    z-index: 100;
    animation: fadeIn 0.15s ease-out;
}

.nav-dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-item {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    transition: var(--transition);
}

.dropdown-item i {
    width: 20px;
    color: var(--primary);
    text-align: center;
}

.dropdown-item:hover {
    background: var(--surface-alt);
    color: var(--primary);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Slide-Out Drawer */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: var(--surface);
    z-index: 1999;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(320px);
}

.mobile-nav-inner {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.mobile-drawer-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
}

.mobile-search {
    display: flex;
    margin-bottom: 10px;
}

.mobile-search input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.88rem;
    background: var(--surface-alt);
}

.mobile-search button {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0 16px;
    cursor: pointer;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    transition: var(--transition);
}

.mobile-link i {
    width: 20px;
    color: var(--primary);
    text-align: center;
}

.mobile-link:hover, .mobile-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.mobile-divider {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    margin: 14px 0 4px 10px;
}

/* --------------------------------------------------------------------------
   4. Homepage Hero Section
   -------------------------------------------------------------------------- */
.hero-spotlight {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #31102e 100%);
    border-radius: var(--radius-xl);
    padding: 48px 36px;
    color: #ffffff;
    margin: 28px 0 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-spotlight::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.6;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #fbbf24;
    margin-bottom: 16px;
    white-space: nowrap;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #ffffff;
}

.hero-desc {
    font-size: 1.05rem;
    color: #cbd5e1;
    margin-bottom: 26px;
    line-height: 1.5;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-full);
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    max-width: 540px;
    width: 100%;
}

.hero-search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 10px 18px;
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
}

.hero-search-box input::placeholder {
    color: #94a3b8;
}

.hero-search-box button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 12px 28px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-search-box button:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.hero-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.hero-tags-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
}

.hero-tag-pill {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: #f1f5f9;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.hero-tag-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Horizontal Quick Category Filter Bar (Mobile & Desktop 1-Line) */
.cat-quick-bar-wrapper {
    margin-bottom: 24px;
}

.cat-quick-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.cat-quick-bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

.cat-quick-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
}

.cat-quick-pill i {
    color: var(--primary);
    font-size: 0.9rem;
}

.cat-quick-pill:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.cat-quick-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.cat-quick-pill.active i {
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   5. Layout System (Main Content + Sticky Sidebar)
   -------------------------------------------------------------------------- */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    margin-bottom: 40px;
}

.home-main {
    min-width: 0;
}

.home-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
}

/* Section Wrapper */
.section {
    margin-bottom: 36px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.section-title i {
    color: var(--primary);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.section-badge {
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.more-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.more-link:hover {
    color: var(--primary-dark);
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   6. App Cards (Modern Grid & List Components)
   -------------------------------------------------------------------------- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 16px;
}

/* Modern Vertical Grid Card */
.app-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(220, 38, 38, 0.25);
}

.app-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    z-index: 2;
    white-space: nowrap;
}

.badge-featured {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.badge-trending {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}

.badge-editors {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #ffffff;
}

.app-card-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 10px;
    background: var(--surface-alt);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
    position: relative;
    flex-shrink: 0;
}

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

.app-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: var(--primary);
    font-size: 1.6rem;
}

.app-card-title {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.app-card-dev {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.app-card-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 0.72rem;
    color: var(--text-dim);
    white-space: nowrap;
    width: 100%;
}

.app-card-size {
    background: var(--surface-alt);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    white-space: nowrap;
}

.app-card-btn {
    width: 100%;
    padding: 7px 10px;
    background: var(--surface-alt);
    color: var(--text);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
}

.app-card:hover .app-card-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

/* Modern App List / Row Style */
.app-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.app-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.app-row:last-child {
    border-bottom: none;
}

.app-row:hover {
    background: var(--surface-alt);
}

.app-row-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface-alt);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

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

.app-row-info {
    flex: 1;
    min-width: 0;
}

.app-row-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-verified-inline {
    color: #3b82f6;
    font-size: 0.85rem;
}

.app-row-dev {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-row-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.app-row-action {
    flex-shrink: 0;
}

.app-dl-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
}

.app-row:hover .app-dl-btn {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

/* Rating Stars */
.stars {
    display: inline-flex;
    gap: 2px;
}

.stars i {
    color: #f59e0b;
    font-size: 0.75rem;
}

.stars-lg i {
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   7. Sidebar Widgets
   -------------------------------------------------------------------------- */
.sidebar-widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.widget-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--primary);
}

.widget-list {
    padding: 8px;
}

.widget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.widget-item:hover {
    background: var(--surface-alt);
}

.rank-badge {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rank-1 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #ffffff;
}

.rank-3 {
    background: linear-gradient(135deg, #b45309, #78350f);
    color: #ffffff;
}

.widget-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.widget-info {
    flex: 1;
    min-width: 0;
}

.widget-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.widget-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Categories Single-Line List Widget */
.cat-list-wrap {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cat-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    gap: 10px;
}

.cat-list-row:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(3px);
}

.cat-list-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.cat-row-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cat-list-row:hover .cat-row-icon {
    background: var(--primary);
    color: #ffffff;
}

.cat-row-name {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.cat-list-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cat-chip-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--surface);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.cat-row-arrow {
    font-size: 0.72rem;
    color: var(--text-dim);
    transition: var(--transition);
}

.cat-list-row:hover .cat-row-arrow {
    color: var(--primary);
    transform: translateX(2px);
}

/* --------------------------------------------------------------------------
   8. Single App / Game Page Styling (`app.php`)
   -------------------------------------------------------------------------- */
.app-detail-container {
    max-width: 1140px;
    margin: 30px auto 60px;
}

/* Breadcrumb Navigation */
.breadcrumbs {
    margin-bottom: 20px;
}

.breadcrumbs ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    color: var(--text-dim);
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs li[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

/* App Hero Card */
.app-hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.app-hero-main {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.app-hero-icon {
    width: 130px;
    height: 130px;
    border-radius: 28px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 3px solid var(--surface);
    background: var(--surface-alt);
}

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

.app-hero-info {
    flex: 1;
    min-width: 0;
}

.app-hero-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 6px;
}

.app-hero-dev {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
}

/* App Quick Stats */
.app-stat-pills {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.stat-pill strong {
    color: var(--text);
}

.stat-pill span {
    color: var(--text-muted);
}

/* App Download CTA Button */
.app-cta-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-download-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    border-radius: var(--radius-full);
    padding: 14px 38px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-download-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -4px var(--primary-glow);
}

.btn-download-primary i {
    font-size: 1.2rem;
}

.btn-share-alt {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-share-alt:hover {
    background: var(--surface-alt);
    color: var(--primary);
}

.safe-verified-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--success);
    font-weight: 600;
    margin-top: 10px;
}

/* Screenshots Slider */
.screenshots-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.screenshots-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.screenshots-scroll::-webkit-scrollbar {
    height: 6px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

.screenshot-thumb {
    flex-shrink: 0;
    width: 220px;
    height: 390px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    scroll-snap-align: start;
    transition: var(--transition);
}

.screenshot-thumb:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.screenshot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content Tabs */
.app-tabs-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.tab-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.tab-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.tab-btn {
    padding: 8px 18px;
    background: none;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

.tab-pane {
    display: none;
    line-height: 1.7;
    color: var(--text);
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.app-description-text {
    font-size: 0.96rem;
    color: #334155;
}

.app-description-text p {
    margin-bottom: 14px;
}

.app-description-text h2, .app-description-text h3 {
    font-family: var(--font-heading);
    margin: 20px 0 10px;
    color: var(--text);
}

/* Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.specs-table tr {
    border-bottom: 1px solid var(--border);
}

.specs-table td {
    padding: 12px 14px;
    font-size: 0.9rem;
}

.specs-table td:first-child {
    font-weight: 600;
    color: var(--text-muted);
    width: 35%;
}

.specs-table td:last-child {
    font-weight: 500;
    color: var(--text);
}

/* Installation Steps Guide */
.install-step {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content h4 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Rating Breakdown Bar */
.ratings-summary {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    padding: 20px 0;
    align-items: center;
}

.rating-score-box {
    text-align: center;
    padding: 20px;
    background: var(--surface-alt);
    border-radius: var(--radius-lg);
}

.rating-large-num {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.bar-track {
    flex: 1;
    height: 8px;
    background: var(--surface-alt);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: var(--radius-full);
}

/* Review Cards */
.reviews-list {
    margin-top: 24px;
}

.review-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.reviewer-name {
    font-weight: 700;
    font-size: 0.92rem;
}

.review-date {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.review-comment {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Review Modal / Form */
.review-form-card {
    background: var(--surface-alt);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* FAQ Accordion Component */
.faq-accordion {
    margin-top: 14px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    background: var(--surface);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq-question i {
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: transform 0.2s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    padding: 0 20px 18px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Floating Sticky Mobile Download Bar */
.sticky-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.sticky-bar-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sticky-bar-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.sticky-bar-title {
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-bar-btn {
    background: var(--primary);
    color: #ffffff;
    border-radius: var(--radius-full);
    padding: 10px 22px;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --------------------------------------------------------------------------
   9. Category & Browse / Search Page Components
   -------------------------------------------------------------------------- */
.browse-hero-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 30px;
    text-align: center;
    margin: 28px 0;
    box-shadow: var(--shadow-sm);
}

.browse-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.browse-hero-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.browse-hero-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
}

/* Filter Toolbar */
.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 18px;
    margin-bottom: 24px;
}

.filter-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-alt);
    transition: var(--transition);
}

.filter-pill:hover, .filter-pill.active {
    background: var(--primary);
    color: #ffffff;
}

.sort-select-wrap select {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.85rem;
    color: var(--text);
    outline: none;
}

/* Pagination */
.pagination-nav {
    margin: 36px 0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
    transition: var(--transition);
}

.page-link:hover, .page-link.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.page-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 40px;
    color: var(--text-dim);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.empty-state-icon {
    font-size: 3.5rem;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   10. Footer Section
   -------------------------------------------------------------------------- */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    border-top: 1px solid #1e293b;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #1e293b;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 14px;
}

.footer-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 20px;
    max-width: 360px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: #1e293b;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: #ffffff;
}

.footer-col h4 {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: #94a3b8;
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: #ffffff;
    transform: translateX(3px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    font-size: 0.82rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 14px;
}

/* Floating Back To Top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 900;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
}

/* --------------------------------------------------------------------------
   11. Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   12. Responsive Media Queries (Mobile-First Polish)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
    .home-sidebar {
        position: static;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 820px) {
    .header-nav, .header-search {
        display: none !important;
    }
    .mobile-toggle {
        display: flex;
    }
    .sticky-mobile-bar {
        display: flex;
    }
    .hero-spotlight {
        padding: 30px 20px;
        margin: 16px 0 20px;
    }
    .hero-title {
        font-size: 1.7rem;
    }
    .app-hero-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .app-hero-icon {
        width: 90px;
        height: 90px;
        border-radius: 20px;
    }
    .app-hero-dev, .app-stat-pills, .app-cta-actions {
        justify-content: center;
    }
    .ratings-summary {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 580px) {
    .container {
        padding: 0 12px;
    }

    /* Mobile Hero Styling */
    .hero-spotlight {
        padding: 20px 14px;
        margin: 10px 0 16px;
        border-radius: var(--radius-lg);
    }
    .hero-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
        margin-bottom: 8px;
    }
    .hero-title {
        font-size: 1.35rem;
        line-height: 1.25;
        margin-bottom: 6px;
    }
    .hero-desc {
        font-size: 0.82rem;
        line-height: 1.4;
        margin-bottom: 14px;
    }
    .hero-search-box {
        padding: 4px;
    }
    .hero-search-box input {
        padding: 8px 10px;
        font-size: 0.82rem;
    }
    .hero-search-box button {
        padding: 8px 14px;
        font-size: 0.8rem;
        gap: 5px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .hero-tags {
        margin-top: 12px;
        gap: 5px;
    }
    .hero-tags-label {
        font-size: 0.75rem;
    }
    .hero-tag-pill {
        font-size: 0.72rem;
        padding: 3px 9px;
    }

    /* Mobile Quick Category Bar */
    .cat-quick-bar-wrapper {
        margin-bottom: 16px;
    }
    .cat-quick-bar {
        gap: 6px;
        padding-bottom: 4px;
    }
    .cat-quick-pill {
        padding: 6px 12px;
        font-size: 0.78rem;
        gap: 5px;
    }

    /* Mobile Section Headers */
    .section {
        margin-bottom: 22px;
    }
    .section-header {
        margin-bottom: 10px;
        gap: 6px;
    }
    .section-title {
        font-size: 1.05rem;
        gap: 6px;
    }
    .section-title i {
        font-size: 0.95rem;
    }
    .section-badge {
        font-size: 0.65rem;
        padding: 1px 5px;
    }
    .more-link {
        font-size: 0.76rem;
    }

    /* Mobile App Grid - 2 Columns Tight & Clean */
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .app-card {
        padding: 10px 8px;
        border-radius: var(--radius-md);
    }
    .app-card-badge {
        top: 5px;
        left: 5px;
        font-size: 0.58rem;
        padding: 2px 5px;
    }
    .app-card-icon {
        width: 54px;
        height: 54px;
        border-radius: 13px;
        margin-bottom: 6px;
    }
    .app-card-title {
        font-size: 0.82rem;
        margin-bottom: 1px;
    }
    .app-card-dev {
        font-size: 0.68rem;
        margin-bottom: 4px;
    }
    .app-card-meta {
        font-size: 0.68rem;
        gap: 4px;
        margin-bottom: 6px;
    }
    .app-card-size {
        padding: 1px 4px;
        font-size: 0.65rem;
    }
    .app-card-btn {
        padding: 5px 8px;
        font-size: 0.74rem;
    }

    /* Mobile App Row */
    .app-row {
        padding: 10px 12px;
        gap: 10px;
    }
    .app-row-icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    .app-row-title {
        font-size: 0.88rem;
    }
    .app-row-dev {
        font-size: 0.72rem;
    }
    .app-row-meta {
        font-size: 0.7rem;
        gap: 5px;
    }
    .app-dl-btn {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
        border-radius: 8px;
    }

    /* Mobile Single App Page */
    .app-hero-card {
        padding: 16px 12px;
        border-radius: var(--radius-md);
        margin-bottom: 16px;
    }
    .app-hero-icon {
        width: 76px;
        height: 76px;
        border-radius: 18px;
        margin-bottom: 10px;
    }
    .app-hero-title {
        font-size: 1.35rem;
    }
    .app-hero-dev {
        font-size: 0.82rem;
        margin-bottom: 10px;
    }
    .app-stat-pills {
        gap: 6px;
        margin-bottom: 14px;
    }
    .stat-pill {
        padding: 4px 8px;
        font-size: 0.72rem;
    }
    .app-cta-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .btn-download-primary {
        width: 100%;
        justify-content: center;
        padding: 11px 16px;
        font-size: 0.9rem;
    }
    .btn-share-alt {
        width: 100%;
        height: 38px;
        border-radius: var(--radius-full);
    }
    .screenshots-card {
        padding: 16px 12px;
        border-radius: var(--radius-md);
    }
    .screenshot-thumb {
        width: 135px;
        height: 240px;
        border-radius: 10px;
    }
    .tab-nav {
        gap: 4px;
    }
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    .app-tabs-wrap {
        padding: 16px 12px;
        border-radius: var(--radius-md);
    }
    .filter-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 1.2rem;
    }
    .hero-search-box button span {
        display: none;
    }
    .hero-search-box button {
        padding: 8px 12px;
    }
    .app-card-icon {
        width: 48px;
        height: 48px;
    }
    .app-card-title {
        font-size: 0.78rem;
    }
}

/* ========================================================
   Content Rich Text & Code Formatting (Pages & Articles)
   ======================================================== */
.app-description-text pre {
    background: #0d1117;
    color: #58a6ff;
    padding: 16px 20px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 18px 0;
    overflow-x: auto;
    white-space: pre;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
    position: relative;
    max-width: 100%;
}

.app-description-text code {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary, #818cf8);
    padding: 3px 7px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.88em;
    border: 1px solid rgba(99, 102, 241, 0.2);
    word-break: break-word;
}

.app-description-text pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
    word-break: normal;
}

.app-description-text blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 18px;
    margin: 18px 0;
    background: var(--surface-alt);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-muted);
    font-style: italic;
}

.app-description-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    overflow-x: auto;
    display: block;
}

.app-description-text table th,
.app-description-text table td {
    border: 1px solid var(--border);
    padding: 10px 14px;
    text-align: left;
}

.app-description-text table th {
    background: var(--surface-alt);
    color: var(--text);
    font-weight: 700;
}

