* {
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

body {
  opacity: 0;
  background-color: #e5d6c1c7;
  margin-top: 10px;
  font-family: 'NanumBarunGothic';
}

#nav {
  left: 50%;
  display: flex;
  justify-content: space-between;
  margin: 10px;
}

#nav .left a {
  margin-left: 30%;
}

#nav .right a {
  margin-right: 30%;
}

#gotoindex {
  position: fixed;
  left: 0%;
  height: 100%;
  width: 7%;
  z-index: 2;
}

#gotowrite {
  position: fixed;
  right: 0%;
  height: 100%;
  width: 7%;
  z-index: 2;
}

#gotoindex:hover,
#gotowrite:hover {
  background-color: gray;
  opacity: 0.1;
}

#gotoindex .left {
  left: 42%;
}

#gotowrite .right {
  left: 58%;
}

#gotoindex button,
#gotowrite button {
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  outline: 0;
}

.arrow {
  cursor: pointer;
  position: absolute;
  top: 40%;
  margin-top: -45px;
  margin-left: -35px;
  width: 70px;
  opacity: 1;
  height: 90px;
}

svg {
  padding: 5px;
  opacity: 1;
}

.left:hover polyline,
.left:focus polyline {
  stroke-width: 3;
}

.left:active polyline {
  stroke-width: 6;
  transition: all 100ms ease-in-out;
}

.right:hover polyline,
.right:focus polyline {
  stroke-width: 3;
}

.right:active polyline {
  stroke-width: 6;
  transition: all 100ms ease-in-out;
}

polyline {
  transition: all 250ms ease-in-out;
}

#polaroidContainer {
  display: flex;
  flex-wrap: wrap;
  /* 줄 바꿈 설정 */
  justify-content: center;
  /* 가운데 정렬 */
  margin: 0 auto;
  /* 가운데 정렬을 위한 왼쪽과 오른쪽 여백 설정 */
}

#polaroidContainer .polaroid {
  background: #f3f3f3;
  border: 1px solid #dedede;
  width: 216px;
  height: 214px;
  box-shadow: 0px 0px 1px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  padding: 10px 10px;
  box-sizing: border-box;
  margin-right: 20px;
  /* 오른쪽 마진 설정 */
  margin-bottom: 20px;
  /* 아래쪽 마진 설정 */
}

#polaroidContainer .polaroid:after {
  bottom: 4px;
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.4);
  right: 4px;
  transform: skew(2deg, 2deg);
  position: absolute;
  z-index: -1;
  transition: all 0.4s ease;
  content: "";
  height: 200px;
  width: 90%;
}

#polaroidContainer .polaroid:hover:after {
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

#polaroidContainer .polaroid h5 {
  color: #7ac143;
  /* 일기 제목 색상 */
  font-size: 24px;
  margin-top: 4px;
  white-space: nowrap;
  /* 텍스트 줄바꿈 방지 */
  overflow: hidden;
  /* 넘침 처리 */
  text-overflow: ellipsis;
  /* 생략 부호(...) 표시 */
  z-index: 10;
  cursor: pointer;
}

#polaroidContainer .polaroid p {
  color: black;
  /* 일기 날짜 색상 */
  font-size: 14px;
}

#polaroidContainer .polaroid .content {
  color: black;
  /* 일기 내용 색상 */
  height: 75%;
  /* 내용 영역의 높이 설정 */
  overflow: hidden;
  /* 넘침 처리 */
  transition: opacity 1s ease-in;
  /* 투명도 변화 효과 설정 */
}

#polaroidContainer .polaroid .content.hide-content {
  opacity: 0;
  /* 일기 내용 클릭 시 검은색으로 변환 */
}

.diary-list .polaroid {
  transition: all 0.3s ease;
}

#all,
#joy,
#sad,
#timid,
#angry {
  width: 70px;
  height: 70px;
  margin-left: 10px;
  margin-top: 10px;
  background: #ebebeb;
  box-shadow: inset 0px 4px 4px rgba(0, 0, 0, 0.25);
  border: 0px;
  border-radius: 50px;
}

#all {  background: #ebebeb;  box-shadow: inset 0px 4px 4px rgba(0, 0, 0, 0.25);}
#joy {  background: #fffadb;  box-shadow: inset 0px 4px 4px rgba(142, 131, 32, 0.25);}
#sad {  background: #e4eaff;  box-shadow: inset 0px 4px 4px rgba(34, 39, 123, 0.25);}
#timid {  background: #f6e9ff;  box-shadow: inset 0px 4px 4px rgba(163, 45, 202, 0.25);}
#angry {  background: #ffe4e4;  box-shadow: inset 0px 4px 4px rgba(202, 45, 45, 0.25);}
#all:hover {  background-color: rgb(255, 255, 255);}
#joy:hover {  background-color: rgb(255, 242, 120);}
#sad:hover {  background-color: rgb(157, 180, 255);}
#timid:hover {  background-color: rgb(208, 137, 239);}
#angry:hover {  background-color: rgb(255, 128, 109);}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* 확대된 보기 스타일 설정 */
#diaryDetail {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background-color: white;
  z-index: 9999;
  padding: 20px;
  overflow-y: auto;
  transition: opacity 1s ease;
  opacity: 0;
  /* 초기 투명도 설정 */
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

#diaryDetail .content {
  margin-bottom: 10px;
}

#diaryDetail h2 {
  color: #7ac143;
  font-size: 30px;
  margin-bottom: 10px;
}

#diaryDetail p {
  color: black;
  font-size: 18px;
  margin-bottom: 10px;
}

#diaryDetail button {
  background-color: #7ac143;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

#diaryDetail .delete {
  background-color: red;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-size: 18px;
}
