/* 2026 login prototype — platform picker popup (nl2026 prefix, Bootstrap-safe) */
.nl2026-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10050;
  backdrop-filter: blur(4px);
}

.nl2026-overlay.show {
  display: flex;
  animation: nl2026-fadeIn 0.25s ease;
}

@keyframes nl2026-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nl2026-modal {
  background: var(--nl-surface);
  border-radius: var(--nl-radius-card);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  animation: nl2026-modalIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
  font-family: "PingFang SC", "Microsoft JhengHei", "Noto Sans TC", system-ui, -apple-system, sans-serif;
  color: var(--nl-text-primary);
}

@keyframes nl2026-modalIn {
  0% { opacity: 0; transform: translateY(24px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.nl2026-modal .nl2026-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 14px;
  flex-shrink: 0;
}

.nl2026-modal .nl2026-user-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.nl2026-modal .nl2026-user-col.row-layout {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.nl2026-modal .nl2026-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.nl2026-modal .nl2026-user-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nl2026-modal .nl2026-welcome {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--nl-text-secondary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: nl2026-fadeSlideIn 0.45s ease-out 0.15s both;
}

.nl2026-modal .nl2026-name,
.nl2026-modal .nl2026-modal-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--nl-deep-blue);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: nl2026-fadeSlideIn 0.45s ease-out 0.28s both;
}

.nl2026-modal .nl2026-modal-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--nl-primary-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.nl2026-modal .nl2026-header-side {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  animation: nl2026-fadeSlideIn 0.45s ease-out 0.4s both;
}

@keyframes nl2026-fadeSlideIn {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.nl2026-modal .nl2026-btn-google {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--nl-tint-gray);
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  color: var(--nl-text-primary);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.18s ease-out, color 0.18s ease-out;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nl2026-modal .nl2026-btn-google:hover {
  background: var(--nl-border);
  color: var(--nl-text-primary);
}

.nl2026-modal .nl2026-btn-google.connected {
  background: transparent;
  color: var(--nl-accent-green);
  cursor: default;
}

.nl2026-modal .nl2026-btn-google.connected:hover {
  background: transparent;
}

.nl2026-modal .nl2026-btn-google svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nl2026-modal .nl2026-g-check {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: var(--nl-accent-green);
  stroke-width: 2.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nl2026-modal .nl2026-g-mail {
  color: var(--nl-text-muted);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.nl2026-modal .nl2026-g-disconnect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--nl-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.nl2026-modal .nl2026-g-disconnect:hover {
  background: var(--nl-tint-green);
  color: var(--nl-accent-green);
}

.nl2026-modal .nl2026-g-disconnect svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2.6;
  fill: none;
  stroke-linecap: round;
}

.nl2026-modal .nl2026-btn-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--nl-primary-blue);
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  white-space: nowrap;
  transition: color 0.18s ease-out;
}

.nl2026-modal .nl2026-btn-switch:hover {
  color: #1d4ed8;
  text-decoration: underline;
  background: transparent;
}

.nl2026-modal .nl2026-btn-switch svg {
  display: none;
}

.nl2026-modal .nl2026-modal-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  padding: 2px 24px 12px;
  flex-shrink: 0;
  margin: 0;
}

.nl2026-modal .nl2026-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 24px 14px;
  border-bottom: 1px solid var(--nl-border);
  flex-shrink: 0;
}

.nl2026-modal .nl2026-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--nl-text-secondary);
  font-size: 13.5px;
  font-family: inherit;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease-out;
}

.nl2026-modal .nl2026-tab:hover {
  background: var(--nl-tint-gray);
  color: var(--nl-text-primary);
}

.nl2026-modal .nl2026-tab.active[data-cat="all"] {
  background: var(--nl-tint-gray);
  color: var(--nl-text-primary);
  font-weight: 600;
}

.nl2026-modal .nl2026-tab.active[data-cat="en"] {
  background: var(--nl-tint-blue);
  color: var(--nl-primary-blue);
  font-weight: 600;
}

