* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #fff;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

main {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow: hidden;
}

.search-section, .user-section {
    padding: 20px;
}

.section-header {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.section-header h2 {
    color: #333;
    font-size: 1.2rem;
    margin: 0;
    flex-shrink: 0;
}

.section-header .btn-back {
    margin-left: auto;
    flex-shrink: 0;
}

.user-avatar-small img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}

.avatar-placeholder-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.avatar-placeholder-small span {
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group label .required {
    color: #e74c3c;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-group input[type="number"] {
    -moz-appearance: textfield;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-container {
    text-align: center;
}

.btn {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-back {
    background: #94a3b8;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.btn-back:hover {
    background: #64748b;
}

.btn:hover {
    background: #5a6fd6;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4191 100%);
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.user-card {
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 15px;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.avatar-placeholder span {
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
}

.user-info {
    flex: 1;
    padding-top: 5px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid #e2e8f0;
    height: 48px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
}

.info-item .value {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.95rem;
}

.info-item .value.points {
    color: #f59e0b;
    font-size: 1.1rem;
}

.info-item .value.vip {
    color: #8b5cf6;
}

.info-item .expiry-separator {
    color: #94a3b8;
    margin: 0 6px;
}

.info-item .expiry-info {
    color: #94a3b8;
    font-size: 0.9rem;
}

.recharge-section {
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
}

.recharge-tabs {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    background: #fff;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 15px;
}

.tab-btn {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tab-content {
    display: block;
}

.current-points {
    text-align: center;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
}

.current-points .points-label {
    font-size: 0.95rem;
    color: #999;
    margin-bottom: 8px;
}

.current-points .points-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #22c55e;
}

.recharge-section h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
}

.recharge-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.recharge-option, .member-option {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.recharge-option:hover, .member-option:hover {
    border-color: #22c55e;
    transform: translateY(-2px);
}

.recharge-option.selected, .member-option.selected {
    border-color: #22c55e;
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
    transform: translateY(-2px);
}

.recharge-option.selected::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recharge-option.selected::before {
    content: '✓';
    position: absolute;
    top: 1px;
    right: 3px;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    z-index: 1;
}

.recharge-option .option-amount {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.recharge-option .option-points {
    font-size: 0.75rem;
    color: #999;
    margin-top: 3px;
}

.recharge-option.selected .option-amount {
    color: #22c55e;
}

.recharge-option.selected .option-points {
    color: #22c55e;
}

.btn-recharge {
    width: 100%;
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-recharge:hover {
    background: #16a34a;
}

.btn-recharge:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
}

@media screen and (min-width: 600px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 20px;
    }
    
    header {
        margin-bottom: 30px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .search-section, .user-section {
        padding: 25px;
    }
    
    .user-card {
        gap: 20px;
        padding: 20px;
    }
    
    .user-avatar img, .avatar-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .avatar-placeholder span {
        font-size: 2.5rem;
    }
    
    .current-points .points-value {
        font-size: 3rem;
    }
    
    .recharge-options {
        gap: 12px;
    }
    
    .recharge-option {
        padding: 15px 10px;
    }
    
    .btn-recharge {
        padding: 16px;
        font-size: 1.1rem;
    }
}

@media screen and (min-width: 768px) {
    html {
        font-size: 16px;
    }
    
    .container {
        padding: 30px;
    }
    
    .user-card {
        gap: 25px;
        padding: 25px;
    }
    
    .user-avatar img, .avatar-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .avatar-placeholder span {
        font-size: 3rem;
    }
    
    .current-points {
        padding: 20px;
    }
    
    .current-points .points-value {
        font-size: 3.5rem;
    }
    
    .recharge-options {
        gap: 15px;
    }
    
    .recharge-option {
        padding: 18px 12px;
    }
}
