/* 기본 스타일 - Rosé Pine Dawn */
:root {
  color-scheme: light;
  --primary-color: #286983;
  --secondary-color: #56949f;
  --accent-color: #d7827e;
  --gradient-primary: linear-gradient(135deg, #286983 0%, #56949f 100%);
  --gradient-light: linear-gradient(135deg, #f4ede8 0%, #f2e9e1 100%);
  --background-color: #faf4ed;
  --card-bg-color: #fffaf3;
  --background-hover: #f2e9e1;
  --text-color: #575279;
  --text-secondary: #797593;
  --text-tertiary: #9893a5;
  --border-color: #dfdad9;
  --border-accent: rgba(40, 105, 131, 0.2);
  --shadow-sm: 0 1px 3px rgba(40, 105, 131, 0.1);
  --shadow-md: 0 4px 15px rgba(40, 105, 131, 0.15);
  --shadow-lg: 0 8px 25px rgba(40, 105, 131, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --transition: all 0.2s ease;
  --match-highlight: rgba(234, 157, 52, 0.18); /* 더 눈에 띄는 연노란색 배경 */
  --gold-color: #ea9d34;
  --gold-dark: #c9822e;
  --gold-gradient: linear-gradient(135deg, #ea9d34 0%, #c9822e 100%);
  --author-color: #56949f;
  --author-gradient: linear-gradient(135deg, #56949f 0%, #286983 100%);
  --keyword-color: #907aa9;
  --keyword-gradient: linear-gradient(135deg, #907aa9 0%, #6f5b87 100%);
  --love: #b4637a;
  --header-bg: rgba(255, 255, 255, 0.8);
  --footer-bg: #fff;
}

/* 다크모드 - Rosé Pine (수동 토글: data-theme, 미지정 시 OS 설정) */
:root[data-theme="dark"] {
    color-scheme: dark;
    --primary-color: #31748f;
    --secondary-color: #9ccfd8;
    --accent-color: #ebbcba;
    --gradient-primary: linear-gradient(135deg, #31748f 0%, #9ccfd8 100%);
    --gradient-light: linear-gradient(135deg, #21202e 0%, #26233a 100%);
    --background-color: #191724;
    --card-bg-color: #1f1d2e;
    --background-hover: #26233a;
    --text-color: #e0def4;
    --text-secondary: #908caa;
    --text-tertiary: #6e6a86;
    --border-color: #403d52;
    --border-accent: rgba(156, 207, 216, 0.25);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.5);
    --match-highlight: rgba(246, 193, 119, 0.15);
    --gold-color: #f6c177;
    --gold-dark: #e0a458;
    --gold-gradient: linear-gradient(135deg, #f6c177 0%, #e0a458 100%);
    --author-color: #9ccfd8;
    --author-gradient: linear-gradient(135deg, #9ccfd8 0%, #31748f 100%);
    --keyword-color: #c4a7e7;
    --keyword-gradient: linear-gradient(135deg, #c4a7e7 0%, #9a7fbe 100%);
    --love: #eb6f92;
  --header-bg: rgba(25, 23, 36, 0.8);
  --footer-bg: #1f1d2e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
  background-color: var(--background-hover);
}

.button:hover {
  background-color: var(--border-color);
}

.button.primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.button.primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: var(--transition);
  color: var(--primary-color);
}

.icon-button:hover {
  background-color: rgba(40, 105, 131, 0.1);
}

/* 레이아웃 컨테이너 */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 헤더 */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: var(--text-color);
  transition: var(--transition);
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.logo-image {
  height: 36px;
  width: auto;
}

.site-title {
  font-size: 18px;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-content h1 {
  font-size: 20px;
  font-weight: 600;
}

.github-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 24px;
  background: var(--gradient-primary);
  color: white;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
}

.github-button:hover {
  background: var(--gradient-primary);
  text-decoration: none !important;
  transform: translateY(-1px);
  color: white;
  box-shadow: var(--shadow-md);
}

.github-button svg {
  fill: white;
}

.github-text {
  font-weight: 500;
}

.github-stats {
  display: flex;
  gap: 6px;
}

.star-badge,
.fork-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

.star-badge svg {
  fill: white;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

.fork-badge svg {
  fill: white;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

.star-count,
.fork-count {
  color: white;
  font-weight: 600;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.date-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 2px;
}

.date-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: var(--text-color);
}

/* 카테고리 내비게이션 바 */
.category-nav {
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 70px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center; /* 중앙 정렬 */
  transition: background-color 0.2s ease;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-label-container {
  display: flex;
  align-items: center;
  max-width: 1440px; /* main 컨테이너의 max-width와 동일 */
  width: 100%;
  padding: 10px 24px 5px 24px; /* 상하 패딩 축소 */
  margin: 0 auto; /* 중앙 정렬 */
  position: relative;
}

.category-nav-label, .filter-nav-label {
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-right: 8px; /* 우측 여백 축소 */
  white-space: nowrap;
  min-width: 90px; /* 너비 축소 (120px -> 90px) */
  letter-spacing: 0.3px; /* 자간 축소 */
  font-size: 14px; /* 폰트 크기 축소 */
  text-transform: uppercase;
  opacity: 1; /* 불투명도 증가 */
  position: relative;
  z-index: 1;
  padding-left: 3px; /* 좌측 패딩 축소 */
}

/* 장식선 제거 CSS 규칙 */
.category-nav-label::after, .keyword-nav-label::after {
  content: none; /* 장식선 제거 */
}

.category-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  width: 100%;
  justify-content: flex-start; /* 좌측 정렬로 변경 */
  flex-wrap: nowrap; /* 줄바꿈 금지 */
  white-space: nowrap; /* 내용이 줄바꿈되지 않도록 보장 */
  /* 마우스 휠 가로 스크롤 지원 추가 */
  overflow-y: hidden;
}

.filter-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  width: 100%;
  justify-content: flex-start; /* 좌측 정렬로 변경 */
  flex-wrap: nowrap; /* 줄바꿈 금지 */
  white-space: nowrap; /* 내용이 줄바꿈되지 않도록 보장 */
  /* 마우스 휠 가로 스크롤 지원 추가 */
  overflow-y: hidden;
}

/* Text search UI */
.text-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.text-search .search-input-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--background-hover);
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  padding: 4px 8px;
}

#textSearchInput {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-color);
  width: 220px;
}

.text-search .clear-x {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: rgba(0,0,0,0.08);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.text-search .clear-x:hover {
  background-color: rgba(0,0,0,0.14);
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-label-container {
  display: flex;
  align-items: center;
  max-width: 1440px; /* main 컨테이너의 max-width와 동일 */
  width: 100%;
  padding: 10px 24px 5px 24px; /* category 태그 컨테이너와 일치 유지 */
  margin: 0 auto; /* 중앙 정렬 */
  position: relative;
}

.category-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 12px;
  background-color: var(--background-hover);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  margin: 0 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 12px;
  background-color: var(--background-hover);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  margin: 0 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  min-width: 20px;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  font-size: 12px;
  padding: 0 6px;
  transition: var(--transition);
}

.category-button:hover {
  background-color: var(--border-color);
  color: var(--text-color);
}

.keyword-tag:hover {
  background-color: var(--border-color);
  color: var(--text-color);
}

.category-button.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* 저자 버튼 스타일 */
.author-button {
  background-color: rgba(40, 105, 131, 0.08); /* primary tint */
  color: var(--primary-color);
  border: 1px solid rgba(40, 105, 131, 0.25);
}

.author-button:hover {
  background-color: rgba(40, 105, 131, 0.12);
  border-color: rgba(40, 105, 131, 0.35);
}

.author-button.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(40, 105, 131, 0.25);
}

/* 키워드 버튼 스타일 */
.keyword-button {
  background-color: rgba(167, 139, 250, 0.10); /* accent tint */
  color: var(--accent-color);
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.keyword-button:hover {
  background-color: rgba(167, 139, 250, 0.14);
  border-color: rgba(167, 139, 250, 0.35);
}

.keyword-button.active {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  color: white;
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(167, 139, 250, 0.25);
}

.keyword-tag.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.category-button.active .category-count {
  background-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* 태그 애니메이션 효과 */
.keyword-tag.tag-appear,
.category-button.tag-appear {
  animation: tagAppear 0.3s ease;
}

.keyword-tag.tag-highlight,
.category-button.tag-highlight {
  animation: tagHighlight 1s ease;
}

@keyframes tagAppear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tagHighlight {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(40, 105, 131, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(40, 105, 131, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(40, 105, 131, 0.4);
  }
}

/* 메인 콘텐츠 영역 */
main {
  flex: 1;
  padding: 0 24px 24px 24px; /* 상단 여백을 0으로 수정, 좌우하단 여백 유지 */
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* 논문 컨테이너 - 그리드 뷰 */
.paper-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 24px;
  align-items: flex-start;
}

/* 논문 카드 - 그리드 뷰 */
.paper-card {
  background-color: var(--card-bg-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: visible;
  transition: var(--transition);
  cursor: pointer;
  height: auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.paper-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  background-color: var(--background-light);
}

.paper-card-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.paper-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.5;
  overflow: visible;
}

.paper-card-authors {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
  overflow: visible;
}

/* 저자 목록 항목 스타일 */
.paper-card-authors .author-item {
  display: inline;
  white-space: nowrap;
}

/* 저자 말줄임표 스타일 */
.paper-card-authors .author-ellipsis {
  display: inline;
  color: var(--text-tertiary);
  font-weight: 500;
  margin: 0 2px;
  user-select: none;
}

.paper-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.category-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: var(--background-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-accent);
}

.paper-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.paper-card-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: visible;
  margin-bottom: 20px;
  border-left: 3px solid var(--primary-color);
  padding-left: 12px;
  background-color: rgba(40, 105, 131, 0.05);
  padding: 12px;
  border-radius: 6px;
}

.paper-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.paper-card-date {
  font-size: 12px;
  color: var(--text-tertiary);
}

.paper-card-link {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 500;
}

/* 논문 상세 모달 */
.paper-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.paper-modal.active {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.paper-modal-content {
  background-color: var(--card-bg-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 90%;
  max-width: 800px;
  margin: 60px auto;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.paper-modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.paper-modal-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.paper-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.paper-modal-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.paper-modal-body p {
  margin-bottom: 16px;
  line-height: 1.6;
}

.paper-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.paper-navigation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.paper-modal-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.paper-modal-footer .button.icon-button {
  width: 40px;
  height: 40px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  border: none;
  background: none;
}

.paper-modal-footer .button.icon-button:not(.primary) {
  color: var(--text-primary);
}

.paper-modal-footer .button.icon-button:not(.primary):hover {
  color: var(--primary-color);
  transform: translateY(-1px);
}

/* Special styling for arXiv logo */
.paper-modal-footer #paperLink svg {
  width: 60px;
  height: 27px;
  margin: -2px -10px;
}

.paper-modal-footer .button.icon-button.primary {
  background: none;
}

.paper-modal-footer .button.icon-button.primary:hover {
  transform: translateY(-1px);
}

/* Tooltip styles */
.paper-modal-footer .button.icon-button::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  margin-bottom: 5px;
}

.paper-modal-footer .button.icon-button:hover::after {
  opacity: 1;
  visibility: visible;
}

.navigation-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.paper-position {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* 날짜 선택기 스타일 */
.date-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  pointer-events: none;
}

.date-picker-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.date-picker-content {
  background-color: var(--card-bg-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease forwards;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.date-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.date-picker-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.date-picker-body {
  padding: 0;
}

.date-picker-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--primary-color);
  text-align: center;
}

.flatpickr-container {
  margin-bottom: 20px;
  width: 100%;
}

.flatpickr-container input {
  display: none;
}

/* Make flatpickr calendar take full width */
.flatpickr-calendar {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.flatpickr-months {
  width: 100% !important;
  padding: 0;
  margin-bottom: 10px;
  background-color: transparent !important;
}

.flatpickr-month {
  background-color: transparent !important;
  color: var(--text-color) !important;
}

.flatpickr-current-month {
  padding: 0 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

.flatpickr-monthDropdown-months {
  font-weight: 600 !important;
  color: var(--text-color) !important;
}

.flatpickr-prev-month, .flatpickr-next-month {
  padding: 5px !important;
  fill: var(--primary-color) !important;
  color: var(--primary-color) !important;
}

.flatpickr-prev-month:hover, .flatpickr-next-month:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
  border-radius: 50% !important;
}

.flatpickr-weekdays {
  width: 100% !important;
  background-color: transparent !important;
  margin-bottom: 5px;
}

.flatpickr-weekday {
  height: 28px;
  line-height: 28px;
  flex: 1;
  background-color: transparent !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
}

.flatpickr-days {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  background-color: transparent !important;
}

.dayContainer {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  /* justify-content: flex-start !important; */
  padding: 0 !important;
}

.flatpickr-day {
  margin: 2px;
  height: 36px !important;
  line-height: 36px !important;
  border-radius: 50% !important;
  /* max-width: 36px !important; */
  width: calc(100% / 7 ) !important;
  flex: 0 0 calc(100% / 7 ) !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box !important;
  font-weight: 400 !important;
  color: var(--text-color) !important;
  border: none !important;
}

.flatpickr-day.today {
  border: none !important;
  background-color: rgba(40, 105, 131, 0.1) !important;
  color: var(--primary-color) !important;
  font-weight: 600 !important;
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, 
.flatpickr-day.startRange.inRange, 
.flatpickr-day.endRange.inRange, 
.flatpickr-day.selected:focus, 
.flatpickr-day.startRange:focus, 
.flatpickr-day.endRange:focus, 
.flatpickr-day.selected:hover, 
.flatpickr-day.startRange:hover, 
.flatpickr-day.endRange:hover, 
.flatpickr-day.selected.prevMonthDay, 
.flatpickr-day.startRange.prevMonthDay, 
.flatpickr-day.endRange.prevMonthDay, 
.flatpickr-day.selected.nextMonthDay, 
.flatpickr-day.startRange.nextMonthDay, 
.flatpickr-day.endRange.nextMonthDay {
  background: var(--gradient-primary) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-sm) !important;
}

.flatpickr-day.inRange, 
.flatpickr-day.prevMonthDay.inRange, 
.flatpickr-day.nextMonthDay.inRange, 
.flatpickr-day.today.inRange, 
.flatpickr-day.prevMonthDay.today.inRange, 
.flatpickr-day.nextMonthDay.today.inRange {
  background: rgba(40, 105, 131, 0.15) !important;
  border-color: transparent !important;
  color: var(--text-color) !important;
  box-shadow: none !important;
}

.flatpickr-day:hover, 
.flatpickr-day.prevMonthDay:hover, 
.flatpickr-day.nextMonthDay:hover, 
.flatpickr-day:focus, 
.flatpickr-day.prevMonthDay:focus, 
.flatpickr-day.nextMonthDay:focus {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: transparent !important;
}

.flatpickr-day.flatpickr-disabled, 
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay, 
.flatpickr-day.nextMonthDay, 
.flatpickr-day.notAllowed {
  color: rgba(87, 82, 121, 0.3) !important;
  background: transparent !important;
  cursor: not-allowed;
}

.date-range-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.02);
  margin: 16px -24px 0 -24px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  margin: 0 10px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 24px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input:checked + .toggle-slider {
  background: var(--gradient-primary);
}

input:focus + .toggle-slider {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(40, 105, 131, 0.2);
}

input:checked + .toggle-slider:before {
  transform: translate(20px, -50%);
}

.toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  user-select: none;
  min-width: 40px;
  text-align: center;
}

.date-quick-actions {
  display: flex;
  justify-content: center;
  padding: 8px 24px 16px 24px;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin: 0 -24px -24px -24px;
}

.date-quick-btn {
  width: 100%;
  padding: 8px 16px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.date-quick-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .header-content {
    padding: 12px 16px;
  }
  
  .header-center {
    position: static;
    transform: none;
    margin-bottom: 8px;
  }
  
  .header-left {
    display: none;
  }
  
  .header-controls {
    margin-left: auto;
  }
  
  .category-scroll {
    padding: 8px 16px;
    max-width: 100%; /* 모바일에서 전체 너비 차지 */
    justify-content: flex-start; /* 모바일에서 좌측 정렬 */
    flex-wrap: nowrap; /* 줄바꿈 방지 */
  }
  
  .filter-scroll {
    padding: 0 16px 8px;
    margin-top: -4px;
    gap: 6px;
    max-width: 100%; /* 모바일에서 전체 너비 차지 */
    justify-content: flex-start; /* 모바일에서 좌측 정렬 */
    flex-wrap: nowrap; /* 줄바꿈 방지 */
  }
  
  .category-button, .keyword-tag {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 14px;
    margin: 0 2px; /* 가로 여백으로 조정 */
  }
  
  main {
    padding: 0 16px 16px 16px; /* 카테고리/키워드 영역과 일치하도록 조정 */
    padding-left: 10px;
  }
  
  .paper-container {
    padding: 0;
    margin-top: 16px;
  }
  
  .keyword-tag-container {
    margin: 6px 16px 0;
    padding: 8px 12px;
  }
  
  .keyword-tag-header {
    margin-bottom: 6px;
  }
  
  .keyword-tags {
    gap: 6px;
    min-height: 24px;
    padding: 4px;
  }
  
  .keyword-tags .keyword-tag {
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 12px;
  }
  
  .paper-modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .paper-sections {
    flex-direction: column;
  }
  
  .date-picker-content {
    width: 95%;
  }
}

/* 로딩 상태 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spinner 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* 푸터 */
footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 24px;
  margin-top: auto;
  transition: background-color 0.2s ease;
}

.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* 논문 인덱스 번호 및 상세 섹션 스타일 추가 */
.paper-card-index {
  font-weight: 600;
  color: white;
  background: var(--gradient-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(40, 105, 131, 0.2);
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 5;
}

.paper-sections {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.paper-section {
  background-color: rgba(40, 105, 131, 0.03);
  border-radius: var(--radius-sm);
  padding: 16px;
  border-left: 3px solid var(--primary-color);
}

.paper-section h4 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--primary-color);
  font-size: 16px;
}

/* 설정 모달 스타일 */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.settings-modal-content {
  background-color: var(--card-bg-color);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.settings-modal.active .settings-modal-content {
  transform: translateY(0);
}

.settings-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.settings-modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.settings-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(85vh - 140px);
}

.settings-section {
  margin-bottom: 28px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-color);
}

.settings-item {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-item:last-child {
  margin-bottom: 0;
}

.settings-item label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.settings-input {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-color);
  transition: var(--transition);
  width: 180px;
}

.settings-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(40, 105, 131, 0.2);
}

.settings-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.tag-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 180px;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.selected-tags .category-tag {
  display: inline-flex;
  align-items: center;
  background-color: rgba(40, 105, 131, 0.1);
  color: var(--primary-color);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.selected-tags .category-tag:hover {
  background-color: rgba(40, 105, 131, 0.2);
}

.range-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 180px;
}

.settings-range {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--gradient-light);
  border-radius: 2px;
  outline: none;
}

.settings-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.settings-range::-moz-range-thumb {
  width: 16px;
  height: 15px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: none;
}

#fontSizeValue {
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: right;
}

@media (max-width: 768px) {
  .settings-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .settings-input, 
  .tag-selector,
  .range-selector {
    width: 100%;
  }
}

.clear-button {
  background-color: var(--text-tertiary);
  color: white;
  font-size: 13px;
  padding: 4px 10px;
  margin: 4px 2px; /* 다른 버튼과 일치하도록 여백 추가 */
}

.clear-button:hover {
  background-color: var(--text-secondary);
}

/* 카테고리 태그 및 키워드 태그 스타일 */
.category-label {
  font-weight: 600;
  color: var(--text-color);
  margin-right: 6px;
}

.keyword-label {
  font-weight: 600;
  color: var(--text-color);
  margin-right: 6px;
  white-space: nowrap;
  margin-left: 0;
  min-width: 90px; /* 너비를 120px에서 90px로 축소, Category 태그와 일치 유지 */
}

.author-label {
  font-weight: 600;
  color: var(--text-color);
  margin-right: 6px;
  white-space: nowrap;
  margin-left: 0;
  min-width: 90px; /* Category 및 Keyword 태그와 일치 유지 */
}

.logic-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: white;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
}

.filter-logic-hint {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
  margin-left: 4px;
  letter-spacing: 0;
  text-transform: none;
}

  padding-left: 3px; /* 좌측 패딩 축소 */
}


