/* 1111style.css - 补充样式文件 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 图片放大镜相关样式 */
.img-magnifier {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.img-magnifier img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}

.magnifier-lens {
    position: absolute;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: none;
    pointer-events: none;
    display: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-tool {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-tool:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-tool:active {
    transform: translateY(0);
}

/* 缩放级别显示 */
.zoom-level {
    display: inline-block;
    padding: 8px 12px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 6px;
    font-weight: 600;
    color: #667eea;
    min-width: 60px;
    text-align: center;
}

/* 裁剪相关样式 */
.crop-info {
    font-size: 14px;
    color: #666;
}

/* 裁剪选择框 */
#cropOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

#cropSelection {
    position: absolute;
    width: 400px;
    height: 400px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
}

/* 裁剪角标 */
.crop-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #667eea;
}

.crop-corner.top-left {
    top: -10px;
    left: -10px;
    cursor: nw-resize;
}

.crop-corner.top-right {
    top: -10px;
    right: -10px;
    cursor: ne-resize;
}

.crop-corner.bottom-left {
    bottom: -10px;
    left: -10px;
    cursor: sw-resize;
}

.crop-corner.bottom-right {
    bottom: -10px;
    right: -10px;
    cursor: se-resize;
}

.crop-info-box {
    position: absolute;
    bottom: -30px;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
}

/* 裁剪预览对话框 */
.crop-preview-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
}

.crop-preview-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crop-preview-header h3 {
    margin: 0;
}

.btn-close-preview {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-preview:hover {
    background: rgba(255, 255, 255, 0.3);
}

.crop-preview-body {
    display: flex;
    padding: 20px;
    background: #f8f9fa;
}

.crop-preview-image {
    padding: 20px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-preview-image img {
    max-width: 400px;
    max-height: 400px;
    border: 3px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.crop-preview-info {
    padding: 20px;
    min-width: 300px;
    overflow-y: auto;
}

.info-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 600;
}

.info-value {
    display: block;
    font-size: 14px;
    color: #333;
}

.info-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-download-crop,
.btn-apply-crop {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-download-crop:hover,
.btn-apply-crop:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-apply-crop {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
