/* 프리미엄 카지노 스타일 — 로그인·회원가입 팝업 & 비회원 UI */
:root {
  --auth-bg: #000000;
  --auth-panel: #0d1318;
  --auth-panel-2: #101820;
  --auth-gold: #00AEEF;
  --auth-gold-light: #5ec8ff;
  --auth-gold-dark: #0077cc;
  --auth-accent: #00AEEF;
  --auth-text: #ffffff;
  --auth-muted: #94a3b8;
  --auth-border: rgba(0, 174, 239, 0.12);
  --auth-glow: rgba(0, 174, 239, 0.35);
}

/* ── 오버레이 ── */
.mb-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s;
}

.mb-auth-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── 모달 프레임 ── */
.mb-auth-modal {
  position: relative;
  width: min(940px, 100%);
  max-height: min(90vh, 680px);
  overflow: hidden;
  border-radius: 20px;
  background: var(--auth-panel);
  border: 1px solid var(--auth-border);
  box-shadow:
    0 0 0 1px rgba(0, 174, 239, 0.06),
    0 32px 100px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(0, 174, 239, 0.04);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.mb-auth-overlay.is-open .mb-auth-modal {
  transform: scale(1) translateY(0);
}

.mb-auth-overlay.is-closing {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mb-auth-modal.is-closing {
  opacity: 0;
  transform: scale(0) translateY(0) !important;
  transition:
    transform 0.42s cubic-bezier(0.55, 0, 1, 0.45),
    opacity 0.35s ease;
}

.mb-auth-modal-wide {
  width: min(980px, 100%);
  max-height: min(92vh, 720px);
}

/* 로그인 — 폼 단독 모달 */
.mb-auth-modal.mb-auth-modal-login {
  width: min(420px, calc(100vw - 40px));
  max-height: none;
}

.mb-auth-form-wrap-login {
  border-left: none;
  overflow: visible;
  max-height: none;
  width: 100%;
  box-sizing: border-box;
}

.mb-auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--auth-border);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.mb-auth-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(0, 174, 239, 0.35);
}

/* ── 좌측 비주얼 패널 ── */
.mb-auth-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 520px;
}

.mb-auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.mb-auth-visual-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(0, 174, 239, 0.15), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(212, 158, 30, 0.18), transparent 50%),
    linear-gradient(160deg, #0a0a0a 0%, #141414 45%, #000000 100%);
}

