.catch-cat-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-text: #0f172a; width: 100%; max-width: 600px; margin: 0 auto; background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); border-radius: 24px; padding: 24px 16px; border: 1px solid var(--p-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); transition: 0.3s; display: flex; flex-direction: column; align-items: center; min-height: 700px; position: relative; overflow: hidden; }

/* 页面切换动画 */
.cat-page { display: none; width: 100%; max-width: 100%; padding: 10px; animation: catFadeIn 0.3s ease; }
.cat-page.active { display: block; }

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

/* ========== 选择页面 ========== */
.cat-select-title { font-size: 2rem; color: white; text-shadow: 3px 3px 6px rgba(0,0,0,0.3); margin: 10px 0 10px; text-align: center; font-weight: bold; }
.cat-select-subtitle { color: rgba(255,255,255,0.9); font-size: 1rem; text-align: center; margin-bottom: 30px; }

.cat-cards { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 400px; margin: 0 auto; }
.cat-card { background: rgba(255, 255, 255, 0.95); border-radius: 20px; padding: 16px; display: flex; align-items: center; gap: 20px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border: 3px solid transparent; }
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.25); }
.cat-card:active { transform: scale(0.98); }

.cat-card-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 15px rgba(0,0,0,0.1); flex-shrink: 0; }
.cat-card-info { flex: 1; }
.cat-card-name { font-size: 1.25rem; font-weight: bold; color: #333; margin-bottom: 5px; }
.cat-card-difficulty { display: inline-block; font-size: 0.8rem; padding: 4px 12px; border-radius: 12px; color: white; margin-bottom: 6px; font-weight: 600; }

.diff-low { background: linear-gradient(135deg, #52c41a, #73d13d); }
.diff-medium { background: linear-gradient(135deg, #faad14, #ffc53d); }
.diff-high { background: linear-gradient(135deg, #ff4d4f, #ff7875); }

.cat-card-desc { font-size: 0.85rem; color: #64748b; }

/* ========== 游戏页面 ========== */
.cat-game-header { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 500px; margin: 0 auto 15px auto; padding: 0 5px; }
.cat-back-btn { background: rgba(255,255,255,0.2); border: none; color: white; padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: 0.3s; font-weight: 600; }
.cat-back-btn:hover { background: rgba(255,255,255,0.3); }

.current-cat-badge { background: rgba(255,255,255,0.95); padding: 6px 16px; border-radius: 20px; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #333; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.current-cat-badge img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

.cat-game-container { background: rgba(255, 255, 255, 0.95); border-radius: 20px; padding: 20px; box-shadow: 0 15px 60px rgba(0,0,0,0.2); width: 100%; max-width: 500px; margin: 0 auto; }

.cat-game-status-bar { display: flex; justify-content: space-around; margin-bottom: 15px; padding: 10px; background: #f1f5f9; border-radius: 12px; border: 1px solid #e2e8f0; }
.cat-status-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cat-label { font-size: 0.75rem; color: #64748b; font-weight: 600; }
.cat-value { font-size: 0.95rem; font-weight: bold; color: #0f172a; }

.cat-status-text { text-align: center; font-size: 1rem; color: #4f46e5; font-weight: bold; margin-bottom: 10px; min-height: 24px; }
.cat-status-text.win { color: #16a34a; }
.cat-status-text.lose { color: #dc2626; }

.cat-restart-hint { text-align: center; font-size: 0.8rem; color: #94a3b8; margin-bottom: 10px; opacity: 0; transition: 0.3s; font-weight: 600; }
.cat-restart-hint.show { opacity: 1; }

.cat-canvas-wrapper { display: flex; justify-content: center; padding: 10px; background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1)); border-radius: 15px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; }
#catCanvas { display: block; cursor: pointer; max-width: 100%; height: auto; -webkit-tap-highlight-color: transparent; outline: none; }

.cat-difficulty-card { margin-top: 15px; padding: 16px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; }
.cat-difficulty-card h3 { font-size: 0.95rem; color: #334155; margin-bottom: 12px; text-align: center; }
.cat-difficulty-list { display: flex; flex-direction: column; gap: 8px; }
.cat-difficulty-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #475569; font-weight: 500; }
.cat-emoji { font-size: 1.1rem; }

.cat-restart-btn { width: 100%; margin-top: 16px; padding: 14px; background: linear-gradient(135deg, #667eea, #764ba2); color: white; border: none; border-radius: 25px; font-size: 1rem; font-weight: bold; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); display: flex; align-items: center; justify-content: center; gap: 8px; }
.cat-restart-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6); filter: brightness(1.1); }
.cat-restart-btn:active { transform: scale(0.98); }

/* ========== 响应式与黑夜模式 ========== */
@media (max-width: 480px) {
    .catch-cat-wrapper { padding: 16px 10px; }
    .cat-select-title { font-size: 1.5rem; }
    .cat-game-container { padding: 15px 12px; }
    .cat-game-status-bar { padding: 8px; }
    .cat-value { font-size: 0.85rem; }
    .cat-canvas-wrapper { padding: 6px; }
}

[data-theme="dark"] .catch-cat-wrapper { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%); border-color: #334155; }
[data-theme="dark"] .cat-card { background: #1e293b; border-color: #334155; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
[data-theme="dark"] .cat-card:hover { box-shadow: 0 15px 40px rgba(0,0,0,0.8); }
[data-theme="dark"] .cat-card-name { color: #f8fafc; }
[data-theme="dark"] .cat-card-desc { color: #94a3b8; }
[data-theme="dark"] .current-cat-badge { background: #1e293b; color: #f8fafc; border: 1px solid #334155; }
[data-theme="dark"] .cat-game-container { background: #0f172a; box-shadow: 0 15px 60px rgba(0,0,0,0.8); }
[data-theme="dark"] .cat-game-status-bar { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .cat-value { color: #f8fafc; }
[data-theme="dark"] .cat-status-text { color: #818cf8; }
[data-theme="dark"] .cat-status-text.win { color: #4ade80; }
[data-theme="dark"] .cat-status-text.lose { color: #f87171; }
[data-theme="dark"] .cat-canvas-wrapper { border-color: #334155; background: #1e293b; }
[data-theme="dark"] .cat-difficulty-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .cat-difficulty-card h3 { color: #cbd5e1; }
[data-theme="dark"] .cat-difficulty-item { color: #94a3b8; }