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

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

.container {
  width: 100%;
  max-width: 450px;
}

.login-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  background: linear-gradient(135deg, #4a3a2d 0%, #1a120d 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
  position: relative;
}

.language-selector {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
}

.language-dropdown {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 25px 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.language-dropdown:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.language-dropdown:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.language-dropdown option {
  background: #ffffff;
  color: #333;
  padding: 8px;
}

.language-dropdown option:hover {
  background: #f0f0f0;
  color: #000;
}

.language-dropdown option:checked {
  background: #e8e8e8;
  color: #000;
  font-weight: 600;
}

.header-content {
  width: 100%;
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 16px;
  opacity: 0.95;
  font-weight: 400;
}

form {
  padding: 40px 30px;
}

.form-group {
  margin-bottom: 30px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

input[type='text'] {
  width: 100%;
  padding: 16px;
  font-size: 24px;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  transition: all 0.3s ease;
  letter-spacing: 8px;
  font-weight: 600;
  color: #333;
}

input[type='text']:focus {
  outline: none;
  border-color: #30221d;
  box-shadow: 0 0 0 4px rgba(48, 34, 29, 0.1);
}

input[type='text']::placeholder {
  color: #ccc;
  letter-spacing: 8px;
}

input[type='email'] {
  width: 100%;
  padding: 18px 16px;
  font-size: 17px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 500;
  color: #333;
}

input[type='email']:focus {
  outline: none;
  border-color: #30221d;
  box-shadow: 0 0 0 4px rgba(48, 34, 29, 0.1);
}

input[type='email']::placeholder {
  color: #aaa;
}

.btn-login {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #4a3a2d 0%, #1a120d 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(48, 34, 29, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-cancel {
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  background: #f3f4f6;
  color: #374151;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-cancel:active {
  transform: translateY(0);
  background: #d1d5db;
}

.btn-loader {
  display: inline-block;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.message {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: none;
  animation: fadeIn 0.3s ease-out;
}

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

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.message.info {
  background-color: #e8ddd1;
  color: #5c4a3a;
  border: 1px solid #d4c4b0;
  display: block;
}

.message.warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  display: block;
}

.footer {
  padding: 20px 30px 30px;
  text-align: center;
}

.hint {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* Inline icon styles */
.icon-inline {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.icon-inline svg {
  display: block;
  width: 20px;
  height: 20px;
}

h1 .icon-inline svg {
  width: 28px;
  height: 28px;
}

/* Toast notification */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: none;
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
}

.toast.show {
  display: block;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.toast.hiding {
  animation: slideOutRight 0.3s ease-out;
}

.toast.success {
  background-color: #10b981;
  color: white;
}

.toast.error {
  background-color: #ef4444;
  color: white;
}

.toast.info {
  background-color: #42302a;
  color: white;
}

.toast.warning {
  background-color: #f59e0b;
  color: white;
}

/* Number input styling for mobile */
@media (max-width: 480px) {
  .login-card {
    border-radius: 16px;
  }

  .header {
    padding: 20px 15px 30px;
  }

  .language-selector {
    top: 10px;
    right: 10px;
  }

  .language-dropdown {
    font-size: 12px;
    padding: 5px 22px 5px 8px;
  }

  .header h1 {
    font-size: 24px;
    margin-top: 10px;
  }

  h1 .icon-inline svg {
    width: 22px;
    height: 22px;
  }

  .subtitle {
    font-size: 14px;
  }

  form {
    padding: 30px 20px;
  }

  input[type='text'] {
    font-size: 20px;
  }

  input[type='email'] {
    font-size: 16px;
    padding: 18px 16px;
  }
}
