/* Base Styles */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #1a1a1a;
  padding: 20px 0;
  min-height: 100vh;
}

/* Toolbar */
#toolbar {
  border-bottom: 1px solid #e5e5e5;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: white;
  box-sizing: border-box;
  padding: 16px;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Save Button Container */
#saveButtonContainer {
  display: none;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 0 16px 16px 16px;
  box-sizing: border-box;
  border-bottom: 1px solid #e5e5e5;
  gap: 8px;
}

#saveButton {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

#saveButton svg {
  flex-shrink: 0;
}

#saveButton:hover {
  background: #0056b3;
}

#saveButton:active {
  background: #004085;
}

#saveButton:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#shareButton {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

#shareButton:hover {
  background: #218838;
}

#shareButton:active {
  background: #1e7e34;
}

#shareButton:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#shareButton svg {
  flex-shrink: 0;
}

/* Editor */
#editor {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: white;
  min-height: calc(100vh - 160px);
  height: calc(100vh - 160px);
  box-sizing: border-box;
  padding: 0 16px 16px 16px;
  border-radius: 0 0 12px 12px;
}

/* Status Indicator */
#status {
  position: fixed;
  right: 10px;
  bottom: 10px;
  font-size: 12px;
  opacity: 0.75;
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 1000;
}

/* Desktop Styles */
@media (min-width: 641px) {
  #status {
    right: calc((100% - 600px) / 2 + 10px);
  }
}

/* Mobile Styles */
@media (max-width: 640px) {
  body {
    padding: 0;
  }
  
  #toolbar {
    border-radius: 0;
  }
  
  #saveButtonContainer {
    padding: 0 16px 16px 16px;
  }
  
  #editor {
    border-radius: 0;
    min-height: calc(100vh - 120px);
    height: calc(100vh - 120px);
  }
}

