/* 拼豆底稿生成器主样式 */

.perler-beads-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.perler-beads-header {
    text-align: center;
    margin-bottom: 30px;
}

.perler-beads-header h2 {
    color: #333;
    font-size: 24px;
    margin: 0;
}

.perler-beads-steps {
    margin-bottom: 30px;
}

.step {
    display: none;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.step.active {
    display: block;
}

.step h3 {
    color: #333;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.step-content {
    margin-top: 20px;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.upload-area:hover {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

#image-upload {
    display: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-area p {
    margin: 5px 0;
    color: #666;
}

.upload-hint {
    font-size: 12px;
    color: #999;
}

.preview-container {
    margin-top: 20px;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 分辨率设置样式 */
.resolution-settings {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item label {
    font-weight: bold;
    color: #333;
}

.setting-item input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100px;
}

/* 裁剪区域样式 */
.crop-section {
    margin-top: 20px;
}

.crop-info {
    background-color: #f0f8ff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.crop-info p {
    margin: 5px 0;
    color: #333;
    font-size: 14px;
}

.crop-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 400px;
    background-color: #fafafa;
    overflow: hidden;
    cursor: move;
}

#crop-canvas {
    display: block;
    width: 100%;
    height: 400px;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.crop-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.crop-controls button {
    padding: 8px 16px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.crop-controls button:hover {
    background-color: #005177;
}

/* 池化模式选择样式 */
.pooling-mode-selector {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.pooling-mode-selector label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pooling-mode-selector label:hover {
    background-color: #f0f8ff;
    border-color: #0073aa;
}

.pooling-mode-selector input[type="radio"] {
    cursor: pointer;
}

/* 处理选项样式 */
.processing-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.option {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: #0073aa;
    background-color: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.option h4 {
    margin-top: 0;
    color: #333;
}

.option p {
    color: #666;
    margin-bottom: 15px;
}

.credit-cost {
    font-weight: bold;
    color: #d63638;
}

.process-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.process-btn:hover {
    background-color: #005177;
}

/* 结果容器样式 */
.result-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-preview {
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 300px;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    text-align: center;
    color: #666;
}

.preview-icon {
    font-size: 64px;
    margin-bottom: 10px;
}

.result-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.bead-size-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bead-size-selector label {
    font-weight: bold;
    color: #333;
}

.bead-size-selector select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.result-actions button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.result-actions button:hover {
    background-color: #005177;
}

/* 导航按钮样式 */
.perler-beads-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.nav-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background-color: #005177;
}

.nav-btn:disabled {
    background-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

/* 加载状态样式 */
.perler-beads-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .perler-beads-container {
        padding: 10px;
    }
    
    .resolution-settings {
        flex-direction: column;
        gap: 10px;
    }
    
    .pooling-mode-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .processing-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .perler-beads-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .crop-controls {
        flex-direction: column;
    }
    
    .crop-controls button {
        width: 100%;
    }
}
