/* ==========================================================================
   KORG ESPORTS ARENA - AUTHENTICATION MODAL STYLING
   Inspired by Reference UI: Tabbed Log In & Create Account Modal
   ========================================================================== */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-card {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  width: 100%;
  max-width: 450px;
  max-height: 94vh;
  overflow-y: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 240, 255, 0.08);
  padding: 1.75rem 1.85rem 1.6rem;
  transform: scale(0.95) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  color: #f1f5f9;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.auth-modal-overlay.active .auth-modal-card {
  transform: scale(1) translateY(0);
}

/* Custom Sleek Scrollbar */
.auth-modal-card::-webkit-scrollbar {
  width: 5px;
}
.auth-modal-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.auth-modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

/* Modal Header: VR Logo + Title + Close */
.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.auth-brand-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.auth-brand-icon {
  width: 44px;
  height: 44px;
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.auth-brand-icon svg {
  width: 24px;
  height: 24px;
}

.auth-brand-info {
  display: flex;
  flex-direction: column;
}

.auth-brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1.15;
}

.auth-brand-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.auth-close-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* ================== SEGMENTED TABS (Exact Reference) ================== */
.auth-segmented-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 1.4rem;
  gap: 0.5rem;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: 1.5px solid transparent;
  border-bottom: none;
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.65rem 0.5rem;
  text-align: center;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s ease;
}

.auth-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.auth-tab-btn.active {
  color: #ffffff;
  border-color: #ffffff;
  border-bottom: 2px solid #0d1117;
  margin-bottom: -1px;
  background: #0d1117;
  box-shadow: 0 -2px 10px rgba(255, 255, 255, 0.05);
}

/* ================== GOOGLE BUTTON ================== */
.auth-btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn-google:hover {
  background: #1c2330;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.auth-google-g-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ================== DIVIDER ================== */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-divider span {
  padding: 0 0.85rem;
}

/* ================== FORM FIELDS ================== */
.auth-form-group {
  margin-bottom: 1.05rem;
}

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.auth-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f8fafc;
}

.auth-label-sub {
  font-size: 0.73rem;
  color: #94a3b8;
  font-weight: 500;
}

.auth-label-link {
  font-size: 0.78rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-label-link:hover {
  color: #00f0ff;
  text-decoration: underline;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 0.95rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 14px;
}

.auth-input-icon svg {
  width: 16px;
  height: 16px;
  stroke: #64748b;
  transition: stroke 0.2s ease;
}

.auth-input {
  width: 100%;
  background: #121721;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.72rem 1rem 0.72rem 2.65rem;
  color: #ffffff;
  font-size: 0.88rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.auth-input::placeholder {
  color: #475569;
}

.auth-input:focus {
  outline: none;
  border-color: #00f0ff;
  background: #151c2a;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.22);
}

.auth-input:focus ~ .auth-input-icon svg {
  stroke: #00f0ff;
}

.auth-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.auth-pw-toggle {
  position: absolute;
  right: 0.85rem;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.auth-pw-toggle:hover {
  color: #ffffff;
}

.auth-pw-toggle svg {
  width: 16px;
  height: 16px;
}

/* ================== TERMS & REMEMBER CHECKBOX ================== */
.auth-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.85rem 0 1.25rem;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
  cursor: pointer;
}

.auth-checkbox-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  background: #121721;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.auth-checkbox-row input[type="checkbox"]:checked {
  background: #00f0ff;
  border-color: #00f0ff;
}

.auth-checkbox-row input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0b0f17;
  font-size: 11px;
  font-weight: 900;
}

.auth-checkbox-row a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ================== SUBMIT BUTTON (High Contrast White) ================== */
.auth-submit-btn {
  width: 100%;
  background: #ffffff;
  color: #0b0f17;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 22px rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-submit-btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 240, 255, 0.4);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn.loading {
  opacity: 0.75;
  pointer-events: none;
}

/* Inline Feedback & Alert Messages */
.auth-alert-msg {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: none;
}

