/* 卡券激活系统 - H5移动端样式 */
/* 蓝+玫红配色的大健康风格 */

:root {
    /* 主色调 - 蓝色系 */
    --primary-blue: #4A90E2;
    --primary-blue-light: #6BA3E8;
    --primary-blue-dark: #3A7BD5;
    --primary-blue-bg: rgba(74, 144, 226, 0.1);
    
    /* 辅助色 - 玫红色系 */
    --accent-rose: #E91E63;
    --accent-rose-light: #F06292;
    --accent-rose-dark: #C2185B;
    --accent-rose-bg: rgba(233, 30, 99, 0.1);
    
    /* 渐变色 */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    --gradient-light: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--primary-blue) 100%);
    --gradient-bg: linear-gradient(180deg, #f8f9ff 0%, #e8f2ff 100%);
    
    /* 中性色 */
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    
    /* 功能色 */
    --success: #2ED573;
    --success-light: #55E88A;
    --success-bg: rgba(46, 213, 115, 0.1);
    --warning: #FFA726;
    --warning-light: #FFB74D;
    --warning-bg: rgba(255, 167, 38, 0.1);
    --error: #FF4757;
    --error-light: #FF6B7A;
    --error-bg: rgba(255, 71, 87, 0.1);
    --info: #54A0FF;
    --info-light: #74B9FF;
    --info-bg: rgba(84, 160, 255, 0.1);
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;
    
    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 28px;
    --font-size-4xl: 32px;
    
    /* 过渡 */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    
    /* 移动端特定 */
    --safe-area-top: env(safe-area-inset-top);
    --safe-area-bottom: env(safe-area-inset-bottom);
    --safe-area-left: env(safe-area-inset-left);
    --safe-area-right: env(safe-area-inset-right);
}

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

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--gray-800);
    background: var(--gradient-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* 页面容器 */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
}

/* 页面头部 */
.page-header {
    position: relative;
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
    text-align: center;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.logo h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin: 0;
}

.header-subtitle {
    font-size: var(--font-size-base);
    opacity: 0.9;
    font-weight: 400;
}

/* 主内容区 */
.page-main {
    flex: 1;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: calc(-1 * var(--space-md));
    position: relative;
    z-index: 1;
    padding-bottom: 80px; /* 为底部导航留出空间 */
}

/* 卡片样式 */
.card {
    background: #FFF;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    margin-bottom: var(--space-lg);
    
}

.card-header {
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    text-align: center;
}

.card-header h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-sm);
}

.card-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-sm);
}

.card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

/* 激活表单 */
.activation-form {
    padding: 0 var(--space-lg) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-700);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: var(--space-md) var(--space-lg) var(--space-md) 52px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    transition: var(--transition-base);
    background: var(--white);
    -webkit-appearance: none;
    appearance: none;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-bg);
}

.input-wrapper input::placeholder {
    color: var(--gray-400);
}

.input-wrapper input:invalid {
    border-color: var(--error);
}

.input-wrapper input:valid {
    border-color: var(--success);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    pointer-events: none;
    z-index: 1;
}

.input-help {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
}

/* 表单操作 */
.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    min-width: 80px;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    width: 100%;
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.spinner {
    animation: spin 1s linear infinite;
}

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

/* 信息列表 */
.info-list {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-blue-bg);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-content h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-xs);
}

.info-content p {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    line-height: 1.5;
}

/* 查询操作 */
.query-actions {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

/* 页面底部 - 移除原来的footer */

/* Toast 提示框 */
#toastContainer {
    position: fixed;
    top: var(--space-lg);
    left: var(--space-md);
    right: var(--space-md);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: slideDown 0.3s ease-out;
    pointer-events: auto;
    border-left: 4px solid;
}

.toast-success {
    border-left-color: var(--success);
    background: var(--success-bg);
}

.toast-error {
    border-left-color: var(--error);
    background: var(--error-bg);
}

.toast-warning {
    border-left-color: var(--warning);
    background: var(--warning-bg);
}

.toast-info {
    border-left-color: var(--info);
    background: var(--info-bg);
}

