/* ==========================================================
   ELECT — LOGIN v2 (Navy / Antique Gold Stadium)
   반응형 단일 템플릿(templates/site/login.html) 전용 자립형 스타일시트.
   기존 style.css 의 .login-wrap / .btn-login 규칙에 의존하지 않는다.
   ========================================================== */

/* ----------------------------------------------------------
   1. DESIGN TOKENS  (색상 하드코딩 금지 — 전부 var() 로 참조)
   ---------------------------------------------------------- */
:root {
  /* Base */
  --lg-bg-void: #060912;
  --lg-bg-base: #0a0d18;
  --lg-bg-surface: #121828;
  --lg-bg-elevated: #1a2136;
  --lg-bg-inset: #0d1220;

  /* Brand — Antique Gold (로고 골드 실측 #896B45·#AB8D62·#D0B485·#EFD8AA 기준) */
  --lg-gold-100: #f3e6c4;
  --lg-gold-300: #e6c98a;
  --lg-gold-500: #cfa85f;
  --lg-gold-600: #b08a45;
  --lg-gold-700: #7a5c2e;

  /* Brand — Steel Blue (로고 네이비와 맞물리는 서브 액센트, 변수명 유지) */
  --lg-green-300: #8fb0e8;
  --lg-green-500: #6f93d8;
  --lg-green-700: #3f63a8;

  /* Text */
  --lg-text-hi: #f2f1ec;
  --lg-text-md: #c4c6cf;
  --lg-text-lo: #9aa0b0;
  --lg-text-mute: #6a7086;

  /* Borders */
  --lg-border-hairline: rgba(207, 168, 95, 0.12);
  --lg-border-soft: rgba(242, 241, 236, 0.08);
  --lg-border-gold: rgba(207, 168, 95, 0.35);

  /* Glow */
  --lg-glow-gold-sm: 0 0 12px rgba(207, 168, 95, 0.4);
  --lg-glow-gold-md: 0 0 24px rgba(207, 168, 95, 0.5), 0 0 48px rgba(207, 168, 95, 0.25);
  --lg-glow-gold-lg: 0 0 32px rgba(207, 168, 95, 0.6), 0 0 80px rgba(207, 168, 95, 0.35);
  --lg-glow-inset-gold: inset 0 0 20px rgba(207, 168, 95, 0.15);

  /* Radius */
  --lg-r-sm: 8px;
  --lg-r-md: 12px;
  --lg-r-lg: 16px;
  --lg-r-xl: 24px;
  --lg-r-pill: 999px;

  /* Type */
  --lg-font-kr: 'Pretendard Variable', 'Pretendard', 'Nanum Gothic', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --lg-font-en: 'Bebas Neue', 'Oswald', 'Helvetica Neue', sans-serif;
  --lg-font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Elevation */
  --lg-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
  --lg-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);

  /* Motion */
  --lg-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --lg-dur-fast: 180ms;
  --lg-dur-med: 320ms;

  /* Layout */
  --lg-field-h: 48px;
}

/* ----------------------------------------------------------
   2. RESET / PAGE SHELL
   ---------------------------------------------------------- */
body#login,
body.lg-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--lg-bg-void);
  color: var(--lg-text-hi);
  font-family: var(--lg-font-kr);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.lg-body *,
.lg-body *::before,
.lg-body *::after { box-sizing: border-box; }

.lg-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 28% 38%, rgba(207, 168, 95, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 80% at 92% 92%, rgba(63, 99, 168, 0.09), transparent 60%),
    linear-gradient(180deg, var(--lg-bg-base) 0%, var(--lg-bg-void) 100%);
}

/* 그리드 앰비언트 — 스타디움 라인 느낌 */
.lg-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(207, 168, 95, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(207, 168, 95, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 90%);
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 90%);
  pointer-events: none;
  z-index: 0;
}

