:root {
    --bg-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --bg-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --bg-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --bg-gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.3);
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --accent-purple: #805ad5;
    --accent-pink: #ed64a6;
    --accent-blue: #4299e1;
    --accent-green: #48bb78;
    --accent-orange: #ed8936;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --glow-color: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

/* 极简细条滚动条 - WebKit */
*::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

*::-webkit-scrollbar-track {
    background: transparent;
    /* 轨道透明，极致极简 */
}

*::-webkit-scrollbar-thumb {
    background: #eee;
    border-radius: 2px;
    transition: background 0.2s;
}

*::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Firefox适配 */
* {
    scrollbar-width: thin;
    scrollbar-color: #eee transparent;
}


body {
    font-family: 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    background: var(--bg-gradient-1);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: white;
    line-height: 1.5;
    padding: 0;
    margin: 0;
    position: relative;
    transition: background 1.5s ease;
}

/* 动态背景层 */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(240, 147, 251, 0.2) 0%, transparent 50%);
    z-index: -1;
    animation: pulse 8s ease-in-out infinite;
    will-change: opacity;
}

/* 安全区域适配 */
.safe-area {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

/* 头部区域 */
.header {
    padding: 20px 0 15px;
    position: relative;
    text-align: center;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, white, transparent);
    opacity: 0.3;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--card-border);
    box-shadow:
        0 10px 30px var(--shadow-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: float 6s ease-in-out infinite;
    will-change: transform;
}

.logo i {
    font-size: 32px;
    background: linear-gradient(135deg, white, #e2e8f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo img {
    width: 58px;
    height: 58px;
    border-radius: 10px;

}

.header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, white, #e2e8f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* 导航指示器 */
.nav-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 16px;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-dot.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 10px white;
}

/* 卡片容器 - 自适应高度 */
.cards-container {
    position: relative;
    min-height: 400px;
    margin-bottom: 90px;
}

.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 0;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 25px 50px var(--shadow-color),
        0 0 0 1px var(--glow-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    border: 1px solid var(--card-border);
}

.card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
    position: relative;
}

/* 卡片内发光边框 */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.4),
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.4));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.card-header {
    padding: 25px 25px 15px;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25px;
    right: 25px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.card-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.3),
            transparent);
}

.card-icon.qrcode {
    background: var(--accent-purple);
}

.card-icon.phone {
    background: var(--accent-blue);
}

.card-icon.success {
    background: var(--accent-green);
}

.card-icon.error {
    background: var(--accent-pink);
}

.card-icon.info {
    background: var(--accent-orange);
}

.card-icon.alert {
    background: var(--accent-orange);
}

.card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-left: 65px;
    padding-bottom: 15px;
}

.card-body {
    padding: 25px;
    overflow: visible;
}

/* 表单优化 */
.form-group {
    margin-bottom: 10px;
}

.form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-label i {
    color: var(--accent-purple);
    width: 24px;
}

.input-wrapper {
    position: relative;
}

.layui-input,
.layui-textarea {
    width: 100%;
    height: 56px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 14px;
    padding: 0 20px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.layui-input:focus,
.layui-textarea:focus {
    border-color: var(--accent-purple);
    outline: none;
    box-shadow:
        0 8px 20px rgba(128, 90, 213, 0.2),
        0 0 0 3px rgba(128, 90, 213, 0.1);
    background: white;
}

.layui-input::placeholder {
    color: #a0aec0;
}

/* ==================== 验证码输入组优化 ==================== */
.sms-group {
    position: relative;
    display: flex;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sms-input {
    flex: 1;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 验证码输入框 */
#sms-code {
    padding-right: 140px;
    width: 100%;
    height: 56px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 14px;
    padding: 0 20px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

/* 输入框获取焦点时 - 按钮同步上移 */
#sms-code:focus {
    border-color: var(--accent-purple);
    outline: none;
    box-shadow:
        0 8px 20px rgba(128, 90, 213, 0.2),
        0 0 0 3px rgba(128, 90, 213, 0.1);
    background: white;
}

/* 验证码按钮集成到输入框内 */
#send-sms-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 130px;
    height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-purple), #6b46c1);
    color: white;
    border: none;
    box-shadow:
        0 4px 12px rgba(128, 90, 213, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    z-index: 2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* 输入框获取焦点时 - 按钮同步上移 */
#sms-code:focus~#send-sms-btn {
    box-shadow:
        0 6px 18px rgba(128, 90, 213, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    height: 49px;
}

#send-sms-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.7s;
}

#send-sms-btn:hover {
    transform: translateY(calc(-50% - 1px));
    box-shadow:
        0 6px 18px rgba(128, 90, 213, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}



#send-sms-btn:active {
    transform: translateY(calc(-50% - 1px)) scale(0.98);
}

