* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}
.app-container {
    width: 375px;
    min-height: 812px;
    background: #f5f5f5;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
}
.gradient-bg {
    background: linear-gradient(135deg, #FF4E50 0%, #FC913A 100%);
}
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.balance-card {
    background: linear-gradient(135deg, #FF4E50 0%, #FC913A 100%);
    border-radius: 16px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}
.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}
.redpacket-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
    cursor: pointer;
}
.redpacket-card:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(255, 78, 80, 0.2);
    border-color: #FF4E50;
}
.btn-primary {
    background: linear-gradient(135deg, #FF4E50 0%, #FC913A 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}
.btn-primary:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(255, 78, 80, 0.3);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 375px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: white;
    padding: 8px 0 20px 0;
    border-top: 1px solid #f0f0f0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #999;
    padding: 8px 20px;
}
.tab-item.active {
    color: #FF4E50;
}
.tab-item:active {
    transform: scale(0.9);
}
.qrcode-container {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f0f0f0;
    margin: 0 auto;
}
.merchant-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}
.merchant-card:active {
    border-color: #FF4E50;
    box-shadow: 0 2px 8px rgba(255, 78, 80, 0.1);
}
.record-item {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 3px solid #FF4E50;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.badge-active {
    background: #E8F5E9;
    color: #4CAF50;
}
.badge-expired {
    background: #FFEBEE;
    color: #F44336;
}
.badge-used {
    background: #E3F2FD;
    color: #2196F3;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.refresh-timer {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 8px;
}
.page-content {
    padding: 16px 16px 80px 16px;
}
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}
