body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace;
}

.diagram-manager-overlay {
  z-index: 10000;
  background: #00000080;
  justify-content: center;
  align-items: center;
  display: flex;
  position: fixed;
  inset: 0;
}

.diagram-manager {
  background: #fff;
  border-radius: 8px;
  flex-direction: column;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  box-shadow: 0 4px 20px #00000026;
}

.diagram-manager-header {
  border-bottom: 1px solid #e0e0e0;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  display: flex;
}

.diagram-manager-header h2 {
  margin: 0;
  font-size: 24px;
}

.close-button {
  cursor: pointer;
  color: #666;
  background: none;
  border: none;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 28px;
  display: flex;
}

.close-button:hover {
  color: #000;
}

.storage-info {
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  display: flex;
}

.storage-badge {
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 500;
}

.storage-badge.server {
  color: #1976d2;
  background: #e3f2fd;
}

.storage-badge.local {
  color: #f57c00;
  background: #fff3e0;
}

.storage-note {
  color: #666;
  font-size: 14px;
}

.error-message {
  color: #c62828;
  background: #ffebee;
  border-left: 4px solid #c62828;
  padding: 10px 20px;
}

.diagram-manager-actions {
  border-bottom: 1px solid #e0e0e0;
  padding: 20px;
}

.action-button {
  cursor: pointer;
  color: #333;
  background: #f5f5f5;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  transition: background .2s;
}

.action-button:hover {
  background: #e0e0e0;
}

.action-button.primary {
  color: #fff;
  background: #4caf50;
}

.action-button.primary:hover {
  background: #45a049;
}

.action-button.danger {
  color: #fff;
  background: #f44336;
}

.action-button.danger:hover {
  background: #da190b;
}

.action-button.share {
  color: #fff;
  background: #2196f3;
}

.action-button.share:hover {
  background: #0b7dda;
}

.loading {
  text-align: center;
  color: #666;
  padding: 40px;
}

.diagram-list {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

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

.empty-state .hint {
  color: #999;
  margin-top: 10px;
  font-size: 14px;
}

.diagram-item {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 15px;
  transition: background .2s;
  display: flex;
}

.diagram-item:hover {
  background: #f5f5f5;
}

.diagram-info h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.diagram-meta {
  color: #666;
  font-size: 13px;
}

.diagram-actions {
  gap: 10px;
  display: flex;
}

.diagram-actions .action-button {
  padding: 6px 12px;
  font-size: 13px;
}

.save-dialog {
  background: #fff;
  border-radius: 8px;
  min-width: 300px;
  padding: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 20px #0003;
}

.save-dialog h3 {
  margin: 0 0 15px;
}

.save-dialog input {
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  margin-bottom: 15px;
  padding: 8px;
  font-size: 14px;
}

.dialog-buttons {
  justify-content: flex-end;
  gap: 10px;
  display: flex;
}

.dialog-buttons button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
}

.dialog-buttons button:first-child {
  color: #fff;
  background: #4caf50;
}

.dialog-buttons button:last-child {
  background: #f5f5f5;
}

.language-selector {
  cursor: pointer;
  font-size: 14px;
  display: inline-block;
  position: relative;
}

.language-display {
  text-align: center;
  background-color: #f5f5f5;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  min-width: 60px;
  padding: 8px 12px;
  display: flex;
}

.language-dropdown {
  z-index: 1000;
  white-space: nowrap;
  background-color: #fff;
  border-radius: 4px;
  min-width: 120px;
  margin-top: 4px;
  position: absolute;
  top: 100%;
  left: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px #00000026;
}

.language-option {
  text-align: center;
  padding: 8px 12px;
  transition: background-color .2s;
}

.language-option:hover {
  background-color: #f0f0f0;
}

.language-option.active {
  color: #1890ff;
  background-color: #e6f7ff;
}

.App {
  flex-direction: column;
  height: 100vh;
  display: flex;
  overflow: hidden;
}

.toolbar {
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
  align-items: center;
  gap: 10px;
  padding: 10px;
  display: flex;
}

.toolbar button {
  color: #fff;
  cursor: pointer;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
}

.toolbar button:hover {
  background-color: #0056b3;
}

.current-diagram {
  color: #666;
  margin-left: auto;
  font-size: 14px;
}

.fossflow-container {
  flex: 1;
  width: 100%;
  position: relative;
}

.fossflow-container > div {
  height: 100%;
}

.dialog-overlay {
  z-index: 1000;
  background-color: #00000080;
  justify-content: center;
  align-items: center;
  display: flex;
  position: fixed;
  inset: 0;
}

.dialog {
  background-color: #fff;
  border-radius: 8px;
  min-width: 400px;
  max-width: 600px;
  max-height: 80vh;
  padding: 20px;
  overflow-y: auto;
  box-shadow: 0 2px 10px #0000001a;
}

.dialog h2 {
  color: #333;
  margin-top: 0;
  margin-bottom: 20px;
}

.dialog input[type="text"] {
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  margin-bottom: 20px;
  padding: 10px;
  font-size: 16px;
}

.dialog-buttons {
  justify-content: flex-end;
  gap: 10px;
  display: flex;
}

.dialog-buttons button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
}

.dialog-buttons button:first-child {
  color: #fff;
  background-color: #007bff;
}

.dialog-buttons button:first-child:hover {
  background-color: #0056b3;
}

.dialog-buttons button:last-child {
  color: #fff;
  background-color: #6c757d;
}

.dialog-buttons button:last-child:hover {
  background-color: #5a6268;
}

.diagram-list {
  max-height: 400px;
  margin-bottom: 20px;
  overflow-y: auto;
}

.diagram-item {
  border: 1px solid #eee;
  border-radius: 4px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  display: flex;
}

.diagram-item:hover {
  background-color: #f8f9fa;
}

.diagram-actions {
  gap: 5px;
  display: flex;
}

.diagram-actions button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 12px;
}

.diagram-actions button:first-child {
  color: #fff;
  background-color: #28a745;
}

.diagram-actions button:first-child:hover {
  background-color: #218838;
}

.diagram-actions button:last-child {
  color: #fff;
  background-color: #dc3545;
}

.diagram-actions button:last-child:hover {
  background-color: #c82333;
}

.error-page-container {
  background-color: #00000080;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  display: flex;
  overflow: hidden;
}

.error-container {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 400px;
  min-height: 300px;
  padding: 30px;
  box-shadow: 0 2px 10px #0000001a;
}

.error-header {
  text-align: center;
  margin-bottom: 20px;
}

.error-header p {
  color: #333;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.error-content {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  margin-bottom: 30px;
  padding: 15px;
}

.error-content p {
  color: #856404;
  word-break: break-word;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.error-footer {
  justify-content: center;
  gap: 10px;
  display: flex;
}

.error-button {
  cursor: pointer;
  color: #fff;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  text-decoration: none;
  transition: background-color .2s;
  display: inline-block;
}

.error-button:hover {
  background-color: #0056b3;
}

.error-button.refresh-button {
  background-color: #28a745;
}

.error-button.refresh-button:hover {
  background-color: #218838;
}