#send-sms-btn:active::before {
    left: 100%;
}

#send-sms-btn i {
    font-size: 14px;
}

/* 禁用状态 */
#send-sms-btn:disabled {
    background: linear-gradient(135deg, #a0aec0, #718096);
    cursor: not-allowed;
    transform: translateY(-50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


#send-sms-btn:disabled:hover {
    transform: translateY(-50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


/* 倒计时状态 */
#send-sms-btn.countdown {
    background: linear-gradient(135deg, #718096, #4a5568);
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* 按钮优化 */
.layui-btn {
    height: 56px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.layui-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.7s;
}

.layui-btn:active::before {
    left: 100%;
}

.layui-btn:active {
    transform: scale(0.97);
}

.layui-btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), #6b46c1);
    color: white;
    box-shadow: 0 10px 25px rgba(128, 90, 213, 0.4);
}

.layui-btn-primary:disabled {
    background: linear-gradient(135deg, #a0aec0, #718096);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #38a169);
    color: white;
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.4);
}

.btn-error {
    background: linear-gradient(135deg, var(--accent-pink), #d53f8c);
    color: white;
    box-shadow: 0 10px 25px rgba(237, 100, 166, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-orange), #dd6b20);
    color: white;
    box-shadow: 0 10px 25px rgba(237, 137, 54, 0.4);
}

/* 二维码区域 */
.qrcode-container {
    text-align: center;
    padding: 15px 0;
}

.qrcode-frame {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(247, 250, 252, 0.9), rgba(237, 242, 247, 0.9));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(128, 90, 213, 0.2);
}

.qrcode-frame::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(128, 90, 213, 0.1), transparent);
    animation: shine 3s infinite linear;
    will-change: transform;
}

.qrcode-placeholder {
    position: relative;
    z-index: 1;
    color: var(--text-secondary);
}

