/* ============================================
   Campus Wall - Base Styles & Reset
   全局基础样式、重置、字体、链接、图片、滚动条
   ============================================ */

/* ============================================
   2. 全局基础样式
   ============================================ */

/* ---- html ---- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ---- body ---- */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== 光晕效果背景 ===== */
.page-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.glow-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 157, 0.3) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.glow-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.25) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  animation-delay: -5s;
}

.glow-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.2) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(20px, 10px) scale(1.02);
  }
}

/* ===== 玻璃拟态卡片 ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
}

/* 深色模式玻璃效果 */
[data-theme="dark"] .glass-card {
  background: rgba(30, 34, 53, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .glass-card-light {
  background: rgba(26, 29, 46, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ---- 选中文字 ---- */
::selection {
  background: rgba(255, 107, 157, 0.2);
  color: var(--primary-dark);
}

::-moz-selection {
  background: rgba(255, 107, 157, 0.2);
  color: var(--primary-dark);
}

/* ---- 链接默认样式 ---- */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* ---- 图片默认样式 ---- */
img {
  max-width: 100%;
  display: block;
}

/* ---- 列表重置 ---- */
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---- 按钮重置 ---- */
button {
  font-family: inherit;
  cursor: pointer;
}

/* ---- 输入框重置 ---- */
input,
textarea,
select {
  font-family: inherit;
}

/* ============================================
   3. 自定义滚动条
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

/* 滚动条轨道 */
::-webkit-scrollbar-track {
  background: transparent;
}

/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-light), var(--secondary-light));
  border-radius: 3px;
}

/* 滚动条滑块悬停 */
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

/* Firefox 滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}

/* ============================================
   4. 字体层级
   ============================================ */

/* 大标题 */
.text-h1,
h1 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
}

/* 标题 */
.text-h2,
h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

/* 副标题 */
.text-h3,
h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
}

/* 正文 */
.text-body {
  font-size: 0.938rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
}

/* 辅助文字 */
.text-caption {
  font-size: 0.813rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* 小字 */
.text-small {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-light);
}