:root {
    --primary: #1E3A5F;
    --secondary: #2D5A87;
    --accent: #4A90D9;
    --success: #22C55E;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

::selection { background-color: var(--primary); color: white; }

.search-input {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}
.search-input:focus { outline: none; }

.search-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(30, 58, 95, 0.4);
}
.search-btn:active:not(:disabled) { transform: translateY(0); }

.example-btn {
    padding: 0.375rem 0.75rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}
.example-btn:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* ==================== 结果卡片 ==================== */

.result-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardEnter 0.4s ease-out forwards;
    opacity: 0;
    border-radius: 0.75rem;
    overflow: hidden;
}

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

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.12);
}

.result-card.status-overseas-only { border-left: 4px solid var(--info); }
.result-card.status-points { border-left: 4px solid var(--success); }
.result-card.status-no-points { border-left: 4px solid var(--danger); }
.result-card.status-restricted { border-left: 4px solid var(--warning); }

.result-card-inner { padding: 1rem; }

/* ==================== 状态标签 ==================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-text { font-size: 0.7rem; }

.status-badge.overseas-only { background-color: rgba(59, 130, 246, 0.1); color: var(--info); }
.status-badge.points { background-color: rgba(34, 197, 94, 0.1); color: var(--success); }
.status-badge.no-points { background-color: rgba(239, 68, 68, 0.1); color: var(--danger); }
.status-badge.restricted { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* ==================== 银行Logo ==================== */

.bank-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    line-height: 0;
    position: relative;
}
.bank-logo img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
}
.bank-logo .bank-logo-img {
    border-radius: 10px;
    object-fit: contain;
    background: transparent;
}

/* ==================== Badge标签 ==================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}
.badge-bonus { background-color: #fdf2f8; color: #be185d; }
.badge-co { background-color: #f3e8ff; color: #7c3aed; }
.badge-standard { background-color: #eff6ff; color: #2563eb; }

/* ==================== 统计卡片 ==================== */

.stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    white-space: nowrap;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
}

.stat-label {
    font-size: 0.65rem;
    color: #6b7280;
}

/* ==================== 移动端优化 ==================== */

@media (max-width: 640px) {
    .search-input {
        font-size: 14px;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        padding-left: 2.5rem;
        letter-spacing: 0.05em;
    }

    #inputType { display: none !important; }

    .result-card-inner { padding: 0.75rem; }

    .bank-logo {
        width: 32px;
        height: 32px;
    }

    .status-badge {
        padding: 0.15rem 0.4rem;
        font-size: 0.6rem;
    }
    .status-text { font-size: 0.6rem; }

    .stat-card { padding: 0.35rem 0.55rem; }
    .stat-value { font-size: 0.9rem; }
    .stat-label { font-size: 0.55rem; }

    .badge { font-size: 0.6rem; padding: 0.2rem 0.45rem; }

    /* 示例按钮区横向滚动 */
    .example-btn { font-size: 0.75rem; padding: 0.25rem 0.55rem; }

    /* 搜索区更紧凑 */
    #resultsContainer .flex-col.lg\:flex-row { gap: 0.75rem; }

    /* 结果网格1列 */
    #resultsGrid { gap: 0.6rem; }
}

/* 超小屏适配 */
@media (max-width: 380px) {
    .result-card-inner { padding: 0.55rem; }
    .bank-logo { width: 28px; height: 28px; }
    .badge { font-size: 0.55rem; padding: 0.15rem 0.35rem; }
    .status-badge { gap: 0.15rem; }
}

/* ==================== 滚动条 ==================== */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

.fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slide-up { animation: slideUp 0.4s ease-out; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}