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

/* SVG图标样式 */
.svg-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
  transition: all 0.3s ease;
}

/* 导航菜单中的图标 */
.nav-item .svg-icon {
  width: 28px;
  height: 28px;
  color: #d4af37;
}

/* 单独缩小关于图标 */
.nav-item[title="关于我们"] .svg-icon {
  width: 25px;
  height: 25px;
}

/* 响应式设计 - 在小屏幕上适当缩小图标 */
@media (max-width: 768px) {
  .svg-icon {
    width: 20px;
    height: 20px;
  }
}

/* 隐藏Font Awesome备用图标 */
.fa {
  display: none !important;
}

/* Layout styles */
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #0f1117 0%, #1a1d28 100%);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 15px 10px;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
      radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
      radial-gradient(circle at 90% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: -2;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  position: relative;
}



/* 导航菜单样式 */
.nav-menu {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* Logo样式 */
.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
}

.nav-logo:hover {
  transform: scale(1.1);
  background: transparent;
}

.nav-logo .svg-icon {
  width: 28px;
  height: 28px;
  color: #d4af37;
  transition: all 0.3s ease;
}

.nav-logo:hover .svg-icon {
  color: var(--accent);
  transform: scale(1.1);
}

.nav-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
}

.nav-item:hover {
  transform: scale(1.1);
  background: transparent;
}

.nav-item .svg-icon {
  color: #d4af37;
  transition: all 0.3s ease;
}

.nav-item:hover .svg-icon {
  color: var(--accent);
  transform: scale(1.1);
}

/* 导航菜单悬停提示文字 */
.nav-item::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    border: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-item:hover::after {
  opacity: 1;
}

footer {
  text-align: center;
  padding: 30px 0 15px;
  color: var(--text-secondary);
  font-size: 14px;    
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

footer a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--accent);
}

.load-more {
  padding: 10px 20px;
  margin: 20px 0;
  background-color: var(--primary);
  color: var(--text-primary);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, opacity 1s; /* Fade-in effect for the button */
  opacity: 0; /* Start hidden */
  display: flex;
  align-items: center;
  justify-content: center;
}

.load-more:hover {
  background-color: var(--primary-dark);
}

.load-more.loading {
  background-color: #a0a0a0; /* 灰色 */
  cursor: not-allowed;
}

.load-more.loading::after {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  content: "";
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 加载原图按钮样式 */
.load-original-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1002;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}

.load-original-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.load-original-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 按钮加载状态 */
.load-original-btn.loading {
  cursor: not-allowed;
  pointer-events: none;
}

.load-original-btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
  display: block;
}

.load-original-btn span {
  display: block;
  line-height: 1;
  white-space: nowrap;
}

/* Loading animation */
#loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

#loading::after {
  content: "";
  border: 4px solid var(--primary);
  border-top: 4px solid transparent;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  will-change: transform; /* 优化动画性能 */
}

#loading.hidden {
  display: none;
}

/* 移动端导航栏样式优化 */
@media (max-width: 768px) {
  /* 减小导航栏间距 */
  .nav-menu {
    gap: 10px;
  }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--primary);
    border: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: var(--shadow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--bg-hover);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.back-to-top i {
  font-size: 1.2rem;
}

.back-to-top .svg-icon {
  width: 24px;
  height: 24px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top i {
    font-size: 1rem;
}

.back-to-top .svg-icon {
    width: 20px;
    height: 20px;
}
}

/* 浅色模式 */
:root {
  --bg-dark: #0f1117;
  --bg-card: rgba(25, 28, 36, 0.95);
  --bg-hover: rgba(45, 50, 65, 0.85);
  --primary: #d4af37;
  --primary-dark: #b08d26;
  --accent: #ffd700;
  --text-primary: #f0f0f8;
  --text-secondary: #a0a8c0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --glass: rgba(255, 255, 255, 0.05);
  --glow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* 使用变量替换原有颜色值 */
.load-more {
    background-color: var(--primary-color);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.gallery img {
    box-shadow: 0 4px 8px var(--shadow-color);
}

.tag-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.08); /* 将透明度从0.05调整为0.08 */
    position: sticky;
    top: 0;
    z-index: 1;
}

/* 加载指示器样式 */
#temp-loading-msg {
    text-align: center;
    margin: 20px 0;
    padding: 10px;
    color: #777;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 5px;
    animation: fadeInOut 1.5s infinite alternate;
}

@keyframes fadeInOut {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

/* 通知系统样式 */
.notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: 300px;
}

.notification {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.3s, transform 0.3s, top 0.3s;
  position: relative;
  word-wrap: break-word;
  max-width: 100%;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

/* 带加载图标的通知 */
.notification.with-spinner {
  padding-left: 16px; /* 减小左侧内边距，与普通通知一致 */
}

.notification .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}
