* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-primary);
}

body {
  background: var(--color-bg);
  min-width: 320px;
  min-height: 100vh;
}

.page-wrapper {
  width: 100%;
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

header, main, footer {
  width: 100%;
  margin: 0 auto;
}

header {
  height: 120px;
}

.logo {
  margin-top: 80px;
  margin-left: 70px;
  height: 121px;
  width: 100px;
}

.container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 13px;
}

.card {
  background: var(--color-bg);
  width: 100%;
  max-width: 600px;
  padding: 60px 89px;
  border-radius: 30px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.back-arrow {
  position: absolute;
  left: 0;
  width: 24px;
  color: var(--color-secondary);
  cursor: pointer;
}

h1 {
  font-size: 61px;
  font-weight: 700;
}

.underline {
  width: 150px;
  height: 4px;
  background: var(--color-secondary);
  margin: 15px auto 40px auto;
  border-radius: 3px;
}

form {
  display: flex;
  flex-direction: column;
  margin-top: 30px;
  gap: 12px;
  padding: 0 5px 0 5px;
}

.input-group {
  position: relative;
  width: 100%;
  min-height: 75px; 
  display: flex;
  flex-direction: column;
}

.input-group input {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  border: 1px solid #d1d1d1;
  padding: 0 45px 0 15px;
  font-size: 20px;
}

.input-icon {
  position: absolute;
  right: 15px;
  top: 14px; 
  width: 20px;
  height: 20px;
  cursor: pointer;
  z-index: 2;
}

.input-group input:focus {
  border: 1px solid var(--color-secondary);
  outline: none;
}

.error-message {
  color: var(--color-error);
  font-size: 16px;
  text-align: left;
  min-height: 25px; 
  height: 25px; 
  margin-top: 2px;
  margin-bottom: 0;
  line-height: 1.4;
  opacity: 1;
  transition: opacity 0.2s;
  display: block; 
}

.error-message:empty {
  opacity: 0; 
}

.input-error {
  border: 1px solid var(--color-error) !important;
}

.privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
  min-height: 40px; 
  margin-top: 10px;
}

.privacy a {
  color: var(--color-secondary);
  text-decoration: none;
}

.privacy .checkbox {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  cursor: pointer;
}

.privacy .checkbox:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgb(252, 251, 251);  
}

#error-privacy {
  min-height: 25px;
  height: 25px;
  width: 100%;
  text-align: center;
  margin-top: 5px;
  opacity: 1;
}

#error-privacy:empty {
  opacity: 0;
}

button {
  margin-top: 15px;
  width: 100%;
  max-width: 140px;
  height: 55px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  align-self: center;
  transition: 0.2s;
}

button:hover {
  background: var(--color-secondary);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.overlay-content {
  background-color: var(--color-primary);
  padding: 25px;
  border-radius: 20px;
  text-align: center;
  width: 90%;
  max-width: 312px;
  height: 74px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.overlay-content p {
  font-size: 20px;
  color: var(--color-white);
}

footer {
  text-align: center;
  padding: 20px;
  color: var(--color-text-secondary);
}

footer a {
  margin: 0 15px;
  text-decoration: none;
  color: var(--color-text-secondary);
}

footer a:hover {
  color: var(--color-secondary);
  font-weight: bold;
}

@media (max-width: 980px) {
  header {
    height: 100px;
    margin-bottom: 20px;
  }

  .logo {
    height: 78px;
    width: 64px;
    margin-left: 38px;
    margin-top: 37px;
  }

  .card {
    padding: 40px 25px;
  }

  h1 {
    font-size: 45px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 30px 6px;
    border-radius: 20px;
  }

  h1 {
    font-size: 36px;
  }

  .back-arrow {
    left: 5px;
  }

  button {
    max-width: 180px;
    height: 51px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 26px;
  }

  .privacy {
    font-size: 16px;
  }

  .overlay-content {
    width: 80%;
    max-width: 280px;
    padding: 20px;
    height: 60px;
  }

  .overlay-content p {
    font-size: 16px;
  }
}