@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;900&display=swap');

:root {
  --accent-color: #8672FF;
  --base-color: #ffffff;
  --text-color: #2E2B41;
  --input-color: #F3F0FF;
  --button-color: #d1a8e4;
  --error-color: #f06272;
  --focus-ring: rgba(46, 43, 65, 0.25);
}

* {
  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;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: url('https://apexfortune.us/auth/img/gg.png') no-repeat right;
  background-size: cover;
  overflow-x: hidden;
}

.wrapper {
  background-color: var(--base-color);
  height: 100vh;
  width: max(40%, 600px);
  padding: 20px;
  border-radius: 0 20px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


.logo { 
    font-weight: 800; 
    font-size: 1.5rem; 
    letter-spacing: -1px; 
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.logo span { color: var(--accent-color); font-weight: 400; }

.logo-icon { 
    width: 22px; 
    height: 22px; 
    background: var(--accent-color); 
    border-radius: 5px; 
    transform: rotate(45deg); 
    display: inline-block; 
    margin-right: 15px; 
}


h1 {
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 10px;
}

h3 {
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}

form {
  width: min(400px, 100%);
  margin: 20px 0 50px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

form > div {
  width: 100%;
  display: flex;
  justify-content: center;
}

form label {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background-color: var(--accent-color);
  color: var(--base-color);
  font-size: 1.5rem;
  font-weight: 500;
  border-radius: 10px 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

form input {
  flex-grow: 1;
  min-width: 0;
  height: 50px;
  padding: 1em;
  font: inherit;
  border: 2px solid var(--input-color);
  border-left: none;
  border-radius: 0 10px 10px 0;
  background-color: var(--input-color);
  transition: border-color 0.2s 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);
  opacity: 0.6;
}

/* Unified Button Style */
form button, 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: background-color 150ms ease, color 150ms ease;
}

form button:hover,
button:hover {
  background-color: var(--text-color);
}

form button:focus,
button:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

/* Links */
a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* OTP Layout */
.otp-wrapper {
  background: white;
  padding: 2rem 3rem;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.otp-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.otp-boxes {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.otp-input {
  width: 60px;
  height: 60px;
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  background-color: var(--input-color);
  border: 2px solid var(--input-color);
  border-radius: 12px;
  text-align: center;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  margin: 0;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.otp-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(134, 114, 255, 0.25);
  outline: none;
}


/* Validation State */
form div.incorrect label {
  background-color: var(--error-color);
}

form div.incorrect input {
  border-color: var(--error-color);
}

#error-message {
  color: var(--error-color);
  margin-bottom: 10px;
  font-weight: 600;
}

/* Responsive Fix */
@media (max-width: 1100px) {
  .wrapper {
    width: 100%;
    border-radius: 0;
  }
}
