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

:root {
    --bg: #0d0f1a;
    --card-bg: #161829;
    --card-border: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #8b8fa3;
    --text-muted: #6b7089;
    --accent: #f5c518;
    --accent-hover: #ffd740;
    --star: #f5c518;
    --divider: rgba(255, 255, 255, 0.08);
    --privacy-bg: #1c1e30;
    --radius: 14px;
    --radius-sm: 10px;
}

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

body {
    font-family: 'Noto Sans TC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #000;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.header__back:active {
    background: rgba(255, 255, 255, 0.08);
}

.header__title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.header__spacer {
    width: 40px;
}

/* Main */
.main {
    padding: 12px 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 18px 16px;
    border: 1px solid var(--card-border);
}

.card__title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.card__text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* App Hero */
.app-hero {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.app-hero__top {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.app-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.app-hero__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.app-hero__body > * {
    flex-shrink: 0;
    position: relative;
}

.app-hero__name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.4;
    margin: 0;
}

.app-hero__dev {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.app-hero__badge {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

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

.card__text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.info-item dd strong {
    font-weight: 600;
}

/* Install Button */
.install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 7px 16px;
    margin: 4px 0 0;
    flex-shrink: 0;
    background: var(--accent);
    color: #1a1a1a;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.2s;
    letter-spacing: -0.01em;
}

.install-btn:active {
    background: var(--accent-hover);
    opacity: 0.92;
}

/* Stats Row */
.stats-row {
    display: flex;
    border-top: 1px solid var(--divider);
    padding-top: 16px;
}

.stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 6px;
    position: relative;
}

.stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: var(--divider);
}

.stat__value {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat__label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.3;
}

.stat__stars {
    display: flex;
    gap: 1px;
    margin-top: 4px;
}

.star {
    width: 10px;
    height: 10px;
    position: relative;
}

.star::before {
    content: '★';
    font-size: 10px;
    line-height: 1;
    color: var(--star);
}

.star--half::before {
    background: linear-gradient(90deg, var(--star) 50%, rgba(255, 255, 255, 0.15) 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Score Card */
.score-card {
    position: relative;
}

.score-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px 16px;
    align-items: center;
}

.score-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-big {
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.score-max {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
}

.score-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bar-label {
    font-size: 11px;
    color: var(--text-muted);
    width: 8px;
    text-align: right;
    flex-shrink: 0;
}

.bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--text-secondary);
    border-radius: 3px;
    min-width: 2px;
}

.score-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.score-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
}

.score-ratings {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Privacy Box */
.privacy-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--privacy-bg);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 14px;
}

.privacy-box__icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.privacy-box__content strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.privacy-box__content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--divider);
}

.info-item:first-child {
    padding-top: 0;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-item dt {
    font-size: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.info-item dd {
    font-size: 14px;
    color: var(--text-primary);
    text-align: right;
    max-width: 65%;
    line-height: 1.45;
}

/* Responsive tweaks */
@media (max-width: 360px) {
    .app-hero__top {
        gap: 10px;
    }

    .app-icon {
        width: 64px;
        height: 64px;
    }

    .app-hero__body {
        gap: 6px;
    }

    .app-hero__name {
        font-size: 15px;
    }

    .install-btn {
        padding: 3px 9px;
        font-size: 12px;
    }

    .stat__value {
        font-size: 17px;
    }

    .stat__label {
        font-size: 10px;
    }
}

@media (min-width: 481px) {
    .page {
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
    }
}