.toast-icon {
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    color: inherit;
    opacity: 0.7;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 模态框样式 */
.modal-overlay {
    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: 10000;
    padding: var(--space-lg);
    animation: fadeIn 0.3s ease-out;
}

.modal-dialog {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    padding: var(--space-lg);
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.modal-body {
    padding: var(--space-lg);
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--space-md);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* 用户信息表单 */
.user-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* 激活结果 */
.result-card {
    text-align: center;
}

.result-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-icon.success {
    background: var(--success-bg);
    color: var(--success);
}

.result-icon.error {
    background: var(--error-bg);
    color: var(--error);
}

.result-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.result-title.success {
    color: var(--success);
}

.result-title.error {
    color: var(--error);
}

.result-message {
    font-size: var(--font-size-base);
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.result-details {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.detail-label {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.detail-value {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-800);
}

.detail-value.amount {
    color: var(--accent-rose);
    font-size: var(--font-size-base);
}

/* 卡券列表 */
.voucher-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.voucher-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.voucher-info {
    flex: 1;
}

.voucher-amount {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--accent-rose);
    margin-bottom: var(--space-xs);
}

.voucher-status {
    font-size: var(--font-size-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-weight: 500;
}

.voucher-status.active {
    background: var(--success-bg);
    color: var(--success);
}

.voucher-status.used {
    background: var(--gray-100);
    color: var(--gray-600);
}

.voucher-status.expired {
    background: var(--error-bg);
    color: var(--error);
}

.voucher-date {
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    margin-top: var(--space-xs);
}

/* 查询表单 */
.query-form {
    padding: 0 var(--space-lg) var(--space-lg);
}

.query-result {
    margin-top: var(--space-lg);
}

.user-summary {
    background: var(--primary-blue-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    flex: 1;
    text-align: left;
}

.user-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-xs);
}

.user-phone {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.balance-info {
    text-align: right;
}

.balance-amount {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: var(--space-xs);
}

.balance-amount.positive {
    color: var(--success);
}

.balance-amount.negative {
    color: var(--error);
}

.balance-label {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 余额统计 */
.balance-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    padding: var(--space-md) 0;
}

.balance-stats-grid .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.balance-stats-grid .stat-item:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.balance-stats-grid .stat-item.income .stat-icon {
    color: var(--success);
}

.balance-stats-grid .stat-item.expense .stat-icon {
    color: var(--error);
}

.balance-stats-grid .stat-item.transactions .stat-icon {
    color: var(--info);
}

.balance-stats-grid .stat-icon {
    margin-bottom: var(--space-sm);
}

.balance-stats-grid .stat-content {
    text-align: center;
}

.balance-stats-grid .stat-value {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-xs);
}

.balance-stats-grid .stat-label {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
}

/* 余额明细列表 */
.balance-details-list {
    max-height: 400px;
    overflow-y: auto;
}

.balance-detail-item {
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-md);
    cursor: pointer;
    transition: var(--transition-base);
}

.balance-detail-item:last-child {
    border-bottom: none;
}

.balance-detail-item:hover {
    background: var(--gray-50);
}

.balance-detail-item.expanded {
    background: var(--primary-blue-bg);
}

.detail-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.detail-info {
    flex: 1;
    margin-right: var(--space-md);
}

.detail-description {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: var(--space-xs);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-size: var(--font-size-xs);
    color: var(--gray-600);
}

.detail-time {
    background: var(--gray-100);
    padding: 2px var(--space-xs);
    border-radius: var(--radius-sm);
}

.detail-order {
    background: var(--info-bg);
    color: var(--info);
    padding: 2px var(--space-xs);
    border-radius: var(--radius-sm);
}

.detail-amount {
    font-size: var(--font-size-lg);
    font-weight: 600;
    white-space: nowrap;
}

.detail-amount.income {
    color: var(--success);
}

.detail-amount.expense {
    color: var(--error);
}

.detail-extra {
    display: none;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-200);
    font-size: var(--font-size-xs);
    color: var(--gray-600);
}

.detail-id,
.detail-sync {
    margin-bottom: var(--space-xs);
}

.empty-details {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--gray-500);
}

.empty-details .empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    opacity: 0.5;
}

.empty-details .empty-text {
    font-size: var(--font-size-sm);
}

