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

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    "Meiryo", sans-serif;
  background: linear-gradient(135deg, #faf9f7 0%, #e8e4e0 100%);
  min-height: 100vh;
  font-size: 18px;
  line-height: 1.6;
}

/* Common animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.hidden {
  display: none;
}

/* Common button styles */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

/* Error and success messages */
.error-message {
  background: #fef2f2;
  border: 2px solid #fecaca;
  color: #b91c1c;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 16px;
  display: none;
  animation: shake 0.5s ease-in-out;
}

.error-message.show {
  display: block;
}

.success-message {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  color: #15803d;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 16px;
  display: none;
}

.success-message.show {
  display: block;
}

/* === css/login.css === */
body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.login-container {
  background: #ffffff;
  border: 2px solid #e8e4e0;
  /* border-radius: 20px; */
  border-radius: 0;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  margin: 20px;
  box-shadow: 0 12px 40px rgba(139, 69, 19, 0.15);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  font-size: 48px;
  margin-bottom: 15px;
}

.login-title {
  font-size: 28px;
  color: #2d2d2d;
  margin-bottom: 10px;
  font-weight: 600;
}

.login-subtitle {
  font-size: 16px;
  color: #5a5a5a;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.5s ease-in;
}

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

.form-label {
  display: block;
  font-size: 18px;
  color: #2d2d2d;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 18px 20px;
  font-size: 18px;
  border: 2px solid #e8e4e0;
  border-radius: 12px;
  background: #fefcfa;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #d2691e;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(210, 105, 30, 0.1);
}

.form-input::placeholder {
  color: #a0a0a0;
}

.login-button {
  width: 100%;
  background: linear-gradient(135deg, #d2691e 0%, #cd853f 100%);
  color: white;
  border: none;
  padding: 20px;
  font-size: 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(210, 105, 30, 0.25);
  font-weight: 600;
  margin-bottom: 20px;
}

.login-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(210, 105, 30, 0.35);
  background: linear-gradient(135deg, #cd853f 0%, #daa520 100%);
}

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

.secondary-button {
  width: 100%;
  background: transparent;
  color: #8b4513;
  border: 2px solid #d2691e;
  padding: 16px;
  font-size: 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.secondary-button:hover {
  background: #fefcfa;
  transform: translateY(-1px);
}

.code-input-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0;
}

.code-digit {
  width: 60px;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  border: 2px solid #e8e4e0;
  border-radius: 12px;
  background: #fefcfa;
  transition: all 0.3s ease;
}

.code-digit:focus {
  outline: none;
  border-color: #d2691e;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(210, 105, 30, 0.1);
}

.resend-info {
  text-align: center;
  margin-top: 20px;
  color: #5a5a5a;
  font-size: 16px;
}

.resend-link {
  color: #8b4513;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}

.resend-link:hover {
  color: #d2691e;
}

.demo-info {
  background: #fefcfa;
  border: 2px solid #d2691e;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  font-size: 15px;
  color: #8b4513;
}

.demo-info h4 {
  margin-bottom: 10px;
  color: #2d2d2d;
}

.demo-credentials {
  font-family: monospace;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 5px 0;
  border: 1px solid #e8e4e0;
}

@media (max-width: 768px) {
  .code-input-container {
    gap: 10px;
  }
  .login-container {
    /* margin: 15px; */
    margin: 0;
    height: 100vh;
    padding: 30px 25px;
  }

  .login-title {
    font-size: 24px;
  }

  .form-input,
  .login-button {
    font-size: 16px;
  }

  .code-digit {
    width: 40px;
    height: 40px;
    font-size: 18px;
    border-radius: 3px;
  }
}
