@import url('https://fonts.googleapis.com/css2?family=Arial:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  height: 100vh;
  background: radial-gradient(circle at top, #1e1a16, #0c0a08 90%);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #E6D6B1;
}

.hidden {
  display: none !important;
}

.card {
  background: linear-gradient(180deg, #1e1a16 0%, #0f0d0b 100%);
  border: 4px solid #3a2a16;
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 2px #915C2D,
    0 0 0 4px #C1914B,
    0 6px 20px rgba(0, 0, 0, 0.8);
  padding: 35px 30px;
  width: 90%;
  max-width: 450px;
  text-align: center;
  color: #E6D6B1;
}

h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #F8E9C5;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 2px #000;
}

.input-group {
  margin-bottom: 1rem;
  text-align: left;
  position: relative;
}

.input-group label {
  font-size: 0.9rem;
  color: #E6D6B1;
  margin-bottom: 6px;
  display: block;
}

.input-group input {
  width: 100%;
  padding: 10px 14px;
  background: #1a1410;
  border: 2px solid #4a3520;
  border-radius: 6px;
  color: #E6D6B1;
  font-size: 0.95rem;
  outline: none;
  transition: 0.2s ease;
  box-shadow: inset 0 0 6px #000;
}

.input-group input:focus {
  border-color: #C1914B;
  background: #211b16;
}

.autocomplete-items {
  position: absolute;
  border: 1px solid #4a3520;
  border-top: none;
  z-index: 99;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 0 0 6px 6px;
  background-color: #1a1410;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.1s, visibility 0.1s;
}

.autocomplete-items:not(:empty) {
  visibility: visible;
  opacity: 1;
}

.autocomplete-items div {
  padding: 10px 14px;
  cursor: pointer;
  background-color: #1a1410;
  border-bottom: 1px solid #2d241c;
  color: #E6D6B1;
  font-size: 0.95rem;
  transition: background-color 0.1s;
}

.autocomplete-items div:last-child {
  border-bottom: none;
}

.autocomplete-items div:hover {
  background-color: #1a1410;
}

.autocomplete-active {
  background-color: #3a2a16 !important;
  color: #F5E1A4 !important;
}


button#generate, button#generateAchievement {
  width: 100%;
  margin-top: 10px;
  padding: 12px 0;
  border: 2px solid #915C2D;
  border-radius: 8px;
  background: linear-gradient(180deg, #3a2a16, #1f150a);
  color: #F5E1A4;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: inset 0 0 6px #000, 0 2px 6px rgba(0, 0, 0, 0.8);
}

button#generate:hover, button#generateAchievement:hover {
  background: linear-gradient(180deg, #4a351f, #261b0f);
  color: #fff7c5;
  box-shadow: 0 0 10px #C1914B;
}

.output {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1b1510;
  border: 2px solid #4a3520;
  border-radius: 8px;
  margin-top: 1.3rem;
  padding: 10px 14px;
  font-size: 1rem;
  font-weight: bold;
  color: #E6D6B1;
  box-shadow: inset 0 0 10px #000;
}

.output.hidden {
  display: none;
}

.btos2-toggle {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #E6D6B1;
  font-size: 0.95rem;
  text-shadow: 1px 1px 1px #000;
  user-select: none;
}

.btos2-toggle label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.btos2-toggle label:hover {
  color: #F8E9C5;
}

.btos2-toggle input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #915C2D;
  border-radius: 4px;
  background: #1a1410;
  box-shadow: inset 0 0 6px #000;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.btos2-toggle input[type="checkbox"]:hover {
  border-color: #C1914B;
  background: #211b16;
}

.btos2-toggle input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #C1914B, #915C2D);
  border-color: #F5E1A4;
  box-shadow: 0 0 6px #C1914B, inset 0 0 4px #000;
}

.btos2-toggle input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 2px;
  font-size: 14px;
  color: #1a1410;
  text-shadow: 0 0 2px #000;
}

#copyBtn {
  background: none;
  border: none;
  color: #C1914B;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.2s ease;
}

#copyBtn:hover {
  color: #F5E1A4;
  text-shadow: 0 0 6px #C1914B;
}

.bottom {
  font-size: 0.8rem;
  color: #C5B48A;
  margin-top: 1.5rem;
  text-shadow: 1px 1px 1px #000;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, #0f0d0b 0%, #1a1410 100%);
  border-top: 2px solid #3a2a16;
  padding: 10px 0;
  font-size: 0.8rem;
  color: #C5B48A;
  text-shadow: 1px 1px 1px #000;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.7);
}

.footer a {
  color: #C1914B;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.footer a:hover {
  color: #F5E1A4;
  text-shadow: 0 0 6px #C1914B;
}

.footer .highlight {
  color: #E6D6B1;
  font-weight: 600;
}

.tab-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  gap: 10px;
}

.tab-buttons button {
  background: linear-gradient(180deg, #3a2a16, #1f150a);
  border: 2px solid #915C2D;
  color: #E6D6B1;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.tab-buttons button.active {
  background: linear-gradient(180deg, #C1914B, #915C2D);
  color: #1a1410;
}

.tab-buttons button:hover {
  box-shadow: 0 0 8px #C1914B;
}

@media (max-width: 500px) {
  .card {
    padding: 25px 20px;
  }
  h1 {
    font-size: 1.4rem;
  }
  button#generate {
    font-size: 0.95rem;
  }
}
