/* 모던 UI - 절제된 스타일 */

/* 다크모드 */
body.dark-mode {
  background: #1a1a1a;
  color: #e0e0e0;
}

body.dark-mode article.post,
body.dark-mode .widget {
  background: #252525;
  border-color: #333;
}

body.dark-mode .entry-title a {
  color: #fff !important;
}

body.dark-mode .ast-primary-header-bar {
  background: #1a1a1a !important;
  border-bottom: 1px solid #333;
}

body.dark-mode .site-title a {
  color: #fff !important;
}

body.dark-mode th {
  background: #333;
}

body.dark-mode td, body.dark-mode th {
  border-color: #444;
}

/* 다크모드 토글 */
.dark-mode-toggle {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ddd;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
}

body.dark-mode .dark-mode-toggle {
  background: #333;
  border-color: #444;
}

.dark-mode-toggle:hover {
  transform: scale(1.05);
}

/* 읽기 진행률 */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: #0066cc;
  z-index: 99999;
  transition: width 0.1s ease;
}

body.dark-mode .reading-progress {
  background: #4a9eff;
}

/* 공유 버튼 */
.floating-share {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 998;
}

.floating-share button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
  color: #333;
}

body.dark-mode .floating-share button {
  background: #333;
  border-color: #444;
  color: #fff;
}

.floating-share button:hover {
  background: #f5f5f5;
  transform: translateX(3px);
}

body.dark-mode .floating-share button:hover {
  background: #444;
}

/* 좋아요 버튼 */
.like-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.15s ease;
  margin-top: 12px;
}

.like-button:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.like-button.liked {
  background: #ff6b6b;
  border-color: #ff6b6b;
  color: #fff;
}

.like-button .heart {
  font-size: 16px;
}

/* 토스트 */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: #333;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 99999;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 검색 오버레이 */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

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

.search-overlay input {
  width: 90%;
  max-width: 500px;
  padding: 16px 24px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.search-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
}

/* 읽기 시간 */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f5f5f5;
  color: #666;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 8px;
}

body.dark-mode .reading-time {
  background: #333;
  color: #aaa;
}

/* 스크롤 탑 버튼 */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ddd;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  transition: all 0.2s ease;
}

body.dark-mode .scroll-top-btn {
  background: #333;
  border-color: #444;
  color: #fff;
}

.scroll-top-btn.show {
  opacity: 1;
}

.scroll-top-btn:hover {
  transform: scale(1.05);
}

/* 반응형 */
@media (max-width: 768px) {
  .floating-share {
    display: none;
  }
  .dark-mode-toggle {
    bottom: 70px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
  .scroll-top-btn {
    right: 16px;
    width: 40px;
    height: 40px;
  }
}
