/**
 * RealPicViewer 样式
 * 统一的图片查看蒙版组件样式
 */

/* 蒙版层 */
.viewer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.viewer-modal.active {
    display: flex;
    opacity: 1;
}

/* 内容容器 */
.viewer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 90vw;
    max-width: 1000px;
    height: 95vh;
}

/* RealPic 容器 - 需要明确的宽高 */
.viewer-container {
    width: 100%;
    height: calc(100% - 100px); /* 减去标题高度和间距 */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.viewer-modal.active .viewer-container {
    opacity: 1;
    transform: translateY(0);
}

/* 信息区域 */
.viewer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 80%;
}

/* 标题 */
.viewer-title {
    color: #e1e1e1;
    font-size: 1.25em;
    font-weight: 400;
    text-align: center;
    line-height: 1.4;
}

/* 描述 */
.viewer-description {
    color: #aaa;
    font-size: 1em;
    text-align: center;
    line-height: 1.5;
    opacity: 0.9;
}

/* Markdown 链接样式 */
.viewer-md-link {
    color: #4a9eff;
    text-decoration: underline;
}

/* 右下角控制按钮组 */
.viewer-controls {
    position: fixed;
    bottom: 30px;
    right: 80px;
    display: flex;
    gap: 12px;
    z-index: 10001;
}

/* 控制按钮 */
.viewer-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(40, 40, 40, 0.8);
    border-radius: 30%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.viewer-btn:hover {
    background: rgba(60, 60, 60, 0.9);
}

.viewer-btn svg {
    width: 24px;
    height: 24px;
    stroke: #ccc;
}

/* 加载动画容器 */
.viewer-loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10002;
    pointer-events: none;
}

.viewer-modal.loading .viewer-loading {
    display: block;
}

/* 加载时隐藏内容，避免重影 */
.viewer-modal.loading .viewer-container {
    opacity: 0;
    transform: translateY(15px);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .viewer-content {
        max-width: 95%;
        max-height: 80%;
    }
    
    .viewer-title {
        font-size: 16px;
        padding: 0 15px;
    }
    
    .viewer-controls {
        bottom: 20px;
        right: 20px;
    }
}
