@charset "UTF-8";
/* CSS Document - OPTIMIZED VERSION WITH ENHANCED BOUNDING BOX */

/* === ROOT VARIABLES === */
:root {
  --primary-gradient: linear-gradient(135deg, #8b5cf6, #ec4899);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="light"] {
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0, 0, 0, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* === GLOBAL STYLES === */
* {
  transition: var(--transition);
}

body {
  background: linear-gradient(135deg, #431d6d, #0f172a);
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-bs-theme="light"] body {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.tab-pane {
  animation: fadeIn 0.3s ease-in-out;
}

/* === GLASS MORPHISM === */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 1rem;
}

.glass-card-promo {
  background: #000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 1rem;
	max-width: inherit;
}

.glass-card-promo img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.glass-header {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.glass-tabs {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 0.25rem;
  backdrop-filter: blur(10px);
}

.glass-tabs .nav-link {
  border-radius: 0.5rem;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.glass-tabs .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.glass-tabs .nav-link.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.glass-tabs .nav-link i {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.glass-tabs .nav-link span {
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 500;
}

/* Glass Sub-tabs */
.glass-sub-tabs {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  padding: 0.2rem;
}

.glass-sub-tabs .nav-link {
  border-radius: 0.4rem;
  padding: 0.5rem 0.25rem;
  font-size: 0.75rem;
}

.glass-sub-tabs .nav-link i {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.glass-sub-tabs .nav-link span {
  font-size: 0.65rem;
}

/* === GENDER SELECTOR STYLES === */
.gender-selector-container {
  margin-bottom: 1rem;
}

.gender-selector {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gender-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border: none;
  border-radius: 0.4rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  cursor: pointer;
  font-size: 0.75rem;
}

.gender-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.gender-btn.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.gender-btn i {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.gender-btn span {
  font-size: 0.65rem;
  font-weight: 500;
}

[data-bs-theme="light"] .gender-selector {
  background: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="light"] .gender-btn {
  color: rgba(0, 0, 0, 0.7);
}

[data-bs-theme="light"] .gender-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.9);
}

/* Glass Accordion */
.glass-accordion .accordion-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.glass-accordion .accordion-button {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.glass-accordion .accordion-button:not(.collapsed) {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
  box-shadow: none;
}

.glass-accordion .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}

.glass-accordion .accordion-body {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === LOGO AND BRANDING === */
.logo-icon {
  width: 4.5rem;
  height: 4.5rem;
  background: var(--primary-gradient);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4.25rem;
  padding: 5px;
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === THEME TOGGLE === */
.theme-toggle {
  width: 3.5rem;
  height: 1.75rem;
  background: #374151;
  border-radius: 1rem;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}

.theme-toggle.light {
  background: var(--primary-gradient);
}

.theme-slider {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  background: white;
  border-radius: 50%;
  top: 0.25rem;
  left: 0.25rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #374151;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle.light .theme-slider {
  transform: translateX(1.75rem);
}

.theme-slider i {
  position: absolute;
  transition: var(--transition);
}

.theme-slider [data-lucide="sun"] {
  opacity: 1;
}

.theme-slider [data-lucide="moon"] {
  opacity: 0;
}

.theme-toggle.light .theme-slider [data-lucide="sun"] {
  opacity: 0;
}

.theme-toggle.light .theme-slider [data-lucide="moon"] {
  opacity: 1;
}

/* === GLASS BUTTONS === */
.glass-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
  padding: 0.75rem;
  min-width: 70px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.glass-button:hover {
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4), 0 0 24px rgba(16, 185, 129, 0.3);
}

.glass-button:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.5);
}

.glass-button i {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.glass-button span {
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 500;
}

.glass-button-primary {
  background: var(--primary-gradient);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  color: white;
}

.glass-button-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-button-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
  color: white;
}

/* === ENHANCED CANVAS WITH BOUNDING BOX === */
.canvas-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  background: transparent;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="light"] .canvas-container {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

#fabricCanvas {
  border-radius: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  display: block;
  /* Enhanced with subtle glow effect */
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
  position: relative;
  z-index: 1;
}

[data-bs-theme="light"] #fabricCanvas {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.05);
}

/* Enhanced Selection Feedback Overlay */
.selection-feedback {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  pointer-events: none;
  z-index: 10;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.selection-feedback.active {
  box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.5), 0 0 30px rgba(139, 92, 246, 0.3);
}

/* Selection Info Tooltip */
.selection-info {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
  pointer-events: none;
  z-index: 20;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: none;
}

[data-bs-theme="light"] .selection-info {
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  border-color: rgba(0, 0, 0, 0.2);
}

/* Custom cursor styles for canvas interactions */
.canvas-container.moving {
  cursor: move;
}

.canvas-container.resizing {
  cursor: nw-resize;
}

.canvas-container.rotating {
  cursor: grab;
}

.canvas-container.rotating:active {
  cursor: grabbing;
}

.canvas-drop-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  background: rgba(139, 92, 246, 0.2);
  border: 2px dashed #8b5cf6;
  border-radius: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.canvas-drop-overlay.active {
  display: flex;
}

.canvas-container::after {
  bottom: -20px;
  right: -20px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.75), transparent 70%);
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.drop-message {
  text-align: center;
  color: #8b5cf6;
  font-weight: 600;
}

.drop-message i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* === GLASS DRAG ZONES === */
.glass-drag-zone {
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-drag-zone:hover,
.glass-drag-zone.drag-over {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
  transform: scale(1.02);
}

.glass-drag-zone i {
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.glass-drag-zone:hover i,
.glass-drag-zone.drag-over i {
  color: #8b5cf6;
  transform: scale(1.1);
}

.glass-drag-zone small {
  display: block;
  margin-top: 0.25rem;
  opacity: 0.7;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

/* === OPTIMIZED THUMBNAILS === */
.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.25rem;
  position: relative;
  grid-auto-rows: 60px;
}

.thumbnail {
  width: 100%;
  height: 60px;
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumbnail:hover {
  transform: scale(1.05);
  border-color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.25rem;
  display: block;
}

.thumbnail.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

/* === GLASS PLACEHOLDER MESSAGES === */
.glass-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(255, 255, 255, 0.6);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-placeholder i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.glass-placeholder p {
  margin: 0;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.glass-placeholder small {
  opacity: 0.6;
  font-size: 0.75rem;
}

[data-bs-theme="light"] .glass-placeholder {
  color: rgba(0, 0, 0, 0.7);
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.8);
}

/* === GLASS FORM CONTROLS === */
.glass-input,
.glass-select {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-input:focus,
.glass-select:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #ec4899;
  box-shadow: 0 0 0 0.2rem rgba(236, 72, 153, 0.25);
  color: rgba(255, 255, 255, 1);
}

.glass-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.glass-range {
  background: transparent;
}

.glass-range::-webkit-slider-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  height: 0.5rem;
}

.glass-range::-webkit-slider-thumb {
  background: var(--primary-gradient);
  border: none;
  border-radius: 50%;
  width: 1.25rem;
  height: 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.glass-range::-moz-range-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  height: 0.5rem;
  border: none;
}

.glass-range::-moz-range-thumb {
  background: var(--primary-gradient);
  border: none;
  border-radius: 50%;
  width: 1.25rem;
  height: 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.glass-color {
  width: 3rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-bs-theme="light"] .glass-input,
[data-bs-theme="light"] .glass-select {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.9);
}

[data-bs-theme="light"] .glass-input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

/* === TEXT EFFECTS === */
.form-check-input:checked {
  background-color: var(--primary-gradient);
  border-color: #8b5cf6;
}

.form-check-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}

.form-check-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
}

[data-bs-theme="light"] .form-check-label {
  color: rgba(0, 0, 0, 0.8);
}

.form-check-label i {
  font-size: 0.875rem;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: -12;
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* === SCROLLBARS === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}


/* === RESPONSIVE - OPTIMIZED === */
@media (max-width: 768px) {
  .canvas-container {
    padding: 0.5rem;
  }

  .thumbnail-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.25rem;
    grid-auto-rows: 50px;
  }

  .thumbnail {
    height: 50px;
    width: 100%;
  }

  .glass-tabs .nav-link {
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem;
  }

  .glass-tabs .nav-link i {
    font-size: 1rem;
  }

  .glass-tabs .nav-link span {
    font-size: 0.65rem;
  }

  .glass-placeholder {
    padding: 1.5rem 1rem;
  }

  .glass-placeholder i {
    font-size: 1.5rem;
  }

  .glass-button {
    min-width: 60px;
    padding: 0.6rem;
  }

  .glass-button i {
    font-size: 0.9rem;
  }

  .glass-button span {
    font-size: 0.65rem;
  }

  .navbar .logo-icon {
    width: auto;
    height: 2.5rem;
    max-width: 500px;
  }

  .navbar .text-gradient {
    font-size: 1rem;
    white-space: nowrap;
  }

  .theme-toggle {
    margin-left: 0.5rem;
    transform: scale(0.9);
  }

  .gender-btn {
    padding: 0.5rem 0.25rem;
  }

  .gender-btn i {
    font-size: 0.8rem;
  }

  .gender-btn span {
    font-size: 0.6rem;
  }

  /* Enhanced mobile controls */
  .selection-info {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* === UTILITIES === */
.loading {
  pointer-events: none;
  opacity: 0.7;
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* === DRAG AND DROP ENHANCEMENTS === */
.thumbnail[draggable="true"] {
  cursor: grab;
}

.thumbnail[draggable="true"]:active {
  cursor: grabbing;
}

.glass-drag-zone.drag-active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.glass-drag-zone.drag-active i {
  color: #10b981;
}

/* === LOADING STATES === */
.thumbnail.loading {
  position: relative;
  overflow: hidden;
}

.thumbnail.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* === LEGACY COMPATIBILITY === */
.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 0.75rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.form-control:hover,
.form-select:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 1);
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.4);
  border-color: #ec4899;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-range {
  background: transparent;
}

.form-control-color {
  width: 3rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
}

.glass-color.small {
  width: 2.5rem;
  height: 2rem;
}

.form-label.small {
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="light"] .form-label.small {
  color: rgba(0, 0, 0, 0.7);
}

.glass-button.w-100 {
  min-height: 60px;
}

.glass-button.w-100 i {
  font-size: 1.1rem;
}

.glass-button.w-100 span {
  font-size: 0.7rem;
  margin-top: 0.25rem;
}

.progress {
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
  overflow: hidden;
}

.progress-bar {
  background: var(--primary-gradient);
}

.glass-accordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

[data-bs-theme="light"] .glass-accordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000000'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Light mode glass components */
[data-bs-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .glass-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .glass-tabs {
  background: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .glass-tabs .nav-link {
  color: rgba(0, 0, 0, 0.7);
}

[data-bs-theme="light"] .glass-tabs .nav-link:hover {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.9);
}

[data-bs-theme="light"] .glass-sub-tabs {
  background: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="light"] .glass-sub-tabs .nav-link {
  color: rgba(0, 0, 0, 0.7);
}

[data-bs-theme="light"] .glass-sub-tabs .nav-link:hover {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.9);
}

[data-bs-theme="light"] .glass-accordion .accordion-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .glass-accordion .accordion-button {
  background: rgba(255, 255, 255, 0.9);
  color: rgba(0, 0, 0, 0.8);
}

[data-bs-theme="light"] .glass-accordion .accordion-button:not(.collapsed) {
  background: rgba(255, 255, 255, 1);
  color: rgba(0, 0, 0, 1);
}

[data-bs-theme="light"] .glass-accordion .accordion-body {
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .glass-button {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.8);
}

[data-bs-theme="light"] .glass-button:hover {
  background: rgba(255, 255, 255, 1);
  color: rgba(0, 0, 0, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="light"] .glass-drag-zone {
  border: 2px dashed rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.8);
}

/* Force horizontal scroll on small screens */
#galleryTabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
}

