/* ============================================================
   서버 점검 모드
   - 점검 안내 화면 (일반 회원)
   - 운영자 상단 배너
   - 관리자 페이지 상태 카드
   ============================================================ */

/* ---------- 점검 안내 화면 ---------- */
.gg-maint {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: var(--bg);
}

.gg-maint-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(20, 45, 90, .12);
  padding: 38px 30px 30px;
  text-align: center;
  animation: ggMaintPop .45s cubic-bezier(.22, .9, .3, 1) backwards;
}

@keyframes ggMaintPop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.gg-maint-duck {
  display: block;
  margin: 0 auto;
  width: 108px;
  height: 108px;
  object-fit: contain;
  /* (2026-08-25) 기본 아바타 — 작게 줄일 때 pixelated 는 외곽선을 끊으므로 auto */
  image-rendering: auto;
  animation: ggMaintBob 2.4s ease-in-out infinite;
}

@keyframes ggMaintBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.gg-maint-tag {
  display: inline-block;
  margin: 12px 0 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e8f1ff;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .1em;
}

.gg-maint-title {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 900;
  color: var(--tx);
}

.gg-maint-msg {
  margin: 0 0 20px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--tx-sub);
  white-space: normal;
  word-break: keep-all;
}

/* ---------- 완료 예정 시각 + 남은 시간 ---------- */
.gg-maint-eta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ffe2b8;
  background: #fff8ec;
}

.gg-maint-eta-label {
  padding: 3px 9px;
  border-radius: 999px;
  background: #ffb020;
  color: #4a2600;
  font-size: 10.5px;
  font-weight: 900;
}

.gg-maint-eta-when {
  font-size: 14px;
  font-weight: 900;
  color: #a8620f;
}

.gg-maint-eta-left {
  font-size: 12px;
  font-weight: 800;
  color: #c2761a;
}

/* ---------- 안내 문구 아래 자동 안내 (종료 예정 · 점검 보상) ---------- */
.gg-maint-auto {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ffe2b8;
  background: #fff8ec;
}

.gg-maint-arow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gg-maint-akey {
  padding: 3px 9px;
  border-radius: 999px;
  background: #ffb020;
  color: #4a2600;
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}

.gg-maint-aval {
  font-size: 14px;
  font-weight: 900;
  color: #a8620f;
}

.gg-maint-aval.is-reward {
  font-size: 16px;
  color: #1158c3;
}

.gg-maint-aleft {
  font-size: 12px;
  font-weight: 800;
  color: #c2761a;
}

.gg-maint-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 22px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3f8ff;
  font-size: 12px;
  font-weight: 800;
  color: #5b7ba8;
}

.gg-maint-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: ggMaintBlink 1.3s ease-in-out infinite;
}

@keyframes ggMaintBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

.gg-maint-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 운영자 상단 배너 ---------- */
.gg-maint-bar {
  position: sticky;
  top: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 14px;
  background: linear-gradient(180deg, #ffb020, #ff8f1f);
  color: #4a2600;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(120, 70, 0, .22);
}

.gg-maint-bar-txt b { font-weight: 900; }

.gg-maint-bar-btn {
  border: none;
  border-radius: 999px;
  height: 26px;
  padding: 0 14px;
  background: #4a2600;
  color: #ffd9a0;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
}

.gg-maint-bar-btn:disabled { opacity: .5; cursor: default; }

/* ---------- 관리자 페이지 상태 카드 ---------- */
.gg-maint-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #dcedd9;
  background: #f2fbf3;
}

.gg-maint-state.is-on {
  border-color: #f6ddb4;
  background: #fff7ea;
}

.gg-maint-state b {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: #2f7d3a;
  margin-bottom: 3px;
}

.gg-maint-state.is-on b { color: #c2761a; }

.gg-maint-state small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--tx-sub);
  line-height: 1.6;
}

.gg-maint-state-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #43b75a;
  box-shadow: 0 0 0 4px rgba(67, 183, 90, .18);
}

.gg-maint-state.is-on .gg-maint-state-dot {
  background: #ff9f1a;
  box-shadow: 0 0 0 4px rgba(255, 159, 26, .2);
  animation: ggMaintBlink 1.3s ease-in-out infinite;
}