.author-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  margin-right: 8px;
  background-color: var(--tag-bg);
  color: var(--text-secondary);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.author-tag.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.author-tag:hover {
  background-color: var(--tag-hover-bg);
}

.author-tag.active:hover {
  background: var(--gradient-primary-hover);
}

/* 하이라이트 스타일 */
.keyword-highlight {
  background-color: rgba(255, 215, 0, 0.15);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: inherit;
  color: inherit;
  position: relative;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.3);
  transition: all 0.2s ease;
}

.keyword-highlight:hover {
  background-color: rgba(255, 215, 0, 0.25);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.4);
}

.author-highlight {
  background-color: rgba(255, 215, 0, 0.12);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: inherit;
  color: inherit;
  position: relative;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.25);
  transition: all 0.2s ease;
}

.author-highlight:hover {
  background-color: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35);
}

.paper-modal-body .highlight-info .keyword-sample {
  background-color: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.paper-modal-body .highlight-info .author-sample {
  background-color: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.25);
}

/* 하이라이트 애니메이션 효과 추가 */
@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 1px rgba(40, 105, 131, 0.3);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(40, 105, 131, 0.5);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(40, 105, 131, 0.3);
  }
}

.paper-card:hover .keyword-highlight,
.paper-card:hover .author-highlight {
  animation: highlightPulse 1.5s ease-in-out infinite;
}

