body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 50px;  /* 添加底部内边距，值要大于页脚高度 */
}
.dropzone {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}
.options {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.options label {
    margin: 0;
    white-space: nowrap;
}

#packButton {
    margin-left: auto;  /* 将按钮推到右边 */
}
.result {
    margin-top: 20px;
    display: none;
}
.preview {
    margin: 0;  /* 更新 margin */
    max-width: 100%;
    display: block;
}

/* 添加预览容器样式 */
.preview-container {
    position: relative;
    background: repeating-conic-gradient(#746c6c 0% 25%, #b4b0b0 0% 50%) 50% / 20px 20px;
    padding: 0;  /* 移除内边距 */
    border-radius: 0;  /* 移除圆角 */
    box-shadow: none;  /* 移除阴影 */
    display: inline-block;
    font-size: 0;  /* 消除内联元素间隙 */
    line-height: 0;  /* 消除行高影响 */
}

.highlight-box {
    position: absolute;
    border: 2px solid #ff00ff;  /* 加粗边框 */
    pointer-events: none;
    z-index: 1;
    margin: 0;  /* 确保没有外边距 */
    padding: 0;  /* 确保没有内边距 */
}

.sprite-name {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px 10px;  /* 增加内边距 */
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
    line-height: 1.2;  /* 添加行高 */
}

#packButton {
    display: none;
}
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin: 5px;
    cursor: pointer;
}
.button:hover {
    background-color: #45a049;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-header h3 {
    margin: 0;
}

.download-buttons {
    display: flex;
    gap: 10px;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background-color: #fff;
    text-align: center;
    border-top: 1px solid #eee;
}

.footer p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #333;
}