:root {
  --primary-color: #8957e5;
  --background-light: #ffffff;
  --background-card: #f6f8fa;
  --text-primary: #24292f;
  --text-secondary: #57606a;
  --border-color: #d0d7de;
  --switch-active: #8957e5;
  --switch-inactive: #d0d7de;
}

body {
  margin: 0;
  background-color: var(--background-light);
  color: var(--text-primary);
}

#root {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #54bc4ae0);
}
.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

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

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

.popup-container {
  width: 300px;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background-light);
  color: var(--text-primary);
  box-shadow: none;
}

h1 {
  font-size: 20px;
  margin: 0 0 20px 0;
  text-align: center;
  font-weight: 600;
  color: var(--primary-color);
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

.settings-container {
  background-color: var(--background-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.setting-item {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 8px;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.setting-item input[type="checkbox"] {
  display: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  margin-right: 12px;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--switch-inactive);
  transition: 0.3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--switch-active);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.setting-item label {
  display: flex;
  align-items: center;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  justify-content: space-between;
}

.label-content {
  display: flex;
  align-items: center;
}

.button-icon {
  display: inline-flex;
  margin-right: 10px;
  align-items: center;
}

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 10px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 10px;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  font-size: 14px;
  color: var(--text-secondary);
  position: relative;
}

.loading:after {
  content: "加载中...";
}

.language-select {
  background-color: var(--background-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

.language-select:focus {
  border-color: var(--primary-color);
}

select.language-select option {
  background-color: var(--background-light);
  color: var(--text-primary);
}

.author-info {
  font-size: 11px;
  margin-top: 8px;
  color: var(--text-secondary);
}

.author-info a {
  color: var(--primary-color);
  text-decoration: none;
}

.author-info a:hover {
  text-decoration: underline;
}