.gg-maint-eta-inline {
  display: inline-block;
  margin-top: 5px;
  color: #c2761a;
  font-weight: 900;
}

/* ---------- 자동 해제 시간 입력 ---------- */
.gg-maint-when-input {
  width: 220px;
  height: 40px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--tx);
}

.gg-maint-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gg-maint-preset {
  border: 1px solid var(--card-border);
  border-radius: 999px;
  height: 30px;
  padding: 0 14px;
  background: #f5f9ff;
  color: #4a6a9c;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.gg-maint-preset:hover { background: #e8f1ff; }

.gg-maint-preset.is-on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ---------- 운영자 배너 안의 자동 해제 안내 ---------- */
.gg-maint-bar-eta {
  font-weight: 900;
  opacity: .92;
}

/* ============================================================
   점검 안내 갱신 강조 — 운영자가 문구를 바꾸고 회원이 "지금 다시 확인"을 누르면
   ============================================================ */
.gg-maint-card.is-updated { animation: ggMaintFlash .9s ease-out; }
@keyframes ggMaintFlash {
  0%   { box-shadow: 0 0 0 0 rgba(59, 122, 224, .45); }
  100% { box-shadow: 0 0 0 16px rgba(59, 122, 224, 0); }
}

/* ============================================================
   점검 완료 보상 안내 팝업
   ============================================================ */
.gg-maint-rw {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(24, 48, 84, .45);
  backdrop-filter: blur(2px);
  animation: ggMaintRwIn .22s ease-out;
}
.gg-maint-rw.is-out { opacity: 0; transition: opacity .2s ease; }
@keyframes ggMaintRwIn { from { opacity: 0; } }
.gg-maint-rw-card {
  position: relative;
  width: min(92vw, 440px);
  max-height: 90dvh; overflow-y: auto;
  padding: 26px 24px 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e7f0fb;
  box-shadow: 0 20px 50px rgba(40, 80, 150, .28);
  text-align: center;
  animation: ggMaintRwPop .28s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes ggMaintRwPop { from { transform: scale(.9) translateY(10px); opacity: 0; } }
.gg-maint-rw-duck {
  width: 92px; height: 92px; object-fit: contain;
  image-rendering: pixelated; margin-bottom: 6px;
}
.gg-maint-rw-tag {
  display: inline-block; margin-bottom: 10px;
  padding: 4px 12px; border-radius: 999px;
  background: #e8f2ff; color: #2f6fe0;
  font-size: 11px; font-weight: 900; letter-spacing: 1px;
}
.gg-maint-rw-title { margin: 0 0 12px; font-size: 17px; font-weight: 900; color: var(--tx); }
.gg-maint-rw-msg {
  margin: 0 0 14px; font-size: 13px; font-weight: 700;
  line-height: 1.75; color: var(--tx-sub);
}
.gg-maint-rw-amt {
  margin: 0 0 14px; padding: 14px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff9ec, #fff3dc);
  border: 1px solid #ffe0a8;
  font-size: 12.5px; font-weight: 800; color: #8a6413; line-height: 1.8;
}
.gg-maint-rw-amt b { display: block; margin: 4px 0; font-size: 24px; font-weight: 900; color: #d98c07; }
.gg-maint-rw-close { width: 100%; margin-top: 4px; }

/* ============================================================
   점검 시작 예약 — 사전 안내 띠
     예약 시각 30분 전부터 화면 맨 위에 뜬다.
     점검 중 운영자 배너(.gg-maint-bar)와 색을 달리해 헷갈리지 않게 한다.
   ============================================================ */
.gg-maint-soon {
  position: sticky;
  top: 0;
  z-index: 8990;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 14px;
  background: linear-gradient(180deg, #4f96ff, #2470ef);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(30, 80, 180, .24);
}
.gg-maint-soon-txt b { font-weight: 900; font-variant-numeric: tabular-nums; }
.gg-maint-soon-sub { opacity: .85; font-weight: 700; }

@media (max-width: 767px) {
  .gg-maint-soon { font-size: 11.5px; padding: 8px 12px; }
  .gg-maint-soon-sub { display: none; }
}
