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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

header {
  background: #5FB3E8;
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

header p {
  font-size: 1rem;
  opacity: 0.9;
}

/* Zweispalten-Layout */
.main-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.left-panel,
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Sections */
.section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.section-title {
  color: #5FB3E8;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid #5FB3E8;
  padding-bottom: 0.5rem;
}

/* Upload Area */
.upload-area {
  border: 3px dashed #5FB3E8;
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #f0f9ff;
}

.upload-area:hover {
  background: #e0f2fe;
  border-color: #4A9FD8;
  transform: translateY(-2px);
}

.upload-area input[type="file"] {
  display: none;
}

.upload-content svg {
  color: #5FB3E8;
  margin-bottom: 1rem;
}

.upload-content p {
  margin: 0.3rem 0;
  color: #333;
}

.upload-hint {
  font-size: 0.85rem;
  color: #666;
}

/* Preview */
.preview-container {
  text-align: center;
}

.canvas-wrapper {
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#previewCanvas {
  max-width: 100%;
  height: auto;
  border: 2px solid #5FB3E8;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-info {
  font-size: 0.9rem;
  color: #666;
  margin: 0.5rem 0 1rem 0;
}

/* Config */
.config-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.config-item {
  flex: 1;
}

.config-item label {
  display: block;
  font-weight: 600;
  color: #5FB3E8;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.config-item input[type="number"] {
  width: 100%;
  padding: 0.6rem;
  border: 2px solid #d1e7f5;
  border-radius: 6px;
  font-size: 1rem;
}

.config-item input[type="number"]:focus {
  outline: none;
  border-color: #5FB3E8;
}

.map-info {
  background: #f0f9ff;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #5FB3E8;
}

.map-info p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
}

.cost-display {
  font-size: 1.1rem !important;
  color: #5FB3E8;
  margin-top: 0.8rem !important;
}

/* Settings */
.settings-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 6px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  cursor: pointer;
}

.checkbox-label span {
  font-weight: 600;
  color: #5FB3E8;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.setting-group label {
  font-weight: 600;
  color: #5FB3E8;
  font-size: 0.95rem;
}

.setting-group select {
  padding: 0.6rem;
  border: 2px solid #d1e7f5;
  border-radius: 6px;
  font-size: 1rem;
  background: white;
}

/* Manual Crop */
.manual-crop-section {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid #5FB3E8;
}

/* Preprocessing */
.preprocessing-section {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
}

.preprocessing-section h3 {
  color: #5FB3E8;
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

/* Sliders */
.slider-group {
  margin-bottom: 1rem;
}

.slider-group label {
  display: block;
  font-weight: 600;
  color: #5FB3E8;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.slider-group input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #d1e7f5;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #5FB3E8;
  cursor: pointer;
}

.slider-group input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #5FB3E8;
  cursor: pointer;
  border: none;
}

/* Form */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #5FB3E8;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 0.7rem;
  border: 2px solid #d1e7f5;
  border-radius: 6px;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #5FB3E8;
}

/* Buttons */
.btn-main {
  width: 100%;
  padding: 1rem;
  background: #5FB3E8;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-main:hover {
  background: #4A9FD8;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(95, 179, 232, 0.4);
}

.btn-main:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 0.7rem 1.2rem;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-secondary.full-width {
  width: 100%;
}

/* Order Status */
.order-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  display: none;
}

.order-status.success {
  display: block;
  background: #d1fae5;
  color: #065f46;
  border: 2px solid #10b981;
}

.order-status.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid #ef4444;
}

/* Responsive */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }
  
  .section {
    padding: 1rem;
  }
}
