body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    color: #444;
    margin-top: 30px;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

#captureBtn {
    display: block;
    margin: 0 auto 30px;
    padding: 12px 30px;
    font-size: 18px;
}

.preview-container {
    border: 2px dashed #ccc;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    padding: 20px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.preview-container img {
    max-width: 100%;
    max-height: 400px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.url-container {
    display: flex;
    margin: 15px 0;
}

#imageUrl {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

#copyBtn {
    border-radius: 0 4px 4px 0;
    margin: 0;
}

/* 错误消息样式 */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 禁用状态 */
button:disabled {
    background-color: #cccccc !important;
    cursor: not-allowed;
}

/* Overlay styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    cursor: crosshair;
}

.selection-area {
    position: absolute;
    border: 2px dashed #fff;
    background-color: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.instructions {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 16px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
}