.lg-shell {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 40px 48px 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

/* ----------------------------------------------------------
   3. HERO (좌측 브랜드 영역)
   ---------------------------------------------------------- */
.lg-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  /* 좌측 컬럼 안에서 히어로 블록(로고+문구+스탯)을 가운데 정렬 */
  margin-left: auto;
  margin-right: auto;
}
/* 로고 폭만 바꾸면 글로우/펄스는 비율에 상관없이 따라간다 (현재 로고 logo-v.webp 660x773 세로형) */
.lg-hero__logo-wrap {
  position: relative;
  width: 300px;
  max-width: 100%;
  margin-bottom: 4px;
}
.lg-hero__logo-wrap::before {
  content: '';
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse at center, rgba(207, 168, 95, 0.3), transparent 62%);
  filter: blur(30px);
  z-index: 0;
  pointer-events: none;
}
.lg-hero__logo-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 32px rgba(207, 168, 95, 0.45)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
  animation: lg-glow-pulse 3.4s ease-in-out infinite;
}
.lg-hero__tagline {
  font-family: var(--lg-font-en);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: var(--lg-text-hi);
  margin: 28px 0 12px;
}
.lg-hero__tagline em {
  font-style: normal;
  background: linear-gradient(90deg, var(--lg-green-500), var(--lg-gold-300));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lg-hero__desc {
  margin: 0;
  max-width: 480px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--lg-text-md);
}
.lg-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--lg-border-soft);
  max-width: 540px;
}
.lg-hero__stat b {
  display: block;
  font-family: var(--lg-font-en);
  font-weight: 500;
  font-size: 34px;
  line-height: 1;
  color: var(--lg-gold-300);
  text-shadow: 0 0 12px rgba(207, 168, 95, 0.3);
}
.lg-hero__stat span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--lg-text-lo);
}

/* ----------------------------------------------------------
   4. PANEL (우측 폼 영역)
   ---------------------------------------------------------- */
.lg-panel {
  width: 100%;
  max-width: 440px;
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.lg-card {
  margin: 0;
  padding: 28px;
  background: linear-gradient(180deg, rgba(26, 33, 54, 0.95), rgba(13, 18, 32, 0.95));
  border: 1px solid var(--lg-border-gold);
  border-radius: var(--lg-r-xl);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    var(--lg-shadow-lg),
    inset 0 1px 0 rgba(207, 168, 95, 0.1),
    0 0 40px rgba(207, 168, 95, 0.08);
}
.lg-card__title {
  margin: 0 0 4px;
  font-family: var(--lg-font-en);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: 0.05em;
  color: var(--lg-text-hi);
}
.lg-card__subtitle {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--lg-text-lo);
}

/* 로그아웃/에러 안내 */
.lg-notice {
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid var(--lg-border-gold);
  border-radius: var(--lg-r-md);
  background: rgba(207, 168, 95, 0.08);
  color: var(--lg-gold-300);
  font-size: 13px;
  line-height: 1.5;
}

/* --- Field --- */
.lg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.lg-field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--lg-text-md);
}
.lg-input {
  width: 100%;
  height: var(--lg-field-h);
  padding: 0 16px;
  background: var(--lg-bg-inset);
  border: 1px solid var(--lg-border-soft);
  border-radius: var(--lg-r-md);
  color: var(--lg-text-hi);
  font-family: var(--lg-font-kr);
  font-size: 15px;
  outline: none;
  transition: border-color var(--lg-dur-fast) var(--lg-ease),
              box-shadow var(--lg-dur-fast) var(--lg-ease),
              background-color var(--lg-dur-fast) var(--lg-ease);
}
.lg-input::-webkit-input-placeholder { color: var(--lg-text-mute); }
.lg-input::placeholder { color: var(--lg-text-mute); }
.lg-input:focus {
  border-color: var(--lg-gold-500);
  background: var(--lg-bg-elevated);
  box-shadow: var(--lg-glow-gold-sm), var(--lg-glow-inset-gold);
}

