/* ==================== 图片显示/加载区域样式 ==================== */
.image-container {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 20px;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    width: var(--stage-width);
    max-width: var(--stage-width);
    margin: 0 auto;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
    touch-action: manipulation; /* 优化触摸响应 */
}

body:not(.light-mode) .image-container {
    background: #2a2a2a;
    border: 2px dashed #444;
}

body.light-mode .image-container {
    background: #f5f5f5;
    border: 2px dashed #ddd;
}

.image-container.has-image {
    border-color: var(--primary-color);
    background: #fff;
}

.image-container.drag-over {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

#display-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    -webkit-user-drag: none; /* 防止图片拖拽 */
    user-select: none; /* 防止图片选择 */
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

#display-img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* 移动端图片优化 */
@media (max-width: 768px) {
    #display-img {
        max-height: 60vh;
        border-radius: 10px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    #display-img:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .image-container.drag-over {
        transform: scale(1.01);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    #display-img:hover {
        transform: none;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    }
    
    .image-container.drag-over {
        transform: scale(1.01);
    }
}

.empty-state {
    color: var(--text-lighter);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

body:not(.light-mode) .empty-state {
    color: #999;
}

body.light-mode .empty-state {
    color: #adb5bd;
}

.processing-state {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    display: none;
    transition: color 0.3s ease;
}

.processing-state::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 刮刮乐效果样式 */
.scratch-container {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    max-width: 100%;
    max-height: 60vh;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
    z-index: 10;
    touch-action: none;
}

.scratch-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}