/* style.css */
* {
  box-sizing: border-box;
  font-family: "Kanit", sans-serif;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #fdf3f3, #ffb3b3);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #333;
  padding: 20px;
}

.login-wrapper {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(179, 58, 58, 0.2);
  width: 100%;
  max-width: 440px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
}

.logo {
  margin-bottom: 25px;
}
.logo img {
  width: 100%;
  max-width: 350px;
  height: auto;
  display: block;
  margin: 0 auto 30px;
}

h2 {
  margin-bottom: 30px;
  font-weight: 600;
  color: #b33a3a;
  letter-spacing: 1.2px;
  font-size: 1.8rem;
}

label {
  display: block;
  text-align: left;
  margin-bottom: 8px;
  font-weight: 600;
  color: #444;
  font-size: 0.95rem;
}
.browser-alert {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff5f5;
  color: #b33a3a;
  border: 2px solid #f4cccc;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 1rem;
  margin: 25px auto 10px;
  max-width: 420px;
  box-shadow: 0 3px 10px rgba(179, 58, 58, 0.15);
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
}

.chrome-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.browser-text {
  flex: 1;
  min-width: 200px;
  font-weight: 600;
  line-height: 1.4;
}

input[type="text"] {
  width: 100%;
  padding: 14px 15px;
  border-radius: 10px;
  border: 2px solid #ddd;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  color: #333;
  margin-bottom: 25px;
  box-shadow: inset 0 2px 5px #f0f0f0;
}
input[type="text"]:focus {
  border-color: #b33a3a;
  outline: none;
  box-shadow: 0 0 8px #b33a3aaa;
}

button {
  width: 100%;
  padding: 15px 0;
  background-color: #b33a3a;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 5px 15px rgba(179, 58, 58, 0.6);
}
button:hover {
  background-color: #8a2c2c;
  box-shadow: 0 7px 20px rgba(138, 44, 44, 0.8);
}

.message {
  margin-top: 15px;
  font-weight: 600;
  min-height: 1.2rem;
  color: #b33a3a;
}
.message.success {
  color: #007700;
}

.footer-text {
  margin-top: 35px;
  font-size: 0.8rem;
  color: #999;
}

/* ✅ ปรับให้เหมาะกับมือถือ */
@media (max-width: 768px) {
  h2 {
    font-size: 1.6rem;
  }

  .login-wrapper {
    padding: 35px 25px;
  }

  input[type="text"] {
    font-size: 1rem;
  }

  button {
    font-size: 1.05rem;
  }

  .logo img {
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  h2 {
    font-size: 1.5rem;
  }

  input[type="text"] {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  button {
    padding: 13px 0;
    font-size: 1rem;
  }

  .login-wrapper {
    padding: 30px 20px;
  }

  .logo img {
    max-width: 280px;
  }
}
@media (max-width: 360px) {
  h2 {
    font-size: 1.3rem;
  }

  .logo img {
    max-width: 240px;
  }

  .login-wrapper {
    padding: 25px 15px;
  }

  input[type="text"],
  button {
    font-size: 0.9rem;
    padding: 12px;
  }
}
#message {
  margin-top: 10px;
  font-weight: bold;
}

#message.success {
  color: green;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

