@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --accent-color: #0d0201;
  --base-color: white;
  --text-color: #1a1c20;
  --input-color: #F3F0FF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: Poppins, Segoe UI, sans-serif;
  font-size: 12pt;
  color: var(--text-color);
  text-align: center;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column; 
  justify-content: flex-start; 
  align-items: center;
  background-color: #f5f5f5;
  font-family: Poppins, sans-serif;
  margin: 0;
}

/* NAVBAR */
nav {
  width: 100%;
  height: 60px;
  background-color: var(--base-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

nav .left a,
nav .right a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  margin-left: 20px;
  margin-right: 20px;
}

nav .left a:hover,
nav .right a:hover {
  color: var(--text-color);
  text-decoration: none;
}

.wrapper {
  background-color: var(--base-color);
  padding: 40px 20px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  margin-top: 80px; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(40%, 600px);
}

h1 {
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 20px;
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

form > div {
  display: flex;
  width: 100%;
}

form label {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background-color: var(--accent-color);
  color: var(--base-color);
  border-radius: 10px 0 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 500;
}

form input {
  flex-grow: 1;
  min-width: 0;
  height: 50px;
  padding: 0 1em;
  font: inherit;
  border-radius: 0 10px 10px 0;
  border: 2px solid var(--input-color);
  border-left: none;
  background-color: var(--input-color);
  transition: 150ms ease;
}

form input:hover {
  border-color: var(--accent-color);
}

form input:focus {
  outline: none;
  border-color: var(--text-color);
}

div:has(input:focus) > label {
  background-color: var(--text-color);
}

form input::placeholder {
  color: var(--text-color);
}

form button {
  margin-top: 10px;
  border: none;
  border-radius: 1000px;
  padding: 0.85em 4em;
  background-color: var(--accent-color);
  color: var(--base-color);
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: 150ms ease;
}

form button:hover {
  background-color: var(--accent-color); 
}

form button:focus {
  outline: none;
  background-color: var(--accent-color);
}

p a {
  color: var(--accent-color);
  text-decoration: none;
}

p a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* ===== SELECT ===== */
form select {
  flex-grow: 1;
  min-width: 0;
  height: 50px;
  padding: 0 1em;
  font: inherit;
  border-radius: 0 10px 10px 0;
  border: 2px solid var(--input-color);
  border-left: none;
  background-color: var(--input-color);
  transition: 150ms ease;
  appearance: none;
  cursor: pointer;
}

form select:hover {
  border-color: var(--accent-color);
}

form select:focus {
  outline: none;
  border-color: var(--text-color);
}

div:has(select:focus) > label {
  background-color: var(--text-color);
}

form select option[value=""] {
  color: #888;
}

.select-group {
  position: relative;
}

.select-group::after {
  content: "▾";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-color);
  pointer-events: none;
}

@media(max-width: 1100px){
  .wrapper{
    width: min(90%, 600px);
    border-radius: 20px;
  }
}

form div.incorrect label {
  background-color: #f06272;
}

form div.incorrect input {
  border-color: #f06272;
}

#error-message {
  color: #f06272;
}

form div label svg {
  fill: white; 
}