/* 模特卡片区块样式 - 全部作用域限定在 .qtu-model-card-block 内，避免影响页面内其他卡片 */

/* 区块容器：宽度交由卡片本体控制，展开时卡片可撑满整行 */
.qtu-model-card-block {
    width: 100%;
}

/* 区块提示：未选择模特或模特不存在时展示 */
.qtu-model-card-notice {
    max-width: 500px;
    margin: 0 auto;
    padding: 24px;
    text-align: center;
    color: #669966;
    font-size: 14px;
    background: #F1FAEE;
    border: 1px dashed #A7C7B0;
    border-radius: 12px;
}

/* 卡片元素基础重置 */
.qtu-model-card-block .embed-card * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 卡片主体：收起态固定宽度居中，宽高比锁定使两态形状一致 */
.qtu-model-card-block .embed-card {
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 5 / 4;
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.15);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease, max-width 0.4s ease;
}

/* 卡片悬停上浮 */
.qtu-model-card-block .embed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(46, 125, 50, 0.2);
}

/* 卡片展开状态：宽度平滑放大到上限并保持居中，内部比例等比不变，交由点击空白处收起 */
.qtu-model-card-block.expanded .embed-card {
    max-width: 1200px;
    margin: 0 auto;
    cursor: default;
}

/* 展开状态禁用悬停上浮，避免与展开冲突 */
.qtu-model-card-block.expanded .embed-card:hover {
    transform: none;
}

/* 卡片内层：左图右文，铺满锁定高度 */
.qtu-model-card-block .card-inner {
    display: flex;
    height: 100%;
}

/* 照片区域：占 45% 宽度并铺满高度，配合 5/4 的卡片比恰为 9:16 竖构图 */
.qtu-model-card-block .card-img {
    width: 45%;
    height: 100%;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.qtu-model-card-block .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qtu-model-card-block .card-img:hover {
    transform: scale(1.02);
}

/* 信息区域：占 55% 宽度，纵向排列，自身不滚动，由画廊吸收剩余高度 */
.qtu-model-card-block .card-info {
    display: flex;
    flex-direction: column;
    width: 55%;
    height: 100%;
    background: #fff;
    padding: 20px 18px;
    overflow: hidden;
}

/* 文字区块保持自身高度，不参与收缩 */
.qtu-model-card-block .card-info > .info-header,
.qtu-model-card-block .card-info > .info-details,
.qtu-model-card-block .card-info > .info-hobbies,
.qtu-model-card-block .card-info > .info-bio {
    flex: none;
}

/* 头部区域 */
.qtu-model-card-block .info-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 12px;
    width: 100%;
}

.qtu-model-card-block .info-header > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 4px;
}

.qtu-model-card-block .info-header h1 {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(90deg, #2E7D32, #4CAF50);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qtu-model-card-block .info-header h2 {
    font-size: 20px;
    color: #66BB6A;
    font-weight: 500;
    margin-top: 4px;
}

/* 头部右侧操作区：纵向排列 */
.qtu-model-card-block .header-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* 访问按钮 */
.qtu-model-card-block .visit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.qtu-model-card-block .visit-btn:hover {
    background: #3d9140;
    transform: scale(1.1);
}

.qtu-model-card-block .visit-btn svg {
    width: 14px;
    height: 14px;
}

/* 标签链接按钮 */
.qtu-model-card-block .tag-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.qtu-model-card-block .tag-link-btn:hover {
    background: #3d9140;
    transform: scale(1.1);
}

.qtu-model-card-block .tag-link-btn svg {
    width: 14px;
    height: 14px;
}

/* 详情列表 */
.qtu-model-card-block .info-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.qtu-model-card-block .detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1B5E20;
    font-size: 12px;
    line-height: 1.6;
}

.qtu-model-card-block .detail-item svg {
    width: 14px;
    height: 14px;
    flex: none;
    color: #4CAF50;
}

/* 爱好区域 */
.qtu-model-card-block .info-hobbies {
    font-size: 12px;
    color: #556B2F;
    border-top: 1px solid #E8F5E9;
    padding-top: 8px;
    margin-bottom: 6px;
    line-height: 1.6;
}

.qtu-model-card-block .hobby-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 6px;
}

.qtu-model-card-block .hobby-tag {
    background: #E8F5E9;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    color: #2E7D32;
}

