/* TODO make it cooler! */

:root {
  --bg: #f5f5f5;
  --lbg: #ffffff;
  --text: #333333;
  --button: #2196F3;
  --button-hov: #1976D2;
  --input-border: #e0e0e0;
  --input-focus: #2196F3;
  --error: #f44336;
  --success: #4CAF50;
}

body {
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  margin: 0;
  min-height: 100vh;
}

div#bg {
  margin: 0;
  padding: 0;
  position: fixed;
  left: 0;
  top: 0;
  width: 70%;
  height: 100%;
  background-image: url("illustration.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

div#content {
  background-color: var(--lbg);
  width: 30%;
  min-width: 400px;
  height: 100vh;
  position: fixed;
  right: 0;
  top: 0;
  padding: 1rem;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

main {
  width: 100%;
  height: 100%;
}

h1 {
  color: var(--text);
  font-size: 1.8em;
  margin-bottom: 2rem;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 400px;
  margin: 0 auto;
  padding: 0 1rem;
}

label {
  display: block;
  font-size: 0.9em;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

input {
  color: var(--text);
  background-color: var(--lbg);
  border-radius: 8px;
  border: 1px solid var(--input-border);
  box-sizing: border-box;
  display: block;
  font-size: 1em;
  padding: 0.5em 0.5em;
  width: 100%;
  transition: all 0.2s ease;
}

input:focus {
  background-color: var(--lbg);
  border-color: var(--input-focus);
  outline: none;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.captcha-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

img {
  background-color: white;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  max-width: 100%;
  height: auto;
}

button, a#reload {
  background-color: var(--button);
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 500;
  padding: 0.8em 1.2em;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease;
  width: 100%;
}

button:focus,
button:hover,
a#reload:hover {
  background-color: var(--button-hov);
  outline: none;
}

a#reload {
  display: inline-block;
  text-align: center;
  margin: 0.5rem 0;
  font-size: 0.9em;
}

.alerts {
  margin-bottom: 0.5rem;
}

.alert {
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9em;
  line-height: 1.4;
}

.alert.error {
  background-color: rgba(244, 67, 54, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
}

.alert.success {
  background-color: rgba(76, 175, 80, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.password-requirements {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.5rem;
}

@media only screen and (max-width: 1024px) {
  div#bg {
    width: 60%;
  }
  
  div#content {
    width: 40%;
  }
}

@media only screen and (max-width: 768px) {
  div#bg {
    display: none;
  }
  
  div#content {
    position: relative;
    width: 100%;
    min-width: unset;
    padding: 1.5rem;
  }
  
  form {
    padding: 0;
  }
}
  
