/* diary-list.css */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #f6f7fb;
  font-family: Arial, sans-serif;
  color: #222;
}

.diary-container {
  background: #f5f6fa;
  border-radius: 20px;
  padding: 24px;
}

.diary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.diary-header h1 {
  margin: 0;
  font-size: 28px;
}

.header-right {
  display: flex;
  gap: 8px;
}

.header-right input {
  width: 240px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

button {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background-color: #333;
  color: #fff;
  cursor: pointer;
}

button:hover {
  background-color: #555;
}

.diary-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.diary-card {
  padding: 20px;
  background-color: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.diary-card:hover {
  transform: translateY(-2px);
  transition: 0.2s;
}

.diary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.diary-title {
  margin: 0;
  font-size: 20px;
}

.diary-date {
  font-size: 14px;
  color: #777;
}

.diary-preview {
  margin: 12px 0;
  line-height: 1.6;
  color: #444;
}

.diary-meta {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: #666;
}

.empty-area,
.loading-area {
  margin-top: 40px;
  text-align: center;
  color: #777;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.pagination button {
  min-width: 36px;
  background-color: #fff;
  color: #333;
  border: 1px solid #ddd;
}

.pagination button.active {
  background-color: #333;
  color: #fff;
}

.pagination button:hover {
  background-color: #eee;
  color: #333;
}

/* 테이블 기본 스타일 */
.diary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 헤더 스타일 */
.diary-table thead {
  background-color: #333;
  color: #fff;
}

.diary-table th,
.diary-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

/* 행 hover 효과 */
.diary-table tbody tr:hover {
  background-color: #f6f7fb;
  transition: 0.2s;
}

/* 상세 페이지 css */

.diary-detail-card {
  padding: 40px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.diary-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.diary-detail-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
}

.diary-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 24px 0;
}

.diary-detail-content {
  min-height: 350px;
  line-height: 2;
  font-size: 16px;
  color: #444;
  white-space: pre-wrap;
}

.diary-meta {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.diary-meta span {
  background: #f5f6fa;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

#btnDelete {
  background-color: #c0392b;
}

#btnDelete:hover {
  background-color: #a93226;
}

/* AI 감정 분석 카드 */

.ai-analysis-card {
  margin-top: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid #eef0f7;
}

.ai-analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.ai-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7c83ff;
  text-transform: uppercase;
}

.ai-analysis-header h3 {
  margin: 0;
  font-size: 22px;
  color: #222;
}

.btn-ai {
  background: #6c63ff;
  color: #fff;
}

.btn-ai:hover {
  background: #5a52d8;
}

.ai-analysis-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.emotion-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.emotion-icon {
  width: 56px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #eef0ff;
  border-radius: 50%;
  font-size: 28px;
}

.emotion-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.emotion-desc {
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
  color: #666;
}

.emotion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emotion-tags span {
  padding: 7px 12px;
  background: #eef0ff;
  border-radius: 999px;
  font-size: 13px;
  color: #555fd6;
}

.ai-comment-box {
  padding: 18px 20px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #edf0f5;
}

.ai-comment-title {
  margin: 0 0 8px;
  font-weight: 700;
  color: #333;
}

.ai-comment-box p:last-child {
  margin: 0;
  line-height: 1.7;
  color: #555;
}

/* 숨기기 */
.hidden {
  display: none !important;
}
