* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

.loading-hide {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PC端背景 */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('../images/bg.jpg') no-repeat;
    background-size: cover;
    /*opacity: 0.8;*/
}

/* 主容器 */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
}

/* 充值卡片 */
.card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 20px;
}

/* 卡片标题 */
.card-header {
    background-color: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #edf2f7;
}

.card-title {
    color: #2d3748;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* 卡片内容 */
.card-body {
    padding: 30px 35px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.form-group:last-child {
    margin-bottom: 10px;
}

.form-label {
    width: 100px;
    flex-shrink: 0;
    font-weight: 500;
    color: #4a5568;
    font-size: 15px;
    margin-bottom: 0;
}

.form-field {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.form-input,
.form-select {
    flex: 0.8;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
    color: #2d3748;
    background-color: #fff;
    transition: all 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.form-input:disabled {
    background-color: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
}

.form-hint {
    width: 160px;
    padding-left: 15px;
    font-size: 13px;
    color: #718096;
    flex-shrink: 0;
}

.form-error {
    color: #e53e3e;
}

.form-success {
    color: #38a169;
}

/* 支付方式选择 */
.payment-methods {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.payment-method {
    flex: 1;
    max-width: 160px;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.payment-method.selected {
    border-color: #4299e1;
    background-color: #ebf8ff;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.15);
}

.payment-method:hover:not(.selected) {
    border-color: #bee3f8;
}

.payment-method .icon {
    margin-right: 8px;
}

/* 提交按钮 */
.submit-btn {
    background-color: #4299e1;
    color: white;
    border: none;
    padding: 11px 0;
    width: 66%;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    display: block;
    /* margin: 0 auto; */
    box-shadow: 0 4px 6px rgba(66, 153, 225, 0.15);
}

.submit-btn:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(66, 153, 225, 0.2);
}

/* 促销信息和赞助获得 */
.promo-container .form-field,
.cash-container .form-field {
    flex-direction: column;
    align-items: flex-start;
}

.promo-box {
    width: 100%;
    background-color: #fffaf0;
    border-left: 3px solid #ed8936;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.promo-box p {
    margin: 5px 0;
    font-size: 14px;
    color: #dd6b20;
}

.cash-result {
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    color: #e53e3e;
    padding: 10px 0;
}

/* 特殊表单组 */
.form-group-stacked .form-label {
    margin-bottom: 8px;
}

.form-group-stacked .form-field {
    width: 100%;
}

.form-group-stacked .form-hint {
    width: 100%;
    padding-left: 0;
    margin-top: 6px;
}

/* 促销信息和赞助获得 */
.promo-container .form-label,
.cash-container .form-label {
    padding-top: 8px;
    align-self: flex-start;
}

/* 扫码支付 */
.qrcode-container {
    padding: 0;
}

.qrcode-header {
    padding: 20px;
    background-color: #f8fafc;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qrcode-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.qrcode-timer {
    font-family: monospace;
    font-size: 18px;
    color: #4a5568;
    background-color: #edf2f7;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.qrcode-timer.expiring {
    color: #e53e3e;
    background-color: #fed7d7;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.qrcode-body {
    padding: 30px;
    text-align: center;
}

.qrcode-image-container {
    position: relative;
    display: inline-block;
    margin: 0 auto 20px;
    transition: all 0.3s;
}

.qrcode-img {
    width: 200px;
    height: 200px;
    border: 5px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: all 0.3s;
}

.qrcode-logo {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wxpay-logo {
    background-color: #09bb07;
}

.wxpay-logo:after {
    content: '';
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 1228 1024' fill='%23ffffff'%3E%3Cpath d='M530.8928 703.1296a41.472 41.472 0 0 1-35.7376-19.8144l-2.7136-5.5808L278.272 394.752a18.7392 18.7392 0 0 1-2.048-8.1408 19.968 19.968 0 0 1 20.48-19.3536c4.608 0 8.8576 1.4336 12.288 3.84l234.3936 139.9296a64.4096 64.4096 0 0 0 54.528 5.9392L1116.2624 204.8C1004.9536 80.896 821.76 0 614.4 0 275.0464 0 0 216.576 0 483.6352c0 145.7152 82.7392 276.8896 212.2752 365.5168a38.1952 38.1952 0 0 1 17.2032 31.488 44.4928 44.4928 0 0 1-2.1504 12.3904l-27.6992 97.4848c-1.3312 4.608-3.328 9.3696-3.328 14.1312 0 10.752 9.216 19.3536 20.48 19.3536 4.4032 0 8.0384-1.536 11.776-3.584l134.5536-73.3184c10.1376-5.5296 20.7872-8.96 32.6144-8.96 6.2976 0 12.288 0.9216 18.0736 2.5088 62.72 17.0496 130.4576 26.5728 200.5504 26.5728C953.7024 967.168 1228.8 750.592 1228.8 483.6352c0-80.9472-25.4464-157.1328-70.0416-224.1024l-604.9792 436.992-4.4544 2.4064a42.1376 42.1376 0 0 1-18.432 4.1984z'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
}

.alipay-logo {
    background-color: #1677ff;
}

.alipay-logo:after {
    content: '';
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 1024 1024' fill='%23ffffff'%3E%3Cpath d='M1024.0512 701.0304V196.864A196.9664 196.9664 0 0 0 827.136 0H196.864A196.9664 196.9664 0 0 0 0 196.864v630.272A196.9152 196.9152 0 0 0 196.864 1024h630.272a197.12 197.12 0 0 0 193.8432-162.0992c-52.224-22.6304-278.528-120.32-396.4416-176.64-89.7024 108.6976-183.7056 173.9264-325.3248 173.9264s-236.1856-87.2448-224.8192-194.048c7.4752-70.0416 55.552-184.576 264.2944-164.9664 110.08 10.3424 160.4096 30.8736 250.1632 60.5184 23.1936-42.5984 42.496-89.4464 57.1392-139.264H248.064v-39.424h196.9152V311.1424H204.8V267.776h240.128V165.632s2.1504-15.9744 19.8144-15.9744h98.4576V267.776h256v43.4176h-256V381.952h208.8448a805.9904 805.9904 0 0 1-84.8384 212.6848c60.672 22.016 336.7936 106.3936 336.7936 106.3936zM283.5456 791.6032c-149.6576 0-173.312-94.464-165.376-133.9392 7.8336-39.3216 51.2-90.624 134.4-90.624 95.5904 0 181.248 24.4736 284.0576 74.5472-72.192 94.0032-160.9216 150.016-253.0816 150.016z'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
}

.qrcode-amount {
    font-size: 28px;
    color: #e53e3e;
    margin: 20px 0;
    font-weight: bold;
}

.qrcode-tips {
    margin: 20px 0;
}

.qrcode-tip {
    margin: 8px 0;
    color: #4a5568;
    font-size: 14px;
}

.primary-tip {
    font-size: 16px;
}

.highlight {
    font-weight: bold;
    color: #e53e3e;
}

.icon-scan {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    vertical-align: middle;
    margin-right: 5px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cmVjdCB4PSIzIiB5PSIzIiB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHJ4PSIyIiByeT0iMiIvPjxjaXJjbGUgY3g9IjguNSIgY3k9IjguNSIgcj0iMS41Ii8+PHBvbHlsaW5lIHBvaW50cz0iMjEgMTUgMTYgMTAgNSAyMSIvPjwvc3ZnPg==');
}

.wx-color .icon-scan {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDdiYzBjIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHJlY3QgeD0iMyIgeT0iMyIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiByeD0iMiIgcnk9IjIiLz48Y2lyY2xlIGN4PSI4LjUiIGN5PSI4LjUiIHI9IjEuNSIvPjxwb2x5bGluZSBwb2ludHM9IjIxIDE1IDE2IDEwIDUgMjEiLz48L3N2Zz4=');
}

.alipay-color .icon-scan {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTY3N2ZmIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHJlY3QgeD0iMyIgeT0iMyIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiByeD0iMiIgcnk9IjIiLz48Y2lyY2xlIGN4PSI4LjUiIGN5PSI4LjUiIHI9IjEuNSIvPjxwb2x5bGluZSBwb2ludHM9IjIxIDE1IDE2IDEwIDUgMjEiLz48L3N2Zz4=');
}

.qrcode-footer {
    padding: 15px 20px;
    border-top: 1px solid #edf2f7;
    text-align: center;
}

.cancel-btn {
    background-color: #edf2f7;
    color: #4a5568;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn:hover {
    background-color: #e2e8f0;
}

/* 二维码过期 */
.qrcode-image-container.expired .qrcode-img {
    filter: grayscale(1) opacity(0.5);
}

.expired-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.refresh-btn {
    margin-top: 10px;
    background-color: #4299e1;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
}

/* 支付结果 */
.result-container {
    text-align: center;
    padding: 30px;
}

.result-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
}

.result-title {
    font-size: 20px;
    color: #2d3748;
    margin-bottom: 15px;
}

.result-message {
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* 支付成功样式 */
.success-animation {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    position: relative;
    display: inline-block;
    vertical-align: top;
}

.checkmark-circle .background {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #38a169;
    position: absolute;
}

.checkmark-circle .checkmark {
    border-radius: 5px;
}

.checkmark-circle .checkmark.draw:after {
    animation-delay: 100ms;
    animation-duration: 0.8s;
    animation-timing-function: ease;
    animation-name: checkmark;
    transform: scaleX(-1) rotate(135deg);
    animation-fill-mode: forwards;
}

.checkmark-circle .checkmark:after {
    opacity: 0;
    height: 40px;
    width: 18px;
    transform-origin: left top;
    border-right: 5px solid white;
    border-top: 5px solid white;
    content: '';
    left: 22px;
    top: 45px;
    position: absolute;
}

@keyframes checkmark {
    0% {
        height: 0;
        width: 0;
        opacity: 1;
    }
    20% {
        height: 0;
        width: 18px;
        opacity: 1;
    }
    40% {
        height: 40px;
        width: 18px;
        opacity: 1;
    }
    100% {
        height: 40px;
        width: 18px;
        opacity: 1;
    }
}

.success-title {
    color: #38a169;
    font-size: 24px;
    font-weight: bold;
}

.success-message {
    color: #2d3748;
    font-size: 16px;
    margin-bottom: 15px;
}

.success-details {
    background-color: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: inline-block;
    transition: all 0.5s ease;
}

.success-details.animated {
    box-shadow: 0 0 15px rgba(56, 161, 105, 0.3);
    transform: scale(1.02);
}

.success-details p {
    margin: 5px 0;
    color: #4a5568;
    font-size: 14px;
}

.back-btn {
    background-color: #4299e1;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(66, 153, 225, 0.15);
}

/* 帮助信息 */
.help-info {
    margin-top: 25px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    font-size: 14px;
    color: #4a5568;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.help-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.help-info p {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        /*background: linear-gradient(135deg, #2b4b6f 0%, #1e293b 100%);*/
        background: linear-gradient(319.06deg,rgba(156,84,248,.72) -4.71%,rgba(121,45,250,.9) 74.84%);
    }
    
    .bg-container {
        display: none;
    }
    
    .container {
        padding: 12px 10px;
        max-width: 100%;
    }
    
    .card {
        border-radius: 10px;
        margin-top: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* 移动端表单改为垂直布局且更紧凑 */
    .form-group {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 15px;
    }
    
    .form-label {
        width: 100%;
        margin-bottom: 5px;
        font-size: 14px;
    }
    
    .form-field {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-input,
    .form-select {
        flex: none;
        width: 100%;
        padding: 8px 12px;
    }
    
    .form-hint {
        display: none; /* 移动端不显示提示 */
    }
    
    /* 错误和成功提示仍然显示 */
    .form-error, 
    .form-success {
        display: block;
        width: 100%;
        padding-left: 0;
        margin-top: 5px;
    }
    
    .payment-methods {
        width: 100%;
    }
    
    .payment-method {
        max-width: none;
        padding: 8px 10px;
    }
    
    .submit-btn {
        width: 100%;
    }

    .page-title {
        color: #fff;
        margin-top: 5px;
        margin-bottom: 15px;
        display: none;
    }
    
    .help-info {
        background-color: rgba(255, 255, 255, 0.95);
        margin-top: 15px;
        padding: 15px;
    }
    
    /* 缩小二维码页面间距 */
    .qrcode-body {
        padding: 20px 15px;
    }
    
    .qrcode-header {
        padding: 15px;
    }
    
    .qrcode-footer {
        padding: 12px 15px;
    }
}

/* 版权信息样式 */
.copyright {
    text-align: center;
    padding: 20px 0;
    color: #666;
    font-size: 14px;
    margin-top: 30px;
    border-top: 1px solid #eee;
}

.copyright p {
    margin: 5px 0;
}

.copyright p:first-child {
    color: #fff;
    font-size: 12px;
}

.copyright p:last-child {
    color: #666;
    font-size: 14px;
} 