/**
 * PlayStore Modern Pro - Theme Stylesheet
 * 100% Responsive, High Performance, Dark/Light Mode
 */

:root {
    --ps-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ps-primary: #01875f;
    --ps-primary-hover: #00704f;
    --ps-bg: #f8fafc;
    --ps-card: #ffffff;
    --ps-border: #e2e8f0;
    --ps-text: #0f172a;
    --ps-text-secondary: #475569;
    --ps-text-muted: #64748b;
    --ps-star: #f59e0b;
    --ps-radius: 16px;
    --ps-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --ps-shadow-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] {
    --ps-bg: #0f172a;
    --ps-card: #1e293b;
    --ps-border: #334155;
    --ps-text: #f8fafc;
    --ps-text-secondary: #cbd5e1;
    --ps-text-muted: #94a3b8;
    --ps-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --ps-shadow-hover: 0 12px 30px -4px rgba(0, 0, 0, 0.6);
}

/* Base Reset & Zero-Overflow Constraint */
html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--ps-font);
    background-color: var(--ps-bg);
    color: var(--ps-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    min-height: 100vh;
}

.ps-site-wrapper {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
}

img, video, iframe, embed, object, svg {
    max-width: 100%;
    height: auto;
}

img {
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: transparent;
}

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

/* =========================================================================
   Header & Navbar
   ========================================================================= */
.ps-header {
    background: var(--ps-card);
    border-bottom: 1px solid var(--ps-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.2s ease;
}

.ps-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 20px;
}

.ps-brand {
    flex-shrink: 1;
    min-width: 0;
    max-width: calc(100% - 90px);
}

.ps-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.ps-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--ps-text);
    letter-spacing: -0.5px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* Search Bar */
.ps-search-wrap {
    flex-grow: 1;
    max-width: 580px;
    position: relative;
}

.ps-search-form {
    display: flex;
    align-items: center;
    background: var(--ps-bg);
    border: 1px solid var(--ps-border);
    border-radius: 30px;
    padding: 4px 6px 4px 16px;
    transition: all 0.2s;
}

.ps-search-form:focus-within {
    border-color: var(--ps-primary);
    box-shadow: 0 0 0 3px rgba(1, 135, 95, 0.15);
}

.ps-search-icon {
    display: flex;
    align-items: center;
    color: var(--ps-text-muted);
    margin-right: 10px;
}

.ps-search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--ps-text);
    padding: 8px 0;
}

.ps-search-submit {
    background: var(--ps-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 20px;
    transition: background 0.2s;
}

.ps-search-submit:hover {
    background: var(--ps-primary-hover);
}

.ps-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 1001;
}

.ps-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ps-border);
    transition: background 0.15s;
}

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

.ps-search-item:hover {
    background: var(--ps-bg);
}

.ps-search-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.ps-search-item-info {
    flex-grow: 1;
    min-width: 0;
}

.ps-search-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ps-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-search-item-sub {
    font-size: 12px;
    color: var(--ps-text-muted);
}

/* Header Actions */
.ps-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ps-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ps-text-secondary);
    background: var(--ps-bg);
    border: 1px solid var(--ps-border);
    transition: all 0.2s;
}

.ps-btn-icon:hover {
    color: var(--ps-primary);
    border-color: var(--ps-primary);
}

.ps-mobile-only {
    display: none;
}

/* Category Pill Navigation Bar */
.ps-category-bar {
    background: var(--ps-card);
    border-top: 1px solid var(--ps-border);
    padding: 10px 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.ps-cat-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ps-cat-scroll::-webkit-scrollbar {
    display: none;
}

.ps-cat-link {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--ps-bg);
    color: var(--ps-text-secondary);
    border: 1px solid var(--ps-border);
    transition: all 0.2s;
}

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

/* Mobile Drawer */
.ps-mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--ps-card);
    box-shadow: 10px 0 30px rgba(0,0,0,0.2);
    z-index: 99999;
    padding: 24px;
    flex-direction: column;
}

.ps-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 800;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ps-border);
    margin-bottom: 20px;
}

.ps-drawer-close {
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.ps-drawer-links a {
    display: block;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ps-text);
    border-bottom: 1px solid var(--ps-border);
}

/* =========================================================================
   Hero Banner on Homepage
   ========================================================================= */