/* 移动端优化 */
@media (max-width: 300px) {
    .user-summary {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }
    
    .user-info {
        text-align: center;
    }
    
    .balance-info {
        text-align: center;
    }
    
    .balance-amount {
        font-size: var(--font-size-xl);
    }
    
    .balance-stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .detail-main {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .detail-info {
        margin-right: 0;
    }
    
    .detail-amount {
        align-self: flex-end;
    }
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--gray-500);
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    opacity: 0.5;
}

.empty-text {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-lg);
}

/* 响应式设计 */
@media (max-width: 375px) {
    .page-main {
        padding: var(--space-md);
    }
    
    .card-header {
        padding: var(--space-md) var(--space-md) var(--space-sm);
    }
    
    .activation-form {
        padding: 0 var(--space-md) var(--space-md);
    }
    
    .info-list {
        padding: var(--space-sm) var(--space-md) var(--space-md);
    }
    
    .query-actions {
        padding: var(--space-sm) var(--space-md) var(--space-md);
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --gray-50: #2a2a2a;
        --gray-100: #3a3a3a;
        --gray-200: #4a4a4a;
        --gray-300: #5a5a5a;
        --gray-400: #6a6a6a;
        --gray-500: #7a7a7a;
        --gray-600: #8a8a8a;
        --gray-700: #9a9a9a;
        --gray-800: #e0e0e0;
        --gray-900: #f0f0f0;
    }
    
    body {
        background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    }
}


/* 验证码相关样式 */
.captcha-wrapper {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.captcha-wrapper input {
    flex: 0 0 165px; /* 固定宽度120px，不伸缩 */
    padding-left: var(--space-md) !important;
}

.captcha-image-container {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
    flex-shrink: 0;
}

#captchaImage {
    height: 48px; /* 与输入框高度一致 */
    width: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    cursor: pointer;
    transition: all 0.3s ease;
}

#captchaImage:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-bg);
}

.btn-captcha {
    height: 48px; /* 与输入框高度一致 */
    padding: 0 var(--space-md);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-captcha:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-captcha:active {
    transform: translateY(0);
}

.btn-captcha:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-captcha-refresh {
    width: 48px;
    height: 48px; /* 与输入框高度一致 */
    padding: 0;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-captcha-refresh:hover {
    background: var(--gray-200);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-captcha-refresh:active {
    transform: rotate(180deg);
}

.btn-captcha-refresh svg {
    transition: transform 0.3s ease;
}

.btn-captcha-refresh:hover svg {
    transform: rotate(180deg);
}

/* 移动端优化 */
@media (max-width: 360px) {
    .captcha-wrapper {
        gap: var(--space-xs);
    }
    
    .captcha-wrapper input {
        flex: 0 0 165px; /* 移动端稍微缩小 */
    }
    
    .captcha-loading {
        padding: var(--space-xs) var(--space-sm);
        font-size: 13px;
        min-width: 80px;
    }
    
    #captchaImage {
        height: 45px;
        max-width: 100px;
    }
    
    .btn-captcha {
        height: 45px;
        padding: 0 var(--space-sm);
        font-size: 13px;
    }
    
    .btn-captcha-refresh {
        width: 45px;
        height: 45px;
    }
    
    .captcha-image-container {
        min-height: 45px;
    }
}

/* 验证码加载状态 */
.captcha-loading {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--gray-50);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-600);
    font-size: var(--font-size-sm);
    height: 48px; /* 与输入框高度一致 */
    min-width: 100px;
}

.captcha-loading .spinner {
    color: var(--primary-blue);
}

.captcha-loading span {
    white-space: nowrap;
}

/* 验证码图片点击效果 */
#captchaImage {
    cursor: pointer;
    transition: all 0.2s ease;
}

#captchaImage:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

#captchaImage:active {
    transform: scale(0.98);
}

/* 验证码容器布局优化 */
.captcha-image-container {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移动端验证码优化 */
@media (max-width: 360px) {
    .captcha-loading {
        padding: 10px;
        font-size: 13px;
    }
    
    #captchaImage {
        height: 45px;
        max-width: 120px;
    }
    
    .captcha-image-container {
        min-height: 45px;
    }
}
/* 实体卡片样式 */
.voucher-card {
    cursor: pointer;
    transition: var(--transition-base);
    perspective: 1200px;
    padding: var(--space-md);
}

