/* --- CSS Variables & Base Optimizations --- */
html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}
:root {
  --font-family-main: 'Poppins', sans-serif;
  --text-primary: #1a1a1a;
  --text-secondary: #2d2d2d;
  --text-dark: #f0f0f0;
  --accent: #007bff;
  --accent-hover: #0056b3;
  --background-panel: rgba(255, 255, 255, 0.9);
  --background-solid: #f8f9fa;
  --border: rgba(0, 0, 0, 0.15);
  --input-bg: rgba(240, 240, 245, 0.9);
  --button-bg: var(--accent);
  --button-text: #ffffff;
  --error: #ff4d4d;
  --success: #4caf50;
  --warning: #ffcc00;
  --info: #17a2b8;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 37px;
  --padding-sm: 8px;
  --padding-md: 16px;
  --padding-lg: 24px;

  /* 统一的纯色方案 - 移除渐变 */
  --unified-bg: rgba(255, 255, 255, 0.9); /* 统一背景色 */
  --unified-glass: rgba(255, 255, 255, 0.4); /* 统一玻璃效果 */
  --unified-border: rgba(255, 255, 255, 0.6); /* 统一边框色 */
  --unified-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); /* 统一阴影 */
  --unified-text: #1a1a1a; /* 统一文字色 */
  --unified-button: rgba(255, 255, 255, 0.35); /* 统一按钮背景 */

  /* 统一的圆角大小 */
  --radius-sm: 8px;    /* 用于小标签、徽章等 */
  --radius-md: 16px;   /* 用于按钮、输入框等标准组件 */
  --radius-lg: 30px;   /* 用于卡片、弹窗等较大容器 */
  --radius-xl: 32px;   /* 用于页面主布局容器 */
  --radius-full: 50%;  /* 用于圆形元素 */
  --radius-pill: 9999px; /* 用于胶囊形状的按钮 */
  
  /* 统一的过渡动画 */
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Styles --- */
body {
  font-family: var(--font-family-main);
  background: #ffffff;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

h1, h2, h3 {
  margin-top: 0;
  font-weight: 800; /* 增加字体重量，更显眼 */
}

/* --- Background Effects --- */
.background-blender {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.2) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.grid-square {
  position: absolute;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: transform;
  pointer-events: none;
}

.grid-square-inner {
  width: 100%;
  height: 100%;
  background-color: var(--border);
  color: var(--text-primary);
  opacity: 0;
  transition: opacity 0.5s ease-in-out, background-color 0.5s ease;
  border-radius: 4px; /* increased by 20% from 3px */
  will-change: opacity, background-color;
}

.grid-square-inner.lit { opacity: 0.6; }
.grid-square-inner.hover-effect { opacity: 0.8; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}
.pulse {
  animation: pulse 2.5s ease-in-out infinite;
}

/* --- Core Styles: 星空背景容器 --- */
#starry-background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #ffffff; /* 统一纯白背景 */
}
