/**
 * USDT收款系统 - 样式文件
 * 说明: 简洁现代的设计风格,适配移动端
 */

/* ============================================
   基础样式
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #26A69A;      /* 主色调 - 青绿色 */
    --primary-dark: #00897B;
    --secondary-color: #FFA726;    /* 辅助色 - 橙色 */
    --success-color: #4CAF50;      /* 成功 - 绿色 */
    --warning-color: #FF9800;      /* 警告 - 橙色 */
    --error-color: #F44336;        /* 错误 - 红色 */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-color: #F5F7FA;
    --card-bg: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   头部样式
   ============================================ */
.header {
    text-align: center;
    padding: 30px 0;
}

.header h1 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.header .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================
   卡片样式
   ============================================ */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* ============================================
   表单样式
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group small {
    color: var(--text-light);
    font-size: 12px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 70px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 18px;
    transition: border-color 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-suffix {
    position: absolute;
    right: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ============================================
   链类型选择
   ============================================ */
.chain-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.chain-option {
    cursor: pointer;
}

.chain-option input {
    display: none;
}

.chain-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}

.chain-option input:checked + .chain-card {
    border-color: var(--primary-color);
    background-color: rgba(38, 166, 154, 0.05);
}

.chain-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.chain-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.chain-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ============================================
   按钮样式
   ============================================ */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 166, 154, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    padding: 10px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-copy {
    padding: 6px 12px;
    background: var(--bg-color);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: var(--border-color);
}

/* ============================================
   信息区域
   ============================================ */
.info-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.info-section ul,
.info-section ol {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.info-section li {
    margin-bottom: 8px;
}

.info-section .warning {
    color: var(--warning-color);
    font-size: 13px;
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 8px;
}

/* ============================================
   支付页面样式
   ============================================ */
.payment-card {
    text-align: center;
}

/* 状态栏 */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.status-bar.pending {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
}

.status-bar.paid {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
}

.status-bar.expired {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
}

.status-icon {
    font-size: 32px;
    margin-right: 12px;
}

.status-text {
    text-align: left;
}

.status-text span {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-text small {
    color: var(--text-secondary);
}

/* 金额显示 */
.amount-display {
    margin: 20px 0;
}

.amount-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
}

.amount-unit {
    font-size: 20px;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* 链类型标签 */
.chain-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-color);
    border-radius: 20px;
    margin-bottom: 20px;
}

.chain-tag .chain-icon {
    font-size: 18px;
    margin-right: 6px;
}

.chain-tag span:last-child {
    font-size: 14px;
    font-weight: 500;
}

/* 二维码 */
.qr-section {
    margin: 20px 0;
}

.qr-image {
    width: 200px;
    height: 200px;
    border: 4px solid var(--border-color);
    border-radius: 12px;
}

.qr-tip {
    color: var(--text-light);
    font-size: 13px;
    margin-top: 12px;
}

/* 地址和金额 */
.address-section,
.pay-amount-section,
.countdown-section {
    text-align: left;
    margin-bottom: 16px;
}

.address-section label,
.pay-amount-section label,
.countdown-section label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.address-box,
.amount-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 13px;
    word-break: break-all;
}

.address-box span,
.amount-box span {
    flex: 1;
    margin-right: 10px;
    font-family: monospace;
}

/* 倒计时 */
.countdown {
    font-size: 32px;
    font-weight: 600;
    color: var(--warning-color);
    font-family: monospace;
}

/* 订单信息 */
.order-info {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.order-info p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.action-buttons button {
    flex: 1;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 12px;
    margin-top: auto;
}

/* ============================================
   响应式适配
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 24px;
    }

    .amount-value {
        font-size: 36px;
    }

    .qr-image {
        width: 180px;
        height: 180px;
    }
}

/* ============================================
   动画效果
   ============================================ */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

.card {
    animation: fadeIn 0.3s ease-out;
}
