::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: #fff !important;
}

::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: #0a0a0a !important;
}

::-webkit-scrollbar-thumb:hover {
  background: #0a0a0a !important;
}

.notice {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 0 10px;
}
.notice .container {
  background: white;
  border-radius: 24px;
  position: relative;
  z-index: 101;
  max-height: 600px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.1) 0px 2px 4px -2px;
  view-transition-name: container;
  overflow: hidden;
}
.notice .container .list {
  overflow-y: auto;
  max-height: 500px;
  min-height: 240px;
}
.notice .container .list-item:nth-child(1) {
  margin-bottom: -8.5%;
  z-index: 8;
}
.notice .container .list-item:nth-child(2) {
  margin-bottom: -8.5%;
  transform: scale(0.95);
  z-index: 7;
}
.notice .container .list-item:nth-child(3) {
  margin-bottom: -8.5%;
  transform: scale(0.9);
  z-index: 6;
}
.notice .container .list-item:nth-child(4) {
  margin-bottom: -8.5%;
  transform: scale(0.85);
  z-index: 5;
}
.notice .container .list-item:nth-child(5) {
  margin-bottom: -8.5%;
  transform: scale(0.8);
  z-index: 4;
}
.notice .container .list-item:nth-child(6) {
  transform: scale(0.75);
  z-index: 3;
}
.notice .container .list-item:nth-child(n+7) {
  display: none;
}
.notice .container .hide {
  display: none;
}
.notice .container.expanded {
  overflow: hidden;
}
.notice .container.expanded .list-item:nth-child(1n) {
  margin-bottom: 0;
  transform: scale(1);
}
.notice .container.expanded .list-item:nth-child(n+7) {
  display: flex;
}
.notice .container.expanded .show {
  display: none;
}
.notice .container.expanded .hide {
  display: block;
}
.notice .container.expanded .show-hide-btn svg {
  transform: rotate(180deg);
  transition: transform 0.6s;
}
.notice .list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  view-transition-name: list;
}
.notice .list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: 16px;
  border: 1px solid #e4e4e7;
  cursor: pointer;
  width: 100%;
  box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.1) 0px 2px 4px -2px;
  transition: transform 0.3s ease;
}
.notice .list-item:hover {
  transform: translateY(-2px);
}
.notice .icon {
  width: 48px;
  height: 48px;
  background: #18181b;
  border-radius: 12px;
  display: grid;
  place-items: center;
  display: none;
}
.notice .icon svg {
  width: 24px;
  height: 24px;
  color: white;
}
.notice .content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: calc(100% - 88px);
}
.notice .title {
  font-size: 16px;
  font-weight: 500;
  color: #18181b;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 280px;
  width: 95%;
}
.notice .subtitle {
  font-size: 14px;
  color: #71717a;
}
.notice .date {
  font-size: 14px;
  color: #71717a;
  width: 75px;
  min-width: 75px;
  text-align: right;
}
.notice .show-hide-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  margin: 8px auto 0 auto;
  width: 140px;
  background: none;
  color: #71717a;
  border: 1px solid #e4e4e7;
  border-radius: 24px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  view-transition-name: show-hide-btn;
}
.notice .show-hide-btn span {
  display: inline-block;
  text-align: center;
  width: fit-content;
}
.notice .show-hide-btn svg {
  transition: transform 0.3s;
  view-transition-name: show-hide-btn-icon;
}
.notice .container.expanded .show-hide-btn svg {
  transform: rotate(-180deg);
}
.notice .show,
.notice .hide {
  width: fit-content;
  view-transition-name: button-label;
}
@keyframes fade-out {
  0% {
    opacity: 1;
  }
  10% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.notice ::view-transition-group(*) {
  animation-duration: 0.6s;
  animation-timing-function: linear(0, 0.402 7.4%, 0.711 15.3%, 0.929 23.7%, 1.008 28.2%, 1.067 33%, 1.099 36.9%, 1.12 41%, 1.13 45.4%, 1.13 50.1%, 1.111 58.5%, 1.019 83.2%, 1.004 91.3%, 1);
}
.notice ::view-transition-old(*),
.notice ::view-transition-new(*) {
  height: 100%;
}
.notice ::view-transition-old(button-label),
.notice ::view-transition-new(button-label) {
  width: fit-content;
}
.notice ::view-transition-old(button-label) {
  animation-name: fade-out;
  animation-duration: 0.6s;
}

@media (max-width: 700px) {
  #main .notice .container {
    max-height: 400px;
    overflow: hidden;
  }
  #main .notice .container .list {
    max-height: 350px;
    overflow-y: auto;
  }
  #main .notice .container .list-item:nth-child(n+7) {
    display: none;
  }
  #main .notice .container.expanded {
    max-height: 400px;
    overflow: hidden;
  }
  #main .notice .container.expanded .list {
    max-height: 350px;
  }
  #main .notice .container.expanded .list-item:nth-child(n+4) {
    display: flex;
  }
  #main .notice .container.expanded .show {
    display: none;
  }
  #main .notice .container.expanded .hide {
    display: block;
  }
  #main .notice .container.expanded .show-hide-btn svg {
    transform: rotate(180deg);
    transition: transform 0.6s;
  }
}
.notice-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.notice-popup.active {
  display: flex;
}
.notice-popup .popup-content {
  background: white;
  width: 90%;
  max-width: 600px;
  border-radius: 16px;
  overflow: hidden;
  animation: popup-show 0.3s ease;
}
.notice-popup .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e4e4e7;
}
.notice-popup .popup-header .popup-title {
  font-size: 20px;
  font-weight: 600;
  color: #18181b;
  margin: 0;
}
.notice-popup .popup-header .close-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #71717a;
}
.notice-popup .popup-header .close-btn:hover {
  color: #18181b;
}
.notice-popup .popup-body {
  padding: 20px;
}
.notice-popup .popup-body .notice-title {
  font-size: 24px;
  font-weight: 600;
  color: #18181b;
  margin: 0 0 8px 0;
}
.notice-popup .popup-body .notice-date {
  font-size: 14px;
  color: #71717a;
  margin: 0 0 20px 0;
}
.notice-popup .popup-body .notice-content {
  font-size: 16px;
  line-height: 1.6;
  color: #18181b;
  height: 400px;
  overflow-y: auto;
}

@keyframes popup-show {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  .notice-popup .popup-body .notice-content {
    height: 300px;
    overflow-y: auto;
  }
}
