/* =========================================================================
   Play Store-style landing page (independent from app.css)
   ========================================================================= */

:root {
    --ps-green: #01875f;
    --ps-green-hover: #056b4d;
    --ps-bg: #ffffff;
    --ps-surface: #f1f3f4;
    --ps-text: #202124;
    --ps-text-soft: #5f6368;
    --ps-text-dim: #80868b;
    --ps-border: #dadce0;
    --ps-star: #01875f;
    --ps-max: 720px;
    --ps-font: 'Roboto', system-ui, -apple-system, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body.play-store {
    font-family: var(--ps-font);
    background: var(--ps-bg);
    color: var(--ps-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

a { color: var(--ps-green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Top bar ---- */
.ps-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--ps-max);
    margin: 0 auto;
    padding: 14px 20px 8px;
}

.ps-topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
    color: var(--ps-text-soft);
}

.ps-play-logo { color: var(--ps-text-soft); flex-shrink: 0; }

.ps-topbar-search {
    background: none;
    border: none;
    color: var(--ps-text-soft);
    cursor: pointer;
    padding: 6px;
    display: grid;
    place-items: center;
}

.ps-page {
    max-width: var(--ps-max);
    margin: 0 auto;
    padding: 8px 20px 48px;
}

/* ---- Header ---- */
.ps-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.ps-app-icon img {
    width: 72px;
    height: 72px;
    border-radius: 20%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.ps-app-title {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--ps-text);
}

.ps-app-dev {
    font-size: 16px;
    color: var(--ps-green);
    font-weight: 500;
    margin-top: 2px;
}

.ps-app-tag {
    font-size: 13px;
    color: var(--ps-text-soft);
    margin-top: 4px;
}

.ps-protect {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--ps-text-dim);
}

.ps-protect-ico {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ps-green);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

/* ---- Stats row ---- */
.ps-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ps-stat {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 4px 8px;
}

.ps-stat-val {
    font-size: 14px;
    font-weight: 500;
    color: var(--ps-text);
}

.ps-stat-val .ps-star { color: var(--ps-star); }

.ps-stat-lbl {
    font-size: 12px;
    color: var(--ps-text-dim);
    margin-top: 2px;
}

.ps-stat-div {
    width: 1px;
    height: 24px;
    background: var(--ps-border);
    flex-shrink: 0;
}

.ps-rated {
    border: 1px solid var(--ps-text);
    border-radius: 2px;
    display: inline-block;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
}

.ps-editors { font-size: 13px; }

/* ---- Actions ---- */
.ps-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.install-hint {
    font-size: 13px;
    color: var(--ps-text-soft);
    background: var(--ps-surface);
    border: 1px dashed var(--ps-border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.install-hint ul {
    margin: 6px 0 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.install-hint-foot { margin-top: 8px; font-size: 12px; color: var(--ps-text-dim); }

.ps-install {
    flex: 1 1 100%;
    width: 100%;
    display: block;
    cursor: pointer;
    font-family: var(--ps-font);
    text-align: center;
    padding: 10px 24px;
    background: var(--ps-green);
    color: #fff !important;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    text-decoration: none !important;
    transition: background 0.2s;
}

.ps-install:hover {
    background: var(--ps-green-hover);
    text-decoration: none !important;
}

.ps-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    background: none;
    border: none;
    color: var(--ps-green) !important;
    font-family: var(--ps-font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none !important;
}

.ps-secondary:hover { text-decoration: underline !important; }

.ps-avail {
    font-size: 12px;
    color: var(--ps-text-dim);
    margin-bottom: 28px;
}

/* ---- Screenshots ---- */
.ps-screenshots {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
    margin-bottom: 28px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

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

.ps-shot {
    flex: 0 0 auto;
    scroll-snap-align: start;
    text-align: center;
}

.ps-phone {
    width: 160px;
    height: 320px;
    border-radius: 24px;
    border: 2px solid var(--ps-border);
    background: #0f172a;
    padding: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ps-mock { height: 100%; border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }

.ps-mock-dash { background: linear-gradient(180deg, #eef1fb, #e9edfb); }
.ps-mock-hero {
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(120deg, #8b5cf6, #3b82f6);
}
.ps-mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 1; }
.ps-mock-grid span {
    background: rgba(255,255,255,0.85);
    border-radius: 8px;
    min-height: 40px;
}

.ps-mock-discover { background: #f4f6ff; }
.ps-mock-card {
    height: 56px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.ps-mock-card.short { height: 36px; }

.ps-mock-portfolio { background: #fff; align-items: center; justify-content: center; }
.ps-mock-donut {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: conic-gradient(#8b5cf6 0 35%, #34d399 35% 60%, #3b82f6 60% 80%, #f59e0b 80% 100%);
    mask: radial-gradient(circle at center, transparent 55%, #000 56%);
    -webkit-mask: radial-gradient(circle at center, transparent 55%, #000 56%);
}
.ps-mock-lines { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ps-mock-lines span { height: 8px; background: var(--ps-surface); border-radius: 4px; }

.ps-shot-cap {
    display: block;
    font-size: 12px;
    color: var(--ps-text-dim);
    margin-top: 8px;
}

/* ---- Sections ---- */
.ps-section {
    padding: 24px 0;
    border-top: 1px solid var(--ps-border);
}

.ps-section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--ps-text);
}

.ps-section-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.ps-section-link svg { color: var(--ps-text-dim); flex-shrink: 0; }

.ps-body {
    font-size: 14px;
    color: var(--ps-text-soft);
    line-height: 1.6;
    margin-bottom: 16px;
}

.ps-body-sm { font-size: 13px; margin-bottom: 12px; }

.ps-features {
    font-size: 14px;
    color: var(--ps-text-soft);
    padding-left: 20px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.ps-features li { margin-bottom: 10px; }

.ps-updated {
    font-size: 12px;
    color: var(--ps-text-dim);
    margin-bottom: 14px;
}

.ps-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ps-tag {
    padding: 6px 14px;
    background: var(--ps-surface);
    border-radius: 999px;
    font-size: 13px;
    color: var(--ps-text-soft);
}

.ps-subhead {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.ps-list {
    font-size: 14px;
    color: var(--ps-text-soft);
    padding-left: 20px;
    line-height: 1.7;
}

/* ---- Data safety ---- */
.ps-safety {
    background: var(--ps-surface);
    border-radius: 12px;
    padding: 16px 18px;
}

.ps-safety-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-size: 14px;
    color: var(--ps-text-soft);
    padding: 10px 0;
    border-bottom: 1px solid var(--ps-border);
}

.ps-safety-row:last-of-type { border-bottom: none; }

.ps-safety-ico { font-size: 18px; flex-shrink: 0; }

.ps-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
}

/* ---- Ratings ---- */
.ps-ratings {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ps-rating-big { text-align: center; min-width: 100px; }

.ps-rating-num {
    font-size: 56px;
    font-weight: 400;
    line-height: 1;
    color: var(--ps-text);
}

.ps-rating-stars { color: var(--ps-star); font-size: 14px; letter-spacing: 1px; }

.ps-rating-count { font-size: 12px; color: var(--ps-text-dim); margin-top: 4px; }

.ps-bars { flex: 1; min-width: 180px; }

.ps-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ps-text-dim);
    margin-bottom: 4px;
}

.ps-bar-row span { width: 8px; text-align: right; }

.ps-bar {
    flex: 1;
    height: 10px;
    background: var(--ps-surface);
    border-radius: 4px;
    overflow: hidden;
}

.ps-bar i {
    display: block;
    height: 100%;
    background: var(--ps-green);
    border-radius: 4px;
}

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

.ps-review-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ps-review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ps-green);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 500;
}

.ps-review-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; }

.ps-review-name { font-size: 14px; font-weight: 500; }

.ps-review-date { font-size: 12px; color: var(--ps-text-dim); }

.ps-review-stars { color: var(--ps-star); font-size: 12px; }

.ps-review-text { font-size: 14px; color: var(--ps-text-soft); line-height: 1.5; margin-bottom: 10px; }

.ps-device-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.ps-device-tab {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--ps-border);
    background: var(--ps-bg);
    font-family: var(--ps-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--ps-text-soft);
    cursor: pointer;
}

.ps-device-tab.active {
    background: var(--ps-surface);
    color: var(--ps-text);
    border-color: var(--ps-text);
}

.ps-review-helpful {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--ps-text-dim);
}

.ps-helpful-btn {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--ps-border);
    background: var(--ps-bg);
    font-family: var(--ps-font);
    font-size: 12px;
    color: var(--ps-text-soft);
    cursor: pointer;
}

.ps-helpful-btn:hover { background: var(--ps-surface); }

/* ---- Footer links ---- */
.ps-footer-links {
    padding: 24px 0 16px;
    border-top: 1px solid var(--ps-border);
    margin-top: 8px;
}

.ps-footer-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.ps-footer-group a {
    font-size: 14px;
    color: var(--ps-text-soft);
    font-weight: 400;
}

.ps-footer-group a:hover { color: var(--ps-green); }

.ps-footer-label {
    font-size: 12px;
    color: var(--ps-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.ps-footer-app {
    text-align: center;
    font-size: 14px;
    color: var(--ps-text-dim);
    padding-top: 16px;
    border-top: 1px solid var(--ps-border);
}

.ps-footer-app a { color: var(--ps-green); font-weight: 500; }
.ps-footer-app span { margin: 0 8px; }

/* ---- Bottom nav ---- */
.ps-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--ps-bg);
    border-top: 1px solid var(--ps-border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    max-width: var(--ps-max);
    margin: 0 auto;
}

@media (min-width: 721px) {
    .ps-bottom-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: var(--ps-max);
        border-left: 1px solid var(--ps-border);
        border-right: 1px solid var(--ps-border);
    }
}

.ps-bnav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 500;
    color: var(--ps-text-dim);
    text-decoration: none !important;
    padding: 4px 6px;
    flex: 1;
}

.ps-bnav:hover { text-decoration: none !important; }

.ps-bnav-ico { font-size: 20px; line-height: 1; }

.ps-bnav.active { color: var(--ps-green); }

@media (min-width: 600px) {
    .ps-page { padding: 8px 24px 64px; }
    .ps-topbar { padding: 16px 24px 8px; }
    .ps-app-title { font-size: 28px; }
    .ps-phone { width: 180px; height: 360px; }
}