.ps-home-hero {
    background: linear-gradient(135deg, rgba(1, 135, 95, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-bottom: 1px solid var(--ps-border);
    padding: 48px 0;
    text-align: center;
}

.ps-hero-badge {
    display: inline-block;
    background: rgba(1, 135, 95, 0.12);
    color: var(--ps-primary);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.ps-home-hero-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.ps-home-hero-subtitle {
    font-size: 16px;
    color: var(--ps-text-muted);
    max-width: 640px;
    margin: 0 auto 20px auto;
}

.ps-hero-features-chips {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ps-chip {
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    color: var(--ps-text-secondary);
}

/* =========================================================================
   Layout Grid & Catalog Cards
   ========================================================================= */
.ps-layout-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
    padding: 40px 0;
}

.ps-layout-wrapper > * {
    min-width: 0;
}

.ps-section-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ps-bar-title {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ps-bar-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--ps-text-muted);
}

.ps-apps-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.ps-catalog-card {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    padding: 16px;
    box-shadow: var(--ps-shadow);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ps-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ps-shadow-hover);
    border-color: rgba(1, 135, 95, 0.3);
}

.ps-catalog-top {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.ps-icon-frame {
    flex-shrink: 0;
}

.ps-catalog-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.ps-catalog-meta {
    flex-grow: 1;
    min-width: 0;
}

.ps-catalog-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--ps-primary);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.ps-catalog-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ps-text);
    margin: 0 0 4px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-catalog-dev {
    font-size: 12px;
    color: var(--ps-text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-catalog-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--ps-text-muted);
    padding: 10px 0;
    border-top: 1px solid var(--ps-border);
}

.ps-catalog-rating {
    color: var(--ps-star);
    font-weight: 700;
}

.ps-catalog-action {
    margin-top: 10px;
}

.ps-btn-download-trigger {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ps-primary);
    color: #fff;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s;
}

.ps-btn-download-trigger:hover {
    background: var(--ps-primary-hover);
    transform: translateY(-1px);
}

/* =========================================================================
   Sidebar & Widgets
   ========================================================================= */
.ps-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ps-widget {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    padding: 22px;
    box-shadow: var(--ps-shadow);
}

.ps-widget-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ps-border);
}

.ps-widget-apps-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ps-mini-app-item {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.15s;
}

.ps-mini-app-item:hover {
    transform: translateX(4px);
}

.ps-mini-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.ps-mini-app-info {
    flex-grow: 1;
    min-width: 0;
}

.ps-mini-app-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ps-text);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-mini-app-meta {
    font-size: 12px;
    color: var(--ps-text-muted);
    display: flex;
    gap: 6px;
}

.ps-rating-star {
    color: var(--ps-star);
    font-weight: 700;
}

.ps-genre-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ps-genre-chip {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 14px;
    background: var(--ps-bg);
    border: 1px solid var(--ps-border);
    color: var(--ps-text-secondary);
    transition: all 0.15s;
}

.ps-genre-chip:hover {
    background: var(--ps-primary);
    color: #fff;
    border-color: var(--ps-primary);
}

.ps-widget-highlight {
    background: linear-gradient(135deg, rgba(1, 135, 95, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border-color: rgba(1, 135, 95, 0.2);
}

/* Quick DL Widget */
.ps-quick-dl-widget {
    text-align: center;
    padding: 10px 0;
}

.ps-widget-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    margin: 0 auto 10px auto;
}

.ps-widget-app-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 4px 0;
}

.ps-widget-ver {
    font-size: 12px;
    color: var(--ps-text-muted);
    display: block;
    margin-bottom: 14px;
}

.ps-btn-full {
    width: 100%;
}

.ps-safety-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--ps-text-secondary);
}

.ps-check {
    color: #10b981;
    font-weight: 800;
    margin-right: 6px;
}

/* =========================================================================
   Breadcrumbs & Single App Template
   ========================================================================= */
.ps-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ps-text-muted);
    padding: 18px 0;
}

.ps-bc-sep {
    opacity: 0.5;
}

.ps-bc-current {
    color: var(--ps-text);
    font-weight: 600;
}

.ps-single-layout,
.ps-layout-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
    padding: 24px 0 60px 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.ps-single-article,
.ps-primary-col {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}

.ps-sidebar-col {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* =========================================================================
   Single App Hero Showcase Card
   ========================================================================= */
.ps-hero-container {
    margin: 0 0 32px 0;
}

.ps-hero-card {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    padding: 28px;
    box-shadow: var(--ps-shadow);
    display: flex;
    gap: 26px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.ps-hero-icon-wrap {
    flex-shrink: 0;
    position: relative;
}

.ps-hero-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: block;
    background: var(--ps-bg);
}

.ps-badge-version {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.2);
}

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

