/* Create Page Specific Styles */

.create-container {
  width: 100%;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  justify-content: top;
  align-items: center;
  background: #fff;
  overflow: hidden;
  /* Allow tooltip to show above */
  height: calc(100vh - 60px);
  /* height should be full height minus header height */
}

/* Hide hamburger menu in header for desktop create page */
.site-header .navbar-toggle {
  display: none !important;
}

/* Initial State - Centered Welcome */
.initial-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 700px;
  padding: 20px;
  padding-top: 20px;
  /* Extra space at top for tooltip */
  padding-bottom: 20px;
  /* Extra space for suggestions dropdown */
  animation: fadeIn 0.3s ease-in;
  margin-top: 20vh;
  position: relative;
  overflow: visible;
  /* Allow tooltip and suggestions to show */
}

.welcome-text {
  text-align: center;
  margin-bottom: 32px;
}

.welcome-text h1 {
  font-size: clamp(28px, 5vw, 40px);
  margin: 0 0 12px;
  font-weight: 600;
  color: #111;
}

.welcome-text p {
  font-size: 18px;
  color: #6b7280;
  margin: 0;
}

.initial-prompt-container {
  width: 100%;
  max-width: 700px;
  position: relative;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  padding: 16px 60px 16px 140px;
  transition: border-color 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 56px;
  margin-bottom: 0;
}

.initial-prompt-container:focus-within {
  border-color: #111;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.initial-prompt-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  line-height: 1.5;
  resize: none;
  font-family: inherit;
  color: #111;
  max-height: 200px;
  overflow-y: auto;
  padding: 0;
  min-height: 24px;
}

.initial-prompt-input::placeholder {
  color: #9ca3af;
  transition: opacity 0.3s ease;
}

/* Prompt Suggestions Dropdown */
.prompt-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 6px;
  z-index: 10000;
  /* High z-index to appear above showcase slider */
  animation: slideUp 0.2s ease;
  margin-top: -20px;
}

.prompt-suggestions.hidden {
  display: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-item {
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  color: #374151;
  font-size: 14px;
  line-height: 1.5;
}

.suggestion-item:hover {
  background: #f3f4f6;
  color: #111;
}

/* Style Tooltip (Initial State Only) */
.style-tooltip {
  position: absolute;
  top: calc(100% - 2px);
  left: 88px;
  /* Position to align arrow with style button */
  background: #000000;
  /*same color as sidebar background */
  color: #ffffff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-style: italic;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
  animation: gentleBounce 2s ease-in-out infinite;
  pointer-events: none;
  opacity: 1;
}

.style-tooltip-arrow {
  position: absolute;
  bottom: 22px;
  left: 20px;
  width: 8px;
  height: 8px;
  background: #000000;
  /* remove the existing border */
  transform: rotate(45deg);
  z-index: -1;
}

.style-tooltip-content {
  position: relative;
  z-index: 1;
}

@keyframes gentleBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

/* Hide tooltip when conversation state is active */
.conversation-state~.initial-state .style-tooltip {
  display: none;
}

/* Conversation State */
.conversation-state {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease-in;
  flex: 1;
  height: 100%;
  padding-top: 20px;
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}

/* Message Styles */
.message {
  display: flex;
  animation: slideIn 0.3s ease-out;
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  display: none;
}

.message-content {
  max-width: 75%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-text {
  background: #f3f4f6;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  color: #111;
  white-space: pre-wrap;
  /* Preserve line breaks */
  word-wrap: break-word;
  /* Wrap long words */
}

.message.user .message-text {
  background: #111;
  color: #fff;
}

.message-image {
  max-width: 70%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.message-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message-image img:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.image-error {
  padding: 20px;
  text-align: center;
  color: #c00;
  background: #fee;
  border-radius: 8px;
  font-size: 14px;
}

.image-placeholder {
  padding: 40px 20px;
  text-align: center;
  background: #f9fafb;
  border-radius: 8px;
  color: #6b7280;
}

.image-placeholder svg {
  color: #9ca3af;
  margin-bottom: 12px;
}

.image-placeholder p {
  margin: 0 0 12px;
  font-size: 15px;
  color: #111;
}

.view-image-link {
  display: inline-block;
  color: #111;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border: 2px solid #111;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.view-image-link:hover {
  background: #111;
  color: #fff;
}

.message-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 18px;
  font-size: 14px;
  color: #6b7280;
}

.message-loading>div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-progress-bar {
  width: 100%;
  height: 3px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.loading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #111 0%, #666 100%);
  border-radius: 2px;
  transition: width 20s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

.loading-tip {
  font-size: 13px;
  color: #6b7280;
  text-align: left;
  margin-top: 8px;
  min-height: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
  font-style: italic;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: #111;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.message-error {
  background: #fee;
  color: #c00;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
}

/* Input Container (Bottom) */
.input-container {
  padding: 20px 0;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  position: sticky;
  bottom: 0;
}

/* Start Over Button */
.start-over-btn {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.start-over-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #111;
}

.start-over-btn svg {
  flex-shrink: 0;
}

.prompt-container {
  position: relative;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  padding: 12px 60px 12px 140px;
  transition: border-color 0.2s ease;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 56px;
}

.prompt-container:focus-within {
  border-color: #111;
}

.prompt-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  font-family: inherit;
  color: #111;
  max-height: 150px;
  overflow-y: auto;
  padding: 0;
  min-height: 24px;
}

.prompt-input::placeholder {
  color: #9ca3af;
}

/* Upload Button */
.upload-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.upload-btn:hover {
  background: #f3f4f6;
  color: #111;
}

.upload-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Aspect Ratio Button */
.aspect-btn {
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.aspect-btn:hover {
  background: #f3f4f6;
  color: #111;
}

.aspect-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Style Button */
.style-btn {
  position: absolute;
  left: 96px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.style-btn:hover {
  background: #f3f4f6;
  color: #111;
}

.style-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Style Dropdown */
.style-dropdown {
  position: fixed;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 200px;
  z-index: 9999;
  animation: slideDown 0.2s ease-out;
  max-height: 400px;
  overflow-y: auto;
}

.style-dropdown.hidden {
  display: none;
}

.style-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #111;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.style-dropdown-item:hover {
  background: #f3f4f6;
}

.style-dropdown-item span {
  flex: 1;
}

.style-dropdown-item .style-check {
  opacity: 0;
  color: #111;
  flex-shrink: 0;
}

.style-dropdown-item.active {
  background: #f9fafb;
}

.style-dropdown-item.active .style-check {
  opacity: 1;
}

/* Aspect Ratio Dropdown */
.aspect-dropdown {
  position: fixed;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 200px;
  z-index: 9999;
  animation: slideDown 0.2s ease-out;
}

.aspect-dropdown.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aspect-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #111;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.aspect-dropdown-item:hover {
  background: #f3f4f6;
}

.aspect-dropdown-item span {
  flex: 1;
}

.aspect-dropdown-item .aspect-check {
  opacity: 0;
  color: #111;
  flex-shrink: 0;
}

.aspect-dropdown-item.active {
  background: #f9fafb;
}

.aspect-dropdown-item.active .aspect-check {
  opacity: 1;
}

/* Uploaded Image Preview */
.uploaded-image-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 8px 0;
  align-items: center;
}

.uploaded-image-item {
  position: relative;
  border-radius: 8px;
  overflow: visible;
  border: 1px solid #e5e7eb;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: #f9fafb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.uploaded-image-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  overflow: hidden;
  z-index: 0;
}

.uploaded-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 7px;
  position: relative;
  z-index: 1;
}

