body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f4f9;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode h2,
body.dark-mode label,
body.dark-mode p,
body.dark-mode a {
  color: #e0e0e0;
}

.container {
  background-color: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 350px;
  width: 100%;
  text-align: center;
}

body.dark-mode .container {
  background-color: #1e1e1e;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

h2 {
  color: #333;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-top: 10px;
  color: #555;
  font-weight: bold;
  text-align: left;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 10px;
  margin: 5px 0 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

body.dark-mode input[type="number"],
body.dark-mode input[type="text"],
body.dark-mode select {
  background-color: #333;
  color: #e0e0e0;
  border: 1px solid #555;
}

select {
  width: 100%;
  padding: 10px;
  margin: 5px 0 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  background-color: #fff;
  color: #333;
}

button {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%;
  font-weight: bold;
}

body.dark-mode button {
  background-color: #333;
  color: #e0e0e0;
  border: 1px solid #555;
}

button:hover {
  background-color: #45a049;
}

body.dark-mode button:hover {
  background-color: #444;
}

#result {
  background-color: #e9f5e9;
  border: 1px solid #c3e6c3;
  color: #2e7d32;
  font-weight: bold;
}

body.dark-mode #result {
  background-color: #333;
  border: 1px solid #555;
  color: #e0e0e0;
}

.file-size-container {
  display: flex;
  gap: 10px;
}

.file-size-input {
  width: 100%;
}

.file-size-unit {
  width: 70%;
}

.speed-container {
  display: flex;
  gap: 10px;
}

.speed-input {
  width: 100%;
  flex: 3;
}

.speed-unit {
  flex: 1;
  width: 100%;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  text-align: center;
}

.footer img {
  margin-right: 10px;
}

.footer a {
  color: #333;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  justify-content: center;
  display: flex;
  align-items: center;
}

body.dark-mode .footer a {
  color: #e0e0e0;
}

body.dark-mode .footer img {
  filter: invert(1);
}

@media (max-width: 600px) {
  body {
    padding: 10px;
    display: block;
    overflow: auto;
  }

  .container {
    padding: 15px 20px;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }

  h2 {
    font-size: 1.5em;
  }

  label {
    font-size: 0.9em;
  }

  input[type="number"],
  input[type="text"],
  select,
  button {
    padding: 8px;
    font-size: 0.9em;
  }

  .file-size-container,
  .speed-container {
    flex-direction: column;
    gap: 0px;
  }

  .file-size-unit,
  .speed-unit {
    width: 100%;
  }

  .footer {
    flex-direction: column;
    margin-top: 15px;
  }

  .footer img {
    margin-right: 10px;
    margin-bottom: 5px;
  }

  .footer a {
    font-size: 0.9em;
  }

  .controls-container {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }
}

/* From Uiverse.io by nihad-abbasov */
/* switch settings 👇 */

.ui-switch {
  /* switch */
  --switch-bg: rgb(135, 150, 165);
  --switch-width: 48px;
  --switch-height: 20px;
  /* circle */
  --circle-diameter: 32px;
  --circle-bg: rgb(232, 89, 15);
  --circle-inset: calc((var(--circle-diameter) - var(--switch-height)) / 2);
  margin: 0;
  padding: 0;
  display: flex;
  height: 32px;
}

.ui-switch input {
  display: none;
}

.slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: var(--switch-width);
  height: var(--switch-height);
  background: var(--switch-bg);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}

.slider .circle {
  top: calc(var(--circle-inset) * -1);
  left: 0;
  width: var(--circle-diameter);
  height: var(--circle-diameter);
  position: absolute;
  background: var(--circle-bg);
  border-radius: inherit;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHdpZHRoPSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj4KICAgIDxwYXRoIGZpbGw9IiNmZmYiCiAgICAgICAgZD0iTTkuMzA1IDEuNjY3VjMuNzVoMS4zODlWMS42NjdoLTEuMzl6bS00LjcwNyAxLjk1bC0uOTgyLjk4Mkw1LjA5IDYuMDcybC45ODItLjk4Mi0xLjQ3My0xLjQ3M3ptMTAuODAyIDBMMTMuOTI3IDUuMDlsLjk4Mi45ODIgMS40NzMtMS40NzMtLjk4Mi0uOTgyek0xMCA1LjEzOWE0Ljg3MiA0Ljg3MiAwMDAtNC44NjIgNC44NzIgNC44NzIgMCAwMDEwIDE0Ljg2MiA0Ljg3MiA0Ljg3MiAwIDAwMTQuODYgMTAgNC44NzIgNC44NzIgMCAwMDEwIDUuMTM5em0wIDEuMzg5QTMuNDYyIDMuNDYyIDAgMDExMy40NzEgMTBhMy40NjIgMy40NjIgMCAwMS0zLjQ3MyAzLjQ3MkEzLjQ2MiAzLjQ2MiAwIDAxNi41MjcgMTAgMy40NjIgMy40NjIgMCAwMTEwIDYuNTI4ek0xLjY2NSA5LjMwNXYxLjM5aDIuMDgzdi0xLjM5SDEuNjY2em0xNC41ODMgMHYxLjM5aDIuMDg0di0xLjM5aC0yLjA4NHpNNS4wOSAxMy45MjhMMy42MTYgMTUuNGwuOTgyLjk4MiAxLjQ3My0xLjQ3My0uOTgyLS45ODJ6bTkuODIgMGwtLjk4Mi45ODIgMS40NzMgMS40NzMuOTgyLS45ODItMS40NzMtMS40NzN6TTkuMzA1IDE2LjI1djIuMDgzaDEuMzg5VjE2LjI1aC0xLjM5eiIgLz4KPC9zdmc+");
  background-repeat: no-repeat;
  background-position: center center;
  -webkit-transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
    -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  -o-transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
    transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
    transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
    -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2),
    0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
}

.slider .circle::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.75);
  border-radius: inherit;
  -webkit-transition: all 500ms;
  -o-transition: all 500ms;
  transition: all 500ms;
  opacity: 0;
}

/* actions */

.ui-switch input:checked + .slider .circle {
  left: calc(100% - var(--circle-diameter));
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjAiIHdpZHRoPSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj4KICAgIDxwYXRoIGZpbGw9IiNmZmYiCiAgICAgICAgZD0iTTQuMiAyLjVsLS43IDEuOC0xLjguNyAxLjguNy43IDEuOC42LTEuOEw2LjcgNWwtMS45LS43LS42LTEuOHptMTUgOC4zYTYuNyA2LjcgMCAxMS02LjYtNi42IDUuOCA1LjggMCAwMDYuNiA2LjZ6IiAvPgo8L3N2Zz4=");
  background-color: rgb(0, 56, 146);
}

.ui-switch input:active + .slider .circle::before {
  -webkit-transition: 0s;
  -o-transition: 0s;
  transition: 0s;
  opacity: 1;
  width: 0;
  height: 0;
}

.controls-container {
  position: relative;
  width: 100%;
  max-width: 350px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.main-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.language-switch-dropdown {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
}

body.dark-mode .language-switch-dropdown {
  background-color: #333;
  color: #e0e0e0;
  border: 1px solid #555;
}

.lang-selection {
  position: relative;
  display: flex;
  align-items: center;
}
