/* ============================================
   我的素材页专用样式 (my-materials.html)
   版本  : 1.1
   更新日期: 2026-06-02
   
   【说明】
   - 包含统计卡片、搜索工具栏、素材卡片等样式
   - 橙色主题配色
   
   ============================================ */

/* 统计卡片网格 */
.stats-grid {
    display              : grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap                  : 16px;
    margin-bottom        : 20px;
}

.stat-card {
    display      : flex;
    align-items  : center;
    gap          : 14px;
    padding      : 16px 20px;
    background   : var(--bg-card);
    border-radius: 12px;
    border       : 1px solid var(--border-color);
    transition   : all 0.3s ease;
}

.stat-card:hover {
    transform : translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width          : 44px;
    height         : 44px;
    border-radius  : 10px;
    display        : flex;
    align-items    : center;
    justify-content: center;
    font-size      : 22px;
}

.stat-icon-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
    color     : #3b82f6;
}

.stat-icon-purple {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(229, 90, 43, 0.1));
    color     : #FF6B35;
}

.stat-icon-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(15, 118, 110, 0.1));
    color     : #10b981;
}

.stat-icon-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    color     : #ef4444;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size  : 22px;
    font-weight: 700;
    color      : var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color    : var(--text-secondary);
}

/* 新搜索工具栏 */
.toolbar-new {
    display        : flex;
    justify-content: space-between;
    align-items    : center;
    padding        : 14px 20px;
    flex-wrap      : wrap;
    gap            : 12px;
}

