/* 公共样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --bg-gradient-start: #e0f2fe;
    --bg-gradient-end: #f0f9ff;
    --text-dark: #1e293b;
    --text-secondary: #64748b;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --bg-secondary: #f4f7ff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-secondary);
    min-height: 100vh;
    padding-bottom: 80px;
    overflow-x: hidden;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 20px;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-item:active {
    opacity: 0.7;
}

.nav-icon {
    width: 28px;
    height: 28px;
    background-size: 100% 200%;
    background-position: top;
    transition: background-position 0.2s;
}

.nav-item.active .nav-icon {
    background-position: bottom;
}

.nav-icon.icon-apply {
    background-image: url('/static/assets/images/icon/nav_icon2.png');
}

.nav-icon.icon-recharge {
    background-image: url('/static/assets/images/icon/nav_icon3.png');
}

.nav-icon.icon-account {
    background-image: url('/static/assets/images/icon/nav_icon4.png');
}

.nav-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.nav-item.active .nav-label {
    color: var(--primary);
}

/* 底部弹出框 */
.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    z-index: 101;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.sheet.active {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 10px auto;
}

.sheet-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--white);
}

.sheet-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
}

.sheet-content {
    padding: 10px 0;
}

.sheet-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.sheet-item:active {
    background: rgba(0, 0, 0, 0.05);
}

.sheet-item-icon {
    width: 36px;
    height: 36px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheet-item-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sheet-item-text {
    font-size: 16px;
    color: var(--text-dark);
}

/* 通用按钮 */
.btn {
    width: 100%;
    height: 52px;
    border-radius: 26px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:active {
    background: rgba(59, 130, 246, 0.05);
    transform: scale(0.98);
}

/* 页面标签 */
.page-tabs {
    display: flex;
    background: var(--white);
    padding: 10px 0 0;
}

.page-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.page-tab.active {
    color: var(--text-dark);
    font-weight: 600;
}

.page-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
}

/* 卡片样式 */
.card {
    margin: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.card-header {
    background: linear-gradient(135deg, #3B7BF3, #86AEF8);
    padding: 20px;
    text-align: center;
    color: var(--white);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.card-subtitle {
    font-size: 12px;
    opacity: 0.9;
}

.card-body {
    padding: 20px;
}

/* 金额选择 */
.amount-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-dark);
}

.amount-label img {
    width: 20px;
    height: 20px;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.amount-btn {
    background: var(--bg-secondary);
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.amount-btn.active {
    background: var(--primary);
    color: var(--white);
}

.amount-btn:active {
    transform: scale(0.95);
}

.amount-input-wrap {
    display: flex;
    gap: 10px;
}

.amount-input {
    flex: 1;
    background: var(--bg-secondary);
    border: none;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 15px;
    color: var(--text-dark);
    outline: none;
}

.amount-input::placeholder {
    color: var(--text-secondary);
}

.amount-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.amount-submit:active {
    opacity: 0.9;
}

/* 支付方式 */
.payment-method {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    font-size: 13px;
    color: var(--text-secondary);
}

.payment-method img {
    width: 24px;
    height: 24px;
}

/* 支付弹框 */
.pay-sheet .sheet-content {
    padding: 20px;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.pay-row:last-child {
    border-bottom: none;
}

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

.pay-value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.pay-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 25px;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}

.pay-btn:active {
    opacity: 0.9;
}
