* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.controls.vertical-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 8px;
}

.bottom-row.image-controls.inline-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: none;
    box-shadow: none;
    position: static;
    margin-left: 0;
}

.start-button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.start-button:hover {
    background-color: #45a049;
}

.display-text {
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

.frame-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    position: relative;
}

.image-controls {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.image-controls.inline-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    background: none;
    box-shadow: none;
    position: static;
    margin-left: 16px;
}

.zoom-controls, .move-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.move-controls {
    flex-direction: column;
    gap: 2px;
}

.move-controls.horizontal-move-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.horizontal-controls {
    display: flex;
    gap: 2px;
}

.control-button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    background-color: #fff;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.control-button:hover {
    background-color: #4CAF50;
    color: white;
}

.frame {
    position: relative;
    width: 100%;
    padding-bottom: 133.33%; /* 4:3 比例 */
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.frame-image {
    width: 100%;
    height: auto;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    transition: transform 0.1s ease-out;
    cursor: move;
}

.point {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.target-point {
    background-color: transparent;
    border: 3px solid red;
    width: 24px;
    height: 24px;
    z-index: 100;
    display: none;
}

.click-point {
    background-color: transparent;
    border: 3px solid blue;
    width: 24px;
    height: 24px;
    z-index: 10;
}

.coordinate-display {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 10;
}

.coordinate-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.coordinate-value {
    font-size: 18px;
    color: #4CAF50;
    font-weight: bold;
}

.coordinate-value span {
    margin: 0 5px;
}

.error-message {
    position: absolute;
    color: red;
    font-size: 14px;
    white-space: normal;
    max-width: 200px;
    display: none;
    background: rgba(255,255,255,0.8);
    padding: 4px 8px;
    border-radius: 6px;
}

/* 添加响应式设计 */
@media (max-width: 768px) {
    .frame-container {
        max-width: 90vw;
    }
    
    .control-button {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .coordinate-display {
        padding: 8px 16px;
    }

    .coordinate-title {
        font-size: 14px;
    }

    .coordinate-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .frame-container {
        max-width: 95vw;
    }
    
    .start-button {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .display-text {
        font-size: 16px;
    }

    .point {
        width: 16px;
        height: 16px;
    }

    .control-button {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .coordinate-display {
        padding: 6px 12px;
    }

    .coordinate-title {
        font-size: 12px;
    }

    .coordinate-value {
        font-size: 14px;
    }
}

.controls.responsive-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
  .controls.responsive-controls {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* 画框自适应最大化 */
.frame-container.mobile-max-frame {
    width: 100vw;
    max-width: 100vw;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
}

.frame {
    width: 100vw;
    max-width: 100vw;
    aspect-ratio: 3/4;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
  .controls.top-controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    background: #f7f7f7;
    padding: 8px 0 4px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  .frame-container.mobile-max-frame {
    margin-top: 56px;
    max-height: calc(100vh - 56px);
    height: calc(100vh - 56px);
  }
  .frame {
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    aspect-ratio: 3/4;
    min-height: 0;
    min-width: 0;
  }
} 