/**
 * painter.css - 画师相关样式
 */

/* 画师库 */
.painter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.painter-card {
    background: #2b2c2f;
    border: 2px solid #444;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.painter-card:hover { border-color: #666; }
.painter-card.selected { border-color: var(--accent-color); }

.painter-cover {
    width: 100%;
    height: 100px;
    background-size: cover;
    background-position: center;
    background-color: #333;
}

.painter-info {
    padding: 10px;
}
.painter-name { font-weight: bold; color: #fff; font-size: 0.9rem; }
.painter-category { font-size: 0.75rem; color: #888; margin-top: 3px; }

.category-btn {
    padding: 5px 12px;
    border-radius: 15px;
    background: #2b2c2f;
    color: #888;
    cursor: pointer;
    font-size: 0.8rem;
    border: 1px solid #444;
    transition: all 0.2s;
}
.category-btn.active { background: var(--accent-color); color: white; border-color: var(--accent-color); }
.category-btn:hover:not(.active) { background: #3a3b3e; color: white; }

#painterCategories {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 🌟 强制一行四个 */
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

#painterCategories .modal-tab {
    width: 100%;
    text-align: center;
    cursor: pointer;
    padding: 10px 5px;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #2b2c2f;
    border: 1px solid #444;
}

#painterCategories .modal-tab.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* 画师功能介绍快捷入口 */
.painter-intro-hint {
    background: rgba(236, 72, 153, 0.15);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(236, 72, 153, 0.3);
    cursor: pointer;
    font-size: 0.75rem;
    color: #ec4899;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.painter-intro-hint:hover {
    background: rgba(236, 72, 153, 0.25);
    border-color: rgba(236, 72, 153, 0.5);
    transform: translateX(-3px);
}

/* 画师选择器高亮动画 */
@keyframes painterPulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(16, 163, 127, 0.7); 
        border-color: rgba(255,255,255,0.1);
    }
    50% { 
        box-shadow: 0 0 0 12px rgba(16, 163, 127, 0); 
        border-color: var(--accent-color);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(16, 163, 127, 0); 
        border-color: rgba(255,255,255,0.1);
    }
}

.painter-pulse {
    animation: painterPulse 1s ease-in-out 3;
}

/* 画师介绍入口高亮动画 */
@keyframes painterIntroPulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7); 
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(236, 72, 153, 0); 
        background: rgba(236, 72, 153, 0.3);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); 
    }
}

.painter-intro-pulse {
    animation: painterIntroPulse 1s ease-in-out 3;
}

/* 🎨 固定画师选择提醒样式 */
.painter-reminder-fixed {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.15), rgba(16, 163, 127, 0.08));
    border: 1px solid rgba(16, 163, 127, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #10a37f;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: auto;
}

.painter-reminder-fixed:hover {
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.25), rgba(16, 163, 127, 0.15));
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.2);
}

.painter-reminder-icon {
    font-size: 1rem;
}

.painter-reminder-fixed strong {
    color: #fff;
    font-weight: 600;
}

.painter-reminder-action {
    color: rgba(16, 163, 127, 0.7);
    font-size: 0.75rem;
    transition: color 0.2s;
}

.painter-reminder-fixed:hover .painter-reminder-action {
    color: #10a37f;
}

/* 当画师是默认风格时，添加提醒动画 */
.painter-reminder-fixed.needs-attention {
    animation: reminderPulse 2s ease-in-out infinite;
    border-color: #e6a23c;
    background: linear-gradient(135deg, rgba(230, 162, 60, 0.15), rgba(230, 162, 60, 0.08));
}

.painter-reminder-fixed.needs-attention .painter-reminder-icon {
    animation: iconBounce 1s ease-in-out infinite;
}

@keyframes reminderPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 162, 60, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(230, 162, 60, 0); }
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 响应式：窄屏时换行显示 */
@media (max-width: 700px) {
    .painter-reminder-fixed {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }
}

/* 后台任务旋转动画 */
@keyframes bgTaskSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bg-task-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: bgTaskSpin 1s linear infinite;
}

/* 后台任务徽章悬停效果 */
#bgTaskBadge:hover {
    box-shadow: 0 6px 20px rgba(230,162,60,0.5);
}
