/* JoneX-style auth (login page) */
.auth-section {
  width: 100%;
  min-height: calc(100vh - 60px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.auth-card {
  background-color: #080808;
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  isolation: isolate;
  transition: background-color 0.3s, border-color 0.3s;
}

.auth-watermark {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.165) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(255, 255, 255, 0.01) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

.auth-content {
  position: relative;
  z-index: 1;
}

.auth-header {
  text-align: center;
  margin-bottom: 25px;
}

.auth-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
}

.auth-header p {
  color: #888;
  font-size: 0.9rem;
  font-weight: 300;
}

.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-form .form-group label {
  display: block;
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.auth-input {
  width: 100%;
  background-color: #0f0f0f;
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 1rem;
  font-family: "Kanit", sans-serif;
  transition: all 0.2s ease;
  outline: none;
}

.auth-input:focus {
  border-color: #666;
  background-color: #141414;
}

.auth-input::placeholder {
  color: #444;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .auth-input {
  padding-right: 72px;
}

.btn-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  padding: 4px;
  font-family: "Kanit", sans-serif;
  transition: color 0.2s;
}

.btn-eye:hover {
  color: #fff;
}

.password-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-checkbox-box {
  width: 18px;
  height: 18px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.custom-checkbox-box .checkmark {
  font-size: 14px;
  color: #000;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s ease;
}

.custom-checkbox-input:checked + .custom-checkbox-box {
  background: #fff;
  border-color: #fff;
}

.custom-checkbox-input:checked + .custom-checkbox-box .checkmark {
  opacity: 1;
  transform: scale(1);
}

.custom-checkbox-label {
  font-size: 0.8125rem;
  color: #888;
}

.forgot-password-link a {
  color: #666;
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.2s;
}

.forgot-password-link a:hover {
  color: #fff;
}

.btn-auth-submit {
  width: 100%;
  background-color: #e6e6e6;
  color: #000;
  font-weight: 600;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  font-size: 1rem;
  font-family: "Kanit", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-auth-submit:hover {
  background-color: #fff;
  transform: translateY(-1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #444;
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #262626;
}

.auth-divider span {
  padding: 0 10px;
}

.btn-auth-social {
  width: 100%;
  background-color: #0f0f0f;
  border: 1px solid #262626;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  font-family: "Kanit", sans-serif;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.btn-auth-social:last-of-type {
  margin-bottom: 0;
}

.btn-auth-social:hover {
  background-color: #1a1a1a;
  border-color: #444;
}

.btn-auth-social .ri-discord-fill {
  color: #5865f2;
  font-size: 1.2rem;
}

.btn-auth-social .ri-google-fill {
  color: #ea4335;
  font-size: 1.2rem;
}

.auth-footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #666;
}

.auth-footer-link a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #555;
  text-underline-offset: 3px;
  margin-left: 5px;
}

.auth-tips {
  margin-top: 35px;
  font-size: 0.8rem;
  color: #444;
  line-height: 1.6;
  text-align: center;
}

.kbd {
  background: #262626;
  padding: 2px 6px;
  border-radius: 4px;
  color: #999;
  font-family: monospace;
  font-size: 0.75rem;
  border: 1px solid #333;
}

#toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 350px;
  padding: 16px 20px;
  border-radius: 12px;
  pointer-events: auto;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  font-family: "Kanit", sans-serif;
  opacity: 0;
  transform: translateY(20px);
  animation: toast-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.success {
  border-left: 4px solid #22c55e;
}

.toast-title {
  font-weight: 600;
  font-size: 15px;
}

.toast-message {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 4px;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(20px) scale(0.95); }
}

body[data-theme="light"] .auth-card {
  background-color: #fff;
  border-color: #e5e5e5;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .auth-watermark {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.01) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body[data-theme="light"] .auth-header h2 {
  color: #000;
}

body[data-theme="light"] .auth-header p,
body[data-theme="light"] .custom-checkbox-label {
  color: #666;
}

body[data-theme="light"] .auth-form .form-group label {
  color: #444;
}

body[data-theme="light"] .auth-input {
  background-color: #f5f5f5;
  border-color: #e0e0e0;
  color: #000;
}

body[data-theme="light"] .auth-input:focus {
  background-color: #fff;
  border-color: #999;
}

body[data-theme="light"] .btn-eye:hover {
  color: #000;
}

body[data-theme="light"] .btn-auth-submit {
  background-color: #000;
  color: #fff;
}

body[data-theme="light"] .btn-auth-submit:hover {
  background-color: #333;
}

body[data-theme="light"] .btn-auth-social {
  background-color: #fff;
  border-color: #e5e5e5;
  color: #000;
}

body[data-theme="light"] .auth-divider::before,
body[data-theme="light"] .auth-divider::after {
  background-color: #e5e5e5;
}

body[data-theme="light"] .auth-footer-link a {
  color: #000;
}

body[data-theme="light"] .auth-tips {
  color: #888;
}

body[data-theme="light"] .kbd {
  background: #f0f0f0;
  color: #666;
  border-color: #ddd;
}

@media (max-width: 768px) {
  .auth-card {
    padding: 30px 25px;
  }

  .auth-watermark {
    font-size: 6rem;
    top: -20px;
  }
}

@media (max-width: 480px) {
  .auth-section {
    padding: 15px;
    align-items: flex-start;
    padding-top: 30px;
  }

  .auth-card {
    padding: 25px 20px;
  }

  .auth-watermark {
    font-size: 5rem;
    top: -15px;
  }

  .auth-header h2 {
    font-size: 1.5rem;
  }
}
