/* ============================================================
   Roblox Login Demo — style.css
   Overrides + custom toast notification
   ============================================================ */

/* --- Base fixes so the page renders without full Roblox JS --- */
body {
  background-color: #1a1a1a;
}

.rbx-body.dark-theme {
  background-color: #1a1a1a;
  color: #ffffff;
}

.login-base-container {
  max-width: 400px;
  margin: 60px auto 0;
  padding: 0 16px;
}

.login-header {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 24px;
}

.login-form-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.input-field {
  width: 100%;
  box-sizing: border-box;
  background: #2a2a2a;
  border: 1px solid #464646;
  border-radius: 4px;
  color: #ffffff;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.input-field:focus {
  border-color: #00a2ff;
  background: #2a2a2a;
}

.input-field::placeholder {
  color: #888;
}

.login-button {
  width: 100%;
  background: #00a2ff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}

.login-button:hover {
  background: #0090e3;
}

.forgot-credentials-link {
  margin-top: 14px;
  margin-bottom: 4px;
}

.text-link {
  color: #00a2ff;
  text-decoration: none;
  font-size: 13px;
}

.text-link:hover {
  text-decoration: underline;
}

.alternative-login-divider-container {
  margin: 16px 0;
}

.rbx-divider {
  border-top: 1px solid #464646;
}

.otp-login-button,
.cross-device-login-button {
  width: 100%;
  background: transparent;
  color: #fff;
  border: 1px solid #464646;
  border-radius: 4px;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}

.otp-login-button:hover,
.cross-device-login-button:hover {
  background: #2a2a2a;
  border-color: #888;
}

.signup-option {
  margin-top: 16px;
  font-size: 13px;
  color: #aaa;
}

.signup-link {
  margin-left: 6px;
}

/* Header */
.rbx-header {
  background: #1f1f1f;
  border-bottom: 1px solid #333;
  height: 56px;
  display: flex;
  align-items: center;
}

.container-fluid {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 24px;
}

.icon-logo,
.icon-logo-r {
  display: inline-block;
  width: 28px;
  height: 28px;
  background: url('https://images.rbxcdn.com/fc3f3e3158fc20ebb5ccc972064ebfe6.png') no-repeat center/contain;
}

.nav.rbx-navbar {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.nav-menu-title {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  display: block;
}

.nav-menu-title:hover {
  color: #fff;
  background: #2a2a2a;
}

.signup-button {
  background: #00a2ff;
  color: #fff !important;
  border-radius: 4px;
  padding: 8px 16px !important;
  font-size: 14px;
  font-weight: 600;
}

.signup-button:hover {
  background: #0090e3;
}

.rbx-navbar-right {
  margin-left: auto;
}

.navbar-right {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Footer */
.container-footer {
  margin-top: 60px;
  padding: 24px 16px;
  border-top: 1px solid #333;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  gap: 4px 0;
  justify-content: center;
}

.footer-link {
  padding: 0 10px;
}

.text-footer-nav {
  color: #888;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.15s;
}

.text-footer-nav:hover {
  color: #ccc;
}

.footer-note {
  color: #666;
  font-size: 11px;
  text-align: center;
  margin-top: 12px;
}

/* ============================================================
   ROBLOX-STYLE ERROR TOAST
   Matches Roblox's official notification banner style
   ============================================================ */

.rbx-error-toast {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  min-width: 340px;
  max-width: 520px;
  width: max-content;
  background: #292929;
  border: 1px solid #d04a4a;
  border-left: 4px solid #d04a4a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  z-index: 100000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  font-family: 'Nunito', 'Source Sans Pro', Arial, sans-serif;
}

.rbx-error-toast.rbx-toast-visible {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.rbx-toast-icon {
  color: #d04a4a;
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* fallback icon if Roblox icon font not loaded */
.rbx-toast-icon::before {
  content: "⚠";
  font-size: 16px;
  line-height: 1;
}

.rbx-toast-message {
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.4;
  flex: 1;
}

.rbx-toast-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.rbx-toast-close:hover {
  color: #fff;
}

/* fallback × if icon font not loaded */
.rbx-toast-close::before {
  content: "×";
  font-size: 20px;
}

/* Responsive */
@media (max-width: 480px) {
  .rbx-error-toast {
    min-width: calc(100vw - 32px);
    left: 16px;
    right: 16px;
    transform: translateY(-20px);
    width: auto;
  }
  .rbx-error-toast.rbx-toast-visible {
    transform: translateY(0);
  }

  .login-base-container {
    margin-top: 30px;
  }
}
