:root {
  --text: #f4f7ff;
  --muted: #d5d9e4;
  --pill: rgba(255, 255, 255, 0.18);
  --pill-border: rgba(255, 255, 255, 0.4);
  --badge-dark: rgba(0, 0, 0, 0.45);
  --bar: rgba(8, 10, 16, 0.7);
  --bar-border: rgba(255, 255, 255, 0.1);
  --hero-image: url("/images/CryWolfMobile.png");
  --footer-height: 96px;   /* 🔥 하단 바(footer) 대략 높이 */
  --header-height: 72px;   /* 🔥 새로 추가 */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b0d17;
  color: var(--text);
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

p {
  margin: 0;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.main-area {
  padding: 0;
}

.hero-viewport {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--header-height) + 48px) 18px 72px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  max-width: 860px;
  width: 100%;
}

.brand-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.brand-logo {
  font-size: 1.1rem;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.hero-copy .lede {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 12px;
}

.link-row {
  display: inline-flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.link-pill {
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--pill);
  border: 1px solid var(--pill-border);
  color: #fdfdff;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.store-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.store-badge.google {
  width: 176px;
  height: 52px;
}

.store-badge.apple {
  width: 156px;
  height: 52px;
}

.store-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-placeholder {
  background: #0b0d17;
  padding: 120px 0;
}

.content-max {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px;
}

.shop-card {
  padding: 42px 36px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.shop-card h2 {
  margin-top: 12px;
  font-size: 1.8rem;
}

.app-shell.home-fullbg {
  /* 전체 페이지 배경 이미지 */
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.app-shell.home-fullbg .main-area {
  position: relative;
  min-height: calc(100vh - var(--footer-height));
  z-index: 0;
}

.app-shell.home-fullbg .main-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
          180deg,
          rgba(0, 0, 0, 0.65) 0%,
          rgba(5, 8, 15, 0.85) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.app-shell.home-fullbg .hero-viewport {
  position: relative;
  z-index: 1;
}

.app-shell.home-fullbg .shop-placeholder {
  background: transparent;
  position: relative;
  z-index: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e8edf7;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--muted);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  background: var(--bar);
  border-bottom: 1px solid var(--bar-border);
  backdrop-filter: blur(12px);
}

.site-footer {
  min-height: var(--footer-height);
  /* 기존에 있던 배경/패딩/정렬 등은 그대로 두고 여기에만 추가 */
}

.footer-inner {
  padding: 2px;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  color: #f6f8ff;
}

.nav-shell {
  width: 100%;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f6f8ff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #7cf7ff, #ff69c6);
  color: #050712;
}

.brand-mark-img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  display: block;
}

.brand-word {
  font-size: 1rem;
}

.footer-meta {
  display: grid;
  gap: 4px;
  max-width: 760px;
}

.company-info {
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
  color: #e8edf7;
  line-height: 1.5;
}

.company-info .copyright {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: 0.92rem;
}

.footer-link {
  color: #e8edf7;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-link:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.login-ui {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.login-panel {
  display: inherit;
  align-items: inherit;
  gap: inherit;
}

.login-input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #93a6ba;
  background: #e7f1ff;
  color: #0b0d17;
  min-width: 180px;
  outline: none;
}

.login-input::placeholder {
  color: #6b7287;
}

.btn-login {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #93A6BA;
  background: linear-gradient(135deg, #cff4fc, #f2f4ff);
  color: #0b0d17;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}

.btn-login.is-loading::after {
  content: "...";
  margin-left: 6px;
  font-weight: 700;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f6f8ff;
}

.user-greeting {
  font-weight: 700;
}

.admin-link {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f6f8ff;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.admin-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
  background: rgba(0, 0, 0, 0.72);
}

.btn-logout {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #dfe5f5;
  background: #0b0d17;
  color: #f6f8ff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.btn-logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
}

.login-ui.shake {
  animation: shake 0.4s ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes shake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-6px); }
  60% { transform: translateX(6px); }
  75% { transform: translateX(-6px); }
  100% { transform: translateX(0); }
}

.ghost-link {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f6f8ff;
}

.social-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-btn {
  height: 40px;
  width: 40px;
  border-radius: 12px;
  border: 1px solid #93A6BA;
  background: linear-gradient(145deg, #cff4fc, #f2f4ff);
  color: #f6f8ff;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.social-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, #8fa9c7, #f2f4ff);
  border-color: #eef2fc;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.social-icon-img {
  height: 20px;
  width: 20px;
  object-fit: contain;
  display: block;
}

.login-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10;
}

.login-modal.is-open {
  display: block;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.login-modal__dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 32px));
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(242, 244, 255, 0.98));
  color: #0b0d17;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  border: 1px solid #dfe5f5;
}