/* 팝업 모달에서도 하이라이트가 잘 표시되도록 유지 */
.paper-modal-body .keyword-highlight,
.paper-modal-body .author-highlight {
  display: inline;
  line-height: inherit;
}

/* 키워드와 저자 하이라이트가 동시 존재할 때 모달 창에 알림 표시 */
.paper-modal-body .highlight-info {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  gap: 10px;
}

.paper-modal-body .highlight-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.paper-modal-body .highlight-info .sample {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* 일치 논문 카드의 하이라이트 스타일 */
.paper-card.matched-paper {
  box-shadow: 0 0 0 2px var(--gold-color), var(--shadow-md);
  background-color: var(--match-highlight);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 215, 0, 0.45);
}

.paper-card.matched-paper:hover {
  box-shadow: 0 0 0 2px var(--gold-color), var(--shadow-lg);
  transform: translateY(-3px);
  border: 1px solid rgba(255, 215, 0, 0.5);
}

/* ::after 별표 제거, .match-badge만 사용 */
.paper-card.matched-paper::after {
  display: none;
}

/* 다른 곳에서 사용될 수 있으므로 기존 키프레임 애니메이션 유지 */
@keyframes goldPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}

/* 모바일 표시 효과 최적화 */
@media (max-width: 768px) {
  .paper-card.matched-paper::after {
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background-size: 12px 12px;
  }
}

