/* Islands Art - 现代简洁头部样式 */

/* ========== 头部基础 ========== */
header {
  backdrop-filter: saturate(180%) blur(5px);
}

/* Logo 悬停效果 */
header a[href] img {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Dropdown 菜单优化 ========== */
.dropdown-trigger {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  z-index: 50;
  pointer-events: none;
  transform-origin: top right;
}

.dropdown-menu.visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) !important;
  pointer-events: auto;
}

/* ========== 登录 Tab 优化 ========== */
.login-tab-btn {
  color: #6b7280;
  background: transparent;
}

.login-tab-btn.active {
  color: #111827;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ========== 模态框优化 ========== */
#searchModal.visible,
#loginModal.visible,
#mobileMenu.visible {
  opacity: 1 !important;
  visibility: visible !important;
}

#searchModal.visible > div,
#loginModal.visible > div {
  transform: scale(1) !important;
}

#mobileMenu.visible > div {
  transform: translateX(0) !important;
}

/* ========== 动画 ========== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.active-scale-98:active {
  transform: scale(0.98);
}

/* ========== 搜索推荐项样式 ========== */
.search-rec-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  transition: background-color 0.2s;
  cursor: pointer;
}

.search-rec-item:hover {
  background-color: #f9fafb;
}

.search-rec-item img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}

.search-rec-item .title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-rec-item .meta {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.125rem;
}

/* ========== 滚动条优化 ========== */
.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ========== 响应式优化 ========== */
@media (max-width: 768px) {
  header {
    height: 56px;
  }
  
  header img {
    max-height: 24px !important;
  }
}

/* ========== 优雅的过渡效果 ========== */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

/* ========== 辅助类 ========== */
.ring-inset {
  --tw-ring-inset: inset;
}
