/* Image Overlay Online - Modern Material UI 3 (M3) Styles */

/* Overlay Graphic Upload Box */
.overlay-upload-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.overlay-upload-box:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.25);
}

.overlay-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #0b0f19;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

/* Material 3 Anchor Grid & Viewfinder */
.anchor-section-wrapper {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.anchor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 154px;
  background: rgba(11, 15, 25, 0.85);
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.anchor-btn {
  width: 40px;
  height: 40px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.anchor-btn:hover {
  border-color: #6366f1;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  transform: scale(1.05);
}

.anchor-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #6366f1;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.5);
  transform: scale(1.05);
}

.anchor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.anchor-btn.active .anchor-dot {
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Canvas Viewport */
.canvas-container {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  max-height: 680px;
  background-color: #0b0f19;
  background-image: linear-gradient(45deg, #141c2e 25%, transparent 25%),
                    linear-gradient(-45deg, #141c2e 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #141c2e 75%),
                    linear-gradient(-45deg, transparent 75%, #141c2e 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  user-select: none;
}

#overlay-canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.05s ease-out;
  transform-origin: center center;
  border-radius: 4px;
}

/* Responsive */
.steps-grid,
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .steps-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .steps-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }
}
