/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #6366F1;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-primary: #F3F4F6;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 顶部区域 */
.header {
    text-align: center;
    padding: 40px 20px 30px;
    color: white;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.app-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-tagline {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
}

/* APP信息卡片 */
.app-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
}

.app-icon-wrapper {
    flex-shrink: 0;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.app-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.version {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: #FBBF24;
    font-size: 14px;
    letter-spacing: 2px;
}

.rating-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 检测信息 */
.detection-info {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 14px;
}

.detection-item:not(:last-child) {
    margin-bottom: 8px;
}

.detection-item .label {
    opacity: 0.8;
}

.detection-item .value {
    font-weight: 500;
}

/* 下载按钮 */
.download-btn {
    width: 100%;
    border: none;
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.download-btn.primary {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    margin-bottom: 30px;
}

.download-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.download-btn.primary:active {
    transform: translateY(0);
}

.download-btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.download-btn.secondary:hover {
    border-color: var(--primary-color);
    background: #F5F3FF;
}

.btn-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.btn-text {
    display: flex;
    flex-direction: column;
}

.btn-main-text {
    font-size: 16px;
    font-weight: 600;
}

.btn-sub-text {
    font-size: 12px;
    opacity: 0.8;
}

/* 其他下载选项 */
.other-options {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.section-title {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.store-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.store-btn:hover {
    background: #E5E7EB;
    transform: translateY(-2px);
}

.store-btn:active {
    transform: translateY(0);
}

.store-btn.recommended {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border: 2px solid var(--primary-color);
}

.store-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.store-icon.google-play {
    background: linear-gradient(135deg, #34A853 0%, #4285F4 50%, #EA4335 100%);
}

.store-icon.google-play::after {
    content: "▶";
    font-size: 16px;
}

.store-icon.huawei {
    background: linear-gradient(135deg, #FF0000 0%, #C41E3A 100%);
}

.store-icon.huawei::after {
    content: "华";
    font-size: 16px;
}

.store-icon.xiaomi {
    background: linear-gradient(135deg, #FF6700 0%, #FF8C00 100%);
}

.store-icon.xiaomi::after {
    content: "MI";
    font-size: 14px;
    font-weight: bold;
}

.store-icon.honor {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
}

.store-icon.honor::after {
    content: "荣";
    font-size: 16px;
}

.store-icon.oppo {
    background: linear-gradient(135deg, #1DA57A 0%, #108B5A 100%);
}

.store-icon.oppo::after {
    content: "O";
    font-size: 18px;
    font-weight: bold;
}

.store-icon.vivo {
    background: linear-gradient(135deg, #415FFF 0%, #3547D9 100%);
}

.store-icon.vivo::after {
    content: "v";
    font-size: 20px;
    font-weight: bold;
    font-style: italic;
}

/* 直接下载 */
.direct-download {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

/* Windows下载 */
.windows-download {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 12px;
}

/* iOS提示 */
.ios-notice {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px 24px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.notice-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ios-notice p {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
}

.ios-notice .sub {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: normal;
    margin-top: 8px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.footer-links {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* 动画 */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.detecting {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 微信遮罩层 */
.wechat-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
}

.wechat-guide {
    text-align: center;
    color: white;
    padding: 20px;
}

.guide-arrow {
    position: absolute;
    top: 10px;
    right: 20px;
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0) rotate(45deg);
    }

    50% {
        transform: translateY(-10px) rotate(45deg);
    }
}

.guide-arrow svg {
    transform: rotate(45deg);
}

.guide-content {
    margin-top: 100px;
    padding: 30px;
}

.guide-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
}

.guide-title .dots {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: bold;
    letter-spacing: 2px;
}

.guide-text {
    font-size: 20px;
    margin-bottom: 16px;
    color: #e0e0e0;
}

.guide-text strong {
    color: #4CAF50;
    font-weight: 600;
}

.guide-hint {
    font-size: 16px;
    color: #9e9e9e;
    margin-top: 30px;
}

.guide-icon {
    margin-top: 40px;
    opacity: 0.5;
}

/* 响应式 */
@media (max-width: 360px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-card {
        padding: 16px;
    }

    .app-icon {
        width: 64px;
        height: 64px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #F9FAFB;
        --text-secondary: #D1D5DB;
        --text-light: #9CA3AF;
        --bg-primary: #374151;
        --bg-card: #1F2937;
        --border-color: #4B5563;
    }

    body {
        background: linear-gradient(135deg, #1e1e2f 0%, #2d1f3d 100%);
    }

    .store-btn {
        background: #374151;
    }

    .store-btn:hover {
        background: #4B5563;
    }

    .download-btn.secondary {
        background: #374151;
        border-color: #4B5563;
        color: #F9FAFB;
    }

    .download-btn.secondary:hover {
        background: #4B5563;
        border-color: var(--primary-color);
    }
}