
        :root { --blue: #2563eb; --bg: #f4f5f7; --text-main: #1f2329; --text-sub: #8f959e; --border: #e4e7ed; }
        body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: var(--bg); margin: 0; color: var(--text-main); }
        
        #step1 { display: block; padding: 24px; box-sizing: border-box; }
        .login-title { font-size: 18px; font-weight: 700; margin: 0; }
        .input-key { width: 100%; padding: 14px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 8px; font-size: 16px; box-sizing: border-box; outline: none; transition: 0.2s; text-align: center; font-family: monospace; letter-spacing: 1px;}
        .input-key:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
        .btn-primary { background: var(--blue); color: #fff; border: none; padding: 14px; width: 100%; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: 0.2s; }
        .btn-primary:hover { opacity: 0.9; }
        .btn-primary:disabled { background: #ccc; cursor: not-allowed; }

        #step2 { display: block; max-width: 860px; margin: 52px auto 32px; padding: 0 20px; }
        .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .title-area { display: flex; align-items: center; gap: 16px; }
        .main-title { font-size: 24px; font-weight: 800; margin: 0; }
        .status-badge { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
        .badge-waiting { background: #eef2ff; color: var(--blue); }
        .badge-success { background: #ecfdf5; color: #059669; }
        .status-dot { width: 6px; height: 6px; border-radius: 50%; }
        .dot-waiting { background: var(--blue); animation: blinker 1.5s linear infinite; }
        .dot-success { background: #059669; }
        @keyframes blinker { 50% { opacity: 0; } }
        
        .header-actions { display: flex; gap: 10px; }
        .btn-change { background: #eff6ff; color: var(--blue); border: 1px solid #bfdbfe; padding: 8px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; font-weight: 500; transition: 0.2s;}
        .btn-change:hover { background: #dbeafe; }
        .btn-change:disabled { opacity: 0.5; cursor: not-allowed; }
        .btn-cancel { background: transparent; color: #ef4444; border: 1px solid #ef4444; padding: 8px 16px; border-radius: 6px; font-size: 14px; cursor: pointer; font-weight: 500; transition: 0.2s;}
        .btn-cancel:hover { background: #fef2f2; }
        .btn-cancel:disabled { opacity: 0.5; cursor: not-allowed; }

        .info-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
        
        .phone-section { padding: 24px; display: flex; align-items: center; justify-content: space-between; }
        .phone-left { display: flex; align-items: center; gap: 20px; overflow: hidden; }
        .icon-wrap { width: 52px; height: 52px; background: #eff6ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--blue); flex-shrink: 0; }
        .label-text { font-size: 13px; color: var(--text-sub); margin-bottom: 4px; }
        .phone-number-display { font-size: 38px; font-weight: 800; color: var(--text-main); letter-spacing: 1px; line-height: 1.1; white-space: nowrap; }
        .btn-icon { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; transition: 0.2s; flex-shrink: 0; }
        .btn-icon:hover { background: #f8f9fa; border-color: #ccc; }

        .meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
        .meta-item { padding: 16px 24px; border-right: 1px solid var(--border); }
        .meta-item:last-child { border-right: none; }
        .meta-val { font-size: 17px; font-weight: 700; color: var(--text-main); margin-top: 6px; }

        .sms-section { padding: 24px; display: flex; justify-content: space-between; align-items: flex-end; }
        .sms-val-row { display: flex; align-items: center; gap: 20px; margin: 12px 0; }
        .sms-code { font-size: 32px; font-weight: 800; color: var(--text-main); letter-spacing: 3px; min-width: 60px;}
        .sms-code.success { color: #ef4444; }
        .sms-tips { font-size: 13px; color: var(--text-sub); margin: 0; display: flex; align-items: center; gap: 6px;}
        .btn-refresh { display: flex; align-items: center; justify-content: center; gap: 6px; background: #fff; border: 1px solid var(--border); padding: 8px 20px; border-radius: 6px; color: var(--blue); font-weight: 600; cursor: pointer; transition: 0.2s; height: 44px; font-size: 15px;}
        .btn-refresh:hover { background: #f8f9fa; }
        .btn-refresh:disabled { color: #ccc; cursor: not-allowed; }

        .instructions-section { padding: 20px 24px; }
        #noticeContent { font-size: 14px; color: var(--text-sub); line-height: 1.6; white-space: pre-wrap; }

        #toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(50,50,50,0.95); color: #fff; padding: 24px 32px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 15px; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.3s; box-shadow: 0 10px 30px rgba(0,0,0,0.2); box-sizing: border-box; text-align: center; }
        #toast.show { opacity: 1; pointer-events: auto; }
        .toast-icon { width: 32px; height: 32px; color: #4ade80; }
        
        .sync-spinner { animation: rotation 2s infinite linear; display: inline-block; width: 14px; height: 14px; border: 2px solid #a5b4fc; border-top-color: var(--blue); border-radius: 50%; flex-shrink: 0; }
        @keyframes rotation { from { transform: rotate(0deg); } to { transform: rotate(350deg); } }

        .ad-banner { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-radius: 12px; margin-bottom: 16px; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.02);}
        .ad-banner:hover { transform: translateY(-2px); }
        .ad-content { display: flex; align-items: center; gap: 16px; }
        .ad-icon { font-size: 32px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
        .ad-text { display: flex; flex-direction: column; gap: 4px; }
        .ad-title { font-size: 16px; font-weight: 800; margin: 0;}
        .ad-desc { font-size: 13px; margin: 0;}
        .ad-btn { padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; flex-shrink: 0; transition: 0.2s; display: inline-block;}

        .banner-type-1 { background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%); border: 1px solid #bfdbfe; }
        .banner-type-1:hover { box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15); }
        .banner-type-1 .ad-title { color: #1e3a8a; }
        .banner-type-1 .ad-desc { color: #3b82f6; }
        .banner-type-1 .ad-btn { background: #2563eb; color: #fff; }

        .banner-type-2 { background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%); border: 1px solid #e9d5ff; }
        .banner-type-2:hover { box-shadow: 0 6px 16px rgba(147, 51, 234, 0.15); }
        .banner-type-2 .ad-title { color: #4c1d95; }
        .banner-type-2 .ad-desc { color: #9333ea; }
        .banner-type-2 .ad-btn { background: #9333ea; color: #fff; }

        /* 🔥 强制阅读公告弹窗样式 (轻奢高级版) 🔥 */
        .force-modal-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(31, 35, 41, 0.4); /* 极其柔和的半透明深灰 */
            backdrop-filter: blur(8px); /* 苹果级毛玻璃背景 */
            display: none; justify-content: center; align-items: center;
            z-index: 999999;
        }
        .force-modal-box {
            background: #ffffff; /* 纯白卡片，契合主UI */
            color: var(--text-main); 
            width: 90%; max-width: 420px;
            border-radius: 16px; /* 更圆润的高级倒角 */
            padding: 32px 24px; 
            box-shadow: 0 20px 40px rgba(0,0,0,0.08); /* 极度柔和的弥散阴影 */
            border: 1px solid rgba(255,255,255,0.8); 
            text-align: center; box-sizing: border-box;
            transform: translateY(0); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .force-modal-title { 
            color: var(--text-main); margin: 0 0 20px 0; font-size: 20px; font-weight: 800; 
            display: flex; align-items: center; justify-content: center; gap: 8px;
        }
        /* 柔和的警示图标颜色 */
        .force-modal-title svg { color: #f59e0b; width: 24px; height: 24px; }
        
        .force-modal-content { 
            text-align: left; font-size: 14px; line-height: 1.6; color: var(--text-sub); 
            margin-bottom: 24px; 
            background: #f8f9fa; /* 极浅灰底色，形成柔和对比 */
            padding: 16px 20px; border-radius: 12px; border: 1px solid var(--border);
            max-height: 250px; overflow-y: auto; white-space: pre-wrap;
        }
        .force-checkbox-label {
            display: flex; align-items: center; justify-content: center; gap: 8px;
            font-size: 13px; color: var(--text-sub); margin-bottom: 24px; cursor: pointer;
        }
        .force-checkbox-label input[type="checkbox"] {
            width: 16px; height: 16px; cursor: pointer; accent-color: var(--blue);
        }
        .force-btn {
            background: #f3f4f6; color: #9ca3af; border: none; width: 100%; padding: 14px;
            border-radius: 10px; font-size: 16px; font-weight: 600; cursor: not-allowed; transition: all 0.3s ease; box-sizing: border-box;
        }
        .force-btn.active { 
            background: var(--blue); color: #fff; cursor: pointer; 
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); /* 按钮激活时的蓝光微影 */
        }
        .force-btn.active:hover { background: #1d4ed8; transform: translateY(-2px); }

        @media screen and (max-width: 680px) {
            #step2 { margin: 16px auto; padding: 0 12px; }
            .header { flex-direction: column; align-items: flex-start; gap: 16px; }
            .title-area { flex-wrap: wrap; gap: 10px; }
            .header-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
            .btn-change, .btn-cancel { width: 100%; padding: 12px 0; text-align: center; }
            .phone-section { padding: 16px; gap: 12px; }
            .phone-left { gap: 12px; }
            .icon-wrap { width: 44px; height: 44px; }
            .icon-wrap svg { width: 20px; height: 20px; }
            .phone-number-display { font-size: clamp(22px, 6vw, 32px); } 
            .meta-grid { grid-template-columns: 1fr 1fr; }
            .meta-item { padding: 12px; border-bottom: 1px solid var(--border); }
            .meta-item:nth-child(even) { border-right: none; }
            .meta-item:nth-last-child(1), .meta-item:nth-last-child(2) { border-bottom: none; }
            .meta-val { font-size: 15px; }
            .sms-section { padding: 16px; flex-direction: column; align-items: flex-start; gap: 16px; }
            .sms-code { font-size: 28px; }
            .btn-refresh { width: 100%; }
            .instructions-section { padding: 16px; }
            #toast { width: 85%; padding: 16px 20px; }
            
            .ad-banner { flex-direction: column; align-items: stretch; gap: 16px; padding: 16px; }
            .ad-btn { text-align: center; width: 100%; box-sizing: border-box; }
        }
    
html { min-width: 320px; } body { min-height: 100dvh; }
button:focus-visible,a:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
#step2 { padding-bottom: 90px; } [hidden] { display: none !important; }
.demo-mark { position: fixed; top: 16px; left: 20px; color: #8f959e; font-size: 11px; letter-spacing: .5px; z-index: 10; }
.demo-dock { position: fixed; bottom: 16px; right: 20px; display: flex; gap: 12px; align-items: center; z-index: 50; font-size: 12px; }
.demo-hint { color: #8f959e; } .demo-hint button { padding: 0; border: 0; background: transparent; color: #2563eb; cursor: pointer; font: inherit; }
.dock-toggle { background: #fff; color: #8f959e; border: 1px solid var(--border); padding: 9px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; }
#demoPanel { position: absolute; right: 0; bottom: 46px; width: 310px; background: white; border: 1px solid var(--border); padding: 20px; border-radius: 12px; box-shadow: 0 12px 36px #1f23291a; box-sizing: border-box; }
#demoPanel strong { font-size: 15px; } #demoPanel p { color: #8f959e; line-height: 1.8; margin: 10px 0; }
.demo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-buttons button { padding: 9px 4px; color: #2563eb; background: #eff6ff; border: 1px solid #dbeafe; border-radius: 6px; cursor: pointer; font-size: 12px; }
#formError { font-size: 13px; color: #ef4444; margin-top: 14px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 12px; margin-top: 24px; } .confirm-actions button { width: 50%; height: 46px; }
#confirmText { color: var(--text-sub); font-size: 14px; line-height: 1.8; }
@media (max-width: 680px) { .demo-mark { top: auto; bottom: 22px; left: 12px; font-size: 10px; } .demo-dock { right: 12px; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* One-page redemption: the form and the order remain in the same workspace. */
#step2 { padding-bottom: 0; margin-bottom: 0; }
.page-footer { max-width: 860px; margin: 24px auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.page-footer .demo-mark { position: static; }
.page-footer .demo-dock { position: relative; right: auto; bottom: auto; }
.redeem-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-key-label { display: block; margin-bottom: 8px; }
.redeem-row { display: flex; align-items: stretch; gap: 12px; }
.redeem-row .input-key { min-width: 0; flex: 1; margin: 0; text-align: left; }
.redeem-row .btn-primary { width: 174px; flex-shrink: 0; }
.input-key[readonly] { background: #f8fafc; color: #64748b; }
.redeem-hint { margin: 12px 0 0; color: #8f959e; font-size: 13px; line-height: 1.7; }
.new-card-button { background: transparent; border: 0; padding: 4px 0; color: var(--blue); font-size: 13px; cursor: pointer; flex-shrink: 0; }
.new-card-button:disabled { opacity: .5; cursor: not-allowed; }
.badge-idle { background: #e9edf3; color: #64748b; }
.dot-idle { background: #94a3b8; }
.phone-number-display.phone-placeholder { color: #a3aab5; font-size: 30px; letter-spacing: 0; font-weight: 600; }
.btn-icon:disabled { cursor: not-allowed; color: #c5cad2; background: #f8fafc; }
@media (max-width: 680px) {
  #step2 { margin-top: 24px; }
  #step1 { padding: 20px 16px; }
  .redeem-heading { align-items: flex-start; }
  .login-title { font-size: 17px; line-height: 1.5; }
  .redeem-row { flex-direction: column; }
  .redeem-row .btn-primary { width: 100%; }
  .phone-number-display.phone-placeholder { font-size: 24px; }
  .sms-tips { align-items: flex-start; line-height: 1.7; }
  .demo-dock { max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .page-footer { padding: 0 12px; flex-direction: column; align-items: flex-start; }
  .page-footer .demo-dock { justify-content: flex-start; }
  .page-footer #demoPanel { right: auto; left: 0; max-width: calc(100vw - 24px); }
}

.admin-link { color:#8f959e; text-decoration:none; font-size:12px; } .admin-link:hover { color:#2563eb; } @media(max-width:680px) { .demo-dock { gap:8px; } .demo-mark { bottom:52px; } }

.service-notice { padding: 14px 18px; margin-bottom: 16px; border: 1px solid #bfdbfe; border-radius: 10px; color: #1d4ed8; background: #eff6ff; font-size: 14px; line-height: 1.7; }