/* 상세 페이지 내 일치 논문 스타일 */
.matched-paper-details {
  position: relative;
  border-left: 4px solid var(--gold-color);
  padding-left: 16px;
  background-color: var(--match-highlight);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.3);
}

.match-indicator {
  position: absolute;
  top: -10px;
  right: 10px;
  background: var(--gold-gradient);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px 4px 28px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(212, 175, 55, 0.4);
  z-index: 1;
  letter-spacing: 0.5px;
  animation: fadeIn 0.5s ease-out;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 14px 14px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .matched-paper-details {
    padding: 15px;
  }
  
  .match-indicator {
    font-size: 11px;
    padding: 3px 10px;
    top: -8px;
    right: 8px;
  }
}

/* 일치 배지 스타일 */
.match-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: var(--gold-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.5);
  z-index: 5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  animation: goldPulse 2s infinite;
  cursor: help;
}

@keyframes starShine {
  0% { 
    transform: scale(1) rotate(0deg); 
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.5);
  }
  50% { 
    transform: scale(1.1) rotate(5deg); 
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.7);
  }
  100% { 
    transform: scale(1) rotate(0deg); 
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.5);
  }
}

@media (max-width: 768px) {
  .match-badge {
    width: 20px;
    height: 20px;
    background-size: 12px 12px;
    top: -4px;
    right: -4px;
  }
}

