/* ---------- Reset & Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(135deg, #cde0f5, #f8f9fa);
  color: #0f172a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ---------- Navbar ---------- */
nav {
  position: sticky;
  top: 0;
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.6));
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  z-index: 999;
  border-bottom: 1px solid rgba(15,23,42,0.1);
}

nav a {
  color: var(--text, #0f172a);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  margin-right: 0.5rem;
  transition: all 0.2s ease;
}

nav a:hover {
  background-color: #0d6efd;
  color: #fff;
}

nav .theme-btn {
  margin-left: auto;
  background-color: #0d6efd;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

nav .theme-btn:hover {
  background-color: #0b5ed7;
  transform: translateY(-2px);
}

/* ---------- Login Container ---------- */
.container {
  max-width: 500px;   /* Increased from 400px */
  width: 90%;
  margin: 100px auto 50px auto; /* Slightly more top margin */
  background: var(--surface, #fff);
  padding: 45px 35px; /* Increased padding */
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.1); /* Slightly stronger shadow */
  text-align: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* ---------- Heading ---------- */
h2 {
  font-size: 26px; /* Increased size */
  margin-bottom: 25px;
  font-weight: 700;
  color: var(--text, #0f172a);
}


.logo {
  width: 130px;
  margin-bottom: 15px;
}

/* ---------- Inputs ---------- */
input {
  width: 100%;
  padding: 14px 12px;
  margin: 10px 0;
  font-size: 15px;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* ---------- Buttons ---------- */
button {
  width: 100%;
  padding: 14px;
  margin-top: 15px;
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(13,110,253,0.15);
}

button:hover {
  background: linear-gradient(135deg, #0b5ed7, #0a58ca);
  transform: translateY(-2px);
}

/* ---------- Links & Messages ---------- */
p a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}

p a:hover {
  color: #0b5ed7;
  text-decoration: underline;
}

#login-msg {
  color: #dc3545;
  margin: 10px 0;
  font-size: 14px;
}

/* ---------- Footer ---------- */
footer {
  margin-top: auto;
  padding: 18px 12px;
  background-color: #0b1220;
  color: #e6eef8;
  text-align: center;
  font-size: 15px;
  border-radius: 8px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* ---------- Dark Mode ---------- */
body.dark-mode {
  background: linear-gradient(135deg, #0b1220, #1c1f2a);
  color: #e6eef8;
}

body.dark-mode .container {
  background: #252525;
  box-shadow: 0 12px 30px rgba(255,255,255,0.05);
}

body.dark-mode input {
  background-color: #333;
  color: #f0f0f0;
  border-color: #555;
}

body.dark-mode input:focus {
  border-color: #00bfff;
  box-shadow: 0 0 0 3px rgba(0,191,255,0.2);
}

body.dark-mode button {
  background: linear-gradient(135deg, #00bfff, #0094d3);
  color: #0c3057;
}

body.dark-mode button:hover {
  background: linear-gradient(135deg, #0094d3, #007bbf);
}

body.dark-mode nav {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  backdrop-filter: blur(6px);
}

body.dark-mode nav a, body.dark-mode nav .theme-btn {
  color: #fff;
}
body.dark-mode h2 {
  color: #00e5ff;  /* Brighter color for better contrast in dark mode */
}
/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }
  nav a, nav .theme-btn {
    margin: 0.3rem 0;
    width: 100%;
    text-align: center;
  }
}
