/**
 * 支付系统公共样式
 * @description 所有模板共用的基础样式
 */

/* ==================== 重置样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== 壁纸背景 ==================== */
.wallpaper-bg {
    position: fixed;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.wallpaper-bg.loaded {
    opacity: 1;
}

.wallpaper-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.wallpaper-overlay.loaded {
    opacity: 1;
}

/* ==================== 基础布局 ==================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 12px;
    padding: 30px;
}

.page-title {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 25px;
}

.hidden {
    display: none !important;
}

/* ==================== 步骤引导 ==================== */
.step-guide {
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.step-guide-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-list {
    list-style: none;
    padding: 0;
}

.step-list li {
    font-size: 13px;
    padding: 5px 0;
    padding-left: 24px;
    position: relative;
}

.step-list li::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    text-align: center;
    line-height: 18px;
}

/* ==================== 表单样式 ==================== */
.form-section {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.price-display {
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 14px;
}

.price-value {
    font-size: 24px;
    font-weight: 600;
}

.price-value::before {
    content: '\A5';
    font-size: 16px;
    margin-right: 2px;
}

.submit-btn {
    width: 100%;
    height: 46px;
    font-size: 16px;
    border-radius: 8px;
}

/* ==================== 验证码 ==================== */
.captcha-section {
    margin-bottom: 20px;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.captcha-img {
    height: 45px;
    border-radius: 6px;
    cursor: pointer;
}

.captcha-refresh {
    font-size: 13px;
    cursor: pointer;
}

.captcha-refresh:hover {
    text-decoration: underline;
}

.captcha-input {
    width: 100%;
}

/* ==================== 邮箱验证 ==================== */
.email-status {
    font-size: 12px;
    margin-top: 6px;
}

.email-status.error {
    color: #ff5722;
}

.email-status.success {
    color: #52c41a;
}

/* ==================== 自定义显示文本 ==================== */
.custom-display-text {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
}

/* ==================== 备注码区域 ==================== */
.remark-code-box {
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.remark-code-label {
    font-size: 13px;
    margin-bottom: 8px;
}

.remark-code-value {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: "Courier New", monospace;
}

.remark-code-tip {
    font-size: 12px;
    margin-top: 8px;
}

/* ==================== 二维码区域 ==================== */
.qrcode-section {
    margin-bottom: 20px;
}

.qrcode-wrapper {
    border-radius: 8px;
    overflow: hidden;
}

.qrcode-tabs {
    display: flex;
}

.qrcode-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.qrcode-content {
    text-align: center;
    padding: 15px;
}

.qrcode-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.qrcode-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* ==================== 支付提示 ==================== */
.payment-notice {
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: noticeGlow 2s ease-in-out infinite;
}

.payment-notice i {
    font-size: 20px;
    flex-shrink: 0;
}

@keyframes noticeGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

/* ==================== 订单摘要 ==================== */
.order-summary {
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.summary-label {
    color: #666;
}

.summary-value {
    font-weight: 500;
}

.summary-value.price {
    font-size: 18px;
}

.back-link {
    text-align: center;
    margin-top: 15px;
}

.back-link a {
    font-size: 14px;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ==================== 成功结果页 ==================== */
.success-result {
    text-align: center;
    padding: 20px 0;
}

/* 状态流程条 */
.order-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.progress-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.progress-icon i {
    font-size: 18px;
}

.progress-text {
    font-size: 12px;
}

.progress-line {
    width: 40px;
    height: 3px;
    margin: 0 8px;
    margin-bottom: 22px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(250, 140, 22, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(250, 140, 22, 0);
    }
}

.pending-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 温馨提示 */
.pending-tips {
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    text-align: left;
}

.tip-item {
    font-size: 13px;
    padding: 4px 0;
    display: flex;
    align-items: center;
}

.tip-item i {
    margin-right: 8px;
    font-size: 14px;
}

/* 订单信息 */
.order-info {
    border-radius: 8px;
    padding: 15px;
    text-align: left;
}

.order-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.order-info-label {
    color: #666;
}

.order-info-value {
    font-weight: 500;
}

.order-info-value.highlight {
    font-weight: 600;
    font-size: 16px;
}

/* 未支付提示 */
.unpaid-notice {
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 20px;
}

.unpaid-title {
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.unpaid-qrcode {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.mini-qrcode-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-tab {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-qrcode-box {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.mini-qrcode-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-qrcode-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.mini-remark {
    font-size: 12px;
}

.mini-remark-code {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 2px;
}

/* ==================== 查询链接 ==================== */
.query-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
}

.query-link a {
    font-size: 14px;
    text-decoration: none;
}

.query-link a:hover {
    text-decoration: underline;
}

/* ==================== layui覆盖 ==================== */
.layui-form-select dl {
    max-height: 200px;
}


/* ==================== 邮箱验证码样式 ==================== */
.email-verify-wrapper {
    width: 100%;
}

.email-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* 邮箱输入框 - 统一高度38px，与layui select一致 */
#emailInput,
.email-input-group input.layui-input,
.email-input-group input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 38px !important;
    min-height: 38px !important;
    line-height: 38px !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.send-code-btn {
    min-width: 110px;
    white-space: nowrap;
    flex-shrink: 0;
    height: 38px !important;
    line-height: 36px !important;
    padding: 0 15px !important;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.send-code-btn:hover:not(.counting):not(.layui-btn-disabled) {
    opacity: 0.8;
}

.send-code-btn.counting {
    background: #f5f5f5 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    border-color: #e0e0e0 !important;
}

.code-input-group {
    margin-top: 12px;
    display: flex;
    align-items: stretch;
    gap: 10px;
}

/* 验证码输入框 - 统一高度38px */
#codeInput,
.code-input-group input.layui-input,
.code-input-group input[type="text"] {
    flex: 1;
    height: 38px !important;
    min-height: 38px !important;
    line-height: 38px !important;
    font-size: 16px !important;
    letter-spacing: 2px;
    text-align: center;
    font-weight: 600;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.code-status {
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
    display: flex;
    align-items: center;
}

.code-status.success {
    color: #52c41a;
}

.code-status.error {
    color: #ff4d4f;
}

.email-tips {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    padding: 8px 12px;
    border-radius: 4px;
    background: #f5f7fa;
}

.email-tips.success {
    color: #52c41a;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}

.email-tips.error {
    color: #ff4d4f;
    background: #fff2f0;
    border: 1px solid #ffccc7;
}

.email-tips:empty {
    display: none;
}

/* 移动端响应式 */
@media (max-width: 480px) {
    .email-input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .send-code-btn {
        width: 100%;
    }
    
    .code-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .code-status {
        text-align: center;
        justify-content: center;
        min-width: auto;
    }
}
