/* ------------------------ */
/*  Box-Sizing Everywhere   */
/* ------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ------------------------ */
/*  Color Variables         */
/* ------------------------ */
:root {
  --bg-color:    #ffffff;
  --nav-color:   #f0f0f0;
  --text-color:  #000000;
  --highlight:   #ff3e3e;
  --error-bg:    #f8d7da;
  --error-text:  #721c24;
}
body.dark-mode {
  --bg-color:    #1e1e1e;
  --nav-color:   #2c2c2c;
  --text-color:  #ffffff;
}

/* ------------------------ */
/*  Page & Wrapper          */
/* ------------------------ */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}
.wrapper {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

/* ------------------------ */
/*  Dark Mode Toggle        */
/* ------------------------ */
.dark-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.toggle-btn {
  background: var(--highlight);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 5px 12px;
  cursor: pointer;
}
.toggle-btn:hover {
  background: #d63031;
}

/* ------------------------ */
/*  Form Container          */
/* ------------------------ */
.box {
  background-color: var(--nav-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  text-align: center;
}
.box h2 {
  color: var(--highlight);
  margin-bottom: 20px;
}

/* ------------------------ */
/*  Error Message           */
/* ------------------------ */
.error {
  background: var(--error-bg);
  color: var(--error-text);
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* ------------------------ */
/*  Input Fields            */
/* ------------------------ */
.input-wrapper {
  position: relative;
  margin-bottom: 15px;
}
.input-wrapper input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ccc;
  border-radius: 30px;
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-color);
}
.input-wrapper input:focus {
  border-color: var(--highlight);
  outline: none;
}
body.dark-mode .input-wrapper input {
  border-color: #555;
}

/* ------------------------ */
/*  Eye Icon                */
/* ------------------------ */
.eye-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #888;
}

/* ------------------------ */
/*  Submit Button           */
/* ------------------------ */
.btn {
  width: 100%;
  padding: 12px;
  background: var(--highlight);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
}
.btn:hover {
  background: #d63031;
}

/* ------------------------ */
/*  Alt-Link to Login       */
/* ------------------------ */
.alt-link {
  margin-top: 20px;
  font-size: 14px;
}
.alt-link a {
  color: var(--highlight);
  text-decoration: none;
  font-weight: bold;
}
.alt-link a:hover {
  text-decoration: underline;
}