
/* 頁面標題使用 common.css 的通用樣式 */
/* 區塊標題在深色背景上的強化可見性 */
.import-section .section-title {
    color: var(--text-on-dark);
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.import-section p {
    color: var(--text-primary);
}

/* 統計欄 */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: var(--text-primary);
}

/* 篩選區 */
.filter-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--bg-primary);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: bold;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.filter-group input,
.filter-group select {
    padding: 10px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    background-color: #fff;
    transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.reset-btn {
    grid-column: 1 / -1;
    padding: 12px;
    background-color: var(--milk-tea-dark);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.05em;
    letter-spacing: 0.5px;
    transition: background-color 0.3s;
}

.reset-btn:hover {
    background-color: var(--milk-tea-darkest);
}

/* 寵物列表 */
.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 寵物卡片 */
.pet-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.pet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.pet-header {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.pet-name {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-primary);
}

.pet-race {
    color: var(--text-primary);
    font-size: 0.9em;
}

.card-type {
    text-align: center;
    padding: 5px;
    font-size: 0.9em;
    font-weight: bold;
}

.card-金, .card-金卡 { color: #d4af37; background: #fff8e1; }
.card-銀, .card-銀卡 { color: #757575; background: #f5f5f5; }
.card-普, .card-普卡 { color: #795548; background: #efebe9; }

.pet-elements {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
}

.element-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    padding: 2px 8px;
    border-radius: 12px;
}

.element-earth { color: #2e7d32; background: transparent; }
.element-water { color: #1565c0; background: transparent; }
.element-fire { color: #c62828; background: transparent; }
.element-wind { color: #f9a825; background: transparent; }

.pet-stats {
    padding: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

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

.stat-name {
    color: var(--text-secondary);
}

.stat-val {
    font-weight: bold;
    color: var(--text-primary);
}

.pet-footer {
    background: #fafafa;
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

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

.footer-label {
    display: block;
    font-size: 0.8em;
    color: var(--text-secondary);
}

.footer-value {
    font-weight: bold;
    color: var(--text-primary);
}

.loading, .no-results {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

/* 一鍵滿星樣式 */
.maxstar-btn {
    display: inline-flex;
    width: 100%;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: linear-gradient(135deg, #fff7e6, #ffe8b3);
    color: #4A3C2B;
    font-weight: bold;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: none;
    font-size: 1em;
}

.maxstar-btn.active {
    background: linear-gradient(135deg, #ffecb3, #ffd54f);
    border-color: #ffc107;
    color: #4A3C2B;
}

/* 讓一鍵滿星與有標籤的欄位對齊（補足標籤高度） */
.filter-group .maxstar-btn { margin-top: 22px; }

/* 滿星數值樣式 */
.original-val {
    text-decoration: line-through;
    color: #999;
    font-size: 0.85em;
    margin-right: 4px;
}

.max-val {
    color: #d32f2f;
    font-weight: bold;
}

.max-star-badge {
    display: inline-block;
    background: #ffecb3;
    color: #ff6f00;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 5px;
    border: 1px solid #ffcc80;
}

.added-stats-info {
    font-size: 0.8em;
    color: #d32f2f;
    margin-left: 5px;
}

/* 星等狀態 */
.star-status {
    display: block;
    width: fit-content;
    text-align: center;
    padding: 2px 8px;
    margin: 8px auto 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.8em;
    border: 0.75px solid rgba(0,0,0,0.08);
    background: transparent;
}

.star-status::before {
    content: '';
    display: none;
}

.star-status.max {
    background: #fff9e8;
    color: #ff6f00;
    border-color: #ffe0a6;
}

.star-status.max::before { content: none; }

.star-status.missing {
    background: #fffaf1;
    color: #ff6f00;
    border-color: #ffe8bf;
}

.star-status.missing::before { content: none; }