/* 일치 정보 스타일 */
.match-info {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 16px 0;
  padding: 15px;
  background-color: rgba(255, 215, 0, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 215, 0, 0.2);
  position: relative;
}

.match-star-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--gold-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  animation: starTwinkle 4s infinite;
}

@keyframes starTwinkle {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.7);
  }
}

.match-details {
  flex-grow: 1;
}

.match-details h4 {
  margin: 0 0 8px 0;
  color: var(--gold-dark);
  font-size: 16px;
  font-weight: 600;
}

.match-details p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .match-info {
    padding: 12px;
    gap: 12px;
  }
  
  .match-star-icon {
    width: 30px;
    height: 30px;
    background-size: 16px 16px;
  }
  
  .match-details h4 {
    font-size: 15px;
  }
  
  .match-details p {
    font-size: 13px;
  }
}

/* 모바일에서 하이라이트 스타일 최적화 */
@media (max-width: 768px) {
  .keyword-highlight, .author-highlight {
    padding: 0 1px;
    border-radius: 2px;
  }
}

/* Paper index badge for modal titles */
.paper-index-badge {
  font-weight: 600;
  color: white;
  background: var(--gradient-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(40, 105, 131, 0.2);
  position: absolute;
  top: -12px;
  left: -12px;
  z-index: 5;
}

/* Random paper indicator */
.random-paper-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--accent-color);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: fadeInOut 3s ease-in-out;
  box-shadow: var(--shadow-md);
}

