/* Universal Reset for predictable sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --green-dark: #072213;
  --green-main: #0e3a21;
  --green-light: #165230;
  --gold: #d4af37;
  --gold-hover: #e5c158;
  --cream: #faf7f2;
  --text-muted: rgba(255, 255, 255, 0.65);
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-focus-bg: rgba(255, 255, 255, 0.1);
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* PAGE LAYOUT */
html, body {
  height: 100%;
  margin: 0;
  font-family: "Merriweather", serif;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* LOGIN CARD */
#login-wrapper {
  width: 100%;
  max-width: 420px; /* Standardized card width for perfect scanning */
  padding: 48px 40px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--green-dark), var(--green-main));
  
  /* Deep, elegant layered shadows */
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 20px 40px -10px rgba(7, 34, 19, 0.3),
    inset 0 1px 0px rgba(255, 255, 255, 0.1);

  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Subtle ambient lighting effect */
#login-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(212, 175, 55, 0.12),
    transparent 75%
  );
  pointer-events: none;
}

/* FORM GROUPING */
#login-wrapper form {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Consistent spacing between all form elements */
  width: 100%;
}

/* TITLE */
#login-wrapper h2 {
  margin: 0 0 32px 0;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-align: center;
}

/* INPUTS */
#login-wrapper input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: var(--input-bg);
  color: #ffffff;
  outline: none;
  transition: var(--transition-smooth);
}

#login-wrapper input::placeholder {
  color: var(--text-muted);
  transition: opacity 0.2s;
}

/* Focus states */
#login-wrapper input:focus {
  border-color: var(--gold);
  background: var(--input-focus-bg);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

/* Slightly dim placeholder on focus for cleaner look */
#login-wrapper input:focus::placeholder {
  opacity: 0.4;
}

/* BUTTON */
#login-wrapper button {
  width: 100%;
  padding: 15px 16px;
  margin-top: 8px;
  border: none;
  border-radius: 12px;
  background: var(--gold);
  color: var(--green-dark); /* Using dark green instead of harsh black */
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

#login-wrapper button:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

#login-wrapper button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

/* RESPONSIVE DESIGN */
@media (max-width: 480px) {
  html, body {
    padding: 0;
    background: linear-gradient(145deg, var(--green-dark), var(--green-main));
  }

  #login-wrapper {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
    padding: 40px 24px;
    justify-content: center;
    box-shadow: none;
  }
  
  #login-wrapper::before {
    background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.18), transparent 85%);
  }

  #login-wrapper h2 {
    font-size: 28px;
    margin-bottom: 40px;
  }

  #login-wrapper input {
    font-size: 16px; /* Prevents iOS auto-zoom */
    padding: 16px;
  }

  #login-wrapper button {
    font-size: 17px;
    padding: 16px;
    margin-top: 12px;
  }
}