.ps-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ps-pill {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.ps-pill-cat {
    background: rgba(1, 135, 95, 0.1);
    color: var(--ps-primary);
}

.ps-pill-verified {
    background: #dcfce7;
    color: #15803d;
}

.ps-pill-free {
    background: #fef3c7;
    color: #b45309;
}

.ps-hero-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 6px 0;
    color: var(--ps-text);
    word-break: break-word;
}

.ps-hero-dev {
    font-size: 14px;
    color: var(--ps-text-muted);
    margin-bottom: 18px;
}

.ps-hero-dev strong {
    color: var(--ps-primary);
}

/* Stats Row - Clean Flex Wrap with Badges */
.ps-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--ps-bg);
    border: 1px solid var(--ps-border);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 22px;
}

.ps-stat-item {
    flex: 1 1 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding: 6px 8px;
    border-right: 1px solid var(--ps-border);
    min-width: 95px;
}

.ps-stat-item:last-child {
    border-right: none;
}

.ps-rating-score {
    font-size: 16px;
    font-weight: 800;
    color: #f59e0b;
}

.ps-stat-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--ps-text);
    white-space: nowrap;
}

.ps-stat-sub {
    font-size: 11px;
    color: var(--ps-text-muted);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Hero Actions & Buttons */
.ps-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ps-btn-download-hero {
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ps-primary) 0%, #059669 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(1, 135, 95, 0.35);
    text-decoration: none;
    transition: all 0.2s ease;
}

.ps-btn-download-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 135, 95, 0.45);
    color: #ffffff !important;
}

.ps-btn-download-hero span {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.ps-btn-download-hero small {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
}

.ps-btn-download-hero strong {
    font-size: 16px;
    font-weight: 800;
}

.ps-btn-playstore {
    background: var(--ps-bg);
    color: var(--ps-text) !important;
    border: 1px solid var(--ps-border);
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.ps-btn-playstore:hover {
    border-color: var(--ps-text-muted);
    background: var(--ps-card);
}

/* =========================================================================
   Screenshots Carousel
   ========================================================================= */
.ps-screenshots-section {
    margin: 32px 0;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}

.ps-section-heading {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--ps-text);
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-word;
    max-width: 100%;
}

.ps-screenshots-carousel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

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

.ps-screenshots-carousel::-webkit-scrollbar-thumb {
    background: var(--ps-border);
    border-radius: 10px;
}

.ps-screenshots-track {
    display: flex;
    gap: 14px;
    width: max-content;
}

.ps-screenshot-item {
    flex: 0 0 auto;
    width: 190px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--ps-border);
    background: var(--ps-bg);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ps-screenshot-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.ps-screenshot-img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block;
}

/* =========================================================================
   Technical Specs Section
   ========================================================================= */
.ps-specs-section {
    margin: 36px 0;
    width: 100%;
    max-width: 100%;
}

.ps-specs-card {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    padding: 24px;
    box-shadow: var(--ps-shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.ps-specs-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 24px;
    width: 100%;
    max-width: 100%;
}

.ps-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--ps-border);
    font-size: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ps-spec-label {
    color: var(--ps-text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.ps-spec-val {
    color: var(--ps-text);
    font-weight: 700;
    text-align: right;
    min-width: 0;
    max-width: 65%;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.ps-spec-val code {
    background: var(--ps-bg);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--ps-primary);
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
    display: inline-block;
    max-width: 100%;
}
}

/* Download CTA Banner Box */
.ps-download-cta-box {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(1, 135, 95, 0.08) 0%, rgba(5, 150, 105, 0.04) 100%);
    border: 1px solid rgba(1, 135, 95, 0.2);
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.ps-cta-text h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: var(--ps-text);
}

.ps-cta-text p {
    font-size: 13px;
    color: var(--ps-text-muted);
    margin: 0;
}

/* =========================================================================
   Sidebar Widgets (Single Page)
   ========================================================================= */
.ps-widget {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    padding: 24px;
    box-shadow: var(--ps-shadow);
}

.ps-widget-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ps-border);
    color: var(--ps-text);
}

.ps-quick-dl-widget {
    text-align: center;
}

.ps-widget-app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    margin: 0 auto 12px auto;
    display: block;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.ps-widget-app-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: var(--ps-text);
}

