/**
 * 预览页布局层
 *
 * 对齐 ani-rss 各组件 scoped 样式的尺寸与排布，让预览的排版和真实界面一致。
 * ani-rss 本体为 GPL-2.0，这里没有复制其代码，按同样的布局数值重写。
 * 真实实现以上游为准：https://github.com/wushuo894/ani-rss
 *
 * 主题文件在本文件之后加载，所以主题可以覆盖这里的一切。
 */

html, body, #app {
    width: 100%;
    height: 100%;
}

#app {
    margin: 0 auto;
}

/* ---------- 主容器（对应 home/App.vue） ---------- */
.content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.add-button {
    display: flex;
    justify-content: flex-end;
    margin: 10px;
}

.spacer {
    width: 8px;
    height: 8px;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 451px) {
    #header {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
}

@media (min-width: 1000px) {
    .auto-flex {
        display: flex;
    }
}

/* ---------- 列表（对应 home/List.vue） ---------- */
.list-container {
    height: 100%;
    overflow: hidden;
}

.list-content {
    margin: 0 10px;
}

.list-week-title {
    margin: 16px 0 8px 4px;
}

.grid-container {
    display: grid;
    grid-gap: 8px;
    grid-template-columns: repeat(var(--ani-grid-columns), 1fr);
    width: 100%;
}

.list-bottom-spacer {
    height: 8px;
}

/* ---------- 订阅卡片（对应 home/AniCard.vue） ---------- */
.list-card-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.list-card-image-container {
    height: 100%;
}

.list-card-image {
    width: 92px;
    height: 130px;
    border: 1px solid var(--el-border-color-light);
    border-radius: var(--el-border-radius-base);
    cursor: pointer;
    object-fit: cover;
}

.list-card-info {
    position: relative;
    flex-grow: 1;
}

.list-card-info-inner {
    margin-left: 8px;
}

.list-card-title {
    width: 200px;
    line-height: 1.6;
    letter-spacing: .0125em;
    font-weight: 500;
    font-size: .97em;
    cursor: pointer;
    color: var(--el-text-color-primary);
}

.list-card-score-container {
    margin-bottom: 8px;
}

.list-card-score {
    color: #E800A4;
    cursor: pointer;
}

.list-card-tags {
    width: 180px;
    display: grid;
    grid-gap: 4px;
}

.gtc3 {
    grid-template-columns: repeat(3, 1fr);
}

.gtc2 {
    grid-template-columns: repeat(2, 1fr);
}

.list-card-subgroup {
    max-width: 60px;
    color: var(--el-color-info);
}

.list-card-actions {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
}

.list-card-spacer {
    height: 5px;
}

/* ---------- 登录页（对应 Login.vue） ---------- */
/* flex:1 是关键：登录卡片吃掉页脚以外的全部高度，再在其中居中。
   少了这行，卡片就贴在页面顶部，只有水平方向居中。 */
#login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
}

#form {
    max-width: 200px;
}

@media (max-width: 450px) {
    #form {
        width: 80%;
    }
}

.title-h2 {
    text-align: center;
    margin-bottom: 32px;
}

/* 上游是 width:100% + space-between。这里多给一个 wrap：主题把按钮做宽之后
   （字距、边框、通栏），200px 的表单放不下两个元素，不换行「记住密码」会被按钮压掉半截 */
.action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
}

.footer {
    margin-bottom: 16px;
}

/* ---------- 日志弹窗（对应 home/Logs.vue） ---------- */
.logs-dialog .content {
    color: #d8dee9;
    background-color: #2e3440;
    border-radius: var(--el-border-radius-base);
    margin-top: 4px;
    padding: 4px;
}

.full-width {
    width: 100%;
}

/* ---------- 浏览字幕组订阅弹窗（对应 home/Mikan.vue、AniBT.vue、AnimeGarden.vue） ----------
   三份组件的 scoped 样式一模一样，这里按同样的数值重写一份，类名加 pv- 前缀避免和主题打架。 */
.pv-search-section {
    margin: 4px;
}

/* 输入框默认 width:100%，搜索按钮就是在这一行被挤的 */
.pv-search-header {
    display: flex;
    justify-content: space-between;
}

.pv-season-selector {
    margin-top: 4px;
    width: 100%;
    justify-content: space-between;
}

.pv-scroll-container {
    margin: 8px 0 4px;
}

.pv-scroll-container .el-collapse {
    --el-collapse-header-height: 55px;
}

.pv-collapse-content,
.pv-group-content {
    margin-left: 15px;
}

.pv-group-content {
    min-height: 50px;
}

.pv-collapse-title {
    align-items: center;
}

.pv-cover {
    border-radius: var(--el-border-radius-base);
    cursor: pointer;
    width: 45px;
    height: 45px;
    object-fit: cover;
    flex-shrink: 0;
}

.pv-title-text {
    margin-left: 6px;
    line-height: 1.6;
    font-weight: bold;
}

.pv-score-m {
    margin-left: 4px;
}

.pv-score {
    color: #E800A4;
}

.pv-badge-m {
    margin-left: 12px;
}

.pv-group-title {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.pv-group-check {
    height: 100%;
}

/* 得写两层：上游那条是 scoped 的（带 data-v 属性，0-2-0），主题里的
   `html .el-checkbox{margin-right:0}` 是 0-1-1，真程序里压不过它。
   预览这边只写 .pv-check-m（0-1-0）就会被压掉，勾选框和字幕组名会贴在一起。 */
.pv-group-check .el-checkbox {
    margin-right: 8px;
}

.pv-group-label {
    display: flex;
    align-items: center;
    flex: 1;
    text-align: start;
}

.pv-tag-m {
    margin-right: 4px;
}

.pv-group-action {
    display: flex;
    align-items: center;
    margin-right: 14px;
    margin-left: 4px;
}

.pv-group-items {
    margin-left: 15px;
}

.pv-item-m {
    margin-bottom: 4px;
}

.pv-item-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------- 封面（home/Cover.vue） ---------- */
.pv-cover-lg {
    border: 1px solid var(--el-border-color-light);
    border-radius: var(--el-border-radius-base);
    cursor: pointer;
    height: 260px;
    width: 180px;
    object-fit: cover;
}

/* ---------- 播放列表（play/PlayList.vue） ---------- */
.pv-play-grid {
    display: grid;
    grid-gap: 5px;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    padding: 0 5px;
}

.pv-play-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

/* el-upload 默认按内容宽度撑，上游这两处都放在通栏容器里，得给满 */
.pv-upload,
.pv-upload .el-upload,
.pv-upload .el-upload-dragger {
    width: 100%;
}

/* ---------- 导入数据（home/ImportAni.vue） ---------- */
.pv-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    margin-bottom: 8px;
}
