@import url('https://fonts.googleapis.com/css2?family=Padauk:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&display=swap');

:root {
  /* Layout Colors */
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e1b4b;
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #8b5cf6;
  --accent: #f0abfc;
  --accent-cyan: #22d3ee;
  --accent-purple: #a78bfa;
  --bg-card: #1e293b;
}

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

.visible {
  visibility: visible !important;
}

/* CMS Layout */
.cms-container {
  display: grid;
  grid-template-columns: 250px 1fr 300px; /* Sidebar | Editor | Expressions */
  grid-template-rows: 100vh;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-gradient-start);
  color: var(--text-primary);
}

/* Modal Overlay Restored */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.hidden {
  display: none !important;
}

/* Sidebar */
.cms-sidebar {
  background: rgba(1, 3, 31, 0.5);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  min-height: 0; /* Add this to enable internal scrolling */
}

.cms-expressions-panel {
  background: rgba(1, 3, 31, 0.5);
  border-left: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  padding: 16px;
  min-height: 0; /* Add this to enable internal scrolling */
}

.sidebar-header,
.panel-header {
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h2,
.panel-header h3 {
  font-family: "Cal Sans", sans-serif;
  margin: 0;
  font-size: 1.2rem;
}

.topic-list,
.expressions-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.topic-item {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid transparent;
}

.topic-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.topic-item.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  transform: translateY(-1px);
}

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



/* Main Editor */
.cms-main {
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Remove scrollbar from main container */
  position: relative;
  min-height: 0; /* Add this to enable internal scrolling */
}

/* Scrollable content wrapper */
.cms-content-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.cms-toolbar {
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 10;
  padding: 16px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0; /* Prevent toolbar from shrinking */
}

/* Content sections should not have their own scrollbars */
.cms-section {
  overflow: visible;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-left h1 {
  font-size: 1.2rem;
  margin: 0;
}

.save-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.3s;
}

.save-status.visible {
  opacity: 1;
}

/* Speakers Grid */
.speakers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.speaker-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.speaker-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  /* Transform removed to prevent jitter */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.speaker-avatar-select {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid var(--card-border);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.speaker-avatar-select:hover {
  /* Transform removed to prevent jitter */
  border-color: var(--primary);
}

.speaker-avatar-select img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.speaker-info-edit {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.speaker-name-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 2px 0;
  width: 100%;
  transition: border-color 0.2s;
}

.speaker-name-input:focus {
  outline: none;
  border-color: var(--primary);
}

.speaker-main-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.speaker-main-toggle input {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.delete-speaker {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transition: all 0.2s;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid transparent;
}

.speaker-card:hover .delete-speaker {
  opacity: 1;
}

.delete-speaker:hover {
  background: #ef4444;
  color: white;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--card-border);
  border-radius: 12px;
}

/* Avatar Picker Popover */
.avatar-picker-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 8px;
  animation: pickerAppear 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top left;
}

@keyframes pickerAppear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.avatar-option {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.avatar-option:hover {
  /* Transform removed to prevent jitter */
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
}

.avatar-option.selected {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.code-input {
  font-family: "Courier New", monospace;
  color: var(--accent);
}

.topic-id-preview {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: "Courier New", monospace;
  display: flex;
  gap: 4px;
  align-items: center;
}

.inline-edit-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.inline-edit-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

#topicIdDisplay {
  color: var(--accent);
  opacity: 0.8;
}

/* Dialogue Editor */
.dialogue-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 30px;
}

.dialogue-line-card {
  background: rgba(30, 41, 59, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.dialogue-line-card:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(99, 102, 241, 0.3);
  /* Transform removed to prevent layout shift/scrollbar glitch */
}

.dialogue-line-card.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.line-avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.line-avatar-btn:hover {
  transform: scale(1.1);
  border-color: var(--primary);
}

.line-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.line-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.speaker-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.line-input {
  min-height: 1.5em;
  padding: 6px 8px;
  border-radius: 6px;
  transition:
    background 0.2s,
    box-shadow 0.2s;
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.line-input:empty:before {
  content: attr(placeholder);
  color: var(--text-muted);
  font-style: italic;
  pointer-events: none;
}

.line-input:hover {
  background: rgba(255, 255, 255, 0.03);
}

.line-input:focus {
  outline: none;
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.line-input.mm {
  font-family: "Padauk", sans-serif;
  line-height: 1.8;
  font-size: 1.05rem;
}

.line-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transition: all 0.2s;
  background: rgba(15, 23, 42, 0.6);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Transform removed to prevent overflow */
}

.dialogue-line-card:hover .line-actions {
  opacity: 1;
}

.dialogue-line-card.divider-card {
  background: rgba(16, 185, 129, 0.1);
  border-style: dashed;
  grid-template-columns: 1fr auto;
  justify-content: center;
}

.dialogue-line-card.divider-card .line-content {
  align-items: center;
}

.dialogue-line-card.divider-card .line-input {
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
  width: 60%;
  color: var(--text-secondary);
}

.action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  padding: 5px;
}

.action-btn svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.action-btn.danger-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.action-btn.insert-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

/* Expression Chips */
.expression-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}

