@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

:root {
  --font-family: 'Inter', Arial, sans-serif;
  --bg-color: #f0f2f5;
  --container-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #555555;
  --input-border: #dddddd;
  --input-focus-border: #4a90e2;
  --button-bg: #4a90e2;
  --button-hover-bg: #357abd;
  --error-text: #d93025;
  --error-bg: #fce8e6;
  --info-text: #666666;
}

/* Dark mode via class (JS fallback) */
html.dark {
  --bg-color: #121212;
  --container-bg: #1e1e1e;
  --text-primary: #f0f0f0;
  --text-secondary: #cccccc;
  --input-border: #444444;
  --input-focus-border: #4a90e2;
  --button-bg: #4a90e2;
  --button-hover-bg: #357abd;
  --error-text: #ff6b6b;
  --error-bg: #5a1e1e;
  --info-text: #aaaaaa;
}

/* Dark mode overrides via media query */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-primary: #f0f0f0;
    --text-secondary: #cccccc;
    --input-border: #444444;
    --input-focus-border: #4a90e2;
    --button-bg: #4a90e2;
    --button-hover-bg: #357abd;
    --error-text: #ff6b6b;
    --error-bg: #5a1e1e;
    --info-text: #aaaaaa;
  }
}

/* Global styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--bg-color);
  display: grid;
  place-items: center;
  height: 100vh;
}

.login-container {
  background: var(--container-bg);
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  width: 360px;
  text-align: center;
}

h1 {
  margin-bottom: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

label {
  display: block;
  text-align: left;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-secondary);
}

input {
  width: 90%;
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 1.8px solid var(--input-border);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  background: transparent;
  color: var(--text-primary);
}

input:focus {
  border-color: var(--input-focus-border);
  outline: none;
}

button {
  width: 100%;
  padding: 12px;
  font-size: 17px;
  font-weight: 600;
  color: white;
  background: var(--button-bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: var(--button-hover-bg);
}

.error {
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid var(--error-text);
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-weight: 600;
}

.info {
  margin-top: 15px;
  font-size: 14px;
  color: var(--info-text);
}