.ps-widget-ver {
    font-size: 13px;
    color: var(--ps-text-muted);
    display: block;
}

.ps-mt-10 {
    margin-top: 14px;
}

.ps-btn-full {
    width: 100%;
}

.ps-safety-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ps-safety-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ps-text);
}

.ps-safety-item .ps-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    flex-shrink: 0;
}

/* =========================================================================
   LightBox & Download Modal
   ========================================================================= */
.ps-lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ps-lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.ps-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    font-weight: bold;
}

.ps-dl-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ps-dl-modal-box {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}

.ps-dl-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 24px;
    cursor: pointer;
    color: var(--ps-text-muted);
}

.ps-dl-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e6f7f1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.ps-dl-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.ps-dl-status {
    font-size: 14px;
    color: var(--ps-text-muted);
    margin-bottom: 20px;
}

.ps-dl-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--ps-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ps-dl-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--ps-primary);
    transition: width 1s linear;
}

.ps-dl-meta-badge {
    font-size: 12px;
    color: var(--ps-text-muted);
    margin-bottom: 20px;
}

.ps-dl-fallback-area {
    padding-top: 16px;
    border-top: 1px solid var(--ps-border);
    font-size: 13px;
    color: var(--ps-text-muted);
}

/* =========================================================================
   Mobile Sticky Download Bar
   ========================================================================= */
.ps-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ps-card);
    border-top: 1px solid var(--ps-border);
    padding: 10px 16px;
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    display: none;
}

.ps-sticky-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin: 0 auto;
    gap: 12px;
}

.ps-sticky-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.ps-sticky-info {
    flex-grow: 1;
    min-width: 0;
}

.ps-sticky-title {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-sticky-ver {
    font-size: 11px;
    color: var(--ps-text-muted);
    display: block;
}

.ps-btn-sticky {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    background: var(--ps-primary);
    color: #fff !important;
    border-radius: 10px;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}

.ps-article-body {
    line-height: 1.8;
    font-size: 16px;
    color: var(--ps-text);
    margin: 36px 0;
}

.ps-article-body h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 36px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ps-border);
    color: var(--ps-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ps-article-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 24px 0 12px 0;
    color: var(--ps-text);
}

.ps-article-body p {
    margin-bottom: 16px;
    line-height: 1.8;
    font-size: 15px;
}

/* 1. Article Overview Box */
.ps-article-overview {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    padding: 24px 28px;
    margin-bottom: 32px;
    box-shadow: var(--ps-shadow);
}

.ps-article-overview p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ps-text);
    margin-bottom: 14px;
}

.ps-article-overview p:last-child {
    margin-bottom: 0;
}

/* 2. Google Trends Spotlight Banner */
.ps-trends-spotlight-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 16px;
    padding: 22px 26px;
    margin: 24px 0 32px 0;
    position: relative;
}

.ps-trends-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.ps-trends-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: var(--ps-text);
}

.ps-trends-spotlight-box p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ps-text);
    margin: 0;
}

/* 3. Key Features Grid & Cards */
.ps-article-features {
    margin: 36px 0;
}

.ps-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 18px;
    width: 100%;
    max-width: 100%;
}

.ps-feature-card {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--ps-shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ps-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ps-shadow-hover);
    border-color: rgba(1, 135, 95, 0.4);
}

.ps-feature-title {
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: var(--ps-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-word;
}

.ps-feature-title::before {
    content: "⚡";
    font-size: 13px;
    flex-shrink: 0;
}

.ps-feature-desc {
    font-size: 13px;
    color: var(--ps-text-muted);
    line-height: 1.6;
    margin: 0;
    word-break: break-word;
}

/* 4. Pros & Cons Comparison Cards */
.ps-pros-cons-wrap {
    margin: 36px 0;
    width: 100%;
    max-width: 100%;
}

.ps-pros-cons-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    margin-top: 18px;
    width: 100%;
    max-width: 100%;
}

.ps-box {
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--ps-shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    word-break: break-word;
}

.ps-pros-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.ps-cons-box {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.ps-box-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ps-pros-box .ps-box-title {
    color: #059669;
}

.ps-cons-box .ps-box-title {
    color: #dc2626;
}

.ps-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ps-box ul li {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    position: relative;
    padding-left: 24px;
    color: var(--ps-text);
}

.ps-box ul li:last-child {
    margin-bottom: 0;
}

.ps-pros-box ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 900;
    color: #10b981;
}

