/* --- CSS Reset & Variables --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --error-color: #ef4444;
  --radius: 12px;
}

/* --- Base Body Styling --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* --- Container Card --- */
.container {
  background: var(--card-bg);
  width: 100%;
  max-width: 400px;
  padding: 40px 32px;
  border-radius: var(--radius);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2),
              0 8px 10px -6px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

/* --- Typography --- */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

/* --- Inputs --- */
input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  color: #94a3b8;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* --- Button --- */
button {
  width: 100%;
  padding: 12px 16px;
  margin-top: 8px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover {
  background-color: var(--primary-hover);
}

button:active {
  transform: scale(0.99);
}

button:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

/* --- Error/Status Message --- */
#message {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--error-color);
  text-align: center;
  min-height: 20px; /* Reserves space so page doesn't jump when text populates */
  line-height: 1.4;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 480px) {
  .container {
    padding: 28px 20px;
  }
  
  h1 {
    font-size: 1.5rem;
  }
}