#galleryTabs .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 80px;
  text-align: center;
  padding: 0.5rem 0.25rem;
  font-size: 0.75rem;
}

#galleryTabs .nav-item {
  flex: 0 0 auto;
}

/* === NOTIFICATION SYSTEM === */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 350px;
  padding: 1rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  animation: slideIn 0.3s ease forwards;
}

.notification.fade-out {
  animation: slideOut 0.3s ease forwards;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.notification-success {
  background: rgba(16, 185, 129, 0.9);
  border-color: rgba(16, 185, 129, 0.3);
}

.notification-error {
  background: rgba(239, 68, 68, 0.9);
  border-color: rgba(239, 68, 68, 0.3);
}

.notification-warning {
  background: rgba(245, 158, 11, 0.9);
  border-color: rgba(245, 158, 11, 0.3);
}

.notification-info {
  background: rgba(59, 130, 246, 0.9);
  border-color: rgba(59, 130, 246, 0.3);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
/* === AD BANNER === */
.promo-link {
  display: none;
}
.promo-banner {
  max-width: 100%;
  height: auto;
}

/* Hide all promo links by default */
.promo-link {
  display: none;
}

/* Show only one based on screen size */
@media (max-width: 576px) {
  .promo-mobile {
    display: block;
  }
}
@media (min-width: 577px) and (max-width: 768px) {
  .promo-tabletSM {
    display: block;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .promo-tabletLG {
    display: block;
  }
}
@media (min-width: 1025px) {
  .promo-desktop {
    display: block;
  }
}


/* === Shape Fill controls (reuse glass styles) === */
.glass-block { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: .75rem; }
.bg-mode-toggle .glass-pill { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: .65rem; display: inline-flex; gap: .4rem; align-items: center; justify-content: center; width: 50%; padding: .45rem .6rem; }
.bg-mode-toggle .glass-pill:hover { background: rgba(255,255,255,.12); }
.btn-check:checked + .glass-pill { background: var(--primary-gradient); color: #fff; box-shadow: 0 4px 12px rgba(139,92,246,.3); }
.glass-chip { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: .3rem .6rem; font-size: .75rem; }
.glass-chip:hover { background: rgba(255,255,255,.14); }
.gradient-preview { height: 32px; border-radius: .5rem; border: 1px solid rgba(255,255,255,.2); background: linear-gradient(45deg, #8b5cf6, #ec4899); }
#shapeFillBlock.disabled { opacity: .6; pointer-events: none; }


/* === Checkerboard background for transparent canvas === */
.canvas-container.checkerboard {
  background-color: transparent !important;
  background-image:
    linear-gradient(45deg, #cfcfcf 25%, transparent 25%),
    linear-gradient(-45deg, #cfcfcf 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cfcfcf 75%),
    linear-gradient(-45deg, transparent 75%, #cfcfcf 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  border-radius: 1rem;
}
/* Subtle tweak in dark theme */
[data-bs-theme="dark"] .canvas-container.checkerboard {
  background-image:
    linear-gradient(45deg, #3a3a3a 25%, transparent 25%),
    linear-gradient(-45deg, #3a3a3a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #3a3a3a 75%),
    linear-gradient(-45deg, transparent 75%, #3a3a3a 75%);
}



/* === Background Tab Polishing === */
#backgrounds .glass-accordion .accordion-button i,
#backgrounds .bg-controls h6 i { opacity: 0.9; }

#backgrounds .bg-controls {
  border-radius: .75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

[data-bs-theme="light"] #backgrounds .bg-controls {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.1);
}

#backgrounds .bg-mode-toggle .glass-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .8rem;
  border-radius: .5rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  user-select: none;
}

#backgrounds .bg-mode-toggle .glass-pill:hover {
  background: rgba(255,255,255,0.08);
}

[data-bs-theme="light"] #backgrounds .bg-mode-toggle .glass-pill {
  border-color: rgba(0,0,0,0.1);
  background: rgba(0,0,0,0.03);
}
[data-bs-theme="light"] #backgrounds .bg-mode-toggle .glass-pill:hover {
  background: rgba(0,0,0,0.06);
}

#backgrounds .btn-check:checked + .glass-pill {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(139,92,246,0.35);
}

#backgrounds .form-control-color.glass-color {
  width: 100% !important;
  height: 3rem !important;
  padding: 0 !important;
  border-radius: .5rem;
}

#backgrounds #backgroundColorHex {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

#backgrounds #bgGradientPane .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

#backgrounds #gradAngle { margin-top: .25rem; }
#backgrounds #gradAngleValue { font-weight: 600; }

#backgrounds .glass-button#clearBackgroundBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}



/* === Accordion / Collapse Stability Fixes === */
/* Make Bootstrap collapse behave predictably even with global transitions */
.collapse, .collapsing {
  transition: height .35s ease !important;
  will-change: height;
}
/* Limit button transitions to avoid animating height/padding inadvertently */
.accordion .accordion-button {
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease !important;
}
/* Keep arrow rotation smooth */
.accordion .accordion-button::after {
  transition: transform .2s ease !important;
}
/* Glass accordion visual polish without breaking layout */
.glass-accordion .accordion-item {
  border-radius: .5rem;
  overflow: hidden;
}
.glass-accordion .accordion-button {
  padding: .75rem 1rem;
}
/* Prevent nested spacing shifts */
.glass-accordion .accordion-body {
  padding: .75rem 1rem;
}


@media (max-width: 576px) {
  .glass-button span { display: none; }
  .glass-button { min-width: 40px; padding: 0.5rem; }
}
.glass-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
