@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Shadows+Into+Light&display=swap');

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #e6f7ff; /* 浅蓝色背景 */
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: auto; /* 确保内容不会溢出容器 */
}

input, select, button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* 确保宽度和高度包括内边距和边框 */
}

#imagePreview {
    max-width: 100%;
    margin: 20px 0;
    cursor: move; /* 添加这行，让用户知道可以拖动 */
    user-select: none; /* 防止文本选择干扰拖动 */
}

#canvas {
    max-width: 100%;
    height: auto;
    cursor: move; /* 添加这行，让用户知道可以拖动 */
    user-select: none; /* 防止文本选择干扰拖动 */
}

#saveButton {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

#saveButton:hover {
    background-color: #45a049;
}

.footer {
    margin-top: 20px;
    text-align: center;
    color: #007BFF;
}

.footer a {
    color: #007BFF;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.logo {
    display: block;
    margin: 0 auto 20px;
    width: 100px;
    height: 100px;
}
#canvasContainer {
    max-width: 100%;
    overflow: auto;
    position: relative;
    margin-top: 20px;
}

#imageCanvas {
    max-width: 100%;
    height: auto;
}
#imagePreviewWrapper {
    position: relative;
    height: 300px; /* 调整为合适的高度 */
    overflow: hidden;
}

#canvasContainer {
    transition: all 0.3s ease;
}

#canvasContainer.sticky {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: white;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#imagePreviewWrapper {
    position: relative;
}

#canvasContainer {
    transition: all 0.3s ease;
}

#imagePreviewWrapper {
    position: relative;
    margin: 20px auto;
    z-index: 1000;
    background-color: white;
    box-shadow: 0 5px 8px rgba(0,0,0,0.1);
    border-radius: 5px;
    width: 250px;
    height: 250px;
    min-width: 100px;
    min-height: 100px;
    max-width: 80vw;
    max-height: 80vh;
    transition: box-shadow 0.3s ease, transform 0.3s ease; /* 优化过渡属性 */
    resize: both;
    outline: none; /* 默认无轮廓 */
}

#imagePreviewWrapper.sticky {
    position: fixed;
    top: 10px;
    right: 10px;
}

#imagePreviewWrapper.hidden {
    display: none;
}

#canvasContainer {
    width: 100%;
    height: 100%;
}

#imageCanvas {
    width: 100%;
    height: auto;
    display: block;
}
.footer {
    margin-top: 20px;
    text-align: center;
    color: #000000;
}

.footer a {
    color: #007BFF;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

#imagePreviewWrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent #007bff transparent;
    cursor: se-resize;
}