.mb-auth-visual-login .mb-auth-visual-bg {
  background:
    radial-gradient(ellipse 80% 60% at 25% 25%, rgba(0, 174, 239, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(212, 158, 30, 0.14), transparent 50%),
    linear-gradient(155deg, #000000 0%, #161616 50%, #000000 100%);
}

.mb-auth-visual-register .mb-auth-visual-bg {
  background:
    radial-gradient(ellipse 70% 55% at 30% 35%, rgba(0, 174, 239, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 45% at 75% 70%, rgba(180, 120, 40, 0.12), transparent 50%),
    linear-gradient(155deg, #0a0a0a 0%, #1a1a1a 50%, #000000 100%);
}

/* 회원가입 좌측 프로모션 배너 */
.mb-auth-visual-register {
  align-items: stretch;
  background: #0a0a0a;
}

.mb-auth-visual-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* 플로팅 칩·카드 장식 */
.mb-auth-chips {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mb-auth-chips .chip,
.mb-auth-chips .card {
  position: absolute;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mb-auth-chips .chip-1 {
  width: 72px;
  height: 72px;
  top: 18%;
  right: 12%;
  background: radial-gradient(circle at 35% 35%, #f0d78c, #9a7b1a);
  animation: auth-float 6s ease-in-out infinite;
}

.mb-auth-chips .chip-2 {
  width: 52px;
  height: 52px;
  top: 42%;
  right: 28%;
  background: radial-gradient(circle at 35% 35%, #5ec8ff, #0077cc);
  animation: auth-float 5s ease-in-out infinite 0.8s;
}

.mb-auth-chips .chip-3 {
  width: 44px;
  height: 44px;
  top: 28%;
  left: 18%;
  background: radial-gradient(circle at 35% 35%, #fca5a5, #991b1b);
  animation: auth-float 7s ease-in-out infinite 1.2s;
}

.mb-auth-chips .chip-4 {
  width: 60px;
  height: 60px;
  top: 22%;
  right: 15%;
  background: radial-gradient(circle at 35% 35%, #fde68a, #b45309);
  animation: auth-float 5.5s ease-in-out infinite 0.5s;
}

.mb-auth-chips .card {
  border-radius: 6px;
  width: 48px;
  height: 68px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border-color: rgba(0, 174, 239, 0.3);
}

.mb-auth-chips .card-1 {
  top: 55%;
  left: 10%;
  transform: rotate(-18deg);
  animation: auth-float 8s ease-in-out infinite 0.3s;
}

.mb-auth-chips .card-2 {
  top: 35%;
  left: 28%;
  transform: rotate(12deg);
  animation: auth-float 6.5s ease-in-out infinite 1s;
}

.mb-auth-chips .card-3 {
  top: 50%;
  left: 14%;
  transform: rotate(-10deg);
  animation: auth-float 7s ease-in-out infinite 0.6s;
}

@keyframes auth-float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}

.mb-auth-chips .card-1 { --r: -18deg; }
.mb-auth-chips .card-2 { --r: 12deg; }
.mb-auth-chips .card-3 { --r: -10deg; }

.mb-auth-visual-content {
  position: relative;
  z-index: 1;
  padding: 36px 32px;
  width: 100%;
}

.mb-auth-visual-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 174, 239, 0.12);
  border: 1px solid rgba(0, 174, 239, 0.35);
  color: var(--auth-gold-light);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

.mb-auth-visual-badge-gold {
  background: rgba(0, 174, 239, 0.15);
  border-color: rgba(0, 174, 239, 0.4);
  color: var(--auth-gold-light);
}

.mb-auth-visual-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.mb-auth-visual-desc {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.mb-auth-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mb-auth-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

.feat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--auth-gold);
  box-shadow: 0 0 8px var(--auth-glow);
  flex-shrink: 0;
}

/* ── 폼 영역 ── */
.mb-auth-form-wrap {
  padding: 36px 34px 28px;
  background: linear-gradient(180deg, var(--auth-panel-2) 0%, var(--auth-panel) 100%);
  border-left: 1px solid var(--auth-border);
  overflow-y: auto;
  max-height: min(90vh, 680px);
}

.mb-auth-form-wrap-scroll {
  max-height: min(92vh, 720px);
}

.mb-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mb-auth-brand-logo {
  justify-content: center;
}

.mb-auth-brand-img {
  display: block;
  height: 80px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.mb-auth-brand-img-register {
  height: 56px;
}

.mb-auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--auth-gold-light) 0%, var(--auth-gold) 50%, var(--auth-gold-dark) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 4px 16px rgba(0, 174, 239, 0.3);
}

.mb-auth-brand-text {
  display: block;
  color: var(--auth-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.mb-auth-brand-sub {
  display: block;
  color: var(--auth-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.mb-auth-title {
  margin: 0 0 6px;
  background: linear-gradient(90deg, var(--auth-gold-light), var(--auth-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mb-auth-recommend-hint {
  margin: -4px 0 14px;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.45;
}

.mb-auth-sub {
  margin: -6px 0 16px;
  color: var(--auth-muted);
  font-size: 13px;
}

.mb-auth-label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mb-auth-field {
  margin-bottom: 14px;
}

.mb-auth-field input,
.mb-auth-select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--auth-text);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.mb-auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.mb-auth-field input:focus,
.mb-auth-select:focus {
  outline: none;
  border-color: rgba(0, 174, 239, 0.5);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}

.mb-auth-field-icon {
  position: relative;
}

.mb-auth-field-icon input {
  padding-left: 42px;
}

.mb-auth-field-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 174, 239, 0.55);
  pointer-events: none;
  display: flex;
}

.mb-auth-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.mb-auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.mb-auth-form-grid .mb-auth-field-full {
  grid-column: 1 / -1;
}

.mb-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.mb-auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.mb-auth-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mb-auth-check-box {
  width: 18px;
  height: 18px;
  border: 1px solid var(--auth-border);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}

.mb-auth-check input:checked + .mb-auth-check-box {
  background: linear-gradient(135deg, var(--auth-gold), var(--auth-gold-dark));
  border-color: var(--auth-gold);
}

.mb-auth-check input:checked + .mb-auth-check-box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #111;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── 버튼 ── */
.mb-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  letter-spacing: 0.02em;
}

.mb-auth-btn:active {
  transform: scale(0.98);
}

.mb-auth-btn-primary {
  background: linear-gradient(135deg, var(--auth-gold-light) 0%, var(--auth-gold) 45%, var(--auth-gold-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 174, 239, 0.35);
}

.mb-auth-btn-primary:hover {
  box-shadow: 0 6px 28px rgba(0, 174, 239, 0.45);
  filter: brightness(1.05);
}

.mb-auth-btn-gold {
  background: transparent;
  border: 1px solid rgba(0, 174, 239, 0.45);
  color: var(--auth-gold-light);
}

.mb-auth-btn-gold:hover {
  background: rgba(0, 174, 239, 0.08);
  color: var(--auth-gold-light);
}

.mb-auth-alert {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.mb-auth-alert-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.mb-auth-alert-success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.mb-auth-switch {
  margin: 16px 0 0;
  text-align: center;
  color: var(--auth-muted);
  font-size: 13px;
}

.mb-auth-link {
  border: 0;
  background: none;
  color: var(--auth-gold-light);
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mb-auth-link:hover {
  color: var(--auth-gold);
}

.mb-auth-trust {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--auth-border);
}

.mb-auth-trust span {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mb-auth-trust span::before {
  content: '✓ ';
  color: rgba(0, 174, 239, 0.5);
}

.mb-auth-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ── 비회원 헤더 버튼 ── */
.page-guest .mb-header {
  background: linear-gradient(180deg, rgba(18, 18, 22, 0.98) 0%, rgba(10, 10, 12, 0.98) 100%);
  border-bottom-color: rgba(0, 174, 239, 0.12);
}

.mb-btn-login {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--auth-text);
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
}

.mb-btn-login:hover {
  border-color: rgba(0, 174, 239, 0.5);
  color: var(--auth-gold-light);
  background: rgba(0, 174, 239, 0.06);
}

.mb-btn-register {
  background: linear-gradient(135deg, var(--auth-gold-light) 0%, var(--auth-gold) 50%, var(--auth-gold-dark) 100%);
  color: #fff;
  border: 0;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 174, 239, 0.3);
}

.mb-btn-register:hover {
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 174, 239, 0.4);
  filter: brightness(1.06);
}

.mb-btn-ico {
  font-size: 10px;
  opacity: 0.7;
}

.mb-guest-chip {
  color: var(--auth-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ── 비회원 메인 CTA ── */
.mb-guest-cta {
  display: flex;
  gap: 12px;
  margin: -8px 0 20px;
  flex-wrap: wrap;
}

.mb-guest-cta-btn {
  flex: 1;
  min-width: 140px;
  height: 48px;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.mb-guest-cta-btn:active {
  transform: scale(0.98);
}

.mb-guest-cta-login {
  background: linear-gradient(135deg, var(--auth-gold-light), var(--auth-gold-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 174, 239, 0.3);
}

.mb-guest-cta-register {
  background: transparent;
  border: 1px solid rgba(0, 174, 239, 0.4);
  color: var(--auth-gold-light);
}

.mb-guest-cta-register:hover {
  background: rgba(0, 174, 239, 0.08);
}

.page-guest .mb-promo-banner-content h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-guest .mb-promo-banner-tag {
  background: rgba(0, 174, 239, 0.2);
  border: 1px solid rgba(0, 174, 239, 0.35);
  color: var(--auth-gold-light);
}

/* ── 드로어 ── */
.mb-drawer-nav button {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: #e5e7eb;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.mb-drawer-nav button:hover {
  background: rgba(0, 174, 239, 0.06);
  color: var(--auth-gold-light);
}

/* ── 반응형 ── */
@media (max-width: 768px) {
  .mb-auth-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .mb-auth-visual {
    display: none;
  }

  .mb-auth-form-wrap {
    padding: 28px 22px 24px;
    border-left: 0;
  }

  .mb-auth-modal,
  .mb-auth-modal-wide {
    width: 90vw;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
  }

  .mb-auth-modal.mb-auth-modal-login {
    width: 90vw;
    max-width: 90vw;
  }

  .mb-auth-title {
    font-size: 26px;
  }

  .mb-auth-form-grid {
    grid-template-columns: 1fr;
  }

  .mb-header-right .mb-btn-login,
  .mb-header-right .mb-btn-register {
    padding: 7px 12px;
    font-size: 12px;
  }
}