.voucher-card:hover {
    transform: translateY(-8px) rotateX(3deg);
}

.physical-card {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform-style: preserve-3d;
    transition: var(--transition-base);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.physical-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}



.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--white);
    background: transparent;
    z-index: 2;
    border-radius: 18px;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.card-amount {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.03em;
    color: var(--white);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.card-number {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: var(--font-size-base);
    font-weight: 600;
    letter-spacing: 0.05em;
    opacity: 0.9;
    order: 1;
    background: rgba(0, 0, 0, 0.3);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-status-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    order: 2;
    align-items: flex-end;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.status-badge.active {
    background: linear-gradient(135deg, #2ED573 0%, #55E88A 100%);
    color: var(--white);
    box-shadow: 
        0 0 25px rgba(46, 213, 115, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(46, 213, 115, 0.5);
}

.status-badge.used {
    background: linear-gradient(135deg, #9E9E9E 0%, #BDBDBD 100%);
    color: var(--white);
    border-color: rgba(158, 158, 158, 0.5);
}

.status-badge.expired {
    background: linear-gradient(135deg, var(--accent-rose) 0%, var(--accent-rose-light) 100%);
    color: var(--white);
    box-shadow: 
        0 0 25px rgba(233, 30, 99, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(233, 30, 99, 0.5);
}

.status-badge.pending {
    background: linear-gradient(135deg, #FFA726 0%, #FFB74D 100%);
    color: var(--white);
    box-shadow: 
        0 0 25px rgba(255, 167, 38, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 167, 38, 0.5);
}

.activation-date {
    font-size: var(--font-size-xs);
    opacity: 0.8;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}



/* 不同卡片类型的特殊效果 */

/* 钻石卡 - 银色主题 */
.physical-card[style*="images/1.png"] .card-overlay {
    background: linear-gradient(135deg, 
        rgba(232, 232, 232, 0.9) 0%, 
        rgba(192, 192, 192, 0.8) 100%);
    color: #333333;
}

.physical-card[style*="images/1.png"] .status-badge {
    border-color: rgba(51, 51, 51, 0.3);
}

.physical-card[style*="images/1.png"]::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255,255,255,0.4) 50%, 
        transparent 70%);
    animation: shimmer 4s infinite;
    pointer-events: none;
    z-index: 3;
}

/* 白金卡 - 金色主题 */
.physical-card[style*="images/2.png"] .card-overlay {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.9) 0%, 
        rgba(255, 165, 0, 0.8) 100%);
    color: #FFFFFF;
}

.physical-card[style*="images/2.png"] {
    box-shadow: 
        0 8px 32px rgba(255, 215, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 至尊卡 - 深色主题 */
.physical-card[style*="images/3.png"] .card-overlay {
    background: linear-gradient(135deg, 
        rgba(139, 69, 19, 0.9) 0%, 
        rgba(160, 82, 45, 0.8) 100%);
    color: #FFFFFF;
}

.physical-card[style*="images/3.png"] {
    box-shadow: 
        0 8px 32px rgba(139, 69, 19, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 215, 0, 0.3);
}

.physical-card[style*="images/3.png"]::before {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.1) 0%, 
        transparent 30%, 
        transparent 70%, 
        rgba(255, 215, 0, 0.05) 100%);
}

/* 闪光动画 */
@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* 响应式设计 */
@media (max-width: 360px) {
    .voucher-card {
        padding: var(--space-sm);
    }
    
    .card-overlay {
        padding: var(--space-lg);
    }
    
    .card-amount {
        font-size: 2.8rem;
    }
    
    .card-number {
        font-size: var(--font-size-sm);
    }
}

/* 卡片进入动画 */
.voucher-card {
    animation: cardSlideIn 0.6s ease-out;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) rotateX(-10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* 为不同卡片添加延迟动画 */
.voucher-card:nth-child(1) { animation-delay: 0.1s; }
.voucher-card:nth-child(2) { animation-delay: 0.2s; }
.voucher-card:nth-child(3) { animation-delay: 0.3s; }
.voucher-card:nth-child(4) { animation-delay: 0.4s; }
.voucher-card:nth-child(5) { animation-delay: 0.5s; }
/* 高端卡片特效 */
.voucher-card:hover .physical-card {
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.2),
        0 12px 35px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

/* 卡片闪光效果 */
.physical-card {
    position: relative;
    overflow: hidden;
}

.physical-card::before {
    animation: cardShimmer 6s infinite;
}

@keyframes cardShimmer {
    0%, 90%, 100% {
        opacity: 0;
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    5%, 15% {
        opacity: 1;
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* 金额数字样式 */
.card-amount {
    position: relative;
}

/* 状态徽章脉冲效果 */
.status-badge.active {
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% {
        box-shadow: 
            0 0 25px rgba(46, 213, 115, 0.4),
            0 4px 15px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 35px rgba(46, 213, 115, 0.6),
            0 4px 15px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* 卡片列表容器美化 */
/* 卡券列表容器 */
.voucher-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: 0;
}

/* 页面背景增强 */
body {
    background: 
        radial-gradient(circle at 20% 80%, rgba(74, 144, 226, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #f8f9ff 0%, #e8f2ff 100%);
}

/* 卡片进入动画增强 */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(-15deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) scale(1);
    }
}

/* 高端光泽效果 */
.physical-card:hover::before {
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.3) 0%, 
        transparent 20%, 
        transparent 80%, 
        rgba(255,255,255,0.2) 100%);
}

/* 卡号容器增强 */
.card-number {
    transition: all 0.3s ease;
}

.voucher-card:hover .card-number {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* 状态信息容器增强 */
.card-status-info {
    transition: all 0.3s ease;
}

.voucher-card:hover .card-status-info {
    transform: translateY(-2px);
}
/* 卡片使用说明样式 */
.card-terms {
    margin-top: var(--space-lg);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.95) 100%);
    border: 1px solid rgba(74, 144, 226, 0.2);
    box-shadow: 
        0 4px 20px rgba(74, 144, 226, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-terms .card-header {
    background: linear-gradient(135deg, 
        var(--primary-blue) 0%, 
        var(--primary-blue-light) 100%);
    color: var(--white);
    margin: -1px -1px 0 -1px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.card-terms-content {
    padding: var(--space-lg);
}

.terms-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

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

.terms-number {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: var(--font-size-base);
    margin-right: var(--space-sm);
    flex-shrink: 0;
    width: 20px;
}

.terms-text {
    color: var(--gray-700);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

/* 响应式优化 */
@media (max-width: 360px) {
    .card-terms-content {
        padding: var(--space-md);
    }
    
    .terms-text {
        font-size: var(--font-size-xs);
    }
}
/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: var(--safe-area-bottom) 0 0 0;
}

.nav-container {
    display: flex;
    height: 60px;
    max-width: 100%;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gray-500);
    transition: var(--transition-base);
    padding: var(--space-xs);
    position: relative;
}

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

.nav-item:hover {
    color: var(--primary-blue);
    background: rgba(74, 144, 226, 0.05);
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: var(--transition-base);
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    font-size: var(--font-size-xs);
    font-weight: 500;
    line-height: 1;
}

.nav-item.active .nav-text {
    font-weight: 600;
}

/* 活跃状态指示器 */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 0 0 3px 3px;
}

/* 响应式优化 */
@media (max-width: 360px) {
    .nav-container {
        height: 55px;
    }
    
    .nav-icon {
        width: 20px;
        height: 20px;
    }
    
    .nav-text {
        font-size: 10px;
    }
}
/* 蓝色主题优化 */
.info-icon {
    background: linear-gradient(135deg, var(--primary-blue-bg) 0%, rgba(74, 144, 226, 0.15) 100%);
    color: var(--primary-blue);
}

.terms-number {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* 输入框聚焦时的蓝色主题 */
.input-wrapper input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-bg);
}

/* 玫红色作为辅助强调色 */
.accent-rose {
    color: var(--accent-rose);
}

.bg-accent-rose {
    background: linear-gradient(135deg, var(--accent-rose) 0%, var(--accent-rose-light) 100%);
}

/* 卡片金额保持玫红色作为强调 */
.detail-amount {
    color: var(--accent-rose);
}

.voucher-amount {
    color: var(--accent-rose);
}

/* 底部导航活跃状态使用蓝色 */
.nav-item.active::before {
    background: var(--primary-blue);
}