.image-text-player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-text-player-overlay.hidden {
    display: none;
}

/* 强化overlay背景 */
.image-text-player-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 154, 162, 0.92) 0%, 
        rgba(255, 183, 178, 0.89) 12.5%, 
        rgba(255, 218, 193, 0.86) 25%, 
        rgba(226, 240, 203, 0.83) 37.5%, 
        rgba(181, 234, 215, 0.86) 50%, 
        rgba(199, 206, 234, 0.89) 62.5%, 
        rgba(248, 200, 220, 0.92) 75%, 
        rgba(162, 210, 255, 0.95) 100%);
    backdrop-filter: blur(25px) saturate(1.4);
    animation: overlayPulse 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes overlayPulse {
    0%, 100% { 
        opacity: 0.92;
        filter: hue-rotate(0deg) brightness(1);
    }
    50% { 
        opacity: 0.96;
        filter: hue-rotate(10deg) brightness(1.05);
    }
}

/* 播放器主容器 - 固定70vw x 85vh设计 */
.image-text-player-container {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    padding: 10px; /* 最小padding，最大化显示区域 */
    width: 70vw;  /* 固定70%宽度，稳定居中 */
    height: 85vh; /* 固定85%高度 */
    max-width: none; /* 移除限制 */
    position: relative;
    box-shadow: 
        0 50px 150px rgba(0, 0, 0, 0.2), 
        0 25px 75px rgba(0, 0, 0, 0.15),
        0 0 0 2px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(40px) saturate(1.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
    animation: containerSlideIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

@keyframes containerSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(60px) rotateX(12deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
}

#image-text-close-btn {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    border: none;
    border-radius: 50%;
    background: white !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 99999 !important;
    /* border: 3px solid #ff6b6b !important; */
    pointer-events: auto !important;
}

#image-text-close-btn:hover {
    background: #fff !important;
    transform: scale(1.1);
    border-color: #ff4757 !important;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 154, 162, 0.5);
}

.close-btn:active {
    transform: scale(0.95);
    background: rgba(255, 250, 250, 1);
}

.status-indicator {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 154, 162, 0.2);
    animation: statusFloat 4s ease-in-out infinite alternate;
    z-index: 5;
}

@keyframes statusFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-4px); }
}

.status-geometry {
    position: relative;
    width: 16px;
    height: 16px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF9AA2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: statusDotPulse 2s ease-in-out infinite;
}

.status-ring {
    width: 16px;
    height: 16px;
    border: 2px solid #FFB7B2;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: statusRingPulse 2s ease-out infinite;
}

@keyframes statusDotPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.4); }
}

@keyframes statusRingPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.status-indicator.status-playing .status-dot {
    background: #B5EAD7;
}

.status-indicator.status-completed .status-dot {
    background: #E2F0CB;
    animation: none;
}

.status-indicator.status-error .status-dot {
    background: #ff6b6b;
    animation: statusDotPulse 1s ease-in-out infinite;
}

.status-text {
    color: #555;
}

/* 图片显示区域 - 90%高度最大化 */
.image-display-area {
    height: 90%; /* 增加到90%高度，最大化图片面积 */
    margin: 2px; /* 最小margin */
    border-radius: 12px;
    overflow: visible;
    position: relative;
    background: #000; /* 黑色背景 */
}