/* --- Captcha --- */
.lg-captcha {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 10px;
}
.lg-captcha__img {
  height: var(--lg-field-h);
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--lg-border-hairline);
  border-radius: var(--lg-r-md);
  background: var(--lg-bg-inset);
  cursor: pointer;
  transition: border-color var(--lg-dur-fast) var(--lg-ease),
              box-shadow var(--lg-dur-fast) var(--lg-ease);
}
.lg-captcha__img:hover {
  border-color: var(--lg-border-gold);
  box-shadow: var(--lg-glow-gold-sm);
}

/* --- Actions --- */
.lg-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
/* 한 줄 전체를 차지하는 버튼 (로그인, 무기명가입 숨김 시의 회원가입) */
.lg-btn--full { grid-column: 1 / -1; }
.lg-btn {
  height: var(--lg-field-h);
  padding: 0 20px;
  border: none;
  border-radius: var(--lg-r-md);
  font-family: var(--lg-font-kr);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--lg-dur-fast) var(--lg-ease),
              box-shadow var(--lg-dur-fast) var(--lg-ease),
              background-color var(--lg-dur-fast) var(--lg-ease);
}
.lg-btn--primary {
  background: linear-gradient(180deg, var(--lg-gold-300) 0%, var(--lg-gold-500) 50%, var(--lg-gold-600) 100%);
  color: #171e2d;
  box-shadow: var(--lg-glow-gold-md), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.lg-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--lg-glow-gold-lg), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.lg-btn--primary:active { transform: translateY(0); }
.lg-btn--ghost {
  background: transparent;
  border: 1px solid var(--lg-border-gold);
  color: var(--lg-gold-300);
}
.lg-btn--ghost:hover {
  background: rgba(207, 168, 95, 0.08);
  box-shadow: var(--lg-glow-gold-sm);
}

/* ----------------------------------------------------------
   5. EVENTS / CHANNELS
   ---------------------------------------------------------- */
.lg-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lg-events__label {
  margin-bottom: 2px;
  font-family: var(--lg-font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lg-text-lo);
  text-align: center;
}
.lg-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  /* <a> 로 렌더될 때 기본 링크 색/밑줄이 붙지 않도록 (호버는 테두리/글로우로만 표현) */
  color: inherit;
  text-decoration: none;
  background: rgba(26, 33, 54, 0.6);
  border: 1px solid var(--lg-border-hairline);
  border-radius: var(--lg-r-md);
  cursor: pointer;
  transition: border-color var(--lg-dur-fast) var(--lg-ease),
              box-shadow var(--lg-dur-fast) var(--lg-ease),
              transform var(--lg-dur-fast) var(--lg-ease);
}
.lg-event:hover {
  border-color: var(--lg-border-gold);
  box-shadow: var(--lg-glow-gold-sm);
  transform: translateX(2px);
}
.lg-event__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.lg-event__icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.lg-event__icon--telegram { background: linear-gradient(135deg, #26a5e4, #0088cc); box-shadow: 0 0 12px rgba(38, 165, 228, 0.35); }
.lg-event__icon--kakao    { background: linear-gradient(135deg, #fee500, #f5d400); color: #3c1e1e; box-shadow: 0 0 12px rgba(254, 229, 0, 0.35); }
.lg-event__icon--tether   { background: linear-gradient(135deg, #26a17b, #1a8062); box-shadow: 0 0 12px rgba(38, 161, 123, 0.4); }
.lg-event__icon--bonus    { background: linear-gradient(135deg, var(--lg-gold-500), var(--lg-gold-700)); color: #171e2d; box-shadow: 0 0 12px rgba(207, 168, 95, 0.35); }
.lg-event__icon--folder   { background: linear-gradient(135deg, #9333ea, #6d28d9); }
.lg-event__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--lg-text-hi);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lg-event__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--lg-text-lo);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lg-event__arrow {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--lg-gold-300);
}

/* ----------------------------------------------------------
   6. FOOTER
   ---------------------------------------------------------- */
.lg-footer {
  position: relative;
  z-index: 2;
  padding: 4px 24px 18px;
  text-align: center;
  font-family: var(--lg-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--lg-text-mute);
}
.lg-footer__age {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--lg-border-soft);
  border-radius: var(--lg-r-pill);
  color: var(--lg-text-lo);
}

/* ----------------------------------------------------------
   7. ANIMATION
   ---------------------------------------------------------- */
@keyframes lg-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 24px rgba(207, 168, 95, 0.4)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5)); }
  50%      { filter: drop-shadow(0 0 36px rgba(207, 168, 95, 0.7)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5)); }
}
@media (prefers-reduced-motion: reduce) {
  .lg-hero__logo-img { animation: none; }
  .lg-btn, .lg-event, .lg-input { transition: none; }
}