/* 简介文本 */
.qtu-model-card-block .info-bio {
    font-size: 11px;
    color: #388E3C;
    line-height: 1.8;
    border-top: 1px solid #E8F5E9;
    padding-top: 8px;
}

/* 画廊展示墙：可视区域约两行图片高度，超出部分竖向滚动，显隐由折叠容器控制 */
.qtu-model-card-block .info-gallery {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #E8F5E9;
    --gallery-image-height: 280px;
    max-height: calc(var(--gallery-image-height) * 2 + 10px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(76, 175, 80, 0.3) transparent;
}

/* 画廊折叠容器：占据信息区剩余高度，0fr 到 1fr 的高度过渡实现平滑收展 */
.qtu-model-card-block .info-gallery-collapse {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.4s ease;
}

.qtu-model-card-block.expanded .info-gallery-collapse {
    grid-template-rows: 1fr;
}

/* 画廊收起态隐藏：非放大状态整体不可见且跳过内容渲染，图片不发起网络请求 */
.qtu-model-card-block .info-gallery-collapse > .info-gallery {
    min-height: 0;
    visibility: hidden;
    content-visibility: hidden;
    transition: visibility 0s linear 0.4s, content-visibility 0s linear 0.4s;
}

/* 画廊展开态显示：立即恢复渲染与可见，高度再由 0fr 过渡展开 */
.qtu-model-card-block.expanded .info-gallery-collapse > .info-gallery {
    visibility: visible;
    content-visibility: visible;
    transition: visibility 0s linear 0s, content-visibility 0s linear 0s;
}

/* 画廊列容器：瀑布流列布局 */
.qtu-model-card-block .gallery-columns {
    column-width: 160px;
    column-gap: 10px;
}

/* 画廊条目：高度由图片自身比例决定，容器不设固定比例，避免裁切 */
.qtu-model-card-block .gallery-item {
    display: block;
    break-inside: avoid;
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
    cursor: zoom-in;
}

.qtu-model-card-block .gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease-out;
}

.qtu-model-card-block .gallery-item:hover img {
    transform: scale(1.08);
}

/* 画廊滚动条：轨道透明、滑块极细 */
.qtu-model-card-block .info-gallery::-webkit-scrollbar {
    width: 4px;
}

.qtu-model-card-block .info-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.qtu-model-card-block .info-gallery::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.25);
    border-radius: 2px;
}

.qtu-model-card-block .info-gallery:hover::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.5);
}

/* 画廊剩余数量标签：绿色椭圆按键，悬浮在画廊底部居中 */
.qtu-model-card-block .gallery-more {
    position: sticky;
    bottom: 8px;
    width: fit-content;
    margin: 0 auto;
    padding: 6px 18px;
    background: #4CAF50;
    color: #fff;
    font-size: 12px;
    line-height: 1.6;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.35);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 4px;
}

.qtu-model-card-block .gallery-more:hover {
    background: #43A047;
    box-shadow: 0 0 16px rgba(76, 175, 80, 0.85);
}

.qtu-model-card-block .gallery-more-arrow {
    width: 14px;
    height: 14px;
    flex: none;
}

/* 画廊空状态：未设置标签或专题时，水平垂直居中显示灰色心形图标 */
.qtu-model-card-block .info-gallery.is-empty {
    display: flex;
    height: calc(var(--gallery-image-height) * 2 + 10px);
    overflow: visible;
    align-items: center;
    justify-content: center;
}

.qtu-model-card-block .info-gallery.is-empty svg {
    width: 120px;
    height: 120px;
}

/* 窄屏：解除宽高比锁定，图片信息改为上下排列 */
@media (max-width: 480px) {
    .qtu-model-card-block .embed-card {
        aspect-ratio: auto;
    }

    .qtu-model-card-block .card-inner {
        flex-direction: column;
        height: auto;
    }

    .qtu-model-card-block .card-img {
        width: 100%;
        height: auto;
        aspect-ratio: 9 / 16;
    }

    .qtu-model-card-block .card-info {
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .qtu-model-card-block .info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 无障碍：用户偏好减少动效时关闭过渡与动画 */
@media (prefers-reduced-motion: reduce) {
    .qtu-model-card-block .card-img img,
    .qtu-model-card-block .info-gallery,
    .qtu-model-card-block .info-gallery-collapse,
    .qtu-model-card-block .embed-card {
        transition: none !important;
        animation: none !important;
    }
}