/* Login page styling */
:root {
  --brand-primary: #2f4f2f;
  --brand-secondary: #1a2f1a;
  --glass-background: rgba(255, 255, 255, 0.95);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/background.webp") no-repeat center;
  background-size: cover;
  opacity: 0.1;
  filter: grayscale(100%);
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 450px;
  padding: 40px;
  text-align: center;
  border-radius: 25px;
  background: var(--glass-background);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Language flags */
.language-flags {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.flag-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 36px;
  padding: 4px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
}

.flag-button:hover {
  border-color: var(--brand-primary);
  transform: scale(1.05);
}

.flag-button.active {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(47, 79, 47, 0.2);
  background: #fff;
}

.flag-button svg {
  border-radius: 3px;
}

.avatar-container {
  margin-bottom: 25px;
}

.avatar-container img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(47, 79, 47, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.avatar-container img:hover {
  transform: scale(1.05);
}

h1 {
  margin-bottom: 15px;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #2c3e50;
}

.welcome-message {
  margin-bottom: 25px;
  color: #4a5568;
  font-size: 1.1rem;
  line-height: 1.6;
}

.invitation-note {
  margin-bottom: 25px;
  padding: 15px 20px;
  border-radius: 15px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  box-shadow: 0 4px 12px rgba(47, 79, 47, 0.3);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
}

input:not([type="submit"]),
select {
  width: 100%;
  padding: 15px 20px;
  font-size: 1rem;
  font-family: inherit;
  color: #2c3e50;
  border-radius: 15px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

input:not([type="submit"]):focus,
select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(47, 79, 47, 0.1);
  background: #fff;
}

input::placeholder {
  color: #a0aec0;
}

input[type="submit"],
.continue-button {
  width: 100%;
  margin-top: 10px;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  box-shadow: 0 4px 12px rgba(47, 79, 47, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

input[type="submit"]:hover,
.continue-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47, 79, 47, 0.4);
}

input[type="submit"]:active,
.continue-button:active {
  transform: translateY(0);
}

.user-select {
  width: 100%;
  padding: 15px 20px;
  font-size: 1rem;
  font-family: inherit;
  color: #2c3e50;
  border-radius: 15px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  appearance: auto;
}

.user-select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(47, 79, 47, 0.1);
  background: #fff;
}

@media (max-width: 500px) {
  .container {
    margin: 10px;
    padding: 30px 25px;
    border-radius: 20px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .welcome-message {
    font-size: 1rem;
  }

  .avatar-container img {
    width: 80px;
    height: 80px;
  }

  input:not([type="submit"]),
  select,
  .user-select {
    padding: 12px 16px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  input[type="submit"],
  .continue-button {
    padding: 12px 25px;
    font-size: 1rem;
  }
}