.random-paper-indicator::before {
  content: "🎲";
  font-size: 14px;
}

@keyframes fadeInOut {
  0% { 
    opacity: 0; 
    transform: translateY(-10px) scale(0.9);
  }
  20% { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
  80% { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
  100% { 
    opacity: 0; 
    transform: translateY(-10px) scale(0.9);
  }
}

@media (max-width: 768px) {
  .random-paper-indicator {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 11px;
  }

}

/* 맨 위로 가기 버튼 스타일 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--card-bg-color);
  border: none;
  border-radius: 12px;
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 1000;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(40, 105, 131, 0.2);
  background: var(--gradient-light);
}

.back-to-top:active {
  transform: translateY(0);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  transition: transform 0.2s ease;
}

.back-to-top:hover svg {
  transform: translateY(-1px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 10px;
  }
  
  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* GitHub Link Styles */
.github-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background-color: var(--background-hover);
  color: var(--text-color);
  border: 1px solid rgba(87, 82, 121, 0.2);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 10px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.github-link:hover {
  background-color: var(--border-color);
  text-decoration: none;
  border-color: rgba(87, 82, 121, 0.3);
}

.github-link.hot-repo {
  /* background-color: #fff8c5;  Removed yellow background */
  border-color: rgba(87, 82, 121, 0.2);
  color: var(--text-color);
}

.github-link.outdated-repo {
  /* opacity: 0.7; Removed opacity */
}

.github-stars {
  margin-left: 4px;
  color: var(--text-secondary);
}

.hot-icon {
  margin-left: 4px;
}

.warning-icon {
  margin-left: 4px;
}

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

.footer-left {
  display: flex;
  align-items: center;
}