.nl2026-modal .nl2026-tab.active[data-cat="zh"] {
  background: var(--nl-tint-pink);
  color: var(--nl-accent-pink);
  font-weight: 600;
}

.nl2026-modal .nl2026-tab.active[data-cat="other"] {
  background: var(--nl-tint-green);
  color: var(--nl-accent-green);
  font-weight: 600;
}

.nl2026-modal .nl2026-modal-body {
  overflow-y: auto;
  padding: 16px 24px;
  flex: 1;
  min-height: 0;
}

.nl2026-modal .nl2026-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.nl2026-modal .nl2026-card {
  --cat: var(--nl-primary-blue);
  --cat-tint: var(--nl-tint-blue);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--nl-surface);
  border: 1.5px solid var(--nl-border);
  border-radius: var(--nl-radius-card);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out, transform 0.18s ease-out;
}

.nl2026-modal .nl2026-card.enter {
  animation: nl2026-cardEnter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes nl2026-cardEnter {
  0% { opacity: 0; transform: translateY(14px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.nl2026-modal .nl2026-card[data-cat="en"] {
  --cat: var(--nl-primary-blue);
  --cat-tint: var(--nl-tint-blue);
}

.nl2026-modal .nl2026-card[data-cat="zh"] {
  --cat: var(--nl-accent-pink);
  --cat-tint: var(--nl-tint-pink);
}

.nl2026-modal .nl2026-card[data-cat="other"] {
  --cat: var(--nl-accent-green);
  --cat-tint: var(--nl-tint-green);
}

.nl2026-modal .nl2026-card:hover {
  border-color: var(--cat);
  background: var(--nl-surface);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.nl2026-modal .nl2026-card:active {
  transform: none;
}

.nl2026-modal .nl2026-card.selected {
  border-color: var(--cat);
  border-width: 2.5px;
  background: var(--nl-surface);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.nl2026-modal .nl2026-card.selected::before {
  content: none;
}

.nl2026-modal .nl2026-card-mask {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.48);
  border-radius: inherit;
}

.nl2026-modal .nl2026-card.selected .nl2026-card-mask {
  display: flex;
  animation: nl2026-maskIn 0.22s ease-out both;
}

@keyframes nl2026-maskIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.nl2026-modal .nl2026-card-enter {
  background: var(--cat);
  color: #fff;
  border: none;
  border-radius: var(--nl-radius-btn);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 22px;
  min-height: 40px;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
  transition: transform 0.15s ease-out, filter 0.15s ease-out;
  animation: nl2026-enterBtnIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes nl2026-enterBtnIn {
  0% { opacity: 0; transform: scale(0.92) translateY(4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.nl2026-modal .nl2026-card-enter:hover {
  filter: brightness(1.06);
  transform: scale(1.03);
}

.nl2026-modal .nl2026-card-enter:active {
  transform: scale(0.97);
}

.nl2026-modal .nl2026-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  background: var(--cat-tint);
  flex-shrink: 0;
  overflow: hidden;
}

.nl2026-modal .nl2026-card-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nl2026-modal .nl2026-cover-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--cat-tint);
}

.nl2026-modal .nl2026-card-cover.has-fallback .nl2026-cover-fallback {
  display: flex;
}

.nl2026-modal .nl2026-card-cover.has-fallback .nl2026-card-cover-img {
  display: none;
}

.nl2026-modal .nl2026-icon-letter {
  font-size: 22px;
  font-weight: 700;
  color: var(--cat);
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nl2026-modal .nl2026-icon-letter.long {
  font-size: 16px;
  letter-spacing: 0;
}

.nl2026-modal .nl2026-card:hover .nl2026-icon-letter {
  transform: scale(1.08);
}

.nl2026-modal .nl2026-card.selected .nl2026-icon-letter {
  transform: scale(1.05);
}

.nl2026-modal .nl2026-card-body {
  padding: 6px;
  width: 100%;
}

.nl2026-modal .nl2026-card-text {
  min-width: 0;
  width: 100%;
}

.nl2026-modal .nl2026-card-title {
  display: block;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.nl2026-modal .nl2026-card-title-en {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--nl-text-secondary);
  word-break: break-word;
}

.nl2026-modal .nl2026-recent-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  background: var(--nl-primary-blue);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.nl2026-modal .nl2026-check {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cat);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}

.nl2026-modal .nl2026-check svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nl2026-modal .nl2026-card.selected .nl2026-check {
  display: flex;
  animation: nl2026-checkPop 0.22s ease-out both;
}

@keyframes nl2026-checkPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.nl2026-modal .nl2026-empty-hint {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--nl-text-muted);
  font-size: 13.5px;
  padding: 32px 0;
}

.nl2026-modal .nl2026-modal-footer {
  border-top: 1px solid var(--nl-border);
  padding: 14px 24px;
  flex-shrink: 0;
}

.nl2026-modal .nl2026-cta {
  width: 100%;
  background: var(--nl-primary-blue);
  color: #fff;
  border: none;
  border-radius: var(--nl-radius-btn);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  padding: 13px 20px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.18s ease-out, box-shadow 0.18s ease-out;
}

.nl2026-modal .nl2026-cta:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.nl2026-modal .nl2026-cta:disabled {
  background: var(--nl-border);
  color: var(--nl-text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 680px) {
  .nl2026-overlay {
    padding: 0 12px 12px;
    align-items: flex-end;
  }

  .nl2026-modal {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px;
  }

  .nl2026-modal .nl2026-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .nl2026-modal .nl2026-modal-header {
    padding: 10px 14px 6px;
    gap: 8px;
  }

  .nl2026-modal .nl2026-modal-avatar {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .nl2026-modal .nl2026-modal-name {
    font-size: 16px;
  }

  .nl2026-modal .nl2026-user-col.row-layout {
    gap: 8px;
  }

  .nl2026-modal .nl2026-btn-google {
    font-size: 12px;
    padding: 2px 6px;
  }

  .nl2026-modal .nl2026-modal-title {
    font-size: 15px;
    padding: 0 14px 6px;
  }

  .nl2026-modal .nl2026-tabs {
    padding: 0 14px 8px;
    gap: 4px;
  }

  .nl2026-modal .nl2026-tab {
    font-size: 12px;
    padding: 5px 12px;
  }

  .nl2026-modal .nl2026-modal-body {
    padding: 8px 14px 12px;
  }

  .nl2026-modal .nl2026-card-cover {
    aspect-ratio: 16 / 9;
  }

  .nl2026-modal .nl2026-icon-letter {
    font-size: 18px;
  }

  .nl2026-modal .nl2026-icon-letter.long {
    font-size: 13px;
  }

  .nl2026-modal .nl2026-card-body {
    padding: 5px 4px 6px;
  }

  .nl2026-modal .nl2026-card-title {
    font-size: 0.8rem;
    line-height: 1.25;
  }

  .nl2026-modal .nl2026-card-title-en {
    font-size: 0.68rem;
  }

  .nl2026-modal .nl2026-recent-badge {
    top: 4px;
    right: 4px;
    font-size: 9px;
    padding: 2px 6px;
  }

  .nl2026-modal .nl2026-card-enter {
    font-size: 12px;
    padding: 8px 14px;
    min-height: 36px;
  }

  .nl2026-modal .nl2026-g-mail {
    max-width: 80px;
  }
}

@media (max-width: 900px) and (min-width: 681px) {
  .nl2026-modal .nl2026-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.nl2026-modal .nl2026-tab:focus-visible,
.nl2026-modal .nl2026-card:focus-visible,
.nl2026-modal .nl2026-card-enter:focus-visible,
.nl2026-modal .nl2026-btn-switch:focus-visible,
.nl2026-modal .nl2026-btn-google:focus-visible,
.nl2026-modal .nl2026-cta:focus-visible {
  outline: 2px solid var(--nl-primary-blue);
  outline-offset: 2px;
}
