:root {
    --brand: #1677ff;
    --bg: #f3f5f8;
    --card: rgba(255, 255, 255, 0.92);
    --text: #111827;
    --muted: #6b7280;
    --radius: 18px;
    --line: rgba(15, 23, 42, 0.06);
    --soft-line: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        "PingFang SC",
        "Microsoft YaHei",
        Arial;
    color: var(--text);
    background:
        radial-gradient(
            circle at top,
            rgba(255, 255, 255, 0.9),
            rgba(255, 255, 255, 0) 35%
        ),
        linear-gradient(180deg, #f7f8fb 0%, #f2f4f7 100%);
}
.loading-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(247, 248, 251, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease;
}

.loading-mask.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-box {
    min-width: 112px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.04);
    display: grid;
    justify-items: center;
    gap: 10px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2.5px solid rgba(22, 119, 255, 0.18);
    border-top-color: var(--brand);
    animation: loading-spin 0.75s linear infinite;
}

.loading-text {
    font-size: 14px;
    color: #4b5563;
    font-weight: 700;
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}
.page {
    max-width: 520px;
    margin: 0 auto;
    padding: 16px;
    display: grid;
    gap: 12px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm), var(--shadow-md);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

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

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    background: #eee;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 8px 20px rgba(15, 23, 42, 0.08);
}

.app-name {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.rating-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.stars,
.score-stars,
.review-stars {
    display: flex;
    gap: 2px;
    align-items: center;
    line-height: 1;
}

.star {
    font-size: 16px;
    color: #d7dce5;
}

.star.full {
    color: #f5b50a;
}

.rating-num {
    color: var(--muted);
    font-weight: 700;
}

.actions {
    display: grid;
    gap: 10px;
}

.dual-actions,
.copy-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.dual-actions.single-col,
.copy-actions.single-col {
    grid-template-columns: 1fr !important;
}
.btn-primary,
.btn-secondary,
.btn-copy {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: none;
    overflow: hidden;
    border-radius: 999px;
    font-weight: 800;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        opacity 0.16s ease;
    text-shadow: none;
}

.btn-primary:active,
.btn-secondary:active,
.btn-copy:active {
    transform: translateY(1px) scale(0.995);
}

.btn-primary {
    width: 100%;
    padding: 16px 16px;
    background: var(--brand);
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: 17px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 10px 22px rgba(42, 97, 135, 0.24);
}

.btn-primary-alt {
    background: var(--brand);
    color: #fff;
    -webkit-text-fill-color: #fff;
    filter: brightness(0.9);
}

.copy-help {
    display: grid;
    gap: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);

    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
    overflow: hidden;
    padding: 0 12px;
    margin-top: 0;
    pointer-events: none;

    transition:
        opacity 0.28s ease,
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        max-height 0.28s ease,
        padding 0.28s ease,
        margin 0.28s ease;
}

.copy-help.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 160px;
    padding: 12px;
    margin-top: 2px;
    pointer-events: auto;
}

.copy-tip {
    font-size: 13px;
    color: var(--muted);
}

.btn-copy {
    width: 100%;
    padding: 12px 14px;
    background: linear-gradient(180deg, #f4f5f7, #e9edf2);
    color: #4b5563;
    font-size: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 4px 10px rgba(15, 23, 42, 0.04);
}

.badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef3fb;
    color: var(--brand);
    border: 1px solid #d7e2f2;
    font-weight: 700;
    font-size: 13px;
}

@supports (background: color-mix(in srgb, white, black)) {
    .badge {
        background: color-mix(in srgb, var(--brand) 10%, white);
        border: 1px solid color-mix(in srgb, var(--brand) 14%, white);
    }
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.stat-icon {
    font-size: 18px;
}

.stat-value {
    font-size: 20px;
    font-weight: 900;
    margin-top: 6px;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.desc-title {
    font-weight: 900;
}

.desc-text {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.score {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.score-big {
    font-size: 48px;
    font-weight: 950;
    letter-spacing: -0.5px;
}

.score-sub {
    color: var(--muted);
    margin-top: 8px;
    font-size: 13px;
}

.score-right {
    width: 100%;
}

.bar-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 7px 0;
}

.bar-star {
    color: var(--muted);
    font-size: 12px;
    text-align: left;
}

.bar-track {
    width: 100%;
    height: 10px;
    background: #e9edf3;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.bar-fill {
    display: block;
    height: 100%;
    background: var(--brand);
    border-radius: 999px;
}

@supports (background: color-mix(in srgb, white, black)) {
    .bar-fill {
        background: linear-gradient(
            90deg,
            color-mix(in srgb, var(--brand) 82%, white),
            var(--brand)
        );
    }
}

.section-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 900;
}

.review {
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfcfd, #f5f7fa);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.review + .review {
    margin-top: 10px;
}

.review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-user {
    font-weight: 900;
}

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

.review-stars {
    margin: 6px 0;
}

.review-text {
    margin: 0;
    color: #111;
    line-height: 1.5;
}

.kv {
    display: grid;
    gap: 10px;
}

.kv-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    align-items: center;
}

.kv-k {
    color: var(--brand);
    font-weight: 900;
}

.kv-v {
    color: #111;
}

.disclaimer {
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.06);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bottom-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bottom-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: cover;
    background: #eee;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 6px 14px rgba(15, 23, 42, 0.08);
}

.bottom-name {
    font-weight: 950;
    font-size: 16px;
}

.bottom-tip {
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}

.btn-secondary {
    flex-shrink: 0;
    padding: 13px 18px;
    font-size: 15px;
    background: var(--brand);
    color: #fff;
    -webkit-text-fill-color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 8px 18px rgba(42, 97, 135, 0.24);
}

@media (max-width: 480px) {
    .score {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .bottom-bar {
        padding: 14px 14px;
    }

    .bottom-icon {
        width: 42px;
        height: 42px;
    }

    .bottom-name {
        font-size: 15px;
    }

    .bottom-tip {
        font-size: 12px;
    }
}
.single-download {
    width: 100%;
}

.is-hidden {
    display: none !important;
}

#copyTip {
    color: red;
}

.btn-primary,
.btn-primary-alt,
.btn-secondary {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.btn-primary *,
.btn-primary-alt *,
.btn-secondary * {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

@supports (background: color-mix(in srgb, white, black)) {
    .btn-primary {
        background: linear-gradient(
            180deg,
            color-mix(in srgb, var(--brand) 82%, white),
            var(--brand)
        );
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.22),
            0 10px 22px color-mix(in srgb, var(--brand) 24%, transparent);
    }

    .btn-primary-alt {
        background: linear-gradient(
            180deg,
            color-mix(in srgb, var(--brand) 68%, white),
            color-mix(in srgb, var(--brand) 88%, #0f172a)
        );
    }

    .btn-secondary {
        background: linear-gradient(
            180deg,
            color-mix(in srgb, var(--brand) 82%, white),
            var(--brand)
        );
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.28),
            0 8px 18px color-mix(in srgb, var(--brand) 24%, transparent);
    }
}
