:root {
  /* Light mode colors */
  --primary: #444444;
  --primary-hover: #555555;
  --background: #f9fafb;
  --surface: #ffffff;
  --text: #111827;
  --text-secondary: #4b5563;
  --error: #dc2626;
  --border: #e5e7eb;
  --button-border: #d1d5db;
  --logo-color: #cc1111;
  --container-bg: rgb(250, 250, 250);
  --input-bg: rgba(0, 0, 0, 0.05);
  --input-border: rgba(0, 0, 0, 0.1);
  --input-shadow: rgba(0, 0, 0, 0.1);
  --button-bg: rgba(0, 0, 0, 0.05);
  --button-color: rgba(0, 0, 0, 0.7);
  --button-border: rgba(0, 0, 0, 0.1);
  --button-hover: rgba(0, 0, 0, 0.9);
  --error-bg: rgba(239, 68, 68, 0.1);
  --light-glow-color: rgba(255, 255, 255, 0.015);
  --glow-color: rgba(255, 255, 255, 0.2);
  --strong-glow-color: rgba(255, 255, 255, 0.8);
  --light-shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --dark-shadow-color: rgba(0, 0, 0, 0.5);
}

/* @media (prefers-color-scheme: dark) { */
:root {
  --primary: #444444;
  --primary-hover: #555555;
  --background: #151515;
  --surface: #202020;
  --text: #ffffff;
  --text-secondary: #777777;
  --error: #ef4444;
  --border: #e5e7eb;
  --button-border: #808080;
  --logo-color: #cc1111;
  --container-bg: rgb(10, 10, 10);
  --input-bg: rgba(0, 0, 0, 0.3);
  --input-border: black;
  --input-shadow: rgba(0, 0, 0, 1);
  --button-bg: rgba(0, 0, 0, 0.1);
  --button-color: rgba(255, 255, 255, 0.5);
  --button-border: rgba(255, 255, 255, 0.1);
  --button-hover: white;
  --error-bg: rgba(239, 68, 68, 0.1);
  --glow-color: rgba(255, 255, 255, 0.2);
  --shadow-color: rgba(0, 0, 0, 0.3);
}
/* } */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  color-scheme: light dark;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.container {
  background: var(--container-bg);
  border-radius: 1.5rem;
  box-shadow: inset -1px 1px 1px rgba(255, 255, 255, 0.3),
    inset 1px -1px 1px var(--shadow-color);
  width: 100%;
  max-width: 350px;
  max-height: 600px;
  margin: 1rem;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  scale: 1;
  filter: drop-shadow(-20px 30px 5px var(--shadow-color))
    drop-shadow(-10px 12px 5px var(--dark-shadow-color));
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  padding: 2rem;
  min-height: 600px;
  justify-content: space-between;
}

.container:hover {
  scale: 1.05;
  filter: drop-shadow(10px -10px 5px var(--light-glow-color))
    drop-shadow(-30px 40px 5px var(--dark-shadow-color))
    drop-shadow(-20px 22px 5px var(--dark-shadow-color));
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 30%,
    transparent 60%
  );
  pointer-events: none;
}

.container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  pointer-events: none;
}

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  body {
    padding: 0;
  }

  .container {
    padding: 1.5rem;
    margin: 0;
    border-radius: 0;
    width: 100%;
    height: 100vh;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  input {
    padding: 0.75rem;
    font-size: 16px;
  }

  button {
    padding: 0.75rem 1rem;
    font-size: 16px;
  }

  .logo-container {
    margin-top: 0.5rem;
  }

  .logo {
    width: 80px;
    height: 65px;
  }
}

.subtitle {
  font-size: 1rem;
  text-align: center;
  color: var(--text);
  text-shadow: 0 0 10px var(--glow-color);
}

.logo-container {
  display: flex;
  justify-content: center;
  margin: 2.5rem;
  margin-bottom: 0;
}

.logo {
  width: 150px;
  height: auto;
  fill: var(--logo-color);
  color: var(--logo-color);
}

h1 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  margin-top: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

input {
  padding: 0.75rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 0.5rem;
  color: var(--text);
  box-shadow: inset -2px 2px 2px rgba(0, 0, 0, 1),
    inset 1px -1px 1px rgba(255, 255, 255, 0.08);
  font-size: 1rem;
  transition: all 0.2s ease;
}

input:focus {
  outline: none;
}

input::placeholder {
  color: var(--text-secondary);
}

button {
  padding: 0.75rem 1.5rem;
  background: var(--button-bg);
  color: var(--button-color);
  border: 1px solid var(--button-border);
  box-shadow: inset -1px 1px 1px rgba(255, 255, 255, 0.02),
    inset 2px -2px 1px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 1.5rem;
}

button:hover {
  color: var(--button-hover);
}

button:active {
  transform: translateY(0);
}

.error {
  color: var(--error);
  margin-top: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.875rem;
  padding: 0.75rem;
  background: var(--error-bg);
  border-radius: 0.5rem;
  border: none; /* 1px solid var(--error); */
  animation: fadeIn 0.3s ease;
  width: 100%;
}

.link {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.link a {
  color: var(--text-secondary);
  text-decoration: none;
  opacity: 0.7;
}

.link a:hover {
  opacity: 1;
  text-decoration: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.avatar-container {
  position: relative;
  border-radius: 50%;
  margin: 1rem;
  width: 175px;
  height: 175px;
  overflow: hidden;
  z-index: 2;
  aspect-ratio: 1;
  flex-shrink: 0;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Chrome, Edge */
input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover,
input:-webkit-autofill:active {
  box-shadow: 0 0 0 1000px black inset !important;
  -webkit-box-shadow: 0 0 0 1000px black inset !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Safari workaround (limited control) */
input:-internal-autofill-selected {
  background-color: black !important;
  color: var(--text) !important;
}