.qrcode-placeholder i {
    font-size: 70px;
    margin-bottom: 15px;
    display: block;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.qrcode-hint {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.error-hint {
    margin-top: 5px;
    color: var(--accent-orange);
    font-size: 14px;
}

.error-hint i,
.qrcode-hint i {
    padding-right: 5px;
}

/* 结果卡片样式 */
.result-card {
    text-align: center;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 25px;
    display: inline-block;
}

.success .result-icon {
    background: linear-gradient(135deg, var(--accent-green), #2f855a);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: successPulse 2s infinite;
}

.error .result-icon {
    background: linear-gradient(135deg, var(--accent-pink), #b83280);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: errorShake 0.8s ease-out;
}

.result-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.success .result-title {
    background: linear-gradient(135deg, var(--accent-green), #2f855a);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error .result-title {
    background: linear-gradient(135deg, var(--accent-pink), #b83280);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-desc {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
}

.result-desc-success {
    color: #6d0deb;
}

/* 信息卡片 */
.info-card {
    background: linear-gradient(135deg, rgba(247, 250, 252, 0.9), rgba(237, 242, 247, 0.9));
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

/* 说明列表 */
.instruction-list {
    list-style: none;
}

.instruction-item {
    padding: 20px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, rgba(247, 250, 252, 0.9), rgba(237, 242, 247, 0.9));
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.6s forwards;
    opacity: 0;
    transform: translateX(-20px);
}

.instruction-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.instruction-item:nth-child(1) {
    animation-delay: 0.1s;
}

.instruction-item:nth-child(2) {
    animation-delay: 0.2s;
}

.instruction-item:nth-child(3) {
    animation-delay: 0.3s;
}

.instruction-item:nth-child(4) {
    animation-delay: 0.4s;
}

.instruction-item:nth-child(5) {
    animation-delay: 0.5s;
}

.instruction-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.instruction-icon.key {
    background: var(--accent-purple);
}

.instruction-icon.calendar {
    background: var(--accent-green);
}

.instruction-icon.phone {
    background: var(--accent-blue);
}

.instruction-icon.user {
    background: var(--accent-orange);
}

.instruction-icon.shield {
    background: var(--accent-pink);
}

.instruction-content {
    flex: 1;
}

.instruction-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 16px;
}

.instruction-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* 底部操作区 */
.bottom-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 16px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 100;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
}

.nav-btn {
    flex: 1;
    height: 56px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-btn i {
    font-size: 18px;
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* ==================== 优化：Alert弹框样式 ==================== */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-alert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-alert-box {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--card-border);
}

.custom-alert-overlay.show .custom-alert-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.alert-header {
    padding: 24px 20px 16px;
    position: relative;
    background: linear-gradient(135deg, rgba(128, 90, 213, 0.1), transparent);
}

.alert-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.alert-icon {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 30px;
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.alert-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
}

.alert-icon.success {
    background: linear-gradient(135deg, var(--accent-green), #2f855a);
}

.alert-icon.error {
    background: linear-gradient(135deg, var(--accent-pink), #b83280);
}

.alert-icon.warning {
    background: linear-gradient(135deg, var(--accent-orange), #dd6b20);
}

.alert-icon.info {
    background: linear-gradient(135deg, var(--accent-blue), #2b6cb0);
}

.alert-icon img {
    width: 60px;
    height: 60px;
    border-radius: 15px;
}

.alert-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    line-height: 1.3;
}

.alert-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.alert-body {
    padding: 20px;
}

.alert-content {
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 25px;
    max-height: 200px;
    overflow-y: auto;
}

/* 优化：按钮区域 - 小屏幕下垂直排列 */
.alert-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* 默认横向排列（大屏幕） */
.alert-buttons.horizontal {
    flex-direction: row;
}

/* 小屏幕垂直排列 */
.alert-buttons.vertical {
    flex-direction: row;
}

.alert-btn {
    height: 45px;
    min-height: 45px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    /* 防止按钮在小屏幕上溢出 */
}

.alert-btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), #6b46c1);
    color: white;
    box-shadow: 0 8px 20px rgba(128, 90, 213, 0.3);
}

.alert-btn-secondary {
    background: rgba(171, 203, 245, 0.9);
    color: var(--text-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.alert-btn:active {
    transform: scale(0.97);
}

/* ==================== 响应式优化 ==================== */

/* 小屏幕手机优化 */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    .card-body {
        padding: 20px;
    }

    .qrcode-frame {
        width: 200px;
        height: 200px;
    }

    .card-header {
        padding: 20px 20px 15px;
    }

    .bottom-actions {
        padding: 12px 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        gap: 8px;
    }

    /* Alert弹框在小屏幕上优化 */
    .alert-header {
        padding: 20px 16px 14px;
    }

    .alert-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
        margin-bottom: 15px;
    }

    .alert-title {
        font-size: 20px;
    }

    .alert-subtitle {
        font-size: 13px;
    }

    .alert-body {
        padding: 16px;
    }

    .alert-content {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .alert-btn {
        height: 46px;
        font-size: 15px;
    }

    /* 验证码输入框在小屏幕上优化 */
    #sms-code {
        height: 50px;
        padding-right: 120px;
        font-size: 15px;
        padding-left: 16px;
    }

    #send-sms-btn {
        width: 110px;
        height: 44px;
        font-size: 14px;
        right: 3px;
    }



    /* 导航按钮在小屏幕上优化 */
    .nav-btn {
        height: 50px;
        font-size: 12px;
    }

    .nav-btn i {
        font-size: 16px;
    }

    /* 主按钮在小屏幕上优化 */
    .layui-btn {
        height: 50px;
        font-size: 16px;
    }

    /* 输入框在小屏幕上优化 */
    .layui-input,
    .layui-textarea {
        height: 50px;
        padding: 0 16px;
        font-size: 15px;
    }

    /* 卡片标题在小屏幕上优化 */
    .card h3 {
        font-size: 20px;
    }

    .card-subtitle {
        margin-left: 60px;
        font-size: 13px;
    }

    /* 结果图标在小屏幕上优化 */
    .result-icon {
        font-size: 70px;
        margin-bottom: 20px;
    }

    .result-title {
        font-size: 22px;
    }

    .result-desc {
        font-size: 14px;
    }
}

/* 超小屏幕手机优化（iPhone 5/SE等） */
@media (max-width: 320px) {
    .header h1 {
        font-size: 24px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .logo i {
        font-size: 28px;
    }

    .qrcode-frame {
        width: 180px;
        height: 180px;
    }

    .card-header {
        padding: 18px 16px 12px;
    }

    .card-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
        border-radius: 12px;
    }

    .card h3 {
        font-size: 18px;
    }

    .card-subtitle {
        margin-left: 55px;
        font-size: 12px;
    }

    /* 验证码输入框在超小屏幕上优化 */
    #sms-code {
        padding-right: 110px;
        font-size: 14px;
    }

    #send-sms-btn {
        width: 100px;
        height: 42px;
        font-size: 13px;
        border-radius: 10px;
    }


    .alert-icon {
        width: 55px;
        height: 55px;
        font-size: 26px;
    }

    .alert-title {
        font-size: 18px;
    }

    .alert-content {
        font-size: 13px;
    }

    .alert-btn {
        height: 44px;
        font-size: 14px;
    }

    /* 超小屏幕下按钮总是垂直排列 */
    .alert-buttons {
        flex-direction: column !important;
    }
}

/* 中等屏幕手机 */
@media (min-width: 361px) and (max-width: 410px) {
    .alert-buttons {
        flex-direction: column;
    }

    /* 验证码输入框在中等屏幕上优化 */
    #sms-code {
        padding-right: 135px;
    }

    #send-sms-btn {
        width: 125px;
    }
}

/* 大屏幕手机和平板 */
@media (min-width: 411px) {
    .alert-buttons {
        flex-direction: row;
    }
}

/* 平板和桌面优化 */
@media (min-width: 768px) {
    .container {
        max-width: 420px;
    }
}

/* 横屏优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .header {
        padding: 10px 0;
    }

    .cards-container {
        min-height: 280px;
        margin-bottom: 80px;
    }

    .card-body {
        padding: 15px;
    }

    .bottom-actions {
        position: relative;
        margin-top: 20px;
        background: rgba(0, 0, 0, 0.3);
    }

    /* 验证码输入框在横屏时优化 */
    #sms-code {
        height: 48px;
        padding-right: 130px;
    }

    #send-sms-btn {
        height: 44px;
        width: 120px;
    }

    /* 横屏下的输入框焦点状态 */
    #sms-code:focus {
        transform: translateY(-2px);
    }

    #sms-code:focus~#send-sms-btn {
        transform: translateY(calc(-50% - 2px));
        height: 45px;
    }

    /* 横屏时Alert弹框优化 */
    .custom-alert-overlay {
        padding: 10px;
    }

    .custom-alert-box {
        max-width: 350px;
    }

    .alert-header {
        padding: 18px 16px 12px;
    }

    .alert-icon {
        width: 55px;
        height: 55px;
        font-size: 26px;
        margin-bottom: 12px;
    }

    .alert-title {
        font-size: 19px;
    }

    .alert-body {
        padding: 16px;
    }

    .alert-content {
        font-size: 14px;
        margin-bottom: 18px;
        max-height: 150px;
    }

    .alert-btn {
        height: 44px;
        font-size: 15px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: rgba(30, 30, 40, 0.85);
        --text-primary: #ffffff;
        --text-secondary: #a0aec0;
        --card-border: rgba(255, 255, 255, 0.1);
        --shadow-color: rgba(0, 0, 0, 0.3);
    }

    .layui-input,
    .layui-textarea {
        background: rgba(45, 55, 72, 0.9);
        border-color: rgba(74, 85, 104, 0.8);
        color: white;
    }

    .layui-input:focus,
    .layui-textarea:focus {
        background: rgba(45, 55, 72, 1);
    }

    /* 验证码输入框暗色模式适配 */
    #sms-code {
        background: rgba(45, 55, 72, 0.9);
        border-color: rgba(74, 85, 104, 0.8);
        color: white;
    }

    #sms-code:focus {
        background: rgba(45, 55, 72, 1);
        border-color: var(--accent-purple);
    }

    #send-sms-btn:disabled {
        background: linear-gradient(135deg, #4a5568, #2d3748);
    }

    .info-card,
    .instruction-item,
    .qrcode-frame {
        background: linear-gradient(135deg, rgba(45, 55, 72, 0.9), rgba(26, 32, 44, 0.9));
    }

    .card::before {
        background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.15),
                rgba(255, 255, 255, 0.05),
                rgba(255, 255, 255, 0.15));
    }

    .custom-alert-box {
        background: rgba(30, 30, 40, 0.95);
    }

    .alert-btn-secondary {
        background: rgba(45, 55, 72, 0.9);
        color: white;
    }
}

