* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #1f1f38;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  color: #eee;
  flex-direction: column;
}

.header {
  background-color: #222 !important;
  padding: 15px 20px !important;
}

.nav {
  display: flex !important;
  justify-content: center !important;
  gap: 30px !important;
  flex-wrap: wrap !important;
}

.nav-link {
  color: white !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  transition: color 0.3s !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
}

.nav-link:hover {
  color: #ffcc00 !important;
}

.nav-link.active {
  background-color: #ffcc00 !important;
  color: #222 !important;
}

main {
  background: #2c2c44;
  padding: 30px 40px;
  border-radius: 14px;
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.7);
  max-width: 480px;
  width: 100%;
  margin: 10px auto;
}

h1 {
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 24px;
  text-align: center;
  color: #f0f0f8;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #bbb;
}

input[type="text"],
input[type="number"],
select,
textarea,
input[type="file"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #555577;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background: #1f1f38;
  color: #ddd;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
input[type="file"]:focus {
  outline: none;
  border-color: #e55353;
  box-shadow: 0 0 8px #e5535388;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

button {
  display: block;
  width: 100%;
  padding: 14px 0;
  background-color: #e55353;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 5px 15px rgba(229, 83, 83, 0.7);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin-top: 8px;
  background: #274627;
  box-shadow: 0 0 10px #4caf5044;
}

button:hover {
  background-color: #306030;
  box-shadow: 0 7px 20px #234823;
}

#previewImages {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

#previewImages img {
  max-width: 150px;
  border-radius: 12px;
  object-fit: cover;
  height: auto;
  box-shadow: 0 3px 8px rgba(229, 83, 83, 0.5);
  border: 1.5px solid #e55353;
}

#result {
  margin-top: 10px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  min-height: 40px;
  white-space: pre-wrap;
  color: #a0e3a0;
  text-align: center;
  /* background: #274627; */
  /* box-shadow: 0 0 10px #4caf5044; */
}

.link {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: #e55353;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.link:hover {
  color: #bb3f3f;
  text-decoration: underline;
}

.spinner {
  border: 2px solid rgba(229, 83, 83, 0.2);
  border-left-color: #e55353;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 600px) {
  .nav {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  .nav-link {
    font-size: 1.2rem;
  }
}