/* ==================== 全局重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #EFF0F4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1C1C1E;
    padding-bottom: 80px;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==================== 液态玻璃效果 ==================== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
}

/* ==================== 导航栏 ==================== */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    margin: 12px 0 16px;
    font-weight: 600;
    font-size: 18px;
}

.nav-bar .title {
    font-size: 17px;
    font-weight: 600;
    color: #1C1C1E;
}

.back-btn, .more-btn, .save-btn, .search-icon {
    background: none;
    border: none;
    font-size: 18px;
    color: #007AFF;
    cursor: pointer;
    padding: 6px;
    border-radius: 30px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.back-btn:active, .more-btn:active, .save-btn:active, .search-icon:active {
    transform: scale(0.95);
    background: rgba(0, 122, 255, 0.1);
}

/* ==================== 头部区域 ==================== */
.hero {
    padding: 16px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 245, 250, 0.8) 100%);
    border-radius: 28px;
    cursor: pointer;
    transition: transform 0.2s;
}

.hero:active {
    transform: scale(0.98);
}

.hero-slogan {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #1C1C1E, #007AFF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 16px;
    text-align: center;
}

/* ==================== 统计行 ==================== */
.stats-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.stat-item {
    flex: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 10px 8px;
}

.stat-item .stat-number {
    font-size: 20px;
    font-weight: 700;
    color: #1C1C1E;
    line-height: 1.3;
}

.stat-item .stat-text {
    font-size: 11px;
    color: #8E8E93;
    margin-top: 4px;
}

/* ==================== 提示栏 ==================== */
.tip-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    margin-bottom: 16px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 28px;
}

.tip-bar .left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tip-bar .right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bank-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.05);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
}

/* ==================== 年费提醒条 ==================== */
.fee-alert-container {
    margin-bottom: 16px;
}

