/* ============================
   GLOBAL STYLES (Auto Light/Dark Theme)
   ============================ */
:root {
  --primary-color: #3498db;
  --primary-hover: #2980b9;
  --bg-light: #f4f4f4;
  --bg-dark: #1e1e1e;
  --text-light: #333;
  --text-dark: #f4f4f4;
  --white: #fff;
  --error-color: #e74c3c;
  --success-color: #27ae60;
  --shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: var(--bg-dark);
    --text-light: var(--text-dark);
    --white: #2b2b2b;
    --shadow: 0 0 12px rgba(255, 255, 255, 0.1);
  }
}

/* ============================
   BODY LAYOUT
   ============================ */
body {
  font-family: Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  transition: background 0.3s, color 0.3s;
}

/* ============================
   FORM CONTAINER
   ============================ */
.form {
  background: var(--white);
  padding: 25px;
  border-radius: 10px;
  width: 350px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
  transition: background 0.3s, box-shadow 0.3s;
}

h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 20px;
}

/* ============================
   INPUTS & LABELS
   ============================ */
label {
  font-size: 14px;
  font-weight: bold;
  display: block;
  margin-top: 10px;
  margin-bottom: 5px;
  color: #1a1a1a; 
  transition: color 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  label {
    color: #f2f2f2; 
  }
}

input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 12px;
  box-sizing: border-box;
  background: transparent;
  color: inherit;
}

input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 4px var(--primary-color);
}

/* ============================
   PASSWORD WRAPPER (SHOW ICON)
   ============================ */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 35px;
}

.show-password {
  position: absolute;
  right: 10px;
  top: 35%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 25px;
  color: var(--primary-color);
  transition: color 0.3s;
}

.show-password:hover {
  color: var(--primary-hover);
}

/* ============================
   BUTTONS
   ============================ */
button {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: var(--primary-hover);
}

/* ============================
   LINKS & MESSAGES
   ============================ */
p.message {
  text-align: center;
  margin-top: 12px;
}

p.message.success {
  color: var(--success-color);
}

p.message.error {
  color: var(--error-color);
}

p.login-link,
p.signup-link {
  text-align: center;
  margin-top: 20px;
}

p.login-link a,
p.signup-link a {
  color: var(--primary-color);
  text-decoration: none;
}

p.login-link a:hover,
p.signup-link a:hover {
  text-decoration: underline;
}

/* ============================
   RESPONSIVE DESIGN
   ============================ */
@media (max-width: 400px) {
  .form {
    width: 90%;
    padding: 20px;
  }
}