.auth-alert-msg.error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.auth-alert-msg.success {
  display: block;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

/* Quick Demo Login Bar at bottom */
.auth-demo-hint {
  text-align: center;
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: #64748b;
}

.auth-demo-link {
  color: #38bdf8;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  text-decoration: underline;
}

.auth-demo-link:hover {
  color: #00f0ff;
}

/* ================== LOGGED IN HEADER USER CHIP ================== */
.header-user-wrapper {
  position: relative;
}

.header-user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 0.28rem 0.75rem 0.28rem 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.header-user-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #00f0ff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.3);
}

.user-chip-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.user-chip-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.user-chip-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.header-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  width: 220px;
  padding: 0.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: none;
  backdrop-filter: blur(12px);
}

.header-user-dropdown.active {
  display: block;
}

.user-dropdown-header {
  padding: 0.5rem 0.65rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dropdown-user-fullname {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
}

.dropdown-user-email {
  font-size: 0.72rem;
  color: #94a3b8;
  word-break: break-all;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.user-dropdown-item.logout {
  color: #f87171;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.35rem;
  padding-top: 0.65rem;
}

.user-dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

/* ================== GOOGLE ACCOUNT CHOOSER OVERLAY (OFFICIAL DARK MODE) ================== */
.google-chooser-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeInOverlay 0.2s ease;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.google-chooser-card {
  background: #131314;
  color: #e8eaed;
  border: 1px solid #303134;
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  padding: 2.25rem 2rem 1.75rem;
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.85);
  font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  animation: scalePopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes scalePopIn {
  from { transform: scale(0.96) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.google-chooser-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.google-chooser-top-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.google-chooser-top-txt {
  font-size: 0.95rem;
  font-weight: 500;
  color: #e8eaed;
}

.google-chooser-header {
  text-align: left;
  margin-bottom: 1.75rem;
}

.google-chooser-title {
  font-size: 1.75rem;
  font-weight: 400;
  color: #e8eaed;
  margin: 0 0 0.45rem;
  letter-spacing: -0.01em;
}

.google-chooser-sub {
  font-size: 0.95rem;
  color: #9aa0a6;
  margin: 0;
}

.google-chooser-sub strong {
  color: #8ab4f8;
  font-weight: 500;
}

.google-account-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #303134;
  margin-bottom: 1.5rem;
}

.google-account-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0.6rem;
  border-bottom: 1px solid #303134;
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 8px;
  background: transparent;
  border-left: none;
  border-right: none;
  width: 100%;
  text-align: left;
}

.google-account-row:hover {
  background: #1e1f20;
}

.google-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a73e8;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.05rem;
  flex-shrink: 0;
  overflow: hidden;
}

.google-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.google-avatar.mohit {
  background: #2a3b4c;
}

.google-avatar.sanidhaya {
  background: #1a73e8;
}

.google-avatar.abhijit {
  background: #9334e6;
}

.google-avatar.other {
  background: transparent;
  border: 1.5px solid #5f6368;
  color: #9aa0a6;
}

.google-account-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.google-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #e8eaed;
  line-height: 1.3;
}

.google-email {
  font-size: 0.82rem;
  color: #9aa0a6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

.google-custom-box {
  background: #1e1f20;
  border: 1px solid #3c4043;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  margin-bottom: 1.25rem;
  animation: fadeInOverlay 0.2s ease;
}

.google-custom-lbl {
  font-size: 0.8rem;
  color: #8ab4f8;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.google-dark-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: #131314;
  border: 1px solid #5f6368;
  border-radius: 8px;
  color: #e8eaed;
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
  outline: none;
  box-sizing: border-box;
}

.google-dark-input:focus {
  border-color: #8ab4f8;
  box-shadow: 0 0 0 1px #8ab4f8;
}

.google-dark-btn {
  width: 100%;
  background: #8ab4f8;
  color: #131314;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.google-dark-btn:hover {
  background: #a8c7fa;
}

.google-chooser-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  color: #9aa0a6;
}

.google-footer-links {
  display: flex;
  gap: 1rem;
}

.google-footer-links a {
  color: #9aa0a6;
  text-decoration: none;
}

.google-footer-links a:hover {
  color: #e8eaed;
}

.google-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #9aa0a6;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.google-close-btn:hover {
  background: #282a2d;
  color: #e8eaed;
}
