:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  overflow: hidden;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

.status-bar {
  position: fixed;
  left: 0;
  right: 0;
  height: 30px;
  background-color: #2a2a2a;
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  border-top: 1px solid #444;
  z-index: 1000;
}

.status-bar.warning {
  background-color: #ff9800;
  color: #000000;
}

.status-bar.error {
  background-color: #f44336;
  color: #ffffff;
}

.status-bar.expired {
  background-color: #d32f2f;
  color: #ffffff;
}

.manage-button {
  background-color: #444;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  height: 22px;
  margin-left: 12px;
  transition: background-color 0.2s;
}

.manage-button:hover {
  background-color: #666;
}

.about-button {
  background-color: #444;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  height: 22px;
  margin-left: 12px;
  transition: background-color 0.2s;
}

.about-button:hover {
  background-color: #666;
}

.about-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.about-dialog {
  background-color: #2a2a2a;
  color: #ffffff;
  border-radius: 8px;
  max-width: 600px;
  max-height: 80vh;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.about-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #444;
}

.about-dialog-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.about-dialog-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.about-dialog-close:hover {
  background-color: #444;
}

.about-dialog-content {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

.about-dialog-description {
  line-height: 1.6;
}

.about-dialog-description h1,
.about-dialog-description h2,
.about-dialog-description h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.about-dialog-description p {
  margin-bottom: 12px;
}

.about-dialog-description code {
  background-color: #444;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.about-dialog-description pre {
  background-color: #444;
  padding: 12px;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.about-dialog-description ul,
.about-dialog-description ol {
  margin-bottom: 12px;
  padding-left: 20px;
}

.about-dialog-description blockquote {
  border-left: 4px solid #666;
  padding-left: 16px;
  margin: 12px 0;
  font-style: italic;
}

.manage-edits-view {
  display: flex;
  align-items: center;
  margin-left: 12px;
}

.edits-notification {
  color: #ff9800;
  font-weight: 500;
  margin-right: 8px;
}

.save-changes-button {
  background-color: #ff9800;
  color: #000;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  height: 22px;
  transition: background-color 0.2s;
}

.save-changes-button:hover {
  background-color: #f57c00;
}

.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.dialog-content {
  background-color: #2a2a2a;
  color: #ffffff;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

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

.dialog-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.dialog-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.dialog-close:hover {
  background-color: #444;
}

.dialog-body {
  padding: 20px;
}

.dialog-body p {
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.dialog-footer {
  padding: 16px 20px;
  border-top: 1px solid #444;
  display: flex;
  justify-content: flex-end;
}

.dialog-button {
  background-color: #444;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.dialog-button:hover {
  background-color: #666;
}

.dialog-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2a2a2a;
  color: #ffffff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.dialog-content-fullscreen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.dialog-content-fullscreen .dialog-header {
  flex-shrink: 0;
}

.dialog-content-fullscreen .dialog-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.dialog-content-fullscreen .dialog-footer {
  flex-shrink: 0;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
  
  .status-bar {
    background-color: #f5f5f5;
    color: #333333;
    border-top: 1px solid #ddd;
  }
  
  .status-bar.warning {
    background-color: #fff3cd;
    color: #856404;
    border-top: 1px solid #ffeaa7;
  }
  
  .status-bar.error {
    background-color: #f8d7da;
    color: #721c24;
    border-top: 1px solid #f5c6cb;
  }
  
  .status-bar.expired {
    background-color: #f8d7da;
    color: #721c24;
    border-top: 1px solid #f5c6cb;
  }

  .manage-button {
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
  }

  .manage-button:hover {
    background-color: #d0d0d0;
  }

  .about-button {
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
  }

  .about-button:hover {
    background-color: #d0d0d0;
  }

  .about-dialog {
    background-color: #ffffff;
    color: #333333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }

  .about-dialog-header {
    border-bottom: 1px solid #ddd;
  }

  .about-dialog-close {
    color: #333333;
  }

  .about-dialog-close:hover {
    background-color: #f0f0f0;
  }

  .about-dialog-description code {
    background-color: #f5f5f5;
    color: #333;
  }

  .about-dialog-description pre {
    background-color: #f5f5f5;
    color: #333;
  }

  .about-dialog-description blockquote {
    border-left: 4px solid #ccc;
  }

  .edits-notification {
    color: #e65100;
  }

  .save-changes-button {
    background-color: #ff9800;
    color: #fff;
    border: 1px solid #f57c00;
  }

  .save-changes-button:hover {
    background-color: #f57c00;
  }

  .dialog-content {
    background-color: #ffffff;
    color: #333333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }

  .dialog-header {
    border-bottom: 1px solid #ddd;
  }

  .dialog-close {
    color: #333333;
  }

  .dialog-close:hover {
    background-color: #f0f0f0;
  }

  .dialog-footer {
    border-top: 1px solid #ddd;
  }

  .dialog-button {
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
  }

  .dialog-button:hover {
    background-color: #d0d0d0;
  }

  .dialog-fullscreen {
    background-color: #ffffff;
    color: #333333;
  }
}
