/* 배경 이미지에만 투명도를 적용하는 방법 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #97beeb;
  background-size: cover;
  background-position: center;
  opacity: 0.5; /* 배경 이미지 투명도 조절 */
  z-index: -1; /* 배경을 가장 뒤로 */
}

/* 로그인 컨테이너 */
.login-container {
  background-color: rgba(255, 255, 255, 0.95); /* 로그인 박스 배경 */
  padding: 2rem;
  border-radius: 0 0 0.625rem 0.625rem; /* 상단 좌우는 0으로, 나머지는 0.625rem로 설정 */
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 20rem;
  text-align: center;
  position: relative; /* 위치 상대적으로 설정 */
}

/* h4 스타일: 로그인 박스 상단에 배경색 적용, 여백 없애기 */
h4 {
  font-size: 1.3rem;
  color: white;
  background-color: #1a4a7a; /* 배경 색상 - #13355b 톤 유지, 명도만 조정 */
  font-weight: bold;
  margin: 0; /* 여백 없애기 */
  padding: 1rem 0; /* 상하 여백만 추가 */
  text-align: center;
  width: 100%; /* 전체 너비 */
  box-sizing: border-box; /* 여백 포함 */
  border-radius: 0.625rem 0.625rem 0 0; /* 상단 좌우는 0으로, 나머지는 0.625rem로 설정 */
}

/* 로고 텍스트 */
.logo-text {
  font-size: 2rem;
  font-weight: bold;
  color: #13355b;
  margin-bottom: 2.5rem;
  margin-top: 0.5rem;
}

/* html, body 기본 설정 */
html {
  height: 100%;
  overflow: hidden; /* 스크롤 방지 */
}

/* 로그인 박스 내 다른 요소들 */
body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  min-height: 100%;
  margin: 0;
  padding: 0;
  position: relative; /* 부모 요소의 상대적 위치 설정 */
  overflow: hidden; /* 스크롤 방지 */
}

/* 아이디/비밀번호 입력란 */
.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.875rem;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  font-size: 1rem;
  box-sizing: border-box;
}

.login-form input[type="password"] {
  margin-bottom: 0;
}

/* 로그인 버튼 */
.login-form button {
  background-color: #1976d2;
  color: white;
  border: none;
  margin-top: 1.5rem;
  margin-bottom: 0;
  border-radius: 0.75rem;
  width: 100%;
  height: 2.8125rem;
  max-width: 20rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
}

/* 로그인 버튼 내 아이콘 */
.login-form button img.login-icon,
.login-form button img.password-icon {
  position: absolute;
  left: 0.9375rem;
  width: 1.25rem;
  height: 1.25rem;
}


.exp {
  font-size: 0.9rem; /* 글씨 크기 */
  color: #d9534f; /* 경고용 빨간색 */
  font-weight: 500; /* 글씨 두께 */
  margin-top: 0rem;
  margin-bottom: 0.5rem;
  text-align: center; /* 중앙 정렬 */
  background-color: #f8d7da; /* 배경색: 밝은 빨간색 */
  padding: 0.5rem 1rem; /* 패딩을 주어 더 부각되게 */
  border-radius: 0.25rem; /* 둥근 모서리 */
  border: 1px solid #f5c6cb; /* 연한 빨간색 테두리 */
}

.tiptext {
  margin-top: 1.5rem;
  margin-bottom: 0;
  font-size: 0.8rem;
}
.tiptext a {
  font-size: 0.875rem; /* 기본 글씨 크기 */
  color: #5f6368; /* 밝은 회색-블루 */
  text-decoration: none; /* 밑줄 제거 */
  font-weight: 600; /* 글씨 두께 */
  transition: all 0.3s ease; /* 부드러운 전환 효과 */
}

.tiptext a:hover {
  color: #13355b; /* 호버 시 색상 변경 */
  text-decoration: underline; /* 밑줄 추가 */
}

.copyright {
  font-size: 0.875rem; /* 기본 글씨 크기 */
  margin-top: 1.5rem;
  margin-bottom: 0rem;
  color: #6a6b6d;
}

/* 모바일 화면을 위한 반응형 디자인 */
@media (max-width: 37.5rem) {
  html {
    height: 100%;
    overflow: hidden;
  }

  body {
    height: 100dvh; /* 동적 뷰포트 높이 사용 (모바일 주소창 고려) */
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .login-container {
    padding: 1.5rem;
    max-width: 17.5rem;
  }

  .logo-text {
    font-size: 1.5rem;
    margin-bottom: 1.5rem; /* 여백 줄임 */
    margin-top: 0.25rem;
  }

  .login-form input[type="text"],
  .login-form input[type="password"] {
    padding: 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }

  .login-form input[type="password"] {
    margin-bottom: 0;
  }

  .login-form button {
    font-size: 0.9375rem;
    height: 2.8125rem;
    max-width: 17.5rem;
    margin-top: 1.25rem;
  }

  .tiptext {
    margin-top: 1rem; /* 여백 줄임 */
  }

  .copyright {
    margin-top: 1rem; /* 여백 줄임 */
    font-size: 0.75rem; /* 폰트 크기 약간 줄임 */
  }
}

/* Flash 메시지 스타일 */
.flash-message {
  margin-bottom: 1.5rem;
}

.flash-message p.error {
  color: red; /* 빨간색 오류 메시지 */
  font-size: 1rem;
  text-align: center;
  margin-bottom: 0;
}
