/* AI Studio Layout */
.ai-header {
  background: linear-gradient(135deg, #0b2946 0%, #1769bc 100%);
  color: white;
  padding: 60px 20px 40px;
  text-align: center;
}

.ai-header h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  font-family: 'Manrope', sans-serif;
  letter-spacing: -1px;
}

.ai-header p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* Tool Grid */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.ai-category-title {
  grid-column: 1 / -1;
  font-size: 1.4rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--navy);
  border-bottom: 2px solid var(--line);
  padding-bottom: 10px;
}

.ai-tool-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.ai-tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  border-color: var(--blue);
}

.ai-tool-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.ai-tool-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--navy);
}

.ai-tool-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
}

/* EDITOR UI */
.editor-wrapper {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.editor-canvas-area {
  flex: 1;
  background: #f1f5f9;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 20px;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.editor-sidebar {
  width: 350px;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.editor-tools-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.editor-tool-tab {
  padding: 8px 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
}

.editor-tool-tab.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.control-group {
  margin-bottom: 20px;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.control-slider {
  width: 100%;
  accent-color: var(--blue);
}

.editor-actions {
  margin-top: 30px;
  display: flex;
  gap: 10px;
}

/* Before / After Slider Component */
.ba-slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3hNEv/9/Z2BkYGRkgPIZGRnBPIYYH0YNYNQAxhg8jA59BwAlpBMd8g7rXwAAAABJRU5ErkJggg==') repeat;
  border-radius: 8px;
  overflow: hidden;
  cursor: ew-resize;
  flex-grow: 1;
}

.ba-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ba-original-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: white;
  z-index: 20;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ba-handle-button {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  gap: 2px;
}

.ba-label {
  position: absolute;
  top: 20px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  z-index: 15;
  transition: opacity 0.2s;
}

.ba-label-original {
  left: 20px;
}

.ba-label-enhanced {
  right: 20px;
}

/* Upload Area specific to AI */
.ai-upload-hero {
  background: white;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(-20px);
}

.privacy-note {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Responsive */
@media (max-width: 1024px) {
  .editor-wrapper {
    flex-direction: column;
  }
  .editor-sidebar {
    width: 100%;
  }
}
