/* 懒加载图片样式 */
.lazy-image {
    min-height: 100px; /* 为未加载的图片设置一个最小高度，防止页面跳动 */
    display: block; /* 确保img标签是块级元素，以便min-height生效 */
    background-color: rgba(255, 255, 255, 0.05); /* 浅色背景作为占位符 */
}

/* 覆盖样式 */
.selected-resolution {
    display: none;
}

.resolution-label {
    margin-left: 1.5rem;
}

#current-resolution {
    font-family: 'Consolas', monospace;
    letter-spacing: 0.05rem;
    color: var(--text-muted);
} 

/* WebCore/css/custom-styles.css 添加样式 */
.image-to-image-container {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.image-upload-section {
    margin-bottom: 15px;
}

.upload-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
    margin-right: 8px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

.upload-area {
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    min-width: 200px;
    width: 40%;
    display: inline-block;
    box-sizing: border-box;
}

/* 移动设备上的样式 */
@media (max-width: 768px) {
    .upload-area {
        width: 100%;
        min-width: unset;
    }
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.05);
}

.upload-placeholder {
    color: rgba(255, 255, 255, 0.7);
    padding: 20px 10px;
    font-size: 0.9rem;
}

.upload-placeholder i {
    font-size: 20px;
    margin-bottom: 8px;
}

.uploaded-image-preview {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

.uploaded-image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    vertical-align: middle;
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.img2img-controls {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.control-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    justify-content: center;
    text-align: center;
}

.control-item label {
    width: 110px;
    font-size: 14px;
    text-align: right;
    padding-right: 10px;
    white-space: nowrap;
}

.control-item input[type="range"] {
    flex: 1;
    margin: 0 10px;
}

.control-value {
    width: 40px;
    text-align: right;
    font-family: 'Consolas', monospace;
}

.tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    margin-left: 8px;
    cursor: help;
    position: relative;
}

.tooltip-icon:hover:after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 10px;
    border-radius: 4px;
    width: 200px;
    font-size: 12px;
    z-index: 100;
    margin-bottom: 5px;
}

/* 提示词显示样式 */
.show-prompt-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.prompt-label {
    font-weight: bold;
    margin-right: 8px;
    color: var(--text-color);
}

.prompt-content {
    color: var(--primary-color);
    font-family: 'Consolas', monospace;
    background-color: rgba(79, 172, 254, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-all;
}

/* 公告栏样式 */
.announcement-bar {
    /* background-color: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.2); */
    background-color: transparent;
    border: none;
    border-radius: var(--border-radius);
    padding: 8px 15px;
    margin: 0 15px;
    overflow: hidden;
    position: relative;
    max-width: 40%;
    flex-grow: 1;
}

.announcement-content {
    white-space: nowrap;
    animation: scrollText 20s linear infinite; /* 调整动画时长，使其更快 */
    display: inline-block;
}

@keyframes scrollText {
    0% {
        transform: translateX(40%);
    }
    100% {
        transform: translateX(-100%); /* 滚动到一半，因为内容复制了一份 */
    }
}

#announcement-text {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* 在移动设备上调整公告栏样式 */
@media (max-width: 768px) {
    .announcement-bar {
        margin: 5px 0;
        /* width: 40%; */
        max-width: 40%;
    }
    
    header {
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
}
