.agreement-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.agreement-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.agreement-modal-container {
  background: #1a1a1a;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.agreement-modal-overlay.active .agreement-modal-container {
  transform: scale(1);
}

.agreement-modal-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.agreement-modal-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  flex: 1;
  margin-right: 16px;
}

.agreement-modal-body {
  padding: 24px;
}

.agreement-modal-content {
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.6;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  word-break: break-all;
  overflow-wrap: break-word;
}

.agreement-modal-content p {
  margin: 0 0 16px 0;
}

.agreement-modal-content ol {
  margin: 16px 0;
  padding-left: 20px;
}

.agreement-modal-content li {
  margin-bottom: 12px;
}

.agreement-modal-content li:last-child {
  margin-bottom: 0;
}

.agreement-modal-content a {
  color: #bfdfff;
  text-decoration: underline;
  font-weight: 600;
}

.agreement-modal-content a:visited {
  color: #bfdfff;
}

.agreement-modal-close-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.agreement-modal-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.agreement-modal-close-btn:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.agreement-modal-close-icon {
  width: 20px;
  height: 20px;
}

/* 스크롤바 스타일링 */
.agreement-modal-container::-webkit-scrollbar {
  width: 6px;
}

.agreement-modal-container::-webkit-scrollbar-track {
  background: #2a2a2a;
  border-radius: 3px;
}

.agreement-modal-container::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

.agreement-modal-container::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .agreement-modal-container {
    width: 95%;
    max-height: 85vh;
  }

  .agreement-modal-header {
    padding: 20px 20px 12px 20px;
  }

  .agreement-modal-body {
    padding: 20px;
  }

  .agreement-modal-title {
    font-size: 18px;
  }

  .agreement-modal-content {
    font-size: 13px;
  }
}