.ps-cons-box ul li::before {
    content: "✕";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 900;
    color: #ef4444;
}

/* 5. How to Install Guide */
.ps-install-guide {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    padding: 24px 28px;
    margin: 36px 0;
    box-shadow: var(--ps-shadow);
}

.ps-steps-list {
    margin: 18px 0 0 0;
    padding: 0;
    list-style: none;
    counter-reset: ps-step-counter;
}

.ps-steps-list li {
    counter-increment: ps-step-counter;
    position: relative;
    padding-left: 44px;
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ps-text);
}

.ps-steps-list li:last-child {
    margin-bottom: 0;
}

.ps-steps-list li::before {
    content: counter(ps-step-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ps-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(1, 135, 95, 0.3);
}

/* 6. FAQ Section */
.ps-faq-wrap {
    margin: 36px 0;
}

.ps-faq-item {
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 16px 20px;
    box-shadow: var(--ps-shadow);
}

.ps-faq-q {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: var(--ps-text);
}

.ps-faq-a {
    font-size: 14px;
    color: var(--ps-text-muted);
    line-height: 1.6;
    margin: 0;
}

.ps-related-section {
    margin-top: 48px;
}

.ps-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* =========================================================================
   Footer
   ========================================================================= */
.ps-footer {
    background: var(--ps-card);
    border-top: 1px solid var(--ps-border);
    padding: 60px 0 30px 0;
    margin-top: 60px;
}

.ps-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 36px;
    margin-bottom: 40px;
}

.ps-footer-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--ps-text);
}

.ps-footer-desc {
    font-size: 14px;
    color: var(--ps-text-muted);
    line-height: 1.6;
    margin-top: 10px;
}

.ps-footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ps-footer-links a {
    font-size: 14px;
    color: var(--ps-text-muted);
    transition: color 0.15s;
}

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

.ps-safety-box {
    background: var(--ps-bg);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    padding: 16px;
}

.ps-badge-safe {
    font-size: 13px;
    font-weight: 700;
    color: #10b981;
    display: block;
    margin-bottom: 6px;
}

.ps-safety-text {
    font-size: 12px;
    color: var(--ps-text-muted);
    line-height: 1.5;
}

.ps-footer-bottom {
    border-top: 1px solid var(--ps-border);
    padding-top: 24px;
    font-size: 12px;
    color: var(--ps-text-muted);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ps-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--ps-text);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    z-index: 999;
    transition: all 0.2s;
}

.ps-back-to-top:hover {
    background: var(--ps-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* =========================================================================
   Pagination
   ========================================================================= */
.pagination, .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 20px 0;
}

.page-numbers {
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--ps-card);
    border: 1px solid var(--ps-border);
    font-size: 14px;
    font-weight: 700;
    color: var(--ps-text);
    transition: all 0.15s;
}

.page-numbers.current, .page-numbers:hover:not(.dots) {
    background: var(--ps-primary);
    color: #fff;
    border-color: var(--ps-primary);
}

/* =========================================================================
   RESPONSIVE OVERHAUL (Desktop, Tablet & Mobile Zero-Overflow System)
   ========================================================================= */