.search-box {
    display      : flex;
    align-items  : center;
    background   : rgba(15, 23, 42, 0.95);
    border       : 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    padding      : 8px 14px;
    width        : 300px;
    transition   : all 0.3s ease;
    box-shadow   : 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-box:hover {
    border-color: rgba(148, 163, 184, 0.3);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow  : 0 0 0 3px rgba(255, 107, 53, 0.15), 0 2px 12px rgba(0, 0, 0, 0.3);
}

.search-icon {
    color       : rgba(148, 163, 184, 0.5);
    margin-right: 10px;
    font-size   : 14px;
}

.search-input-new {
    width      : 100%;
    padding    : 4px 0;
    background : transparent;
    border     : none;
    outline    : none;
    color      : rgba(255, 255, 255, 0.98);
    font-size  : 14px;
    font-family: inherit;
}

.search-input-new::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.filter-dropdown {
    position: relative;
}

.filter-select-new {
    padding      : 8px 32px 8px 14px;
    background   : rgba(15, 23, 42, 0.95);
    border       : 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    color        : rgba(255, 255, 255, 0.98);
    font-size    : 13px;
    cursor       : pointer;
    outline      : none;
    appearance   : none;
    min-width    : 130px;
    transition   : all 0.3s ease;
    box-shadow   : 0 2px 8px rgba(0, 0, 0, 0.2);
}

.filter-select-new:hover {
    border-color: rgba(148, 163, 184, 0.3);
}

.filter-select-new:focus {
    border-color: var(--primary-color);
    box-shadow  : 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.filter-dropdown::after {
    content       : '\f107';
    font-family   : 'bootstrap-icons';
    position      : absolute;
    right         : 12px;
    top           : 50%;
    transform     : translateY(-50%);
    color         : rgba(148, 163, 184, 0.5);
    pointer-events: none;
    font-size     : 14px;
}

.filter-select-new option {
    background: #0f172a;
    color     : rgba(255, 255, 255, 0.95);
    padding   : 8px 12px;
}

/* 素材卡片网格 */
.materials-grid {
    display              : grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap                  : 16px;
    margin-bottom        : 20px;
}

.material-card {
    background   : var(--bg-card);
    border-radius: 12px;
    border       : 1px solid var(--border-color);
    padding      : 16px 20px;
    transition   : all 0.3s ease;
    position     : relative;
    overflow     : hidden;
}

.material-card::before {
    content   : '';
    position  : absolute;
    left      : 0;
    top       : 0;
    width     : 4px;
    height    : 100%;
    background: var(--status-color, var(--border-color));
}

.material-card:hover {
    transform : translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 107, 53, 0.08);
}

.material-card-header {
    display        : flex;
    justify-content: space-between;
    align-items    : flex-start;
    margin-bottom  : 12px;
}

.material-title {
    font-size    : 15px;
    font-weight  : 600;
    color        : var(--text-primary);
    margin       : 0;
    line-height  : 1.4;
    flex         : 1;
    min-width    : 0;
    overflow     : hidden;
    text-overflow: ellipsis;
    white-space  : nowrap;
}

.material-episodes {
    display      : inline-flex;
    align-items  : center;
    gap          : 4px;
    padding      : 3px 8px;
    background   : rgba(255, 107, 53, 0.12);
    color        : #FF6B35;
    border-radius: 10px;
    font-size    : 11px;
    font-weight  : 500;
    flex-shrink  : 0;
    margin-left  : 8px;
}

.material-status-row {
    display      : flex;
    align-items  : center;
    gap          : 10px;
    margin-bottom: 10px;
}

.material-status {
    display      : inline-flex;
    align-items  : center;
    gap          : 4px;
    padding      : 3px 8px;
    border-radius: 10px;
    font-size    : 11px;
    font-weight  : 500;
}

.material-status.pending {
    background: rgba(245, 158, 11, 0.12);
    color     : #f59e0b;
}

.material-status.processing {
    background: rgba(255, 107, 53, 0.12);
    color     : #FF6B35;
}

.material-status.completed {
    background: rgba(16, 185, 129, 0.12);
    color     : #10b981;
}

.material-status.failed {
    background: rgba(239, 68, 68, 0.12);
    color     : #ef4444;
}

.material-progress {
    flex       : 1;
    display    : flex;
    align-items: center;
    gap        : 8px;
}

.progress-bar-bg {
    flex         : 1;
    height       : 5px;
    background   : var(--bg-darker);
    border-radius: 3px;
    overflow     : hidden;
}

.progress-bar-fill {
    height       : 100%;
    border-radius: 3px;
    background   : linear-gradient(90deg, var(--primary-color), #ff8a5c);
    transition   : width 0.5s ease;
    min-width    : 0;
}

.progress-text {
    font-size : 11px;
    color     : var(--text-secondary);
    min-width : 36px;
    text-align: right;
}

.material-meta {
    display      : flex;
    align-items  : center;
    gap          : 14px;
    margin-bottom: 12px;
    padding-top  : 10px;
    border-top   : 1px solid var(--border-color);
}

.meta-item {
    display    : flex;
    align-items: center;
    gap        : 4px;
    font-size  : 12px;
    color      : var(--text-secondary);
}

.material-actions {
    display        : flex;
    gap            : 6px;
    justify-content: flex-end;
}

.action-btn-small {
    display      : inline-flex;
    align-items  : center;
    gap          : 4px;
    padding      : 5px 10px;
    border-radius: 6px;
    font-size    : 11px;
    font-weight  : 500;
    cursor       : pointer;
    transition   : all 0.2s;
    border       : none;
}

.action-btn-small.view {
    background: rgba(255, 107, 53, 0.12);
    color     : #FF6B35;
}

.action-btn-small.view:hover {
    background: #FF6B35;
    color     : white;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.35);
}

.action-btn-small.delete {
    background: rgba(239, 68, 68, 0.12);
    color     : #ef4444;
}

.action-btn-small.delete:hover {
    background: #ef4444;
    color     : white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.error-message {
    display      : flex;
    align-items  : center;
    gap          : 6px;
    padding      : 8px 12px;
    background   : rgba(239, 68, 68, 0.08);
    border-left  : 3px solid #ef4444;
    border-radius: 0 8px 8px 0;
    font-size    : 12px;
    color        : #ef4444;
    margin-top   : 10px;
}

/* 分页居中 */
.pagination-center {
    display        : flex;
    justify-content: center;
    padding        : 20px 0 32px;
}

.pagination-center .pagination {
    display    : flex;
    align-items: center;
    gap        : 6px;
    border-top : none;
    margin-top : 0;
    padding-top: 0;
}

.pagination-center .page-btn {
    padding      : 8px 14px;
    min-width    : 36px;
    border-radius: 8px;
    font-size    : 13px;
    font-weight  : 500;
    border       : 1px solid var(--border-color);
    background   : var(--bg-card);
    color        : var(--text-secondary);
    cursor       : pointer;
    transition   : all 0.2s;
}

.pagination-center .page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color       : var(--primary-color);
    background  : rgba(255, 107, 53, 0.08);
}

.pagination-center .page-btn.active {
    background  : var(--primary-color);
    color       : white;
    border-color: var(--primary-color);
    font-weight : 600;
}

.pagination-center .page-btn:disabled {
    opacity: 0.4;
    cursor : not-allowed;
}

.pagination-center .page-ellipsis {
    padding: 0 4px;
    color  : var(--text-secondary);
}

.pagination-center .page-info {
    margin-left: 12px;
    font-size  : 12px;
    color      : var(--text-secondary);
}

/* 通用操作按钮和状态徽章 */
.action-btn { 
    padding      : 6px 14px;
    border-radius: 6px;
    font-size    : 13px;
    font-weight  : 500;
    cursor       : pointer;
    transition   : all 0.2s ease;
    margin-right : 8px;
    border       : none;
}

.action-btn.view { 
    background-color: rgba(255, 107, 53, 0.12);
    color           : #FF6B35;
}

.action-btn.view:hover { 
    background-color: #FF6B35;
    color           : white;
    box-shadow      : 0 2px 6px rgba(255, 107, 53, 0.35);
}

.action-btn.delete { 
    background-color: rgba(239, 68, 68, 0.12);
    color           : #ef4444;
}

.action-btn.delete:hover { 
    background-color: #ef4444;
    color           : white;
    box-shadow      : 0 2px 6px rgba(239, 68, 68, 0.35);
}

.status-badge { 
    padding      : 4px 12px;
    border-radius: 12px;
    font-size    : 12px;
    font-weight  : 500;
}

.status-pending { 
    background: rgba(245, 158, 11, 0.12);
    color     : #f59e0b;
}

.status-processing { 
    background: rgba(255, 107, 53, 0.12);
    color     : #FF6B35;
}

.status-completed { 
    background: rgba(16, 185, 129, 0.12);
    color     : #10b981;
}

.status-failed { 
    background: rgba(239, 68, 68, 0.12);
    color     : #ef4444;
}

.action-buttons { 
    display        : flex;
    gap            : 8px;
    justify-content: center;
    white-space    : nowrap;
}