.fee-alert-item {
    background: linear-gradient(135deg, #FF9500, #FF3B30);
    color: white;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 24px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.fee-alert-item:active {
    transform: scale(0.98);
}

.fee-alert-item .alert-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.fee-alert-item .close-alert {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fee-alert-item .close-alert:active {
    background: rgba(255, 255, 255, 0.4);
}

.fee-alert-item.fade-out {
    opacity: 0;
    transform: translateX(20px);
}

/* ==================== 卡片列表 ==================== */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-item {
    padding: 12px 14px;
    margin-bottom: 12px;
    transition: transform 0.2s;
}

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

/* 卡片头部 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

/* 卡片银行信息区域 */
.card-bank-info {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    min-width: 0;
}

/* 卡片银行Logo */
.card-bank-logo {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    background: #8E8E93;
}

.card-bank-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-bank-logo span {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* 卡片银行名称 */
.card-bank-name {
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
}

.card-alias {
    font-size: 10px;
    color: #8E8E93;
    font-weight: normal;
}

.card-number-mask {
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #6C6C70;
    margin-top: 2px;
    word-break: break-all;
}

/* 卡片右侧标签组 */
.card-right-tags {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.card-right-tags img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
}

/* 卡组织标签 */
.card-org-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: #8E8E93;
}

.card-org-tag img {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: contain;
}

/* 卡片右侧天数显示 */
.card-days {
    text-align: right;
    flex-shrink: 0;
}

.card-days .num {
    font-size: 18px;
    font-weight: 700;
    color: #FF3B30;
    line-height: 1.2;
}

.card-days .unit {
    font-size: 10px;
    color: #8E8E93;
    margin-left: 2px;
}

.card-days .date {
    font-size: 10px;
    color: #8E8E93;
    margin-top: 2px;
}

/* 卡片信息行 */
.card-info-row {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #8E8E93;
    margin: 8px 0;
    flex-wrap: wrap;
}

.card-info-row i {
    width: 14px;
    margin-right: 2px;
    color: #8E8E93;
}

.card-info-row span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* 借记卡标签 */
.tag.debit {
    background: rgba(52, 199, 89, 0.2);
    padding: 2px 8px;
    border-radius: 16px;
    font-size: 10px;
    color: #228A3C;
}

.tag.debit.achieved {
    background: rgba(52, 199, 89, 0.15);
    color: #228A3C;
}

.tag.debit.achieved i {
    margin-right: 4px;
}

/* 警告标签 */
.warning-tag {
    background: #FF3B30;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
}

.warning-tag-orange {
    background: #FF9500;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
}

/* 卡片底部元信息 */
.card-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 0.5px solid rgba(0, 0, 0, 0.05);
}

.meta-item {
    flex: 1;
    text-align: center;
}

.meta-item .label {
    font-size: 10px;
    color: #8E8E93;
}

.meta-item .value {
    font-weight: 500;
    font-size: 12px;
    margin-top: 2px;
}

/* ==================== 进度条样式 ==================== */
.progress-section {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 8px 10px;
    margin: 8px 0;
    transition: all 0.3s ease;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    margin-bottom: 6px;
    color: #6C6C70;
}

.progress-header i {
    margin-right: 4px;
    color: #FF9500;
}

.progress-text {
    font-weight: 500;
}

.progress-bar-bg {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* ==================== 卡片操作按钮 ==================== */
.card-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.card-actions-left {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card-actions-right {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.action-edit {
    color: #007AFF;
}

.action-edit:active {
    background: rgba(0, 122, 255, 0.1);
}

.action-delete {
    color: #FF3B30;
}

.action-delete:active {
    background: rgba(255, 59, 48, 0.1);
}

.action-add {
    background: #34C759;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s ease;
}

.action-add:active {
    transform: scale(0.95);
}

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

/* ==================== 卡片页面样式（cards.php） ==================== */
.cards-page {
    padding: 0 0 20px 0;
}

/* 筛选按钮组 */
.filter-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.05);
    color: #1C1C1E;
    transition: all 0.2s;
}

.filter-btn:active {
    transform: scale(0.96);
}

.filter-btn-primary {
    background: #007AFF !important;
    color: white !important;
}

/* 筛选标签徽章 */
.filter-badge {
    background: rgba(0, 122, 255, 0.2);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-badge a {
    color: #007AFF;
    text-decoration: none;
}

.filter-badge a:active {
    transform: scale(0.95);
    display: inline-block;
}

/* 银行图标容器 */
.bank-icon {
    width: 28px;
    height: 28px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #8E8E93;
    flex-shrink: 0;
}

.bank-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bank-icon span {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

/* 筛选标签中的小银行图标 */
.bank-icon-small {
    width: 20px;
    height: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #8E8E93;
}

.bank-icon-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bank-icon-small span {
    font-size: 10px;
    font-weight: 600;
    color: white;
}

/* 银行分组 */
.bank-group {
    margin-bottom: 16px;
    padding: 14px;
}

/* 银行分组头部 */
.bank-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.bank-group-header:active {
    transform: scale(0.98);
}

.bank-group-header .bank-name {
    font-weight: 600;
    font-size: 15px;
    color: #1C1C1E;
}

.bank-group-header .bank-count {
    background: #007AFF;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

/* ==================== 详情页样式 ==================== */
.detail-header {
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.bank-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 14px;
    border-radius: 40px;
    margin-bottom: 16px;
}

.bank-icon-large {
    width: 28px;
    height: 28px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bank-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-card-number {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.detail-expiry {
    font-size: 13px;
    color: #8E8E93;
}

.detail-section {
    padding: 16px 18px;
    margin-bottom: 16px;
}

.section-title {
    font-weight: 600;
    margin-bottom: 14px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
}

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

.detail-row .label {
    color: #6C6C70;
    font-size: 13px;
}

.detail-row .label i {
    width: 22px;
    margin-right: 8px;
    color: #007AFF;
}

.detail-row .value {
    font-weight: 500;
    font-size: 13px;
}

.days-badge {
    background: #FF3B30;
    color: white;
    padding: 2px 8px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
}

.fee-rule-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

/* 复制卡号按钮 */
.card-number-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-card-btn {
    background: none;
    border: none;
    color: #8E8E93;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.copy-card-btn:active {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    transform: scale(0.95);
}

/* ==================== 表单样式 ==================== */
.form-card {
    margin-bottom: 16px;
    overflow: hidden;
    padding: 0 20px;
}

.form-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #007AFF;
    padding: 10px 0 4px;
}

.form-section-title i {
    margin-right: 6px;
}

.form-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
}

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

.form-row .label {
    width: 90px;
    font-size: 13px;
    color: #1C1C1E;
    font-weight: 500;
    flex-shrink: 0;
}

.form-row .label i {
    width: 20px;
    margin-right: 6px;
    color: #8E8E93;
}

.input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.input-wrap input,
.input-wrap select {
    flex: 1;
    max-width: 200px;
    border: none;
    background: transparent;
    font-size: 13px;
    padding: 4px 0;
    outline: none;
    text-align: right;
}

.input-wrap select {
    text-align-last: right;
    cursor: pointer;
}

/* 卡片类型选择器 */
.type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.type-option {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid transparent;
}

.type-option.active {
    background: #007AFF;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    border-color: #007AFF;
}

.type-option i {
    margin-right: 6px;
}

/* 按钮样式 */
.btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: 40px;
    border: none;
    background: linear-gradient(135deg, #007AFF, #0056b3);
    color: white;
    font-size: 15px;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-danger {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #FF3B30;
    text-decoration: none;
    padding: 14px;
    border-radius: 30px;
    background: rgba(255, 59, 48, 0.1);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.btn-danger:active {
    transform: scale(0.98);
}

/* 年费字段组 */
.fee-fields-group {
    transition: all 0.3s ease;
}

.fee-fields-group.hidden {
    display: none;
}

/* OCR 样式 */
.ocr-section {
    margin-bottom: 20px;
    position: relative;
}

.ocr-btn {
    background: linear-gradient(135deg, #007AFF, #0056b3);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.ocr-btn:active {
    transform: scale(0.98);
}

.preview-area {
    margin-top: 12px;
    display: none;
    border-radius: 16px;
    overflow: hidden;
}

.preview-area.active {
    display: block;
}

#previewImage {
    width: 100%;
    height: auto;
    display: block;
    max-height: 300px;
    object-fit: contain;
}

.recog-status {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    display: none;
    font-weight: 500;
}

.recog-status.loading {
    background: #FFF3E0;
    color: #FF9800;
    display: block;
}

.recog-status.success {
    background: #E8F5E9;
    color: #4CAF50;
    display: block;
}

.recog-status.error {
    background: #FFEBEE;
    color: #F44336;
    display: block;
}

/* 卡号验证状态 */
.card-number-valid {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 6px;
    white-space: nowrap;
}

.card-number-valid.valid {
    background: #4CAF50;
    color: white;
}

.card-number-valid.invalid {
    background: #F44336;
    color: white;
}

/* 自动匹配提示 */
.auto-match-hint {
    font-size: 10px;
    color: #007AFF;
    margin-left: 8px;
    white-space: nowrap;
    animation: pulse 1s ease;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==================== 底部导航栏 ==================== */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 460px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8E8E93;
    font-size: 10px;
    gap: 2px;
    flex: 1;
    padding: 4px 0;
    border-radius: 30px;
}

.bottom-nav .nav-item.active {
    color: #007AFF;
}

.bottom-nav .nav-item i {
    font-size: 20px;
}

.bottom-nav .nav-item span {
    font-size: 9px;
}

.bottom-nav .nav-item.add-btn {
    margin-top: -24px;
}

.add-icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #007AFF, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
    transition: transform 0.2s;
}

.add-icon-wrapper:active {
    transform: translateY(2px);
}

.add-icon {
    font-size: 24px !important;
    color: white;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-box {
    width: 280px;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 28px;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-title i {
    margin-right: 6px;
}

.modal-body {
    font-size: 13px;
    color: #3A3A3C;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-actions button {
    padding: 8px 16px;
    border-radius: 25px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-actions button:active {
    transform: scale(0.95);
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #8E8E93;
}

.empty-state .icon {
    margin-bottom: 12px;
}

.empty-state .icon i {
    color: #C6C6C8;
    font-size: 48px;
}

/* ==================== 搜索弹窗 ==================== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s;
}

.search-modal.active {
    visibility: visible;
    opacity: 1;
}

.search-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    width: calc(100% - 40px);
    max-width: 400px;
    margin-top: 60px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

.search-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.search-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 30px;
}

.search-input-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input-wrap input {
    flex: 1;
    padding: 14px 16px;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
}

.search-input-wrap input:focus {
    border-color: #007AFF;
}

.search-input-wrap button {
    width: 50px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-history {
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
    padding-top: 16px;
}

.search-history .history-title {
    font-size: 12px;
    color: #8E8E93;
    margin-bottom: 10px;
}

.history-item {
    display: inline-block;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.history-item:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.96);
}

/* ==================== Toast 提示 ==================== */
.toast-message {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    z-index: 1000;
    animation: fadeOut 2s ease forwards;
}

@keyframes fadeOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); visibility: hidden; }
}

/* ==================== 卡片淡出动画 ==================== */
@keyframes cardFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}

.card-fade-out {
    animation: cardFadeOut 0.3s ease forwards;
}

/* ==================== 搜索高亮 ==================== */
mark {
    background: #FF9500;
    color: white;
    padding: 0 2px;
    border-radius: 4px;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 480px) {
    .stat-item {
        padding: 6px 8px;
    }
    .stat-item .stat-number {
        font-size: 12px;
    }
    .stat-item .stat-text {
        font-size: 10px;
    }
    .detail-section {
        padding: 14px 16px;
    }
    .form-row .label {
        width: 80px;
        font-size: 12px;
    }
    .input-wrap input,
    .input-wrap select {
        font-size: 12px;
        max-width: 160px;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 隐藏类 ==================== */
.hidden {
    display: none;
}