:root {
  --bg: #fdfdfd;
  --surface: #ffffff;
  --text: #202124;
  --subtext: #5f6368;
  --primary: #1a73e8;
  --primary-ink: #ffffff;
  --outline: #e0e3e7;
  --shadow: 0 4px 12px rgba(32, 33, 36, 0.1),
            0 1px 4px rgba(32, 33, 36, 0.06);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --focus: 0 0 0 3px rgba(26, 115, 232, 0.25);
}

/* 2) Базовые стили */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI",
               "Helvetica Neue", Arial, "Noto Sans";
  background: linear-gradient(180deg, #fdfdfd 0%, #f5f7fa 100%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  line-height: 1.45;
}

h2, h3 {
  margin: 0 0 14px 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.6rem;
  color: var(--text);
  text-align: center;
  margin-bottom: 24px;
}

h3 {
  font-size: 1.1rem;
  color: var(--subtext);
}

.card,
#phone-section,
#code-section {
  width: min(420px, 92vw);
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-1px);
}

input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--outline);
  background: #fafbfc;
  color: var(--text);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  font-size: 0.98rem;
}

input::placeholder {
  color: var(--subtext);
}

input:hover {
  border-color: #c6dafc;
}

input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus);
  background: #ffffff;
}


button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  margin-top: 12px;
  background: var(--primary);
  color: var(--primary-ink);
  border: none;
  border-radius: 9999px; /* pill */
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.25),
              0 2px 6px rgba(26, 115, 232, 0.22);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(26, 115, 232, 0.28),
              0 3px 10px rgba(26, 115, 232, 0.24);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.24),
              0 1px 6px rgba(26, 115, 232, 0.22);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}


#message-box {
  width: min(420px, 92vw);
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  background-color: #f0f4f8;
  color: #3c4043;
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
}


@media (max-width: 600px) {
  body {
    padding: 16px;
    justify-content: flex-start;
    align-items: stretch;
  }


  h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }


  #phone-section,
  #code-section,
  #user-section {
    width: 100%;
    padding: 18px;
    border-radius: var(--radius-md);
    box-shadow: none;
    border: none;
    background: transparent;
  }
    #back-section{
      margin-left: auto;
    margin-right: auto;
    width: 70%;
    padding: 18px;
    border-radius: var(--radius-md);
    box-shadow: none;
    border: none;
    background: transparent;
  }

  .card {
     width: 100%;
     padding: 18px;
     border-radius: var(--radius-md);
     box-shadow: none;
     border: none;
     background: transparent;
  }


  input[type="text"] {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  button {
    padding: 10px 14px;
    font-size: 0.95rem;
    box-shadow: none;
  }
}