/* 右側區域 */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    height: 100%;
}

/* 推薦影片區域 */
.recommendations-wrapper {
    flex: 1;
    min-height: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    overflow-y: auto;
}

.recommendations-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.recommendations-section .section-title {
    margin-bottom: 16px;
    flex-shrink: 0; /* 標題不會被壓縮 */
}

.recommendations-list {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    flex: 1; /* 佔據剩餘空間 */
    min-height: 0; /* 重要：允許 flex 子元素縮小 */
    max-height: 100%;
}

.recommendations-list::-webkit-scrollbar {
    width: 6px;
}

.recommendations-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.recommendations-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.recommendations-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: calc(20px * var(--font-size-enlarge, 1));
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.section-title::before {
    content: "";
    width: 4px;
    height: 20px;
    background: var(--accent-warm);
    border-radius: 2px;
}

.recommendations-section .section-title {
    margin-bottom: 16px;
}

/* 推薦影片 */
.recommendations-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.recommendation-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 8px;
    text-decoration: none;
    color: inherit;
}

.recommendation-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.recommendation-item:focus {
    outline: 2px solid var(--accent-cool);
    outline-offset: 2px;
    background: var(--bg-tertiary);
}

.recommendation-item.accessibility-focus {
    outline: 3px solid var(--accent-warm);
    outline-offset: 3px;
    background: var(--hover-bg);
    box-shadow: 0 2px 8px rgba(196, 147, 85, 0.3);
}

.rec-thumbnail {
    width: 140px;
    aspect-ratio: 16 / 9;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.rec-thumbnail::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(196, 147, 85, 0.08), rgba(90, 138, 184, 0.08));
}

.recommendation-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rec-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: calc(11px * var(--font-size-enlarge, 1));
    font-weight: 600;
    z-index: 1;
}

.rec-info {
    flex: 1;
    min-width: 0;
    padding-left: 0;
}

.rec-title {
    font-size: calc(14px * var(--font-size-enlarge, 1));
    font-weight: 500;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    color: var(--text-primary);
}

.rec-channel {
    font-size: calc(12px * var(--font-size-enlarge, 1));
    color: #2b2b2b;
    margin-bottom: 4px;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 4px 12px;
    border-radius: 16px;
    max-width: 15ch;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-views {
    font-size: calc(12px * var(--font-size-enlarge, 1));
    color: var(--text-secondary);
}

.no-recommendations {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-secondary);
    font-size: calc(14px * var(--font-size-enlarge, 1));
}

.label-teachapp, .label-program {
    color : white !important;
}