.login-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.login-modal__subtitle {
  color: #4b5568;
  margin: 0 0 14px;
}

.login-modal__close {
  background: transparent;
  border: 1px solid #dfe5f5;
  color: #0b0d17;
  border-radius: 10px;
  height: 32px;
  width: 32px;
  cursor: pointer;
}

.login-modal__form {
  display: grid;
  gap: 10px;
}

.login-modal .modal-password {
  width: 100%;
  min-width: 0;
}

.policy-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 48px) 18px 120px;
  display: grid;
  gap: 18px;
}

.policy-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.lang-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lang-switch .link-pill {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.lang-switch .link-pill.active {
  background: #f4f7ff;
  color: #0b0d17;
  border-color: #f4f7ff;
}

.policy-frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.policy-frame iframe {
  width: 100%;
  height: 72vh;
  border: none;
  background: #fff;
}

@media (max-width: 600px) {
  .brand-badge {
    position: static;
    justify-self: center;
    margin-bottom: 8px;
  }

  .login-ui {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .login-input {
    min-width: 140px;
    flex: 1 1 100%;
  }
}

/* Admin page */
.admin-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(var(--header-height, 80px) + 32px) 18px 120px;
  display: grid;
  gap: 18px;
}

.admin-header h1 {
  margin: 0;
}

.admin-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.3);
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  gap: 10px;
}

.field-label {
  font-weight: 700;
  color: #f6f8ff;
}

.toggle-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-toggle {
  gap: 6px;
}

.toggle-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  color: #f6f8ff;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.toggle-btn.is-active {
  background: linear-gradient(135deg, #cff4fc, #f2f4ff);
  color: #0b0d17;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.lang-form-list {
  display: grid;
  gap: 12px;
}

.lang-form {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 10px;
}

.lang-form__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #f6f8ff;
  font-weight: 700;
}

.lang-code-pill {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

.lang-form .admin-input,
.lang-form .admin-textarea {
  background: #f4f7ff;
}

.lang-hint {
  margin: 6px 0 0;
}

.range-inputs {
  align-items: flex-start;
}

.range-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.range-pair {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.range-input {
  width: 120px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #dfe5f5;
  background: #f4f7ff;
  color: #0b0d17;
}

.range-tilde {
  font-weight: 700;
  color: #f6f8ff;
}

.btn-add-range {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dfe5f5;
  background: #0b0d17;
  color: #f6f8ff;
  cursor: pointer;
}

.selection-summary {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #f6f8ff;
}

.admin-input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #dfe5f5;
  background: #f4f7ff;
  color: #0b0d17;
}

.notice-schedule .schedule-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.schedule-field {
  display: grid;
  gap: 6px;
  color: #f6f8ff;
}

.reward-list {
  display: grid;
  gap: 10px;
}

.reward-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.2);
}

.reward-field {
  display: grid;
  gap: 6px;
  color: #f6f8ff;
}

.btn-add-reward,
.btn-remove-reward {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dfe5f5;
  background: #0b0d17;
  color: #f6f8ff;
  cursor: pointer;
}

.event-card .event-header {
  display: grid;
  gap: 6px;
}

.event-card .event-header h2 {
  margin: 0;
}

.event-tier-list {
  display: grid;
  gap: 14px;
}

.event-tier {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  display: grid;
  gap: 12px;
}

.event-tier__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #f6f8ff;
  font-weight: 700;
}

.event-tier__header .admin-input {
  width: 120px;
}

.event-tier__body {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: end;
}

.event-tier__body .admin-input {
  margin-top: 4px;
}

.event-tier__rewards {
  display: grid;
  gap: 10px;
}

.btn-add-tier,
.btn-remove-tier {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dfe5f5;
  background: #0b0d17;
  color: #f6f8ff;
  cursor: pointer;
}

.admin-datetime {
  background: #f4f7ff;
}

.admin-textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #dfe5f5;
  background: #f4f7ff;
  color: #0b0d17;
  min-height: 160px;
}

.credits-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: calc(var(--header-height, 80px) + 32px) 18px 120px;
}

.credits-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.3);
  color: #f6f8ff;
  display: grid;
  gap: 12px;
}

.credits-list {
  display: grid;
  gap: 12px;
}

.credits-list dt {
  font-weight: 700;
}

.credits-list dd {
  margin: 4px 0 0;
  color: #dbe6ff;
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-send {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dfe5f5;
  background: linear-gradient(135deg, #8fa9c7, #f2f4ff);
  color: #0b0d17;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.send-status {
  color: #f6f8ff;
}
