/**
 * History & Favorites UI Styles
 * 播放历史和收藏界面样式
 */

/* 模态框容器 */
.history-favorites-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-favorites-modal.active {
    opacity: 1;
}

/* 模态框内容 */
.hf-modal-content {
    background: var(--bg-color, #1a1a2e);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

/* 头部区域 */
.hf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 212, 255, 0.1));
}

.hf-tabs {
    display: flex;
    gap: 10px;
}

.hf-tab {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color, #fff);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hf-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hf-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.hf-close {
    background: transparent;
    border: none;
    color: var(--text-color, #fff);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hf-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* 工具栏 */
.hf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hf-stats {
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    font-size: 14px;
}

.hf-actions {
    display: flex;
    gap: 10px;
}

.hf-btn-secondary,
.hf-btn-danger {
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hf-btn-secondary {
    background: rgba(108, 92, 231, 0.2);
    color: #6c5ce7;
}

.hf-btn-secondary:hover {
    background: rgba(108, 92, 231, 0.3);
    transform: translateY(-2px);
}

.hf-btn-danger {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

.hf-btn-danger:hover {
    background: rgba(255, 71, 87, 0.3);
    transform: translateY(-2px);
}

/* 内容区域 */
.hf-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
}

.hf-content::-webkit-scrollbar {
    width: 8px;
}

.hf-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.hf-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.hf-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 列表 */
.hf-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 列表项 */
.hf-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.hf-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.hf-item-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 212, 255, 0.2));
    border-radius: 10px;
    flex-shrink: 0;
}

.hf-item-info {
    flex: 1;
    min-width: 0;
}

.hf-item-title {
    color: var(--text-color, #fff);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hf-item-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.5));
}

.hf-item-category {
    padding: 2px 8px;
    background: rgba(108, 92, 231, 0.2);
    border-radius: 4px;
    color: #a29bfe;
}

.hf-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.hf-item-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hf-item-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.hf-btn-remove:hover {
    background: rgba(255, 71, 87, 0.3);
}

/* 空状态 */
.hf-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary, rgba(255, 255, 255, 0.5));
}

.hf-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.hf-empty p {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-color, #fff);
}

.hf-empty-hint {
    font-size: 14px;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hf-modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 15px;
    }

    .hf-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .hf-tabs {
        width: 100%;
        justify-content: space-around;
    }

    .hf-tab {
        flex: 1;
        padding: 10px 15px;
        font-size: 14px;
        justify-content: center;
    }

    .hf-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .hf-toolbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .hf-actions {
        width: 100%;
        justify-content: space-between;
    }

    .hf-content {
        padding: 15px 20px;
    }

    .hf-item {
        padding: 12px;
        flex-wrap: wrap;
    }

    .hf-item-title {
        font-size: 15px;
    }

    .hf-item-meta {
        flex-direction: column;
        gap: 5px;
    }

    .hf-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 深色主题支持 */
[data-theme="dark"] .hf-modal-content {
    background: #1a1a2e;
}

[data-theme="light"] .hf-modal-content {
    background: #ffffff;
}

[data-theme="light"] .hf-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hf-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .hf-item-title {
    color: #2d3436;
}

[data-theme="light"] .hf-item-meta {
    color: #636e72;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hf-item {
    animation: fadeIn 0.3s ease;
}

/* 星标按钮特殊样式 */
.hf-item-btn[title*="收藏"]:hover {
    background: rgba(255, 193, 7, 0.3);
}
