/* =========================================================
   MXM EMULATOR BYPASS — Login & Register Portal Stylesheet
   ========================================================= */

:root {
  --bg-space: #03060C;
  --bg-card: #0D121D;
  --bg-input: #090D15;
  --border-card: #1A2333;
  --border-input: #1E2838;
  --text-main: #FFFFFF;
  --text-muted: #8E9BAE;
  --text-dim: #5A677B;
  --accent-cyan: #00E5FF;
  --accent-green: #10B981;
  --radius-card: 22px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-space);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Particle Starfield Canvas */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Glassmorphic Login Card */
.login-card {
  width: 100%;
  background: rgba(13, 18, 29, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 229, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Brand Icon */
.card-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #121826;
  border: 1px solid #233048;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #FFFFFF;
  margin-bottom: 18px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.brand-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  text-align: center;
  margin-bottom: 4px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 22px;
}

/* Pill Tab Switcher */
.auth-tabs-pill {
  width: 100%;
  background: #090D15;
  border: 1px solid var(--border-input);
  border-radius: 12px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 20px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-main);
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab-btn:hover {
  color: #FFF;
}
.auth-tab-btn.active {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* OAuth Section */
.oauth-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-oauth-google {
  width: 100%;
  background: #111724;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-oauth-google:hover {
  background: #172032;
  border-color: #2F3E57;
  transform: translateY(-1px);
}
.google-icon {
  width: 18px;
  height: 18px;
}

.oauth-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-oauth-mini {
  background: #0B0F17;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-oauth-mini:hover {
  background: #131A28;
  color: #FFF;
  border-color: #2F3E57;
}

/* Divider */
.auth-divider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}
.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: #192231;
  z-index: 1;
}
.auth-divider span {
  position: relative;
  z-index: 2;
  background: #0D121D;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* Forms */
.auth-form {
  width: 100%;
  display: none;
  flex-direction: column;
  gap: 16px;
}
.auth-form.active {
  display: flex;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.hint-text {
  font-size: 11px;
  color: var(--text-dim);
}
.field-subtext {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.input-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  font-size: 14px;
  pointer-events: none;
}

.input-field-wrap input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: 11px 14px 11px 40px;
  color: #FFFFFF;
  font-size: 13px;
  font-family: var(--font-main);
  outline: none;
  transition: var(--transition);
}
.input-field-wrap input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
}

.btn-toggle-eye {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}
.btn-toggle-eye:hover {
  color: #FFF;
}

/* Submit Buttons */
.btn-auth-submit {
  width: 100%;
  background: #FFFFFF;
  border: none;
  color: #000000;
  font-size: 13px;
  font-weight: 800;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
  transition: var(--transition);
}
.btn-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.45);
}

.register-disclaimer {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
  margin-top: 6px;
}

/* Card Footer Info */
.card-footer-info {
  width: 100%;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
}

.sec-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sec-badge strong {
  color: var(--text-muted);
}

.version-tag {
  background: #090D15;
  border: 1px solid var(--border-input);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
}

/* Support Text */
.bottom-support-text {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}
.bottom-support-text a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}
.bottom-support-text a:hover {
  text-decoration: underline;
  color: #FFF;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.toast {
  background: #101624;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #FFF;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid #EF4444; }
.toast.info { border-left: 4px solid var(--accent-cyan); }

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