.expression-chip:hover {
  border-color: var(--primary);
}

.expression-chip .remove-exp {
  opacity: 0.5;
}

.expression-chip .remove-exp:hover {
  opacity: 1;
}

/* Live Preview */
.cms-preview {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 400px;
  height: calc(100vh - 40px);
  background: var(--bg-gradient-end);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.preview-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px 16px 0 0;
}

.preview-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Modals */
.large-modal {
  max-width: 800px;
  height: 80vh;
}

/* Modals */
.modal {
  /* Reset fixed positioning as it is now inside modal-overlay */
  position: relative; 
  width: 100%;
  height: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  pointer-events: auto;
}

.modal-content, 
.modal.medium-modal, 
.modal.large-modal {
  background: var(--bg-gradient-end);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  width: 100%; /* controlled by max-width on parent or modifier */
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: modalSlideUp 0.3s ease-out;
}

.modal.medium-modal { max-width: 600px; }
.modal.large-modal { max-width: 800px; }

/* Remove old modal.hidden since overlay handles it */
.modal.hidden {
  display: none;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--text-primary);
}

.modal-footer-split {
  justify-content: space-between;
}

.icon-sm {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.modal-desc {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal-tip {
  margin-top: 1rem;
  padding: 10px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
  border: 1px solid var(--primary);
  font-size: 0.85rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group.full {
  grid-column: span 2;
}

.line-controls-footer {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.add-line-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.primary-line-btn {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.3);
}

.primary-line-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.secondary-line-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-color: var(--card-border);
}

.secondary-line-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Wizard */
.wizard-steps {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}

.step {
  color: var(--text-muted);
  font-weight: 500;
}

.step.active {
  color: var(--primary);
  font-weight: 700;
}

.wizard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wizard-content textarea {
  flex: 1;
  resize: none;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 14px;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.wizard-content textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* Example Inputs */
.example-input-group {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 4px;
  position: relative;
  border: 1px solid var(--card-border);
}

.ex-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.ex-row:last-child {
  margin-bottom: 0;
}

.remove-example {
  position: absolute;
  top: 4px;
  right: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.font-mm {
  font-family: "Padauk", sans-serif;
}

/* Responsive */
@media (max-width: 1024px) {
  .cms-container {
    grid-template-columns: 200px 1fr; /* Hide expressions on small screens? or toggle */
  }
  .cms-expressions-panel {
    display: none; /* Make it toggleable later */
  }
}

/* Custom Scrollbar Styles for CMS */
.cms-content-wrapper::-webkit-scrollbar,
.topic-list::-webkit-scrollbar,
.expressions-list::-webkit-scrollbar,
.preview-content::-webkit-scrollbar {
  width: 6px;
}

.cms-content-wrapper::-webkit-scrollbar-track,
.topic-list::-webkit-scrollbar-track,
.expressions-list::-webkit-scrollbar-track,
.preview-content::-webkit-scrollbar-track {
  background: transparent;
}

.cms-content-wrapper::-webkit-scrollbar-thumb,
.topic-list::-webkit-scrollbar-thumb,
.expressions-list::-webkit-scrollbar-thumb,
.preview-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.cms-content-wrapper::-webkit-scrollbar-thumb:hover,
.topic-list::-webkit-scrollbar-thumb:hover,
.expressions-list::-webkit-scrollbar-thumb:hover,
.preview-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Firefox scrollbar styling */
@supports (scrollbar-width: thin) {
  .cms-content-wrapper,
  .topic-list,
  .expressions-list,
  .preview-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  }
}

/* ===========================================
   GitHub & Cloudflare Integration Styles
   =========================================== */

/* Toolbar Divider */
.toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--card-border);
  margin: 0 8px;
}

/* Sync to GitHub Button (Blue) */
.sync-btn {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sync-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
  transform: translateY(-1px);
}

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

.sync-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.sync-btn svg {
  flex-shrink: 0;
}

/* Publish Button (Green) */
.publish-btn {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.publish-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  transform: translateY(-1px);
}

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

.publish-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: rgba(100, 100, 100, 0.15);
  color: #9ca3af;
  border-color: rgba(100, 100, 100, 0.3);
}

.publish-btn.cooldown {
  animation: pulse-cooldown 2s infinite;
}

@keyframes pulse-cooldown {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.7;
  }
}

.publish-btn svg {
  flex-shrink: 0;
}

/* Field Hint Text */
.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Status Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.5);
}

.toast.success .toast-icon {
  color: #34d399;
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.5);
}

.toast.error .toast-icon {
  color: #f87171;
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-message {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Connection Status Indicator */
.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
}

.connection-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
}

.connection-status.connected .status-dot {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.connection-status.disconnected .status-dot {
  background: #f87171;
}

/* Spin Animation for Loading States */
.spin {
  animation: spin 1s linear infinite;
}

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