body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

main {
    display: flex;
    flex-direction: row;
    margin-top: 1rem;
    width: 100%;
}

.sidebar {
    width: 200px;
    flex-shrink: 0;
    border-right: 1px solid #e5e7eb;
}

#videos-container {
    flex-grow: 1;
    display: block;
    margin-left: 20px;
    width: calc(100% - 220px);
}

.hidden {
    display: none !important;
}

.video-category {
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 10px;
    background-color: #4b6cb7;
    color: white;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.video-category:before {
    content: "";
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.video-category:hover {
    background-color: #3b5998;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.video-category:hover:before {
    left: 100%;
}

.active-category {
    background-color: #3b5998;
    font-weight: bold;
    position: relative;
}

.active-category::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #ffd700;
}

.sub-category {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px 8px 10px 24px;
    border-bottom: 1px solid #f3f4f6;
    background-color: #f0f4ff;
    border-radius: 3px;
    margin-bottom: 1px;
    margin-left: 10px;
    position: relative;
    z-index: 1;
}

.sub-category:after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background-color: #e0e7ff;
    transition: width 0.3s ease;
    z-index: -1;
    border-radius: 3px;
}

.sub-category:hover {
    color: #2563eb;
    padding-left: 28px;
}

.sub-category:hover:after {
    width: 100%;
}

.active-subcategory {
    background-color: #dbeafe;
    font-weight: bold;
    color: #1e40af;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.active-subcategory::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: #3b82f6;
}

.subcategories-container {
    margin-top: 1px;
    margin-bottom: 6px;
}

.collections-container {
    margin-left: 15px;
}

.collection-item {
    cursor: pointer;
    padding: 8px 10px;
    margin-bottom: 1px;
    background-color: #f8fafc;
    border-radius: 2px;
    color: #475569;
    font-size: 0.95em;
    transition: all 0.2s ease;
    border-left: 0px solid #3b82f6;
}

.collection-item:hover {
    background-color: #f1f5f9;
    color: #1e293b;
    padding-left: 15px;
    border-left: 3px solid #3b82f6;
}

.collection-item.bg-gray-100 {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 500;
}

/* 为各种类别添加图标指示 */
.video-category .fa-chevron-down,
.video-category .fa-chevron-up {
    color: rgba(255,255,255,0.8);
    font-size: 0.8em;
}

.sub-category .fa-chevron-right,
.sub-category .fa-chevron-down {
    color: #6b7280;
    font-size: 0.75em;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.video-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    top: 0;
}

.video-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    top: -5px;
    border-color: #bfdbfe;
}

.video-card:hover .video-title {
    color: #2563eb;
}

.video-title {
    padding: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bilibili-player {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: white;
}

.main-player {
    flex: 1;
    min-height: 500px;
    position: relative;
}

.playlist {
    width: 300px;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.playlist-header {
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.playlist-count {
    color: #6b7280;
    font-size: 14px;
    font-weight: normal;
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
}

.playlist-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    height: 48px;
    box-sizing: border-box;
}

.playlist-item:after {
    content: "";
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-color: #3b82f6;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.playlist-item:hover {
    background-color: #f9fafb;
    padding-left: 20px;
    padding-right: 24px;
}

.playlist-item:hover:after {
    right: 10px;
    opacity: 0.7;
}

.playlist-item:hover .playlist-title {
    color: #2563eb;
}

.playlist-item.active {
    background-color: #f0f9ff;
}

.playlist-item.active .playlist-index {
    color: #2563eb;
}

.playlist-item.active .playlist-title {
    color: #2563eb;
    font-weight: 500;
}

.playlist-index {
    color: #6b7280;
    font-size: 14px;
    width: 28px;
    text-align: center;
}

.playlist-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-duration {
    color: #6b7280;
    font-size: 14px;
}

.collection-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: white;
}

.collection-header {
    background-color: #f3f4f6;
    padding: 0.75rem;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.video-list {
    height: 240px;
    overflow-y: auto;
    border-bottom: 1px solid #e5e7eb;
}

.video-list-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
    height: 48px;
    display: flex;
    align-items: center;
}

.video-list-item:hover {
    background-color: #f9fafb;
}

.video-list-item.active {
    background-color: #e5e7eb;
    font-weight: 500;
}

.category-tree {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
} 