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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
    position: relative;
    overflow: hidden;
}



/* 中等屏幕适配 (平板等) */
@media (max-width: 768px) and (min-width: 481px) {
    .alternative-links {
        gap: 8px;
    }

    .alt-download-btn {
        font-size: 15px;
        padding: 12px 18px;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .debug-modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .debug-modal-header {
        padding: 15px;
    }

    .debug-modal-body {
        padding: 15px;
    }

    .debug-info {
        font-size: 11px;
        padding: 10px;
    }
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e53e3e, #c53030, #f56565);
    background-size: 200% 100%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.app-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border-radius: 28px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    box-shadow: 0 10px 30px rgba(229, 62, 62, 0.3);
    position: relative;
    overflow: hidden;
}

.app-icon .logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 16px;
}

.app-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }

    50% {
        transform: translateX(0%) translateY(0%);
    }

    100% {
        transform: translateX(100%) translateY(100%);
    }
}

.app-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}



.download-section {
    margin-bottom: 28px;
}

.download-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.4);
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(229, 62, 62, 0.6);
}

.download-btn:active {
    transform: translateY(0);
}

/* App Store 预览图片样式 */
.app-preview-image {
    text-align: center;
    margin-bottom: 24px;
}

.preview-screenshot {
    width:100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.preview-screenshot:hover {
    transform: scale(1.02);
}

/* 应用商店格子布局样式 */
.store-grid-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.store-item {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.store-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #e53e3e;
}

.store-item:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.store-icon {
    font-size: 32px;
    margin-bottom: 8px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.store-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

/* 各应用商店特色样式 */
.xiaomi-icon {
    color: #ff6900;
}

.oppo-icon {
    color: #1ba784;
}

.vivo-icon {
    color: #4285f4;
}

.honor-icon {
    color: #0070f3;
}

/* 其他下载方式 */
.alternative-download {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.alt-title {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 12px;
}

.alt-download-btn {
    width: 100%;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alt-download-btn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4043 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.alt-download-btn:active {
    transform: translateY(0);
}

/* 移动端适配 */
@media (max-width: 480px) {
    .store-grid {
        gap: 12px;
    }

    .store-item {
        padding: 16px 12px;
    }

    .store-icon {
        font-size: 28px;
        height: 36px;
    }

    .store-name {
        font-size: 13px;
    }

    .store-desc {
        font-size: 11px;
    }

    .store-grid-title {
        font-size: 16px;
        margin-bottom: 16px;
    }
}



.alternative-links {
    margin-top: 20px;
    display: flex;
    gap: 6px;
    justify-content: center;
}



.loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}



/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 20px 0 20px;
}

.modal-body {
    padding: 20px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 自定义弹窗样式 */
.custom-alert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: all 0.3s ease;
}

.custom-alert-modal.show {
    opacity: 1;
}

.custom-alert-content {
    background: white;
    border-radius: 20px;
    padding: 32px 24px 24px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-alert-modal.show .custom-alert-content {
    transform: translateY(0) scale(1);
}

.custom-alert-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.custom-alert-message {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 24px;
    font-weight: 500;
}

.custom-alert-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.custom-alert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

.custom-alert-btn:active {
    transform: translateY(0);
}

/* 华为手机提示样式 */
.huawei-tip {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 16px;
    text-align: center;
}

.huawei-tip-text {
    font-size: 13px;
    color: #856404;
    line-height: 1.4;
    margin: 0;
}

.huawei-tip-link {
    color: #e53e3e;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.huawei-tip-link:hover {
    color: #c53030;
}

/* 华为指导弹窗样式 */
.huawei-guide-content {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    /* 与主视图容器保持一致 */
    width: 90%;
    /* 与主视图容器保持一致 */
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.huawei-guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

.huawei-guide-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.huawei-guide-body {
    padding: 20px 40px 40px;
    /* 减少顶部内边距，整体内容向上移动 */
}

.guide-steps-container {
    display: flex;
    transition: transform 0.3s ease;
    margin-top: -20px;
    /* 轮播图容器向上移动 */
}

.guide-step {
    min-width: 100%;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.guide-step.active {
    opacity: 1;
}

.step-content {
    text-align: center;
    max-width: 300px;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    gap: 8px;
    /* 缩小step-text与step-image之间的间距 */
}

.step-text {
    flex-shrink: 0;
}

.step-image {
    width: 160px;
    height: 332px;
    /* 根据722×1496宽高比计算：160 * (1496/722) ≈ 332 */
    background: #f8f9fa;
    border-radius: 12px;
    margin: 0 auto;
    /* 去掉上边距，使用gap控制间距 */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
    flex-shrink: 0;
}

.step-number {
    display: none;
    /* 隐藏步骤序号 */
}

.step-content h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.step-content p {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 保持宽高比，完整显示图片 */
    border-radius: 8px;
}

.guide-navigation {
    padding: 20px 24px;
    background: transparent;
    /* 去掉灰色背景 */
    border-top: none;
    /* 去掉顶部边框 */
}

.nav-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-dot.active {
    background: #f97316;
    transform: scale(1.2);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.nav-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prev-btn {
    background: #f1f3f4;
    color: #666;
}

.prev-btn:hover:not(:disabled) {
    background: #e8eaed;
}

.prev-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.next-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
}

.next-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.version-history-section {
    margin-top: 28px;
    text-align: left;
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px;
    background: #fef5e7;
    border-radius: 12px;
    border-left: 4px solid #e53e3e;
    transition: all 0.3s ease;
    user-select: none;
    text-align: left;
}

.version-header:hover {
    background: #fed7d7;
}

.version-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: left;
}

.version-toggle-icon {
    font-size: 16px;
    color: #999;
    transition: all 0.3s ease;
    font-weight: normal;
}

.version-content {
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 12px;
    text-align: left;
}

.version-list {
    padding: 0;
    text-align: left;
}

.version-item {
    background: #fef5e7;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #e53e3e;
    transition: all 0.3s ease;
    text-align: left;
}

.version-item:hover {
    background: #fed7d7;
}

.version-header-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
    text-align: left;
}

.version-number {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.version-date {
    font-size: 13px;
    color: #666;
    text-align: left;
}

.version-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.feature-item {
    padding: 4px 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
}

@media (max-width: 480px) {
    .container {
        padding: 24px;
        margin: 20px;
    }

    .app-name {
        font-size: 28px;
    }

    .download-btn {
        font-size: 16px;
        padding: 14px 24px;
    }

    .alternative-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .alt-download-btn {
        width: 100%;
        max-width: 280px;
        font-size: 16px;
        padding: 14px 20px;
    }

    .version-history-section {
        margin-top: 20px;
    }

    .version-header {
        padding: 12px;
    }

    .version-title {
        font-size: 14px;
    }

    .version-item {
        padding: 12px;
    }

    .version-header-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .version-number {
        font-size: 14px;
    }
}