html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #1b0133;
    color: #fff;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.topbar {
  position:fixed; top:0; left:0; width:100%; height:50px;
  background:linear-gradient(90deg,#EB22CB,#30CFD0);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 20px; z-index:100;
  box-shadow:0 2px 10px rgba(48,207,208,0.3);
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.left {
    flex: 2;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-right: 2px solid #1f003c;
    overflow: hidden;
}

/* 在纵向屏幕上使用垂直布局 */
@media (orientation: portrait) and (max-aspect-ratio: 1/1) {
    .container {
        flex-direction: column;
    }
    
    .left {
        flex: 1;
        min-height: 50vh;
    }
    
    .right {
        flex: 1;
        min-height: 50vh;
    }
}

.right {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: #21053c;
    overflow-y: auto;
    max-height: 100vh;
}

.slider-container {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

input[type=range] {
    flex: 1;
    margin-left: 10px;
    margin-right: 5px;
    accent-color: #30CFD0;
}

label {
    margin-left: 5px;
    color: #aaa;
    font-weight: 500;
}

#canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(48, 207, 208, 0.5);
    background-color: #1b0133;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    cursor: grab;
}

.dropzone {
    position: absolute;
    inset: 0;
    border: 3px dashed #30CFD0;
    color: #888;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    transition: .3s;
    background-color: rgba(27, 1, 51, 0.2);
    z-index: 10;
    font-size: 1.5em;
}

.dropzone.dragover {
    border-color: #EB22CB;
    color: #fff;
    background: rgba(48, 207, 208, 0.1);
}

.mobile-upload {
    margin-top: 20px;
}

.file-label {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(to right, #EB22CB, #30CFD0);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.3s;
}

.file-label:hover {
    opacity: 0.8;
}

#extended-panel {
    margin-top: 20px;
    display: none;
    border-top: 1px solid #444;
    padding-top: 10px;
}

h2, h3 {
    margin: 10px 0;
    font-weight: 700;
    background: linear-gradient(to right, #EB22CB 0%, #30CFD0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.home-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 4px;
    background: linear-gradient(to right, #EB22CB 0%, #30CFD0 100%);
    transition: opacity 0.3s;
}

.home-link:hover {
    opacity: 0.8;
}

.zoom-slider {
    flex: 1;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1b0133;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #EB22CB, #30CFD0);
    border-radius: 4px;
}