* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f6fa;
    min-height: 100vh;
    color: #333;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    background: #f5f6fa;
    min-height: 100vh;
    position: relative;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #6A4C93 0%, #8E6CBA 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
}

/* 主内容区 */
.main-content {
    padding: 12px;
    padding-bottom: 80px;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #9ca3af;
    font-size: 11px;
    padding: 4px 16px;
    position: relative;
}

.nav-item.active {
    color: #4A6FA5;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(135deg, #4A6FA5 0%, #2C4A70 100%);
    border-radius: 2px;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 用户信息卡片 - 新设计 */
.user-info-card {
    background: linear-gradient(135deg, #6A4C93 0%, #8E6CBA 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.user-info-card .avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid white;
    flex-shrink: 0;
}

.user-info-card .user-info {
    flex: 1;
}

.user-info-card .username {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-info-card .user-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-info-card .svip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.user-info-card .total-cards {
    font-size: 12px;
    opacity: 0.9;
}

/* 账户余额卡片 - 新设计 */
.balance-card {
    background: linear-gradient(135deg, #6A4C93 0%, #8E6CBA 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.balance-card .balance-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.balance-card .balance-value {
    font-size: 22px;
    font-weight: 700;
}

.balance-card .arrow {
    font-size: 18px;
    opacity: 0.7;
}

/* 卡种展示 - 新设计模仿图片 */
.card-type-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.card-type-item {
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    color: white;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-type-item:active {
    transform: scale(0.98);
}

/* 卡片头部 - 名称和数量标签 */
.card-type-item .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-type-item .name {
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.card-type-item .card-subtitle {
    font-size: 10px;
    opacity: 0.8;
    text-align: left;
    margin-top: 2px;
}

.card-type-item .stock-badge {
    background: #4CAF50;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
}

/* 卡片价格 */
.card-type-item .price-section {
    margin: 8px 0;
}

.card-type-item .price {
    font-size: 18px;
    font-weight: 700;
}

/* 卡片按钮 */
.card-type-item .buy-btn {
    background: rgba(255,255,255,0.25);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    backdrop-filter: blur(4px);
}

.card-type-item .vip-tip {
    font-size: 10px;
    margin-top: 6px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

/* 不同卡类型的渐变背景 */
.card-type-item.month {
    background: linear-gradient(135deg, #4A6FA5 0%, #3A5A8A 100%);
}

.card-type-item.year {
    background: linear-gradient(135deg, #5B7FB8 0%, #4A6FA5 100%);
}

.card-type-item.permanent {
    background: linear-gradient(135deg, #6C8FC7 0%, #5B7FB8 100%);
}

.card-type-item.agent {
    background: linear-gradient(135deg, #FF9A5A 0%, #FF7B3A 100%);
}

.card-type-item.oem {
    background: linear-gradient(135deg, #FFB366 0%, #FF9A5A 100%);
}

/* 购买记录 - 新设计 */
.record-card {
    background: linear-gradient(135deg, #6A4C93 0%, #8E6CBA 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    color: white;
}

.record-card .record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.record-card .record-title {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.record-card .record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    margin-bottom: 8px;
}

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

.record-card .record-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.record-card .record-type {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.record-card .record-right {
    text-align: right;
}

.record-card .record-amount {
    font-size: 16px;
    font-weight: 600;
}

.record-card .record-quantity {
    font-size: 11px;
    opacity: 0.8;
}

.record-card .record-arrow {
    font-size: 14px;
    opacity: 0.6;
    margin-left: 8px;
}

/* 公告 - 新设计 */
.notice-box {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-top: 12px;
    text-align: center;
}

.notice-box .warning-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.notice-box h3 {
    color: #FF4D4D;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.notice-box .notice-content {
    text-align: left;
    background: #FFF5F5;
    border-radius: 12px;
    padding: 14px;
    margin-top: 10px;
}

.notice-box p {
    font-size: 12px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 4px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4A6FA5 0%, #2C4A70 100%);
    color: white;
}

.btn-primary:active {
    opacity: 0.9;
    transform: scale(0.98);
}

.btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* 表单 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
    background: #f9fafb;
}

.form-input:focus {
    outline: none;
    border-color: #4A6FA5;
    background: white;
}

.form-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #f9fafb;
    cursor: pointer;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 320px;
    text-align: center;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
}

.modal-body {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
}

/* 进度条 */
.progress-bar {
    background: #e5e7eb;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}

/* 列表项 */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: white;
    border-radius: 12px;
    margin-bottom: 8px;
}

.list-item-left {
    display: flex;
    align-items: center;
}

.list-item-icon {
    font-size: 22px;
    margin-right: 12px;
}

.list-item-title {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

.list-item-desc {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.list-item-right {
    color: #9ca3af;
}

/* 复制按钮 */
.copy-btn {
    background: linear-gradient(135deg, #4A6FA5 0%, #2C4A70 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}

/* 提现 */
.withdraw-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.withdraw-amount {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 12px 0;
}

.withdraw-amount small {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

/* 激励政策 */
.policy-list {
    margin-top: 12px;
}

.policy-item {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 8px;
}

.policy-item h4 {
    font-size: 14px;
    color: #065f46;
    margin-bottom: 6px;
    font-weight: 600;
}

.policy-item p {
    font-size: 12px;
    color: #047857;
    line-height: 1.6;
}

/* 登录注册页 */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #4A6FA5 0%, #2C4A70 100%);
}

.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo h1 {
    color: white;
    font-size: 26px;
    font-weight: 700;
}

.auth-form {
    background: white;
    border-radius: 20px;
    padding: 28px 20px;
}

.auth-title {
    text-align: center;
    font-size: 20px;
    margin-bottom: 24px;
    color: #1f2937;
    font-weight: 600;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-switch a {
    color: #4A6FA5;
    text-decoration: none;
    font-weight: 500;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 14px 28px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 2000;
}

/* 加载中 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top-color: #4A6FA5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 数量选择器 */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 16px 0;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4A6FA5;
    font-weight: 600;
}

.quantity-value {
    font-size: 22px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    color: #1f2937;
}

/* 支付方式选择 */
.pay-methods {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.pay-method {
    flex: 1;
    padding: 12px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.pay-method.active {
    border-color: #4A6FA5;
    background: rgba(74, 111, 165, 0.08);
}

.pay-method-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.pay-method-name {
    font-size: 11px;
    color: #6b7280;
}

/* 数据卡片 */
.data-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.data-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.data-card .icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.data-card .value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.data-card .label {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

/* 升级进度卡片 */
.upgrade-card {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.upgrade-card .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.upgrade-card .current-level {
    font-size: 14px;
    color: #be185d;
    font-weight: 600;
}

.upgrade-card .next-level {
    font-size: 12px;
    color: #9ca3af;
}

/* 推广链接卡片 */
.promo-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.promo-card .title {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 10px;
}

.promo-card .link-box {
    display: flex;
    gap: 8px;
    align-items: center;
}

.promo-card .link-box input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    background: #f9fafb;
    color: #6b7280;
}

/* 二维码区域 */
.qrcode-area {
    text-align: center;
    padding: 20px;
}

.qrcode-area .qrcode-box {
    width: 140px;
    height: 140px;
    background: #f3f4f6;
    margin: 0 auto 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-area .qrcode-box img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.qrcode-area p {
    font-size: 12px;
    color: #9ca3af;
}

/* 抽奖转盘 */
.lottery-container {
    background: white;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.lottery-header {
    margin-bottom: 16px;
}

.lottery-header h3 {
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
}

.lottery-header p {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.lottery-cell {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 16px 8px;
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}

.lottery-cell .icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.lottery-cell.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.lottery-cell.center {
    background: linear-gradient(135deg, #4A6FA5 0%, #2C4A70 100%);
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.lottery-cell.center:active {
    transform: scale(0.95);
}

.lottery-cell.center .icon {
    font-size: 24px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #9ca3af;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* 邮箱显示 */
.email-display {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 8px;
    word-break: break-all;
}