/* ----------------------------------------------------------
   8. RESPONSIVE
   ---------------------------------------------------------- */

/* 세로가 짧은 데스크탑(노트북 800~880px) — 스크롤 없이 한 화면에 들어오도록 압축 */
@media (min-width: 1101px) and (max-height: 880px) {
  .lg-shell { padding: 28px 48px 16px; }
  .lg-panel { gap: 14px; }
  .lg-card { padding: 24px; }
  .lg-card__subtitle { margin-bottom: 16px; }
  .lg-field { margin-bottom: 10px; }
  .lg-events { gap: 5px; }
  .lg-event { padding: 8px 14px; }
  .lg-footer { padding: 2px 24px 14px; }
}

/* 태블릿 / 좁은 데스크탑 — 1단 스택 */
@media (max-width: 1100px) {
  .lg-shell {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 32px 24px;
    align-items: start;
  }
  .lg-hero {
    align-items: center;
    text-align: center;
  }
  .lg-hero__logo-wrap {
    width: 240px;
    margin-bottom: 0;
  }
  .lg-hero__tagline { font-size: 38px; margin-top: 20px; }
  .lg-hero__desc { max-width: 560px; }
  .lg-hero__stats {
    justify-content: center;
    gap: 28px;
    margin-top: 28px;
    width: 100%;
    max-width: 560px;
  }
  .lg-panel {
    justify-self: center;
    max-width: 480px;
  }
}

/* 모바일 */
@media (max-width: 640px) {
  :root { --lg-field-h: 48px; }

  .lg-page {
    background:
      radial-gradient(ellipse 100% 50% at 50% 12%, rgba(207, 168, 95, 0.18), transparent 60%),
      radial-gradient(ellipse 100% 40% at 50% 100%, rgba(63, 99, 168, 0.1), transparent 60%),
      var(--lg-bg-base);
  }
  .lg-page::before { background-size: 40px 40px; }

  .lg-shell {
    padding: 28px 20px 20px;
    gap: 24px;
  }
  .lg-hero__logo-wrap { width: 190px; }
  .lg-hero__tagline { font-size: 30px; margin: 14px 0 0; }

  /* 모바일은 로고 → 폼 → 이벤트 순서가 우선 — 설명 문단은 숨겨 로그인 버튼을 첫 화면 안에 둔다 */
  .lg-hero__desc { display: none; }

  /* 모바일에서는 스탯 줄을 3분할 그리드로 압축 */
  .lg-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
  }
  .lg-hero__stat b { font-size: 26px; }
  .lg-hero__stat span { font-size: 12px; letter-spacing: 0.04em; }

  .lg-card {
    padding: 20px;
    border-radius: var(--lg-r-lg);
  }
  .lg-card__title { font-size: 28px; }
  .lg-card__subtitle { margin-bottom: 18px; }

  .lg-captcha { grid-template-columns: 120px 1fr; }
  .lg-actions { grid-template-columns: 1fr 1fr; }

  .lg-footer { font-size: 12px; letter-spacing: 0.04em; }
  .lg-footer__age { display: block; margin: 8px auto 0; width: -webkit-fit-content; width: fit-content; }
}

/* 초소형 단말 */
@media (max-width: 360px) {
  .lg-hero__stats { gap: 8px; }
  .lg-hero__stat b { font-size: 22px; }
  .lg-captcha { grid-template-columns: 108px 1fr; }
}
