/* Reset some default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body and main container styles */
body {
  font-family: 'Arial', sans-serif;
  background-color: #f4f4f4;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

/* Form styling */
#shorten-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  padding: 20px;
}

/* Input fields styling */
input[type="url"],
input[type="text"] {
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Button styling */
button {
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #0056b3;
}

/* Dark mode toggle styling */
#dark-mode-container {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  background-color: white;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 26px;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #66bb6a;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Dark mode styles */
body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

.dark-mode input[type="url"],
.dark-mode input[type="text"] {
  background-color: #333;
  color: #fff;
  border-color: #444;
}

.dark-mode button {
  background-color: #333;
}

.dark-mode .slider {
  background-color: #777;
}

/* Responsive design */
@media (max-width: 768px) {
  #shorten-form {
    width: 90%;
  }

  #dark-mode-container {
    bottom: 5px;
    left: 5px;
  }
}

/* Hide the custom URL container by default */
#custom-url-container {
  display: none;
}
