.auth-container {
  display: flex;
  min-height: 100vh;
  background: var(--snow);
  position: relative;
  overflow: hidden;
}

.auth-panel {
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  height: 100%;
  top: 0;
  transition: left 1s cubic-bezier(0.65, 0, 0.35, 1), right 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.auth-form-panel {
  background: var(--white);
  left: 0;
  padding: 64px;
}

.auth-image-panel {
  background: var(--snow);
  right: 0;
  padding: 0;
}

.auth-container.signup-mode .auth-form-panel {
  left: 50%;
}

.auth-container.signup-mode .auth-image-panel {
  right: 50%;
}

.auth-container.verify-mode:not(.signup-mode) .auth-image-content {
  opacity: 0.6;
}

.auth-container.verify-mode:not(.signup-mode) .auth-image-content::before {
  background: linear-gradient(to bottom, rgba(51, 142, 218, 0.4) 0%, transparent 60%);
  height: 200px;
}

.auth-form-content {
  width: 100%;
  max-width: 440px;
}

.auth-image-content {
  width: 100%;
  height: 100%;
  position: relative;
}

.auth-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-image-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(249, 250, 252, 0.3) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.auth-image-content::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 60px;
  background: linear-gradient(to right, rgba(249, 250, 252, 0.2) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.image-caption {
  position: absolute;
  bottom: 32px;
  left: 32px;
  font-size: 16px;
  font-weight: bold;
  color: var(--white);
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.image-caption a {
  color: var(--white);
  text-decoration: underline;
  transition: opacity 0.125s ease-in-out;
}

.image-caption a:hover {
  opacity: 0.8;
}

.flag-banner {
  position: absolute;
  top: 0;
  left: 10px;
  width: 256px;
  z-index: 999;
  border: 0;
}

.auth-header {
  margin-bottom: 48px;
}

.auth-logo {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--black);
  margin: 0 0 8px 0;
  line-height: 1.2;
  transition: opacity 0.3s ease-in-out;
}

.auth-subtitle {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  transition: opacity 0.3s ease-in-out;
}

.auth-mode-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 16px;
  color: var(--muted);
}

.auth-mode-link {
  color: var(--red);
  font-weight: bold;
  cursor: pointer;
  transition: color 0.125s ease-in-out;
  text-decoration: underline;
}

.auth-mode-link:hover {
  color: var(--orange);
}

.form-group {
  margin-bottom: 24px;
  transition: opacity 0.6s ease-in-out, max-height 0.8s ease-in-out, margin 0.8s ease-in-out;
}

.username-field {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  overflow: hidden;
}

.username-field.show {
  max-height: 200px;
  opacity: 1;
  margin-bottom: 24px;
}

.form-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: bold;
  color: var(--black);
}

.label-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--smoke);
  border-radius: 8px;
  background: var(--white);
  color: var(--black);
  font-size: 16px;
  font-family: Phantom Sans, sans-serif;
  box-sizing: border-box;
  transition: border-color 0.125s ease-in-out, box-shadow 0.125s ease-in-out;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(51, 142, 218, 0.1);
}

.form-input::placeholder {
  color: var(--muted);
}

.primary-button {
  width: 100%;
  padding: 16px 32px;
  margin-top: 8px;
  border: none;
  border-radius: 99999px;
  background: var(--red);
  color: var(--white);
  font-size: 18px;
  font-weight: bold;
  font-family: Phantom Sans, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.125);
  transition: transform 0.125s ease-in-out, box-shadow 0.125s ease-in-out;
  -webkit-tap-highlight-color: transparent;
}

.primary-button:hover:not(:disabled) {
  transform: scale(1.0625);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.primary-button:active:not(:disabled) {
  transform: scale(1);
}

.primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary-button {
  width: 100%;
  padding: 16px 32px;
  margin-top: 16px;
  background: transparent;
  border: 2px solid var(--red);
  border-radius: 99999px;
  color: var(--red);
  font-size: 18px;
  font-weight: bold;
  font-family: Phantom Sans, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.125s ease-in-out, box-shadow 0.125s ease-in-out;
  -webkit-tap-highlight-color: transparent;
}

.secondary-button:hover {
  transform: scale(1.0625);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.125);
}

.secondary-button:active {
  transform: scale(1);
}

.error-message {
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(236, 55, 80, 0.1);
  border: 2px solid var(--red);
  border-radius: 8px;
  color: var(--red);
  font-size: 16px;
}

.success-message {
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(51, 214, 166, 0.1);
  border: 2px solid var(--green);
  border-radius: 8px;
  color: var(--green);
  font-size: 16px;
}

.info-message {
  text-align: center;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 16px;
}

.verification-notice {
  padding: 20px;
  margin-bottom: 24px;
  background: rgba(51, 142, 218, 0.05);
  border: 2px solid rgba(51, 142, 218, 0.2);
  border-radius: 12px;
}

.verification-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: bold;
  color: var(--black);
}

.verification-text {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
}

.verification-text strong {
  color: var(--blue);
  font-weight: bold;
}

.verification-code-section {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  border-top: 2px solid transparent;
  transition: opacity 0.4s ease-in-out, max-height 0.6s ease-in-out, margin-top 0.6s ease-in-out, padding-top 0.6s ease-in-out, border-color 0.3s ease-in-out;
}

.verification-code-section.show {
  max-height: 1000px;
  opacity: 1;
  margin-top: 32px;
  padding-top: 32px;
  border-top-color: var(--smoke);
}


@media (max-width: 768px) {
  .auth-container {
    flex-direction: column;
  }

  .auth-panel {
    padding: 32px;
  }

  .auth-form-panel {
    order: 1 !important;
    min-height: auto;
  }

  .auth-image-panel {
    order: 2 !important;
    min-height: 300px;
  }

  .flag-banner {
    width: 128px;
  }

  .auth-title {
    font-size: 28px;
  }
}
