/**
 * base.css - 公共基础样式
 * @author 看雲起雲落
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  color: var(--text-primary, #ffffff);
  background-color: var(--bg-main);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(100, 30, 120, 0.08) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(160, 40, 10, 0.08) 0%, transparent 20%);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--accent, #DAA520);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-bright, #f0c060);
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* 副标题 */
.subtitle {
  font-size: 1rem;
  color: var(--text-secondary, #b0b0c0);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* 页脚 */
.site-footer {
  text-align: center;
  padding: 2.5rem 0;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted, #666);
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--accent, #DAA520);
  color: var(--bg-main);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px var(--shadow-color, rgba(0,0,0,0.3));
}

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

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-color, rgba(0,0,0,0.4));
}

/* 响应式 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 1.8rem !important;
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.75rem;
  }

  h1 {
    font-size: 1.5rem !important;
  }
}
