/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 微信浏览器提示浮层 */
.wechat-tip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #6dff6b 0%, #2475ee 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    display: none;
}

.wechat-tip.show {
    display: block;
    transform: translateY(0);
}

.wechat-tip-content {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 12px;
    position: relative;
}

.wechat-tip-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.wechat-tip-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
}

.wechat-tip-text p {
    margin: 0;
}

.wechat-tip-text p:first-child {
    font-weight: 600;
    margin-bottom: 2px;
}

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

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

/* 移动端容器 */
.mobile-container {
    width: 100%;
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: padding-top 0.3s ease;
}

/* 当微信提示显示时，为主容器添加顶部间距 */
body.wechat-tip-visible .mobile-container {
    padding-top: 80px;
}

/* 头部区域 */
.mobile-header {
    padding: 40px 20px 30px;
    text-align: center;
    /*background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);*/
    backdrop-filter: blur(10px);
}

.app-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.app-icon {
    font-size: 50px;
    background: white;
    border-radius: 15px;
    padding: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.app-info h1 {
    font-size: 1.8rem;
    color: white;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.version {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
}

.subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    margin-top: 10px;
}

/* 应用预览区域 */
.app-preview {
    padding: 30px 20px;
    display: flex;
    justify-content: center;
}

.phone-preview {
    width: 200px;
    height: 360px;
    background: #1a1a1a;
    border-radius: 30px;
    padding: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    position: relative;
}

.phone-preview::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #333;
    border-radius: 2px;
}

.screen-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 20px;
    padding: 30px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.25);
    padding: 12px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.feature-icon {
    font-size: 20px;
}

.feature-text {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 下载按钮区域 */
.download-section {
    padding: 20px;
    background: white;
    margin: 0 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.download-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.download-btn:active::before {
    left: 100%;
}

.download-btn:active {
    transform: scale(0.98);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.6);
}

.download-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.download-btn.disabled:active {
    transform: none !important;
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-text {
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
}

.app-details {
    display: flex;
    justify-content: space-around;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.detail-item {
    text-align: center;
    flex: 1;
}

.detail-item .label {
    display: block;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 5px;
}

.detail-item .value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* 功能特色区域 */
.features-section {
    padding: 30px 20px;
    background: white;
    margin: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.features-section h3 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #333;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.feature-card:active {
    transform: scale(0.98);
}

.card-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
}

.card-content h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #333;
}

.card-content p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* 底部信息 */
.mobile-footer {
    padding: 30px 20px;
    text-align: center;
    margin-top: auto;
}

.mobile-footer p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 20% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

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

.close-btn:active {
    background: #f0f0f0;
    transform: scale(0.9);
}

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

.modal-body p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

.modal-footer {
    padding: 15px 25px 25px;
    display: flex;
    gap: 15px;
}

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

.btn-cancel {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.btn-cancel:active {
    background: #e9ecef;
    transform: scale(0.98);
}

.btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-confirm:active {
    transform: scale(0.98);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

/* 加载动画 */
.loading {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-content p {
    font-size: 0.9rem;
    margin: 0;
}

/* Toast通知 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1002;
    font-size: 0.9rem;
    max-width: 90%;
    text-align: center;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 微信提示显示时的Toast位置调整 */
body.wechat-tip-visible .toast {
    top: 100px;
}

/* 安全区域适配 */
@supports (padding: max(0px)) {
    .mobile-header {
        padding-top: max(40px, env(safe-area-inset-top) + 20px);
    }

    .mobile-footer {
        padding-bottom: max(30px, env(safe-area-inset-bottom) + 10px);
    }

    .wechat-tip {
        top: env(safe-area-inset-top);
    }

    body.wechat-tip-visible .mobile-container {
        padding-top: calc(80px + env(safe-area-inset-top));
    }
}

/* 横屏适配 */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .mobile-header {
        padding: 20px 20px 15px;
    }

    .app-preview {
        padding: 15px 20px;
    }

    .phone-preview {
        width: 150px;
        height: 270px;
    }

    .features-section {
        padding: 20px;
    }

    .wechat-tip-content {
        padding: 8px 15px;
    }

    .wechat-tip-text {
        font-size: 12px;
    }

    body.wechat-tip-visible .mobile-container {
        padding-top: 60px;
    }
}

/* 小屏幕优化 */
@media screen and (max-width: 320px) {
    .app-logo {
        flex-direction: column;
        gap: 10px;
    }

    .app-icon {
        font-size: 40px;
        padding: 10px;
    }

    .app-info h1 {
        font-size: 1.5rem;
    }

    .phone-preview {
        width: 160px;
        height: 290px;
    }

    .wechat-tip-content {
        padding: 10px 12px;
    }

    .wechat-tip-text {
        font-size: 12px;
    }
}

/* 大屏幕优化 */
@media screen and (min-width: 768px) {
    .mobile-container {
        max-width: 500px;
        margin: 0 auto;
        box-shadow: 0 0 30px rgba(0,0,0,0.2);
    }

    .wechat-tip {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%) translateY(-100%);
    }

    .wechat-tip.show {
        transform: translateX(-50%) translateY(0);
    }
}

