/* ========== 2fa.autos 样式复刻 ========== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 14px;
    line-height: 1.6;
    color: #1f2937;
    background: #f8fafc;
    padding: 20px 15px;
}

.container {
    max-width: 520px;
    margin: 0 auto;
}

/* ========== 标题区域 ========== */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #02031b;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #b7bac5;
    font-weight: 400;
}

/* ========== 主卡片 ========== */
.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

/* ========== 输入框 ========== */
.input-wrapper {
    margin-bottom: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    color: #02031b;
    background: #f6f7f9;
    border: 1px solid #f6f7f9;
    border-radius: 14px;
    outline: none;
    transition: all 0.2s;
    font-family: "Courier New", Courier, monospace;
}

.input-wrapper input::placeholder {
    color: #7e8a9a;
}

.input-wrapper input:focus {
    border-color: #5c98f8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(92, 152, 248, 0.1);
}

/* ========== 上传区域 ========== */
.upload-area {
    border: 2px dashed #dfe6ed;
    border-radius: 14px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.upload-area:hover {
    border-color: #5c98f8;
    background: #f8fafc;
}

.upload-area.dragover {
    border-color: #5c98f8;
    background: #eff6ff;
}

.upload-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.upload-text-group {
    flex: 1;
}

.upload-text {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2px;
}

.upload-hint {
    font-size: 12px;
    color: #94a3b8;
}

/* ========== 按钮组 ========== */
.btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.btn-primary {
    flex: 1;
    background: #3b82f6;
    color: #ffffff;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    padding: 12px 20px;
    background: #f2f5f7;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* ========== 验证码结果区域 ========== */
.code-result {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.code-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
}

.code-display {
    flex: 1;
    text-align: center;
}

.code-value {
    font-size: 42px;
    font-weight: 700;
    color: #02031b;
    font-family: "Courier New", Courier, monospace;
    letter-spacing: 10px;
    cursor: pointer;
    user-select: all;
}

/* ========== 倒计时圆环 ========== */
.countdown-circle {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.countdown-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.countdown-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 6;
}

.countdown-progress {
    fill: none;
    stroke: #5c98f8;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 263.89;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.countdown-num {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: 700;
    color: #02031b;
    font-family: "Courier New", Courier, monospace;
}

.code-tip {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
}

/* ========== 分享区域 ========== */
.share-section {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.share-label {
    font-size: 14px;
    color: #99a2a9;
    margin-bottom: 8px;
}

.bulb-icon {
    color: #f59e0b;
    margin-right: 2px;
}

.share-url {
    display: inline-block;
    font-size: 14px;
    color: #5a87f6;
    font-family: "Courier New", Courier, monospace;
    word-break: break-all;
    text-decoration: none;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 10px;
}

.share-url:hover {
    text-decoration: underline;
}

/* ========== 说明区域 ========== */
.info-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: #23262f;
    margin-bottom: 0;
}

.info-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 0 16px 0;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.8;
}

.info-list li:last-child {
    margin-bottom: 0;
}

.info-list li .dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    background: #5c98f8;
    border-radius: 50%;
    margin-top: 8px;
}

.info-content {
    flex: 1;
    color: #717483;
}

.info-content strong {
    color: #23262f;
    font-weight: 600;
}

.info-text {
    color: #717483;
}

.demo-key {
    color: #5a87f6;
    font-family: "Courier New", Courier, monospace;
    cursor: pointer;
    text-decoration: underline;
}

.demo-key:hover {
    color: #2563eb;
}

.demo-note {
    color: #b1b2b6;
    font-size: 13px;
}

.link {
    color: #8aa9e9;
    text-decoration: none;
    word-break: break-all;
}

.link:hover {
    text-decoration: underline;
}

/* ========== 查询页面样式 ========== */
.query-card {
    text-align: center;
    padding: 40px 20px;
}

.query-label {
    font-size: 16px;
    color: #5f5f6b;
    margin-bottom: 24px;
}

.query-code-box {
    justify-content: center;
    max-width: 400px;
    margin: 0 auto 20px;
}

.query-timer {
    font-size: 16px;
    color: #5f5f6b;
    margin-bottom: 12px;
}

.timer-num {
    color: #5c98f8;
    font-weight: 700;
    font-family: "Courier New", Courier, monospace;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    font-size: 15px;
    color: #8a9cba;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.error-msg {
    color: #ff4d4f;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ========== 弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    max-width: 320px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.modal-close {
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
    line-height: 1;
}

.modal-close:hover {
    color: #475569;
}

.modal-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #02031b;
    margin-bottom: 16px;
}

.modal-tip {
    margin-top: 12px;
    font-size: 12px;
    color: #94a3b8;
}

#qrcode {
    display: flex;
    justify-content: center;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(2, 3, 27, 0.9);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
}

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

/* ========== 响应式 ========== */
@media (max-width: 520px) {
    body {
        padding: 15px 12px;
    }

    .card {
        padding: 20px 16px;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .btn-primary {
        width: 100%;
        margin-bottom: 8px;
    }

    .code-value {
        font-size: 32px;
        letter-spacing: 6px;
    }

    .countdown-circle {
        width: 60px;
        height: 60px;
    }

    .countdown-num {
        font-size: 16px;
    }

    .info-section {
        padding: 20px 16px;
    }
}