.remove-upload-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #6b7280;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.remove-upload-btn:hover {
  background: #111;
  transform: scale(1.1);
}

.remove-upload-btn:active {
  transform: scale(0.95);
}

/* Submit Button */
.submit-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
  background: #000;
  transform: translateY(-50%) scale(1.05);
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.submit-btn:active:not(:disabled) {
  transform: translateY(-50%) scale(0.95);
}

/* Action Buttons (now inside message-image) */
.message-image {
  position: relative;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0;
  padding: 12px;
  background: #f9fafb;
  border-radius: 0 0 12px 12px;
}

.action-btn {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
}

.action-btn.primary {
  background: #111;
  color: #fff;
}

.action-btn.primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.action-btn.secondary {
  background: #fff;
  color: #111;
}

.action-btn.secondary:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
  transform: translateY(0);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Scrollbar Styling */
.messages-container::-webkit-scrollbar {
  width: 8px;
}

.messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}

/* Responsive Design */
@media (max-width: 768px) {
  .create-container {
    padding: 12px;
  }

  .initial-state {
    padding: 20px 12px;
    max-width: 100%;
  }

  .welcome-text h1 {
    font-size: 24px;
  }

  .welcome-text p {
    font-size: 16px;
  }

  .message-content {
    max-width: 85%;
  }

  .initial-prompt-container,
  .prompt-container {
    padding-left: 140px;
    padding-right: 52px;
  }

  .action-btn {
    width: 100%;
  }
}

/* Save Poster Modal */
.save-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
}

.save-modal.hidden {
  display: none;
}

/* Image Lightbox (Fullscreen Viewer) */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  animation: fadeIn 0.2s ease;
}

.image-lightbox.hidden {
  display: none;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox-close svg {
  color: #fff;
}

#lightbox-image {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.save-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease-out;
}

.save-modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.save-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.save-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111;
}

.save-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-modal-close:hover {
  background: #f3f4f6;
  color: #111;
}

.save-modal-close:active {
  transform: scale(0.95);
}

.save-modal-body {
  padding: 24px;
}

.save-form-group {
  margin-bottom: 24px;
}

.save-form-group:last-child {
  margin-bottom: 0;
}

.save-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin-bottom: 8px;
}

.save-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #111;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.save-input:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.save-input::placeholder {
  color: #9ca3af;
}

.save-visibility-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.save-visibility-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.save-visibility-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.save-visibility-btn.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.save-visibility-btn svg {
  width: 24px;
  height: 24px;
}

.save-modal-footer {
  padding: 20px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid #e5e7eb;
}

.save-btn-secondary,
.save-btn-primary {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border: none;
}

