body {
  margin: 0;
}

.bg {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,0.58), transparent 28%),
    radial-gradient(circle at 84% 76%, rgba(47,196,124,0.28), transparent 30%),
    linear-gradient(135deg, #dff8e9, #b9edcf, #91ddb6);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  overflow: hidden;
}

.wrap {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  isolation: isolate;
}

/* 전체 화면 음식 아이콘 레이어 */
.icon-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.brand-pill,
.title,
.login-card,
.hint {
  position: relative;
  z-index: 10;
}

.brand-pill {
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.50);
  color: #1b5c43;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(14,84,55,0.08);
  backdrop-filter: blur(12px);
}

.title {
  min-height: 48px;
  margin: 0 0 26px 0;
  padding: 0 20px;
  text-align: center;
  font-size: clamp(27px, 4.5vw, 46px);
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: -1.2px;
  color: #123f2d;
  text-shadow: 0 1px 0 rgba(255,255,255,0.45);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* 로그인 카드 */
.login-card {
  width: min(82vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(18px);
  box-shadow:
    0 20px 50px rgba(15,63,45,0.14),
    inset 0 1px 0 rgba(255,255,255,0.7);
}

.login-title {
  margin-bottom: 6px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: #134b37;
}

.login-input {
  height: 56px;
  border: none;
  outline: none;
  border-radius: 18px;
  padding: 0 18px;
  background: rgba(255,255,255,0.88);
  color: #123f2d;
  font-size: 16px;
  font-weight: 600;
  transition: 0.2s;
}

.login-input:focus {
  box-shadow: 0 0 0 3px rgba(43,182,115,0.16);
}

.login-input::placeholder {
  color: rgba(18,63,45,0.42);
}

.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.login-btn,
.signup-btn {
  flex: 1;
  height: 56px;
  border: none;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s;
}

.login-btn {
  background: linear-gradient(135deg, #24be76, #11945d);
  color: white;
  box-shadow: 0 10px 24px rgba(17,148,93,0.32);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(17,148,93,0.42);
}

.signup-btn {
  background: rgba(255,255,255,0.72);
  color: #13523d;
  border: 1px solid rgba(19,82,61,0.08);
}

.signup-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.9);
}

.hint {
  margin-top: 18px;
  color: rgba(18,63,45,0.70);
  font-size: 14px;
  font-weight: 600;
}

/* 음식 아이콘 애니메이션 */
.icon-shell {
  position: absolute;
  left: -18vw;
  top: 0;
  will-change: transform;
  animation-name: moveAcross;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.food-icon {
  display: block;
  width: var(--size, 70px);
  height: auto;
  opacity: var(--opacity, 0.85);
  filter:
    blur(var(--blur, 0px))
    drop-shadow(0 6px 10px rgba(7,53,37,0.18));
  will-change: transform;
  animation-name: floatBob, floatRotate;
  animation-timing-function: ease-in-out, ease-in-out;
  animation-iteration-count: infinite, infinite;
  animation-duration: var(--bobDuration, 4s), var(--rotateDuration, 5s);
  animation-delay: var(--bobDelay, 0s), var(--rotateDelay, 0s);
}

@keyframes moveAcross {
  from {
    transform: translateX(-20vw);
  }
  to {
    transform: translateX(140vw);
  }
}

@keyframes floatBob {
  0%, 100% {
    transform: translateY(0) scale(var(--scale, 1));
  }
  50% {
    transform: translateY(var(--bob, -14px)) scale(var(--scale, 1));
  }
}

@keyframes floatRotate {
  0%, 100% {
    rotate: var(--rotateA, -5deg);
  }
  50% {
    rotate: var(--rotateB, 5deg);
  }
}

@media (max-width: 640px) {
  .login-card {
    width: min(82vw, 380px);
    padding: 24px;
  }
  .btn-group {
    flex-direction: column;
  }
  .hint {
    width: 80vw;
    text-align: center;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.modal-open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 32px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow:
          0 20px 50px rgba(15, 23, 42, 0.18),
          0 8px 20px rgba(15, 23, 42, 0.12);
  animation: modalFadeIn 0.2s ease-out;
}

/*.modal-content h2 {*/
/*  margin: 0 0 8px;*/
/*  font-size: 28px;*/
/*  color: #1e293b;*/
/*}*/

/*.modal-description {*/
/*  margin: 0 0 24px;*/
/*  color: #64748b;*/
/*  font-size: 14px;*/
/*}*/

/*.modal-close-button {*/
/*  position: absolute;*/
/*  top: 18px;*/
/*  right: 20px;*/
/*  width: 36px;*/
/*  height: 36px;*/
/*  border: none;*/
/*  border-radius: 50%;*/
/*  background: #f1f5f9;*/
/*  color: #475569;*/
/*  font-size: 24px;*/
/*  line-height: 1;*/
/*  cursor: pointer;*/
/*}*/

/*.modal-close-button:hover {*/
/*  background: #e2e8f0;*/
/*}*/

/*.form-group {*/
/*  margin-bottom: 18px;*/
/*}*/

/*.form-group label {*/
/*  display: block;*/
/*  margin-bottom: 7px;*/
/*  color: #334155;*/
/*  font-size: 14px;*/
/*  font-weight: 700;*/
/*}*/

/*.form-group input {*/
/*  width: 100%;*/
/*  box-sizing: border-box;*/
/*  padding: 13px 14px;*/
/*  border: 1px solid #cbd5e1;*/
/*  border-radius: 12px;*/
/*  color: #1e293b;*/
/*  background: #ffffff;*/
/*  font-size: 15px;*/
/*  outline: none;*/
/*}*/

/*.form-group input:focus {*/
/*  border-color: #38bdf8;*/
/*  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);*/
/*}*/

/*.field-error {*/
/*  margin: 6px 0 0;*/
/*  color: #dc2626;*/
/*  font-size: 13px;*/
/*}*/

/*.alert {*/
/*  margin-bottom: 18px;*/
/*  padding: 12px 14px;*/
/*  border-radius: 10px;*/
/*  font-size: 14px;*/
/*}*/

/*.alert-error {*/
/*  color: #b91c1c;*/
/*  background: #fef2f2;*/
/*  border: 1px solid #fecaca;*/
/*}*/

/*.signup-submit-button {*/
/*  width: 100%;*/
/*  margin-top: 8px;*/
/*  padding: 14px;*/
/*  border: none;*/
/*  border-radius: 12px;*/
/*  color: #ffffff;*/
/*  background: #0ea5e9;*/
/*  font-size: 16px;*/
/*  font-weight: 700;*/
/*  cursor: pointer;*/
/*}*/

/*.signup-submit-button:hover {*/
/*  background: #0284c7;*/
/*}*/

/*body.modal-active {*/
/*  overflow: hidden;*/
/*}*/

/*@keyframes modalFadeIn {*/
/*  from {*/
/*    opacity: 0;*/
/*    transform: translateY(12px) scale(0.98);*/
/*  }*/
/*  to {*/
/*    opacity: 1;*/
/*    transform: translateY(0) scale(1);*/
/*  }*/
/*}*/

/*@media (max-width: 520px) {*/
/*  .modal-content {*/
/*    padding: 28px 20px;*/
/*    border-radius: 20px;*/
/*  }*/
/*}*/

/* 회원가입 모달 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
/* JavaScript가 이 클래스를 추가하면 모달이 나타남 */
.modal.modal-open {
  display: flex;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}
.modal-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 32px;
  background-color: #ffffff;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  animation: signupModalOpen 0.2s ease-out;
}
.modal-content h2 {
  margin: 0 0 24px;
  text-align: center;
  color: #1f2937;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background-color: #f1f5f9;
  color: #475569;
  font-size: 24px;
  cursor: pointer;
}
.modal-close:hover {
  background-color: #e2e8f0;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}
.form-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
}
.form-group input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}
.signup-submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background-color: #0ea5e9;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.signup-submit-btn:hover {
  background-color: #0284c7;
}
/* 모달이 열렸을 때 뒤쪽 페이지 스크롤 방지 */
body.modal-active {
  overflow: hidden;
}
@keyframes signupModalOpen {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}