.image-container {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 16px;
    overflow: visible;
    background: #f8f9fa; /* 淡雅背景色，与空白区域融合 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 图片完整显示 - 确保图片不被裁剪 */
.main-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 确保图片完整显示，不会被裁剪 */
    object-position: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 16px;
    animation: imageSlideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes imageSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.main-image.hidden {
    display: none;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    transition: all 0.3s ease;
}

.image-placeholder.hidden {
    display: none;
}

.placeholder-geometry {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.geo-shape {
    position: absolute;
    border: 3px solid #C7CEEA;
    animation: geoFloat 4s ease-in-out infinite;
}

.shape-1 {
    top: 0;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.shape-2 {
    bottom: 0;
    left: 0;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    animation-delay: 1.3s;
}

.shape-3 {
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid #F8C8DC;
    border-radius: 0;
    animation-delay: 2.6s;
}

@keyframes geoFloat {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.6; }
    50% { transform: translateY(-10px) scale(1.1); opacity: 1; }
}

.placeholder-text {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.8;
    color: #6c757d;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.loading-overlay.visible {
    opacity: 1;
}

.loading-geometry {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.loading-triangle {
    position: absolute;
    width: 0;
    height: 0;
    animation: triangleRotate 2s ease-in-out infinite;
}

.triangle-1 {
    top: 0;
    left: 50%;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid #FF9AA2;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.triangle-2 {
    bottom: 0;
    left: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 16px solid #FFB7B2;
    animation-delay: 0.66s;
}

.triangle-3 {
    bottom: 0;
    right: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 16px solid #FFDAC1;
    animation-delay: 1.33s;
}

@keyframes triangleRotate {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    33% { opacity: 0.7; transform: scale(1.2) rotate(120deg); }
    66% { opacity: 0.4; transform: scale(0.8) rotate(240deg); }
}

.loading-text {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* 文本显示区域 - 3%高度紧凑设计 */
.text-display-area {
    height: 5%; /* 减少到5%高度，为全屏按钮留空间 */
    margin: 1px 2px; /* 最小margin */
    padding: 4px 8px; /* 最小padding */
    display: flex; /* flex布局容纳文字和全屏按钮 */
    align-items: center;
    background: linear-gradient(135deg, 
        rgba(255, 154, 162, 0.08) 0%, 
        rgba(162, 210, 255, 0.08) 100%);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 154, 162, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 154, 162, 0.1);
}

.text-container {
    flex: 1; /* 占据剩余空间 */
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden; /* 隐藏溢出内容 */
}

.current-text {
    font-size: 14px; /* 16px字体 */
    line-height: 1.2;
    color: #333;
    margin: 0;
    padding: 0 8px; /* 左右留少许空间 */
    white-space: nowrap; /* 单行不换行 */
    overflow-x: auto; /* 横向滚动 */
    overflow-y: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 600;
    scroll-behavior: smooth;
}

/* 全屏按钮样式 */
.fullscreen-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 154, 162, 0.2);
    color: #FF9AA2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.fullscreen-btn:hover {
    background: rgba(255, 154, 162, 0.3);
    transform: scale(1.1);
}

/* 隐藏滚动条但保持功能 */
.current-text::-webkit-scrollbar {
    height: 2px;
}

.current-text::-webkit-scrollbar-track {
    background: rgba(255, 154, 162, 0.1);
    border-radius: 1px;
}

.current-text::-webkit-scrollbar-thumb {
    background: rgba(255, 154, 162, 0.3);
    border-radius: 1px;
}

.current-text.text-appear {
    animation: textSlideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes textSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 0.95;
        transform: translateY(0) scale(1);
    }
}

.text-progress-bar {
    height: 6px;
    background: rgba(255, 154, 162, 0.15);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin-top: auto;
}

.text-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF9AA2 0%, #FFB7B2 50%, #FFDAC1 100%);
    border-radius: 6px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressGlow 3s ease-in-out infinite alternate;
}

@keyframes progressGlow {
    0% { box-shadow: 0 0 5px rgba(255, 154, 162, 0.3); }
    100% { box-shadow: 0 0 12px rgba(255, 154, 162, 0.5); }
}

/* 进度指示器区域 - 5%高度（容纳两行） */
.segment-progress {
    height: 5%; /* 增加高度容纳两行 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 8px;
    margin: 1px;
    background: rgba(255, 255, 255, 0.8);
    /* border-radius: 12px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 154, 162, 0.1);
    box-shadow: 0 2px 12px rgba(255, 154, 162, 0.1); */
}

.progress-text-line {
    text-align: center;
    font-size: 13px;
    color: #666;
    font-weight: 600;
    margin-bottom: 6px;
    height: 40%; /* 占40%高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.segmented-progress-container {
    display: flex;
    gap: 4px; /* 段与段之间的空隙 */
    height: 60%; /* 占60%高度 */
    align-items: center;
    padding: 0 4px;
}

.progress-segment {  
    flex: 1;    
    height: 16px;    
    border-radius: 0; /* 默认无圆角 */   
    cursor: pointer; 
    transition: all 0.3s ease; 
    background: rgba(255, 154, 162, 0.3);
}
 
/* 第一段：只有左侧圆角 */
.progress-segment:first-child {
    border-top-left-radius: 8px;    
    border-bottom-left-radius: 8px; 
}
 
/* 最后段：只有右侧圆角 */
.progress-segment:last-child { 
    border-top-right-radius: 8px;   
    border-bottom-right-radius: 8px;
} 

.progress-segment.completed {
    background: linear-gradient(90deg, #FF9AA2, #FFB7B2);
    box-shadow: 0 2px 4px rgba(255, 154, 162, 0.3);
}

.progress-segment.current {
    background: #FFB7B2;
    box-shadow: 0 0 8px rgba(255, 154, 162, 0.6);
    transform: scaleY(1.1);
}

.progress-segment:hover {
    transform: scaleY(1.2);
    box-shadow: 0 3px 6px rgba(255, 154, 162, 0.5);
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #666;
}

.current-segment {
    color: #fbe1e3;
    min-width: 24px;
    text-align: center;
}

.separator {
    opacity: 0.6;
    font-weight: 400;
}

.progress-dots {
    display: flex;
    gap: 10px;
    max-width: 50%;
    overflow-x: auto;
    padding: 6px 0;
}

.progress-dots::-webkit-scrollbar {
    height: 3px;
}

.progress-dots::-webkit-scrollbar-track {
    background: transparent;
}

.progress-dots::-webkit-scrollbar-thumb {
    background: rgba(255, 154, 162, 0.3);
    border-radius: 2px;
}

.progress-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 154, 162, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    position: relative;
}

.progress-dot:hover {
    background: rgba(255, 154, 162, 0.6);
    transform: scale(1.3);
}

