:root {
  --background-color: #f0f0f0;
  --text-color: #333;
  --header-background: transparent;
  --button-background: #007bff;
  --button-text: #fff;
  --button-hover-background: #0056b3;
  --progress-bar-background: #007bff;
  --progress-bar-empty-background: #f0f0f0;
  --key-input-border: #ccc;
  --copy-btn-background: #28a745;
  --copy-btn-hover-background: #218838;
}

[data-theme='dark'] {
  --background-color: #333;
  --text-color: #f0f0f0;
  --header-background: #444;
  --button-background: #007bff;
  --button-text: #fff;
  --button-hover-background: #0056b3;
  --progress-bar-background: #007bff;
  --progress-bar-empty-background: #555;
  --key-input-border: #777;
  --copy-btn-background: #28a745;
  --copy-btn-hover-background: #218838;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

header {
  position: sticky;
  width: 100%;
  background-color: var(--header-background);
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}

#header-top {
  display: flex;
  justify-content: right;
  align-items: center;
}

#google-translate-element {
  background: transparent;
  text-align: center;
}

#theme-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.3s ease;
}

#theme-toggle:hover {
  color: var(--button-hover-background);
}

#header-bottom {
  font-size: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 10px;
  box-sizing: border-box;
}

#logo {
  border-radius: 50%;
  object-fit: cover;
}

.container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  height: 100vh;
  overflow: auto;
  background: var(--background-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

select {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  margin-bottom: 15px;
  border-radius: 5px;
}

button {
  background-color: var(--button-background);
  color: var(--button-text);
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: var(--button-hover-background);
}

.progress-bar {
  background-color: var(--progress-bar-empty-background);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 20px;
  height: 30px;
  position: relative;
}

.progress-bar div {
  height: 100%;
  background-color: var(--progress-bar-background);
  width: 0;
  transition: width 0.5s;
}

.key-item input {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border: 1px solid var(--key-input-border);
  border-radius: 5px;
  margin-right: 10px;
}

.copyKeyBtn {
  background-color: var(--copy-btn-background);
  border: none;
  padding: 10px 20px;
  color: white;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
}

.copyKeyBtn:hover {
  background-color: var(--copy-btn-hover-background);
}

.scrollToTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background-color: #333;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  font-size: 18px;
}

.scrollToTopBtn:hover {
  background-color: #555;
}

.hidden {
  display: none;
}

footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: var(--header-background);
  display: flex;
  flex-direction: column;
  padding: 10px;
}

#footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

#footer-top button {
  margin: 5px;
  padding: 10px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

#footer-bottom {
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
}

#footer-bottom p {
  font-size: 14px;
  margin: 0;
  text-align: center;
}