html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f4f4f9;
  color: #333;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  max-width: 100vw;
  overflow-x: hidden;
  min-height: 100vh;
}

.light-mode {
  position: fixed;
  top: 20px;
  right: 20px;
}

h3 {
  margin: 20px 0;
  font-size: 1.8em;
  color: #555;
  text-align: center;
}

form {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
  margin: 20px auto;
}

label {
  font-weight: bold;
  margin-top: 10px;
  display: block;
}

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

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  margin-right: 10px;
}

button {
  padding: 10px 20px;
  margin: 10px auto;
  display: block;
  border: none;
  border-radius: 5px;
  background-color: #2196F3;
  color: white;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  max-width: 300px;
  text-align: center;
}

button:hover {
  background-color: #1976D2;
}

a button {
  background-color: #4CAF50;
  width: 100%;
  max-width: 300px;
}

a button:hover {
  background-color: #388E3C;
}

#message {
  margin-top: 20px;
  font-weight: bold;
  color: #d9534f;
  text-align: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

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

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

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

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

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 2s linear infinite;
  display: inline-block;
  margin-left: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

p.note {
  font-size: 0.9em;
  color: #777;
  text-align: center;
  margin-top: 10px;
}

video {
  width: 100%;
  max-width: 500px;
  height: auto;
  margin: 20px auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