.save-btn-secondary {
  background: #f3f4f6;
  color: #6b7280;
}

.save-btn-secondary:hover {
  background: #e5e7eb;
  color: #111;
}

.save-btn-secondary:active {
  transform: scale(0.98);
}

.save-btn-primary {
  background: #111;
  color: #fff;
}

.save-btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.save-btn-primary:active {
  transform: translateY(0);
}

.save-btn-primary:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 600px) {
  .save-modal {
    padding: 12px;
  }

  .save-modal-content {
    max-width: 100%;
  }

  .save-modal-header {
    padding: 20px 20px 16px;
  }

  .save-modal-header h2 {
    font-size: 18px;
  }

  .save-modal-body {
    padding: 20px;
  }

  .save-visibility-options {
    grid-template-columns: 1fr;
  }

  .save-modal-footer {
    padding: 16px 20px 20px;
    flex-direction: column-reverse;
  }

  .save-btn-secondary,
  .save-btn-primary {
    width: 100%;
  }
}

/* ============================================================================
   CONVERSATIONS SIDEBAR
   ============================================================================ */

.create-main {
  display: flex;
  position: relative;
  height: calc(100vh - 60px);
  /* height should be full height minus header height */
  background: #fff;
  overflow: hidden;
}

.conversations-sidebar {
  width: 300px;
  background: #fafafa;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  position: fixed;
  top: 60px;
  left: 0;
  height: calc(100vh - 60px);
  overflow: hidden;
  z-index: 100;
}

.conversations-sidebar.collapsed {
  transform: translateX(-100%);
}

.create-container.with-sidebar {
  flex: 1;
  min-width: 0;
  margin-left: 300px;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

.new-conversation-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.new-conversation-btn:hover {
  background: #000;
  transform: scale(1.05);
}

.new-conversation-btn:active {
  transform: scale(0.95);
}

/* Conversations List */
.conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.conversations-list::-webkit-scrollbar {
  width: 6px;
}

.conversations-list::-webkit-scrollbar-track {
  background: transparent;
}

.conversations-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.conversations-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.empty-state p {
  margin: 0 0 8px;
  font-size: 15px;
}

.empty-subtitle {
  font-size: 13px;
  color: #d1d5db;
}

/* Anonymous User Message */
.anonymous-message {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.anonymous-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.anonymous-signup-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 12px;
  width: 100%;
  max-width: 200px;
}

.anonymous-signup-btn:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.anonymous-login-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.anonymous-login-link:hover {
  color: #111;
  text-decoration: underline;
}

/* Conversation Item */
.conversation-item {
  padding: 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease;
  background: #fff;
  border: 1px solid transparent;
}

.conversation-item:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.conversation-item.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.conversation-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.conversation-title {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item.active .conversation-title {
  color: #fff;
}

.conversation-timestamp {
  font-size: 12px;
  color: #6b7280;
}

.conversation-item.active .conversation-timestamp {
  color: #d1d5db;
}

.conversation-snippet {
  font-size: 12px;
  color: #9ca3af;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.conversation-item.active .conversation-snippet {
  color: #9ca3af;
}

.conversation-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  color: #111;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.conversation-item:hover .conversation-delete-btn {
  display: flex;
}

.conversation-item.active .conversation-delete-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.conversation-delete-btn:hover {
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  transform: scale(1.1);
}

.conversation-delete-btn:active {
  transform: scale(0.9);
}

/* Toggle Sidebar Button */
.toggle-sidebar-btn {
  display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .conversations-sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    height: calc(100vh - 60px);
    z-index: 100;
    transform: translateX(-100%);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  }

  .conversations-sidebar.open {
    transform: translateX(0);
  }

  .conversations-sidebar.collapsed {
    transform: translateX(-100%);
  }

  .toggle-sidebar-btn {
    right: -40px;
    transform: translateX(0);
  }

  .conversations-sidebar.open .toggle-sidebar-btn {
    right: -20px;
  }

  .create-container.with-sidebar {
    margin-left: 0;
  }

  /* Overlay when sidebar is open on mobile */
  .sidebar-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
  }

  .sidebar-overlay.visible {
    display: block;
  }
}

/* Loading State for Conversations */
.conversations-loading {
  text-align: center;
  padding: 20px;
  color: #9ca3af;
  font-size: 14px;
}

.conversations-loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {

  0%,
  20% {
    content: '.';
  }

  40% {
    content: '..';
  }

  60%,
  100% {
    content: '...';
  }
}


/* Auto-sliding Showcase */
.showcase-slider {
  width: 200%;
  max-width: 1700px;
  margin: 200px auto 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  height: 280px;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.showcase-slider.hidden {
  display: none;
}

.showcase-track {
  display: flex;
  gap: 12px;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  animation: scroll 60s linear infinite;
  width: max-content;
}

.showcase-track:hover {
  animation-play-state: paused;
}

.showcase-item {
  height: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: default;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.showcase-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-item:hover {
  transform: scale(1.05);
  z-index: 10;
}

.showcase-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.showcase-overlay span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Ensure suggestions are above slider */
.prompt-suggestions {
  z-index: 1001;
  /* Higher than slider */
}