/* ===== 基础重置与全局样式 ===== */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
  /* 禁止图片拖动 */
  cursor: url('https://songlll.pages.dev/mouse.png'), pointer;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

blockquote {
  padding-left: 10px;
  border-left: 5px solid #333;
  margin-left: 0;
  font-style: italic;
  background-color: #bb7f4aa1;
}

/* ===== 间距系统 ===== */
:root {
  --spacing-md: 24px;
  --spacing-lg: 36px;
}

body>*+* {
  margin-top: var(--spacing-md);
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ===== 图片优化方案 ===== */
img {
  display: block;
  margin: 1.5rem auto;

  /* 尺寸控制 */
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;

  /* 新增：动态圆角解决方案 */
  border-radius: clamp(8px, 1.5vw, 16px);
  /* 响应式圆角 */
  aspect-ratio: attr(width) / attr(height);
  /* 保持原始比例 */

  /* 图片渲染优化 */
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

/* ===== 卡片与背景样式 ===== */
.bg {
  background: linear-gradient(135deg, #ff9a44, #ff6b6b);
  color: white;
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: var(--spacing-md);
}

.card-container {
  display: grid;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
}

/* ===== 排版系统 ===== */
p,
h1,
h2,
h3,
h4 {
  margin-top: 0;
  margin-bottom: 1rem;
}

li+li {
  margin-top: 8px;
}

main {
  padding-top: 60px;
}

header {
  z-index: 10000;
  right: 0;
  top: 0;
  position: fixed;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  background: linear-gradient(135deg, #4470ff, #b56bff);
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

input,
button {
  margin-top: 10px;
  margin-bottom: 16px;
  background-color: #5b99fc;
  border-radius: 10px;
  height: 30px;
  border: 5px solid #5193fe;
  color: #000;
}

textarea {
  margin-top: 10px;
  margin-bottom: 16px;
  background-color: #5b99fc;
  border-radius: 10px;
  border: 5px solid #5193fe;
  color: #000;
  height: 100px;
  padding: 10px;
}

.waitting{
  display: flex;
  align-items: center;
  color: #7e7e7e;
}

loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 5px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

input:focus,
button:focus,
textarea:focus {
  outline: none;
  border-color: #5193fe;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.623);
}

ul {
  list-style: none;
  padding: 0%;
}

li {
  list-style-type: circle;
  list-style: none;
}

li::before {
  content: "•";
  color: #fff;
  margin-right: 10px;
}

input,
textarea {
  width: 100%;
}

code {
  background-color: #bd681daa;
  border-radius: 5px;
  border-style: solid;
  border-color: #000000;
  border-width: 1px;
}

textarea {
  resize: none;
}

a {
  color: #3a86ff;
  text-decoration: none;
  position: relative;
  font-weight: 500;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #3a86ff;
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}