/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #07C160;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #e5e5e5;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --error-color: #fa5151;
    --success-color: #07C160;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #06ad56 100%);
    color: var(--white);
    padding: 40px 20px 30px;
    text-align: center;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    background-color: var(--white);
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.page-description {
    font-size: 14px;
    margin-top: 10px;
    opacity: 0.9;
    line-height: 1.5;
}

/* 主要内容 */
.main-content {
    flex: 1;
    padding: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* 金额选择 */
.amount-section {
    margin-bottom: 30px;
}

.amount-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.amount-option {
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.amount-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.15);
}

.amount-option.active {
    border-color: var(--primary-color);
    background-color: rgba(7, 193, 96, 0.05);
}

.amount-option.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.amount-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.amount-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* 自定义金额 */
.custom-amount {
    margin-top: 20px;
}

.custom-amount label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 15px;
    font-size: 18px;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 35px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

/* 备注信息 */
.remark-section {
    margin-bottom: 30px;
}

.remark-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s ease;
}

.remark-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* 支付按钮 */
.pay-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #06ad56 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.4);
}

.pay-button:active {
    transform: translateY(0);
}

.pay-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.button-amount {
    font-size: 24px;
    font-weight: 700;
}

/* 支付状态 */
.payment-status {
    text-align: center;
    padding: 40px 20px;
    margin-top: 20px;
}

.status-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.status-icon svg {
    width: 100%;
    height: 100%;
}

.icon-loading {
    fill: var(--primary-color);
    animation: rotate 1s linear infinite;
}

.icon-success {
    fill: var(--success-color);
}

.icon-error {
    fill: var(--error-color);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.status-text {
    font-size: 16px;
    color: var(--text-color);
}

/* 页脚 */
.footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.footer-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .header {
        padding: 30px 15px 20px;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .title {
        font-size: 20px;
    }

    .main-content {
        padding: 15px;
    }

    .amount-options {
        grid-template-columns: 1fr;
    }

    .amount-value {
        font-size: 24px;
    }

    .pay-button {
        font-size: 16px;
    }

    .button-amount {
        font-size: 20px;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.amount-option,
.custom-amount,
.remark-section,
.pay-button {
    animation: fadeIn 0.5s ease-out;
}

/* 页面加载遮罩 */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.page-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.page-loading .loading-text {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
