/* Cases Page Styles - 全景屏布局：全景背景 + 当前子项信息面板 */

/* 加载指示器 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-indicator.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 20px;
    color: var(--text-on-image-secondary, rgba(255, 255, 255, 0.65));
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif);
    font-size: var(--font-size-medium, 1.0rem);
    font-weight: var(--font-weight-normal, 400);
    letter-spacing: var(--letter-spacing-base, 0.5px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    width: 100%;
    min-height: 100vh;
    background: var(--color-black, #000);
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100vw;
    /* 全景屏滚动切换由 JS 接管，禁用滚动链与回弹避免手势干扰 */
    overscroll-behavior: none;
}

/* 主容器 */
.app {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    margin: 0 auto;
}

/* 全景背景图片容器 - fixed 定位覆盖视口，依次显示每一个子项的全景背景图片；
   仅作背景展示不响应点击，跳转由文字信息容器触发 */
.app__bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    overflow: hidden;
    clip: rect(0, 100vw, 100vh, 0);
}

.app__bg__image {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.app__bg__image img {
    background-color: rgba(0, 0, 0, 0.9);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    will-change: transform, opacity;
}

/* 渐变遮罩：底部与左侧压暗，提升信息面板文字可读性 */
.app__bg::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0) 65%),
        linear-gradient(to right, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 45%);
    pointer-events: none;
}

/* 当前子项信息面板：点击文字信息区域跳转到对应播放器页面 */
.item-panel {
    position: fixed;
    left: 40px;
    bottom: 48px;
    z-index: 100;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: auto;
}

.item-panel__info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    animation: fadeInSlide 0.35s ease-out forwards;
}

/* 标题与副标题左侧上下两行，播放按钮靠右：整行位于详情文字上方 */
.item-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* 左侧标题列：标题 + 副标题 上下排列，靠左对齐 */
.item-panel__heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-panel__title {
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-on-image, rgba(255, 255, 255, 0.85));
    line-height: 1.3;
    letter-spacing: var(--letter-spacing-base, 0.5px);
    text-align: left;
    word-break: break-word;
}

/* 元数据行：媒体类型 + 归属方 */
.item-panel__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.item-panel__tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-on-image, rgba(255, 255, 255, 0.85));
    letter-spacing: 1px;
    text-transform: uppercase;
}

.item-panel__owner {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-on-image, rgba(255, 255, 255, 0.85));
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.item-panel__divider {
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.item-panel__desc {
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif);
    font-size: 0.9rem;
    font-weight: var(--font-weight-normal, 400);
    color: var(--text-on-image, rgba(255, 255, 255, 0.85));
    line-height: 1.7;
    letter-spacing: var(--letter-spacing-base, 0.5px);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    word-break: break-word;
    hyphens: auto;
}

/* 播放按钮：靠容器右侧显示 */
.item-panel__action {
    pointer-events: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 22px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif);
    font-size: var(--font-size-small, 0.75rem);
    font-weight: var(--font-weight-medium, 500);
    letter-spacing: var(--letter-spacing-base, 0.5px);
    color: var(--text-on-image-secondary, rgba(255, 255, 255, 0.65));
}

.item-panel__action:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.05);
    color: var(--text-on-image-hover, #ffffff);
}

/* 播放三角图标 */
.action-play-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 9px solid currentColor;
    border-top: 5.5px solid transparent;
    border-bottom: 5.5px solid transparent;
}

/* 底部居中的向下滚动提示：双层下箭头（“》”旋转 90° 朝下），提示可下滑切换全景屏 */
.scroll-hint {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    user-select: none;
    transform: translateX(-50%);
    animation: scrollHintBounce 1.8s ease-in-out infinite;
    transition: opacity 0.4s ease;
}

/* 单个下箭头：右边框 + 下边框旋转 45° 形成“⌄” */
.scroll-hint__chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--text-on-image, rgba(255, 255, 255, 0.7));
    border-bottom: 2px solid var(--text-on-image, rgba(255, 255, 255, 0.7));
    transform: rotate(45deg);
    animation: scrollHintFade 1.8s ease-in-out infinite;
}

.scroll-hint__chevron:first-child {
    margin-bottom: -7px;
}

@keyframes scrollHintBounce {
    0%, 100% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, 8px);
    }
}

@keyframes scrollHintFade {
    0%, 100% {
        opacity: 0.35;
    }
    50% {
        opacity: 0.9;
    }
}

/* 最后一屏时隐藏（下方已无可切换内容） */
.scroll-hint--hidden {
    opacity: 0;
    animation-play-state: paused;
}

/* ==================== 响应式断点 ==================== */

/* 移动端和Pad端：< 1024px */
@media only screen and (max-width: 1023px) {
    .item-panel {
        left: 20px;
        bottom: 40px;
        max-width: min(560px, calc(100vw - 40px));
    }
}

/* 移动端详细样式：< 768px */
@media only screen and (max-width: 767px) {
    .item-panel {
        left: 16px;
        right: 16px;
        bottom: 32px;
        gap: 12px;
    }

    .item-panel__title {
        font-size: 0.95rem;
    }

    .item-panel__desc {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .item-panel__action {
        height: 36px;
        padding: 0 18px;
    }
}