/* 防止双击缩放
* {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
*/

input,
textarea {
    user-select: text;
    -webkit-user-select: text;
}

/* 卡片内容动画 */
.card-content {
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

/* ==================== 动画定义 ==================== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes successPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes errorShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* 激活详情 */
.activation-details {
    background: var(--light-blue);
    border-radius: 12px;
    padding: 10px;
    padding-bottom: 0;
    margin: 10px 0;
    text-align: left;
    border: 3px solid var(--secondary-color);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(52, 152, 219, 0.2);
}

.detail-label {
    font-weight: 500;
    color: #2d3748;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

.detail-value {
    color: #2d3748;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

.layui-layer {
    color: #000;
    border-radius: 10px;
}

.layui-layer-hui {
    background-color: rgba(255, 255, 255, 0.9);
}

/* 父容器 */
.btn-group {
    display: flex;
    gap: 5px;
    /* 中间间距 5px */
}

/* 按钮样式 */
.btn-group button {
    flex: 1;
    /* 自动平分宽度 */
    padding: 10px;
    cursor: pointer;
}

.qr-name {
    font-size: 22px;
    font-weight: 600;
    color: #e91010;
}

.loading-spin {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(41, 40, 40, 0.2);
    border-top-color: #1b1a1a;
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin: 30px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}




/* ==================== 用户选择列表（Layui 表单适配 · 修复点击切换） ==================== */
.user-list {
    margin-bottom: 25px;
}

/* 强制隐藏 Layui  radio 样式 */
.user-item input[type="radio"] {
    display: none !important;
}

.user-item .layui-form-radio {
    display: none !important;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    margin-bottom: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 14px;
    border: 2px solid #eee;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-phone {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* 选中高亮 */
.user-item.active {
    border-color: var(--accent-orange) !important;
    background: rgba(255, 248, 230, 0.95);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.15);
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    .user-item {
        background: rgba(45, 55, 72, 0.9);
    }

    .user-avatar {
        border-color: rgba(255, 255, 255, 0.1);
    }

    .user-item.active {
        background: rgba(66, 55, 42, 0.9);
    }
}
