/* =================================================================
 * 89F Global Styles (shared.css)
 * ================================================================= */

/* ============ Base Styles (FIXED FULL SCREEN) ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; width: 100%; overflow-x: hidden; } 
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: #ffffff; 
    color: #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0;
}

/* ============ PC Layout (Default/Large Screen) ============ */
.page-wrap {
    max-width: 1200px;
    width: 100%;
    height: 100%; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 20px; 
    box-sizing: border-box;
}
.left-figure { flex: 1; display: flex; justify-content: center; }
.left-figure img { width: 100%; max-width: 620px; height: auto; display: block; }
.right-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 40px;
    text-align: center;
}
.logo img { height: 110px; display: block; margin-bottom: 32px; }
.title-main { font-size: 30px; font-weight: 600; color: #014421; margin-bottom: 22px; }
.title-sub { font-size: 38px; font-weight: 600; color: #014421; margin-bottom: 32px; }

/* PC/H5 Common Button Style (Large) */
.btn-enter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 120px; 
    border-radius: 145.765px; 
    font-size: 38px;
    color: #ffffff !important;
    background: #014421;
    border: 2.429px solid #fff;
    box-shadow: 0 2.429px 4.859px 0 rgba(1, 68, 33, 0.25), inset 0 0 7.288px 0 #012f17;
    text-decoration: none;
    margin-bottom: 48px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    cursor: pointer;
}
.btn-enter:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(1, 68, 33, 0.60); }

/* Speed Test Failure Warning Style */
.btn-warning {
    background: linear-gradient(90deg, #ff7a63, #ff4d4f); 
    box-shadow: 0 2.429px 4.859px 0 rgba(255, 77, 79, 0.4), inset 0 0 7.288px 0 #920000;
}
.btn-warning:hover {
    box-shadow: 0 10px 24px rgba(255, 77, 79, 0.6);
}

/* PC QR Code Style */
.qr-wrap-new { margin-top: -20px; text-align: center; }
.qr-title { font-size: 24px; color: #014421; margin-bottom: 20px; font-weight: 600; }
.qr-card-perfect { display: inline-block; width: 272px; height: 272px; padding: 6px; background: #014421; border-radius: 32px; box-shadow: 0 12px 36px rgba(0,0,0,0.15); }
.qr-inner { width: 100%; height: 100%; background: #ffffff; border-radius: 26px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.qr-img { width: 260px; height: 260px; display: block; border-radius: 18px; box-shadow: 0 6px 16px rgba(0,0,0,0.12); }

/* Speed Test Notice Style */
.notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px; 
    color: #9ca3c7;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid rgba(1, 68, 33, 0.50);
    background: rgba(15,23,42,0.9);
    margin-bottom: 24px; 
    flex-shrink: 0;
    white-space: normal; 
    word-wrap: break-word;
    overflow: hidden; 
}
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: #014421; box-shadow: 0 0 12px #014421; flex-shrink: 0; }
.notice-testing .notice-dot { background: #ef4444; box-shadow: 0 0 12px #ef4444; border-radius: 2px; }

/* ============ Mobile Common Styles (FIXED LAYOUT & CENTERING) ============ */
.mobile-page {
    width: 100%;
    min-height: 100dvh; 
    display: none; 
    flex-direction: column;
    align-items: center; 
    box-sizing: border-box;
    background: #eff6fc; 
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    justify-content: space-between;
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch;
}
.mobile-header { width: 100%; text-align: center; flex-shrink: 0; }
.mobile-logo img { width: 60%; max-width: 200px; height: auto; display: block; margin: 0 auto; }
.mobile-slogan { font-size: 24px; font-weight: 700; color: #014421; margin-top: 20px; }
.mobile-figure { 
    width: 100%; 
    max-width: 340px; 
    margin: 20px auto; 
    flex-grow: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.mobile-figure img { width: 100%; height: auto; display: block; border-radius: 12px; }

/* Mobile Dual Button Group */
.mobile-button-group {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    margin: 0 auto;
}
.mobile-button-group .btn-enter {
    /* Mobile-specific override to prevent overflow and keep buttons full-width */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    font-size: 18px;
    margin: 0;
    box-shadow: none;
}
/* APP Download Button Unified Color (Primary) */
/*
.btn-secondary {
    background: #014421;
    border: 2.429px solid #fff;
    color: #ffffff !important; 
    box-shadow: 0 2.429px 4.859px 0 rgba(1, 68, 33, 0.25), inset 0 0 7.288px 0 #012f17 !important;
}
*/
/* Footer (Used in Mobile Layout) */
.footer {
    flex-shrink: 0;
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    padding-top: 10px;
}
.footer span { margin: 0 8px; }


/* ============ Modal (Floating Window) Styles ============ */
#downloadModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    position: relative;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-size: 18px;
    font-weight: 700;
    color: #014421;
}
.modal-close {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: #999;
}
.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;           /* 更大的按钮间距 */
    margin-top: 4px;
}

/* Generic Download Button Style */
.dl-btn {
    height: 50px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    width: 100%;                /* 按钮占满弹窗宽度 */
}
.dl-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Android Buttons (Unified Blue Main Style) */
.dl-btn-android-main, .dl-btn-android-lite { 
    background-color: #014421; 
    color: #ffffff; 
    box-shadow: 0 2px 5px rgba(1, 68, 33, 0.30); 
    border: none;
}

/* iOS Button Group Style (Matching image aesthetic) */
.dl-btn-ios-main {
    background-color: #014421;
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(1, 68, 33, 0.30);
    position: relative;
    padding: 0 15px;
}
.dl-btn-ios-lite {
    background-color: #014421;
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(1, 68, 33, 0.30);
    border: none;
    position: relative;
    padding: 0 15px;
}
.dl-btn-ios-quick {
    background-color: #014421;
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(1, 68, 33, 0.30);
}
.dl-btn-ios-icon { margin-right: 10px; font-size: 20px; }
.dl-btn-ios-icon::before { content: ''; }


/* ============ iOS Profile Guide Page ============ */
#profileGuide {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 1001;
    overflow-y: auto;
    padding: 30px 20px;
    text-align: left;
}
.guide-header { text-align: center; margin-bottom: 25px; }
.guide-header h3 { color: #014421; }
.guide-step { margin-bottom: 20px; border-left: 3px solid #014421; padding-left: 10px; }
.guide-step p { font-size: 14px; color: #666; }
.guide-step strong { color: #333; }
.guide-footer { text-align: center; margin-top: 30px; }
.guide-footer .btn-enter {
    padding: 15px 50px;
    font-size: 18px;
    margin-bottom: 0;
}


/* Hide PC content on small screens */
@media (max-width: 768px) {
    body { 
        background: #eff6fc;
        align-items: flex-start;
        padding: 0;
    }
    .page-wrap { display: none; }
    .mobile-page { 
        display: flex; 
    }
}