/* ============================================================
   NobleWeb · noble_n theme — shared CSS
   Tailwind CDN handles utilities; this file covers custom classes
   ============================================================ */

:root { color-scheme: dark; }

html {
  overflow-x: hidden;
  max-width: 100%;
}

html, body {
  background: #0B0F19;
}
body {
  font-family: 'Pretendard', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

* {
  min-width: 0;
}

/* ── Grid backdrop ── */
.bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}
.bg-grid-fade {
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
}

/* ── Aurora ── */
.aurora::before, .aurora::after {
  content: ''; position: absolute; inset: -10% -10% auto -10%; height: 70%;
  background:
    radial-gradient(closest-side at 20% 30%, rgba(168,85,247,.35), transparent 70%),
    radial-gradient(closest-side at 70% 20%, rgba(59,130,246,.32), transparent 70%),
    radial-gradient(closest-side at 50% 80%, rgba(34,211,238,.18), transparent 70%);
  filter: blur(40px);
  z-index: 0; pointer-events: none;
}
.aurora::after {
  opacity: .6;
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(3%,-2%,0) scale(1.05); }
}

/* ── Gradient text ── */
.grad-text {
  background: linear-gradient(95deg, #fff 0%, #fff 35%, #A855F7 60%, #3B82F6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-text-2 {
  background: linear-gradient(95deg, #22D3EE, #A855F7);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Buttons ── */
.btn-neon {
  position: relative; isolation: isolate;
  background: linear-gradient(95deg, #6D28D9 0%, #3B82F6 100%);
  box-shadow: 0 10px 30px -10px rgba(99,102,241,.6), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-neon:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 16px 36px -10px rgba(99,102,241,.75), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-neon::after {
  content:''; position:absolute; inset:-1px; border-radius: inherit; z-index:-1;
  background: linear-gradient(95deg, #A855F7, #3B82F6, #22D3EE);
  filter: blur(14px); opacity: .55;
}
.btn-outline-neon {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(168,85,247,.45);
  transition: all .18s ease;
}
.btn-outline-neon:hover {
  border-color: rgba(168,85,247,.9);
  box-shadow: inset 0 0 0 1px rgba(168,85,247,.3), 0 0 24px -6px rgba(168,85,247,.5);
  background: rgba(168,85,247,.06);
}

/* ── Cards ── */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(20,26,43,.85) 0%, rgba(11,15,25,.85) 100%);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 20px;
}
.card-hover { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card-hover:hover { transform: translateY(-4px); border-color: rgba(168,85,247,.35); box-shadow: 0 20px 60px -30px rgba(168,85,247,.45); }
.card-premium {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(20,26,43,.95), rgba(11,15,25,.95)) padding-box,
    linear-gradient(135deg, #A855F7, #3B82F6, #22D3EE) border-box;
  box-shadow: 0 30px 80px -30px rgba(99,102,241,.6);
}

/* ── Misc components ── */
.chip {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(168,85,247,.10);
  border: 1px solid rgba(168,85,247,.28);
  color: #C4B5FD;
}
.hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,.45), rgba(59,130,246,.45), transparent);
}
.nav-blur {
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}

/* ── Form fields ── */
.field {
  background: rgba(7,9,18,.6);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  color: #E5E7EB;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field:focus { outline: none; border-color: rgba(168,85,247,.6); box-shadow: 0 0 0 4px rgba(168,85,247,.12); background: rgba(7,9,18,.85); }
.field::placeholder { color: rgba(229,231,235,.35); }

/* ── Reveal animation ── */
.reveal { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }
.reveal-armed { opacity: 0; transform: translateY(14px); }
.reveal-armed.in { opacity: 1; transform: none; }

/* ── Decorative ── */
.bg-dots {
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 18px 18px;
}
.check-dot { background: radial-gradient(closest-side, #22D3EE 30%, transparent 70%); }

/* ── Animations ── */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { animation: marquee 28s linear infinite; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(34,211,238,.55); }
  100% { box-shadow: 0 0 0 14px rgba(34,211,238,0); }
}
.pulse-dot { animation: pulse-ring 1.8s ease-out infinite; }

@keyframes grow { from { transform: scaleY(.1); } to { transform: scaleY(1); } }
.bar { transform-origin: bottom; animation: grow 1.2s cubic-bezier(.2,.7,.2,1) both; }

/* ── 모바일 가로 넘침 방지 ── */
img, video, iframe, table { max-width: 100%; }
.overflow-hidden { max-width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1F2540; border-radius: 10px; }
::-webkit-scrollbar-track { background: #0B0F19; }

/* ── TOC (privacy, terms, academy pages) ── */
.toc a { color: #94A3B8; padding: 6px 12px; border-radius: 8px; display: block; font-size: 12.5px; transition: all .15s; }
.toc a:hover { color: #fff; background: rgba(255,255,255,.04); }
.toc a.is-active { color: #fff; background: linear-gradient(95deg, rgba(168,85,247,.18), rgba(59,130,246,.10)); border-left: 2px solid #A855F7; padding-left: 10px; }
.toc .sub { font-size: 11.5px; padding-left: 22px; color: #64748B; }

/* ── Confetti (thanks page) ── */
.confetti-piece {
  position: fixed; top: -10px; width: 8px; height: 16px;
  border-radius: 2px; animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── G5 admin bar (preserve) ── */
#hd_login_msg { display: none; }

/* ── G5 로그인 폼 (bbs/login.php) 다크 스타일 ── */
#mb_login {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  margin-top: 64px;
  background: #0B0F19;
}
.mbskin_box {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, rgba(20,26,43,.9), rgba(11,15,25,.9));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 36px 32px;
}
.mbskin_box h1 { display: none; }
.mb_log_cate { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.mb_log_cate h2 { font-size: 20px; font-weight: 800; color: #fff; }
.mb_log_cate .join { font-size: 13px; color: #94a3b8; text-decoration: none; }
.mb_log_cate .join:hover { color: #a78bfa; }
#login_fs { border: none; padding: 0; }
#login_fs .frm_input {
  display: block; width: 100%; box-sizing: border-box;
  margin-bottom: 12px; padding: 14px 16px;
  background: rgba(7,9,18,.6); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; color: #e2e8f0; font-size: 14px; font-family: inherit;
}
#login_fs .frm_input:focus { outline: none; border-color: rgba(168,85,247,.6); box-shadow: 0 0 0 4px rgba(168,85,247,.12); }
#login_fs .frm_input::placeholder { color: rgba(229,231,235,.35); }
.btn_submit {
  display: block; width: 100%; padding: 14px;
  background: linear-gradient(95deg,#6D28D9,#3B82F6);
  border: none; border-radius: 12px; cursor: pointer;
  color: #fff; font-size: 15px; font-weight: 700; font-family: inherit;
  margin-top: 4px;
}
.btn_submit:hover { filter: brightness(1.1); }
#login_info { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 13px; }
.login_if_auto label { color: #94a3b8; cursor: pointer; }
.login_if_lpl a { color: #94a3b8; text-decoration: none; }
.login_if_lpl a:hover { color: #a78bfa; }
