/* 기본 설정 */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Poppins', 'Noto Sans KR', sans-serif;
  background: linear-gradient(135deg, #0c1529, #06101e);
  overflow: hidden;
  
}

/* 배경 효과 */
.cyber-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 40% 40%, rgba(15,157,255,0.08), transparent 70%);
  z-index: 0;
}

/* 로그인 셸 */
.login-shell {
  position: absolute;
  top: 25%;  /* ← 원래는 50%였음 */
  left: 90%;
  transform: translate(-50%, -50%);
  padding: 20px;
  width: 100%;
}



/* 카드 회전 컨테이너 */
.login-glass-container {
  perspective: 1200px;
  width: 100%;
  max-width: 360px;
  position: center;
}

/* 카드 본체 */
.login-glass {
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
  transform-origin: 59.9% 40.1%;  /* ✅ 중심 고정 */
  width: 100%;
  max-width: 360px;
}


/* 앞/뒷면 공통 */
.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 40px rgba(15, 157, 255, 0.1);
  backdrop-filter: blur(12px);
  backface-visibility: hidden;
  transition: opacity 0.4s ease;
}

/* 앞면 */
.card-face.front {
  transform: rotateY(0deg);
  z-index: 2;
}

/* 뒷면 */
.card-face.back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* 카드 뒤집기 */
.login-glass-container.flipped .login-glass {
  transform: rotateY(180deg);
}

/* 텍스트 스타일 */
.card-face h1 {
  font-size: 22px;
  font-weight: 600;
  color: #e1efff;
  margin-bottom: 10px;
}

.sub-text {
  font-size: 14px;
  color: #90a5bd;
  margin-bottom: 30px;
}

/* 폼 요소 */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

form input {
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
  color: #dcefff;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

form input::placeholder {
  color: #8ca1b6;
}

form input:focus {
  outline: none;
  border-color: #0f8fff;
  box-shadow: 0 0 8px #0f8fff77;
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.05);
}

/* 버튼 */
form button {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  color: white;
  background: linear-gradient(to right, #0f8fff, #0055b0);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

form button::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.1);
  transition: left 0.4s ease;
}

form button:hover {
  background: linear-gradient(to right, #00aaff, #0060c2);
}

form button:hover::after {
  left: 100%;
}

/* 고객사 버튼 */
.customer-link-btn {
  display: inline-block;
  padding: 12px 24px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #dcefff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.customer-link-btn:hover {
  background: rgba(15, 157, 255, 0.2);
  color: #ffffff;
  transform: scale(1.05);
}

/* 텍스트 */
.help-text {
  margin-top: 25px;
  font-size: 13px;
  color: #9fb3c8;
}

.error-message {
  margin-top: 10px;
  font-size: 14px;
  color: #ff6b6b;
}

/* 애니메이션 */
@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-zoom {
  animation: zoomIn 0.6s ease-out forwards;
}

.animate-fade {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-delay {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
  animation-delay: 0.4s;
}

.animate-fade-delay-more {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
  animation-delay: 0.8s;
}

.animate-slide-up {
  opacity: 0;
  animation: slideUp 0.8s ease-out forwards;
  animation-delay: 0.3s;
}
/* 📱 모바일 최적화 */
@media (max-width: 768px) {
  .login-shell {
    top: 20%;       /* 세로 가운데 정렬 */
    left: 55%;      /* 가로 가운데 정렬 */
    transform: translate(-59.9%, -40.1%);
    padding: 10px;
    width: 80%;     /* 화면 너비에 맞춤 */
  }

  .login-glass-container,
  .login-glass {
    max-width: 100%; /* 카드 크기 자동 조정 */
  }

  .card-face {
    padding: 25px 20px;
  }

  form input, form button {
    font-size: 14px;
    padding: 12px;
  }

  .card-face h1 {
    font-size: 18px;
  }

  .sub-text {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .customer-link-btn {
    font-size: 13px;
    padding: 10px 18px;
  }

  .help-text {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .card-face {
    padding: 20px 15px;
  }

  .card-face h1 {
    font-size: 16px;
  }

  form input, form button {
    font-size: 13px;
    padding: 10px;
  }

  .customer-link-btn {
    font-size: 12px;
    padding: 8px 14px;
  }
}
/* 로딩 스피너 */
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #0f8fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 15px auto 0;
  display: none;
}
/* 아이디 저장 체크박스 라벨 */
.remember-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9fb3c8;
  margin: -10px 0 15px 0; /* 버튼과 간격 조절 */
  width: 100%;
  justify-content: flex-start;
}

.remember-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #0f8fff; /* 체크 색상 */
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
