* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-image: url("/bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-header {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #eef2f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
}

.input-box {
  flex: 1;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 15px;
}

.input-box textarea {
  width: 100%;
  height: 80vh;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: none;
  font-family: inherit;
}

.table-box {
  position: relative;
  flex: 2;
  overflow-y: auto;
  max-height: 100vh;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 15px;
  padding-bottom: 60px; /* 복사 버튼 및 메시지 공간 확보 */
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: #333;
}

th,
td {
  text-align: center;
  padding: 12px;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f7f9fb;
  color: #555;
  font-weight: 600;
}

tr:hover {
  background-color: #f0f8ff;
}

td img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

/* ChatGPT 스타일 복사 버튼 */

#copyTableBtn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  background-color: #f5f5f7;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

#copyTableBtn:hover {
  background-color: #e2e2e5;
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.1);
}

#copyTableBtn:active {
  background-color: #cacacb;
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.15);
}

#copyTableBtn svg {
  width: 16px;
  height: 16px;
  fill: #444;
}

/* 복사 완료 메시지 스타일 */
.copy-message {
  color: #878787;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.1s ease;
  user-select: none;
  white-space: nowrap;
  min-width: 120px;
}

.copy-message.visible {
  opacity: 1;
}

/* 복사 버튼 및 메시지 오른쪽 아래 고정 */
.table-header {
  position: absolute;
  bottom: 15px;
  right: 15px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0;
  background-color: transparent;
  z-index: 10;
}

/* 모바일 대응: 세로 배치 */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .input-box,
  .table-box {
    width: 100%;
    max-height: 50vh;
    overflow: auto;
  }

  .input-box textarea {
    height: 100%;
  }

  .table-header {
    position: static;
    margin-top: 10px;
    justify-content: center;
  }
}
