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

/* 隐藏滚动条但保持滚动功能 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

html, body {
    height: 100%;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    min-height: 100%;
    padding-bottom: 80px;
}

/* 头部 - 紧凑 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(180deg, #ff3366 0%, #ff6b9d 100%);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: -10px;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.records-link {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    margin-right: -10px;
}

/* 手机号输入 - 紧凑 */
.phone-section {
    background: #fff;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.phone-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.phone-input {
    flex: 1;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    border: none;
    outline: none;
    background: transparent;
    letter-spacing: 2px;
}

.phone-input::placeholder {
    color: #ccc;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
}

.contacts-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
}

.operator-info {
    font-size: 12px;
    color: #ff6b35;
    padding-top: 6px;
    min-height: 22px;
}

/* 充值金额 - 紧凑横向滚动 */
.amount-section {
    background: #fff;
    padding: 12px 0;
    margin-bottom: 8px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 0 16px 10px;
}

.amount-list {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.amount-list::-webkit-scrollbar {
    display: none;
}

.amount-item {
    flex-shrink: 0;
    position: relative;
    width: 100px;
    background: #f8f9fa;
    border: 1.5px solid transparent;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
}

.amount-item.active {
    background: #fff5f0;
    border-color: #ff6b35;
}

.amount-main {
    margin-bottom: 4px;
}

.amount-num {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.amount-item.active .amount-num {
    color: #ff6b35;
}

.amount-unit {
    font-size: 12px;
    color: #666;
}

.amount-tag {
    font-size: 11px;
    color: #ff6b35;
    margin-bottom: 2px;
}

.amount-sub {
    font-size: 10px;
    color: #999;
}

.hot-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 0 8px 0 8px;
}

/* 到账计划 - 紧凑 */
.schedule-section {
    background: #fff;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.schedule-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.schedule-list::-webkit-scrollbar {
    display: none;
}

.schedule-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    min-width: 60px;
}

.schedule-item:first-child {
    background: #fff5f0;
    border: 1px solid #ff6b35;
}

.schedule-month {
    font-size: 11px;
    color: #666;
}

.schedule-item:first-child .schedule-month {
    color: #ff6b35;
    font-weight: 600;
}

.schedule-amount {
    font-size: 13px;
    font-weight: 700;
    color: #ff6b35;
}

.schedule-status {
    font-size: 9px;
    color: #999;
    padding: 1px 4px;
    background: #fff;
    border-radius: 4px;
}

.schedule-status.pending {
    color: #ff9500;
}

.schedule-status.success {
    color: #07C160;
}

/* 说明 - 紧凑 */
.tips-section {
    background: #fff;
    padding: 12px 16px;
}

.tips-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 6px;
}

.tips-item:last-child {
    margin-bottom: 0;
}

.tips-dot {
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.tips-text {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
}

/* 联系客服 */
.service-section {
    background: #fff;
    padding: 16px;
    margin-top: 8px;
    text-align: center;
}

.service-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff5f0;
    border: 1px solid #ff6b35;
    border-radius: 16px;
    font-size: 13px;
    color: #ff6b35;
    cursor: pointer;
}

/* 二维码弹窗 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qr-modal.show {
    display: flex;
}

.qr-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 280px;
    text-align: center;
}

.qr-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.qr-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.qr-image {
    width: 180px;
    height: 180px;
    margin: 0 auto 12px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-desc {
    font-size: 12px;
    color: #999;
}

/* 底部支付栏 - 紧凑 */
.pay-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.05);
}

.pay-info {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pay-label {
    font-size: 12px;
    color: #999;
}

.pay-price {
    font-size: 14px;
    color: #ff6b35;
}

.pay-price b {
    font-size: 22px;
    font-weight: 700;
}

.pay-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border: none;
    border-radius: 20px;
}

.pay-btn:disabled {
    background: #ccc;
}

/* 悬浮返回首页按钮 */
.floating-home {
    position: fixed;
    left: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff3366 0%, #ff6b9d 100%);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.4);
    text-decoration: none;
    z-index: 99;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-home:hover {
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.5);
    transform: scale(1.05);
}

.floating-home svg {
    margin-bottom: 2px;
}

.floating-home span {
    font-size: 10px;
}

/* 响应式 */
@media (max-width: 375px) {
    .amount-item {
        width: 90px;
        padding: 8px 6px;
    }
    
    .amount-num {
        font-size: 18px;
    }
}
