/* ===== 基礎 & 背景 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #4611a1 0%, #6b2c91 25%, #f0a8d0 50%, #6b2c91 70%, #4611a1 100%);
    background-attachment: fixed;
    font-family: -apple-system, 'PingFang TC', 'Noto Sans TC', Arial, sans-serif;
    color: #fff;
    padding-bottom: 60px;
    overflow-x: hidden;
}

/* ===== 毛玻璃卡片 ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.25);
}

/* ===== 頁面容器 ===== */
.page-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ===== App 資訊卡 ===== */
.app-card {
    padding: 24px 20px 20px;
    margin-bottom: 16px;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.app-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.app-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.app-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.stars-inline {
    color: #fbcc5b;
    font-size: 13px;
    letter-spacing: 1px;
}

/* ===== 下載按鈕 ===== */
.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff5c1 0%, #fbcc5b 100%);
    color: #4611a1;
    border: none;
    border-radius: 50px;
    padding: 13px 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(251, 204, 91, 0.4);
    width: 100%;
    margin-top: 18px;
}

.btn-download:hover, .btn-download:active {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(251, 204, 91, 0.5);
    color: #4611a1;
}

.btn-download i {
    font-size: 18px;
}

/* ===== 評分卡 ===== */
.rating-card {
    padding: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.rating-big {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.rating-max {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

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

.star-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}

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

.star-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbcc5b, #f0a8d0);
    border-radius: 3px;
    transition: width 1s ease;
}

.rating-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 10px;
}

/* ===== 資訊卡 ===== */
.info-card {
    padding: 20px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
}

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

.info-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.info-value {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* ===== 免責聲明 ===== */
.disclaimer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
    text-align: center;
    padding: 16px 0 0;
}

/* ===== 瀏覽器提示遮罩 ===== */
#browserTip {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#browserTip img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
}

/* ===== 安裝引導 Modal ===== */
.modal-content {
    background: rgba(60, 20, 120, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 18px 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.btn-close {
    filter: invert(1) brightness(2);
    opacity: 0.7;
}

.modal-body {
    padding: 24px 20px;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-step:last-child {
    border-bottom: none;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbcc5b, #f0a530);
    color: #4611a1;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(251, 204, 91, 0.4);
}

.step-text {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    padding-top: 6px;
}

.step-text strong {
    color: #fbcc5b;
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 16px 20px;
}

.btn-guide-confirm {
    width: 100%;
    background: linear-gradient(135deg, #a477e5 0%, #6b2c91 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-guide-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(164, 119, 229, 0.4);
}

/* ===== 淡入動畫 ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.glass-card {
    animation: fadeInUp 0.5s ease both;
}

.glass-card:nth-child(1) { animation-delay: 0.05s; }
.glass-card:nth-child(2) { animation-delay: 0.15s; }
.glass-card:nth-child(3) { animation-delay: 0.25s; }