.progress-dot.active {
    background: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 100%);
    transform: scale(1.4);
    box-shadow: 0 3px 12px rgba(255, 154, 162, 0.5);
    animation: activeDotPulse 2.5s ease-in-out infinite alternate;
}

.progress-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #FFDAC1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: activeDotRing 2s ease-out infinite;
}

@keyframes activeDotPulse {
    0% { box-shadow: 0 3px 12px rgba(255, 154, 162, 0.5); }
    100% { box-shadow: 0 5px 18px rgba(255, 154, 162, 0.7); }
}

@keyframes activeDotRing {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.progress-dot.completed {
    background: linear-gradient(135deg, #B5EAD7 0%, #E2F0CB 100%);
    transform: scale(1.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-text-player-container {
        width: 95vw;
        height: 90vh;
        padding: 16px;
    }
    
    .image-display-area {
        height: 72%; /* 移动端稍微调整 */
        margin: 70px 12px 12px;
    }
    
    .text-display-area {
        height: 22%; /* 移动端稍微调整 */
        margin: 0 12px 12px;
        padding: 16px;
    }
    
    .segment-progress {
        height: 6%; /* 移动端稍微调整 */
        margin: 0 12px 8px;
        padding: 6px 16px;
    }
    
    .current-text {
        font-size: 17px;
        line-height: 1.4;
    }
    
    .progress-info {
        font-size: 14px;
    }
    
    .progress-dots {
        gap: 8px;
        max-width: 40%;
    }
    
    .progress-dot {
        width: 12px;
        height: 12px;
    }
    
    .close-btn {
        width: 40px;
        height: 40px;
        top: -6px;   /* 移动端也移出容器边界 */
        right: -6px; /* 移动端也移出容器边界 */
    }
}

@media (max-width: 480px) {
    .image-text-player-container {
        width: 98vw;
        height: 95vh;
        padding: 12px;
        border-radius: 20px;
    }
    
    .current-text {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .progress-info {
        font-size: 13px;
    }
    
    .progress-dots {
        gap: 6px;
        max-width: 35%;
    }
    
    .progress-dot {
        width: 10px;
        height: 10px;
    }
}

/* 深色主题兼容 */
@media (prefers-color-scheme: dark) {
    .image-text-player-container {
        background: rgba(30, 34, 42, 0.97);
        border-color: rgba(255, 154, 162, 0.2);
    }
    
    .current-text {
        color: #e8eaed;
    }
    
    .status-text {
        color: #bdc1c6;
    }
    
    .loading-text {
        color: #bdc1c6;
    }
    
    .placeholder-text {
        color: #80868b;
    }
}

/* 全屏模式样式 */
.image-text-player-container.fullscreen-mode {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    padding: 8px;
    max-width: none;
    background: rgba(0, 0, 0, 0.95);
}

.fullscreen-mode .image-display-area {
    height: 92%;
}

.fullscreen-mode .text-display-area {
    height: 5%;
}

.fullscreen-mode .segment-progress {
    height: 3%;
}

.fullscreen-mode .current-text {
    color: #fff;
    font-size: 18px;
}

/* 方块进度条样式 */
.progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

/* 恢复原来的方块设计，但使用新的混合进度条背景 */
.progress-blocks {
    width: 240px; /* 扩大到2倍宽度 */
    height: 14px; /* 稍微增高 */
    display: flex;
    align-items: center;
    gap: 3px; /* 恢复方块间空隙 */
    flex-shrink: 0;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2; /* 在进度填充之上，在文字之下 */
}

.progress-block {
    width: 16px; /* 固定方块宽度 */
    height: 100%;
    background: rgba(255, 154, 162, 0.3);
    border-radius: 2px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 移除border-right，使用gap间隔 */

.progress-block.active {
    background: #FF9AA2;
    box-shadow: 0 2px 4px rgba(255, 154, 162, 0.4);
}

.progress-block:hover {
    background: #FFB7B2;
    box-shadow: 0 0 6px rgba(255, 154, 162, 0.5);
}

/* 交互浏览模式样式 */
.progress-block.browsing {
    background: #FFB7B2 !important;
    box-shadow: 0 0 8px rgba(255, 154, 162, 0.8);
    position: relative;
}

.progress-block.browsing::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #FF9AA2;
    border-radius: inherit;
    pointer-events: none;
}

.progress-block.completed {
    background: rgba(255, 154, 162, 0.6);
}

.progress-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    font-size: 13px;
    color: #666;
}

/* 进度区域的全屏按钮 */
.segment-progress .fullscreen-btn {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin: 0;
}

/* 对称按钮布局 */
.fullscreen-btn-top {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 154, 162, 0.15);
    color: #FF9AA2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.fullscreen-btn-top:hover {
    background: rgba(255, 154, 162, 0.25);
    transform: scale(1.1);
}

/* 混合进度条样式 */
.progress-blocks-container {
    width: 100%;
    height: 20px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 154, 162, 0.2);
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #FF9AA2, #FFB7B2);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 2px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    pointer-events: none;
    z-index: 3;
    gap: 4px;
}
