/**
 * 直播课列表（Live List）
 * 对应源码 Luckilyring.html「直播课」区块
 */

.gt-serif {
    font-family: 'Noto Serif SC', serif;
}

.gt-ll {
    padding-right: 0;
    width: 100%;
    box-sizing: border-box;
    min-width: 0; /* flex 子项安全 */
}

@media (min-width: 768px) {
    .gt-ll {
        padding-right: 2.5rem; /* md:pr-10 */
    }
}

/* ---------- 标题栏 ---------- */
.gt-ll-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .gt-ll-head {
        margin-bottom: 2.5rem; /* md:mb-10 */
        align-items: flex-end;
    }
}

.gt-ll-title {
    font-family: 'Noto Serif SC', serif;
    color: #000;
    font-size: 1.25rem; /* 移动端更紧凑 */
    line-height: 1.4;
    letter-spacing: 0.15em;
    margin: 0;
    font-weight: 500;
}

@media (min-width: 768px) {
    .gt-ll-title {
        font-size: 1.5rem; /* md:text-2xl */
        line-height: 2rem;
        letter-spacing: 0.2em;
    }
}

.gt-ll-more {
    color: #9ca3af; /* text-gray-400 */
    font-size: 0.75rem; /* text-xs */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.gt-ll-more:hover {
    color: #000;
}

/* ---------- 列表 ---------- */
.gt-ll-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .gt-ll-list {
        gap: 1.5rem; /* md:space-y-6 */
    }
}

/* ---------- 单项（默认手机：紧凑横向） ---------- */
.gt-ll-item {
    display: flex;
    flex-direction: row;
    gap: 0.875rem; /* 移动端图文间距 */
    padding: 0.5rem;
    margin-left: 0;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    align-items: stretch;
}

@media (min-width: 768px) {
    .gt-ll-item {
        gap: 1.25rem; /* md:gap-5 */
        margin-left: -0.5rem; /* 源码一致，仅桌面负边距 */
    }
}

.gt-ll-item:hover {
    background: #f9fafb;
    border-color: #f3f4f6;
}

/* ---------- 图片（默认手机：左侧小缩略图） ---------- */
.gt-ll-item-img {
    position: relative;
    width: 120px;
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
    overflow: hidden;
    flex-shrink: 0;
    align-self: flex-start;
}

@media (min-width: 480px) {
    .gt-ll-item-img {
        width: 140px;
    }
}

@media (min-width: 768px) {
    .gt-ll-item-img {
        width: 10rem; /* md:w-40 */
    }
}

.gt-ll .gt-ll-item-img > img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover;
    display: block;
    transition: transform 0.7s ease;
}

.gt-ll-item:hover .gt-ll-item-img > img {
    transform: scale(1.05);
}

/* ---------- 徽章容器（多个 Tag 并排） ---------- */
.gt-ll-item-badges {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    z-index: 2;
    max-width: calc(100% - 0.5rem);
}

@media (min-width: 768px) {
    .gt-ll-item-badges {
        top: 0.5rem;
        left: 0.5rem;
        gap: 0.25rem;
        max-width: calc(100% - 1rem);
    }
}

.gt-ll-item-badge {
    font-size: 9px;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
    text-transform: none;
}

@media (min-width: 768px) {
    .gt-ll-item-badge {
        font-size: 10px;
        padding: 0.25rem 0.5rem;
        letter-spacing: 0.1em;
    }
}

.gt-ll-item-badge--live {
    background: #000;
    color: #fff;
}

.gt-ll-item-badge--replay {
    background: #d1d5db; /* gray-300 */
    color: #374151; /* gray-700 */
}

/* ---------- 文字 ---------- */
.gt-ll-item-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    min-width: 0;
    flex: 1;
    gap: 0.375rem;
}

@media (min-width: 768px) {
    .gt-ll-item-body {
        padding: 0.25rem 0;
        gap: 0;
    }
}

.gt-ll-item-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #000;
    letter-spacing: 0.04em;
    margin: 0;
    font-weight: 500;
    transition: color 0.2s ease;
    /* 手机端：2 行省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

@media (min-width: 768px) {
    .gt-ll-item-title {
        font-size: 1.125rem; /* md:text-lg */
        line-height: 1.5;
        letter-spacing: 0.05em;
        margin: 0 0 0.75rem;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        display: block;
        overflow: visible;
    }
}

.gt-ll-item:hover .gt-ll-item-title {
    color: #6b7280; /* gray-500 */
}

.gt-ll-item-meta {
    font-size: 0.7rem;
    color: #9ca3af;
    letter-spacing: 0.08em;
    margin: 0;
}

@media (min-width: 768px) {
    .gt-ll-item-meta {
        font-size: 0.75rem;
        letter-spacing: 0.1em;
        margin: 0 0 0.25rem;
    }
}

.gt-ll-item-desc {
    font-size: 0.75rem;
    color: #6b7280;
    letter-spacing: 0.025em;
    margin: 0;
    line-height: 1.5;
    /* 手机端允许 2 行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

@media (min-width: 768px) {
    .gt-ll-item-desc {
        -webkit-line-clamp: 1;
        line-clamp: 1;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}