@media (max-width: 992px) {
    .ps-layout-wrapper,
    .ps-single-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        width: 100%;
        max-width: 100%;
    }

    .ps-sidebar-col {
        order: 2;
        width: 100%;
        max-width: 100%;
    }

    .ps-single-article,
    .ps-primary-col {
        order: 1;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .ps-footer-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 24px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Navbar & Brand */
    .ps-container {
        padding: 0 16px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .ps-nav-container {
        height: 60px;
        gap: 12px;
    }

    .ps-brand {
        max-width: calc(100% - 84px);
    }

    .ps-logo-text {
        font-size: 16px;
    }

    .ps-search-wrap {
        display: none;
    }

    .ps-mobile-only {
        display: inline-flex;
    }

    /* Category Bar */
    .ps-category-bar {
        padding: 6px 0;
    }

    .ps-cat-scroll {
        padding: 0 16px;
        gap: 8px;
    }

    .ps-cat-link {
        font-size: 12px;
        padding: 5px 12px;
    }

    /* Homepage Hero */
    .ps-home-hero {
        padding: 28px 0 20px 0;
    }

    .ps-home-hero-title {
        font-size: 24px;
        line-height: 1.25;
    }

    .ps-home-hero-subtitle {
        font-size: 13px;
        padding: 0 8px;
    }

    .ps-apps-catalog-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px;
    }

    /* Single App Page: Hero Card Stacking */
    .ps-hero-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 14px;
        gap: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .ps-hero-icon-wrap {
        margin: 0 auto;
    }

    .ps-hero-icon {
        width: 96px;
        height: 96px;
        border-radius: 20px;
    }

    .ps-badges-row {
        justify-content: center;
        gap: 6px;
    }

    .ps-hero-title {
        font-size: 22px;
        line-height: 1.3;
        text-align: center;
        margin-top: 4px;
        word-break: break-word;
    }

    .ps-hero-dev {
        text-align: center;
        margin-bottom: 14px;
    }

    /* Stats: 2x2 Grid with Zero Horizontal Overflow */
    .ps-hero-stats {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        padding: 8px;
        width: 100%;
        margin-bottom: 16px;
        box-sizing: border-box;
    }

    .ps-stat-item {
        border-right: none !important;
        background: var(--ps-card);
        border: 1px solid var(--ps-border);
        border-radius: 10px;
        padding: 8px 6px;
        min-width: 0 !important;
        width: 100%;
        box-sizing: border-box;
    }

    .ps-stat-val {
        font-size: 13px;
        font-weight: 800;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ps-stat-sub {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hero Buttons: Full Width Mobile Stack */
    .ps-hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .ps-btn-download-hero,
    .ps-btn-playstore {
        width: 100% !important;
        box-sizing: border-box;
        justify-content: center;
        padding: 13px 14px;
        font-size: 14px;
    }

    /* Screenshots: Scaled for Smooth Mobile Touch Scrolling */
    .ps-screenshots-section {
        margin: 24px 0;
    }

    .ps-screenshots-carousel {
        padding-bottom: 8px;
    }

    .ps-screenshot-item {
        width: 140px;
        border-radius: 12px;
    }

    .ps-screenshot-img {
        height: 245px;
    }

    /* Technical Specs: 1-Column Mobile Layout */
    .ps-specs-card {
        padding: 16px 14px;
    }

    .ps-specs-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .ps-spec-row {
        padding: 8px 0;
        font-size: 13px;
    }

    .ps-spec-val {
        max-width: 55%;
    }

    /* Big Download CTA Banner */
    .ps-download-cta-box {
        flex-direction: column;
        text-align: center;
        padding: 18px 14px;
        gap: 14px;
    }

    .ps-download-cta-box .ps-cta-text {
        text-align: center;
    }

    .ps-download-cta-box > div:last-child {
        width: 100%;
        flex-direction: column;
        display: flex;
        gap: 10px;
    }

    .ps-download-cta-box .ps-btn {
        width: 100% !important;
        box-sizing: border-box;
        justify-content: center;
    }

    /* AI Content Sections: 1-Column Grids */
    .ps-pros-cons-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px;
    }

    .ps-features-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px;
    }

    .ps-feature-card {
        padding: 16px 14px;
    }

    .ps-box {
        padding: 16px 14px;
    }

    .ps-install-guide {
        padding: 18px 14px;
    }

    .ps-steps-list {
        padding: 16px 16px 16px 34px !important;
    }

    .ps-article-overview {
        padding: 16px 14px;
    }

    .ps-related-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px;
    }

    .ps-footer-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 24px;
    }

    /* Mobile Sticky Bar: Active and Docked */
    .ps-sticky-bar {
        display: block !important;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    body {
        padding-bottom: 68px; /* Offset for sticky bottom bar */
    }
}

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

    .ps-brand {
        max-width: calc(100% - 76px);
    }

    .ps-brand .ps-logo-text {
        font-size: 14px;
    }

    .ps-home-hero-title {
        font-size: 20px;
    }

    .ps-hero-title {
        font-size: 19px;
    }

    .ps-hero-icon {
        width: 84px;
        height: 84px;
        border-radius: 16px;
    }

    .ps-stat-val {
        font-size: 12px;
    }

    .ps-stat-sub {
        font-size: 9px;
    }

    .ps-screenshot-item {
        width: 120px;
    }

    .ps-screenshot-img {
        height: 210px;
    }

    .ps-section-heading {
        font-size: 17px;
    }

    .ps-btn-download-hero strong {
        font-size: 14px;
    }

    .ps-sticky-icon {
        width: 34px;
        height: 34px;
    }

    .ps-sticky-title {
        font-size: 11px;
    }

    .ps-btn-sticky {
        padding: 6px 10px;
        font-size: 11px;
    }
}
