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

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1f1c2c, #928dab);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: #e0e0e0;
}

.container {
  background: #2c2540;
  padding: 3rem 3.5rem;
  border-radius: 1.5rem;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 0 30px #6b5b95;
  width: 100%;
  max-width: 460px;
  text-align: center;
  transition: transform 0.3s ease;
}

.container:hover {
  transform: translateY(-10px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.7),
    inset 0 0 40px #927fbf;
}

h1.title {
  font-weight: 700;
  font-size: 2.4rem;
  margin-bottom: 2rem;
  letter-spacing: 2px;
  color: #f7f1ff;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.15);
}

form {
  width: 100%;
}

.amount {
  margin-bottom: 2rem;
  text-align: left;
}

.amount label {
  font-weight: 600;
  font-size: 1.1rem;
  color: #cfc9e6;
  margin-bottom: 0.5rem;
  display: block;
  letter-spacing: 0.03em;
}

.amount input {
  width: 100%;
  height: 3.8rem;
  border: none;
  border-radius: 1rem;
  background: #433c68;
  color: #e0dffb;
  font-size: 1.2rem;
  padding: 0 1.25rem;
  box-shadow:
    inset 2px 2px 6px #5a5192,
    inset -2px -2px 6px #362d59;
  transition: background 0.3s ease, color 0.3s ease;
}

.amount input:focus {
  outline: none;
  background: #5a5299;
  color: #fff;
  box-shadow:
    0 0 8px #a991f7,
    inset 2px 2px 8px #7e73c8;
}

.dropdown {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  gap: 1rem;
}

.from,
.to {
  flex: 1;
  text-align: left;
}

.from label,
.to label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: #cfc9e6;
  letter-spacing: 0.03em;
}

.select-container {
  display: flex;
  align-items: center;
  background: #433c68;
  border-radius: 1rem;
  padding: 0.35rem 1rem;
  box-shadow:
    inset 2px 2px 8px #5a5192,
    inset -2px -2px 8px #362d59;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.select-container:hover {
  background: #5a5299;
  box-shadow:
    0 0 12px #a991f7,
    inset 2px 2px 12px #7e73c8,
    inset -2px -2px 12px #3f3972;
}

.select-container img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  margin-right: 1rem;
  user-select: none;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.1));
}

.select-container select {
  flex: 1;
  font-size: 1.2rem;
  border: none;
  background: transparent;
  color: #dcd6f7;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}

.select-container select:focus {
  outline: none;
  color: #fff;
}

.switch-btn {
  background: transparent;
  border: none;
  color: #a991f7;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.4s ease, color 0.3s ease;
  align-self: flex-end;
  margin-top: 1.4rem;
  padding: 0;
}

.switch-btn:hover {
  transform: rotate(180deg) scale(1.1);
  color: #f3e8ff;
}

.msg {
  font-weight: 700;
  font-size: 1.3rem;
  color: #cfc9e6;
  margin-bottom: 2.5rem;
  min-height: 2rem;
  letter-spacing: 0.05em;
  user-select: none;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

button.convert-btn {
  width: 100%;
  padding: 1.15rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #2c2540;
  background: linear-gradient(135deg, #a991f7, #7e73c8);
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  box-shadow:
    0 6px 20px rgba(105, 91, 179, 0.6),
    inset 0 -3px 6px rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

button.convert-btn:hover {
  background: linear-gradient(135deg, #b3a1ff, #8f84d9);
  box-shadow:
    0 8px 28px rgba(135, 120, 224, 0.8),
    inset 0 -4px 8px rgba(255, 255, 255, 0.3);
  color: #201e2a;
}

/* Responsive Styles */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .container {
    padding: 2rem 2rem;
    max-width: 100%;
    border-radius: 1rem;
  }

  .dropdown {
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .from,
  .to {
    width: 100%;
    text-align: left;
  }

  .select-container {
    width: 100%;
    padding: 0.5rem 1.25rem;
  }

  .switch-btn {
    align-self: center;
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
  }

  button.convert-btn {
    font-size: 1.25rem;
    padding: 1rem 0;
  }
}
