/* ============================================================
   LframeNGC v3.0.2 - Luopu Framework Next Generation Classic
   经典幻想风格 · 零依赖 · 暗黑模式 · 响应式
   作者：@Chenianlaocu | 洛璃科技设计团队洛浦瑟湾
   Next-Generation3.0.0 编写于20:38 HKT
   最后更新：2025年12月02日 21:32 HKT
   官网：https://hiluoli.cn/LframeNG
   ============================================================ */

/* ------------------ 1. 主题变量（支持暗黑模式） ------------------ */
:root {
  /* 亮色模式 - 幻想风格：羊皮纸背景、金色主调、木纹边框 */
  --primary: #d4af37; /* 金色主色 */
  --primary-hover: #b8942f; /* 深金色悬停 */
  --primary-light: #f0d9a1; /* 浅金色高亮 */
  --text: #2c1810; /* 深棕色文本 */
  --text-light: #5d4037; /* 中棕色次要文本 */
  --bg: #f5e8c7; /* 羊皮纸背景 */
  --surface: #fff8dc; /* 浅羊皮纸表面 */
  --border: #8b4513; /* 棕木边框色 */
  --shadow: 0 4px 8px rgba(139, 69, 19, 0.3); /* 木质阴影 */
  --radius: 0; /* 无圆角，锐利边框以匹配幻想风格 */
  --success: #228b22; /* 森林绿成功 */
  --warning: #cd853f; /* 古铜警告 */
  --error: #8b0000; /* 深红错误 */
  --info: #4682b4; /* 钢蓝信息 */
  --texture-bg: linear-gradient(135deg, #f5e8c7 0%, #e8d5b7 100%); /* 羊皮纸纹理渐变 */
  --border-texture: repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 69, 19, 0.1) 2px, rgba(139, 69, 19, 0.1) 4px); /* 木纹边框 */
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e0d0b8; /* 浅米色文本 */
    --text-light: #b8a898; /* 中米色次要 */
    --bg: #1a0f00; /* 深棕暗黑背景 */
    --surface: #2c1810; /* 深木表面 */
    --border: #5d4037; /* 中棕边框 */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* 深幻想阴影 */
    --primary: #ffd700; /* 亮金暗黑主色 */
    --primary-hover: #daa520; /* 橙金悬停 */
    --texture-bg: linear-gradient(135deg, #1a0f00 0%, #2c1810 100%); /* 暗木纹理 */
    --border-texture: repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(93, 64, 55, 0.2) 2px, rgba(93, 64, 55, 0.2) 4px); /* 暗木纹 */
  }
}

/* ------------------ 2. 重置 & 基础样式 ------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Times New Roman', 'Garamond', serif; /* 幻想中世纪字体 */
  background: var(--texture-bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-attachment: fixed; /* 固定纹理背景 */
}
img { max-width: 100%; height: auto; display: block; loading: lazy; }
a { color: var(--primary); text-decoration: underline wavy; /* 幻想波浪下划线 */ transition: color .2s; }
a:hover { color: var(--primary-hover); }
button, input, select, textarea { font: inherit; }

/* ------------------ 3. 容器布局 ------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center { align-items: center; justify-content: center; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

/* ------------------ 4. 排版 ------------------ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  margin: 16px 0 8px;
  font-weight: bold; /* 加粗以匹配幻想标题 */
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* 轻微阴影增强深度 */
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin: 12px 0; font-size: 1rem; }
.flow-text { font-size: 2rem; font-weight: bold; margin: 0; text-transform: uppercase; /* 大写以幻想感 */ }
small { font-size: 0.875rem; color: var(--text-light); }

/* ------------------ 5. 按钮 ------------------ */
.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-hover)); /* 金色渐变按钮 */
  color: #000; /* 深色文本对比 */
  border: 2px solid var(--border); /* 木质边框 */
  border-radius: var(--radius);
  font-weight: bold;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
  background-image: var(--border-texture); /* 添加木纹纹理 */
  background-size: 100% 100%;
}
.btn:hover, button:hover { 
  background: linear-gradient(to bottom, var(--primary-hover), var(--primary)); 
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); /* 内阴影模拟按压 */
  transform: translateY(1px); /* 轻微下沉 */
}
.btn:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* ------------------ 6. 输入框 & 表单 ------------------ */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 2px solid var(--border); /* 粗边框匹配木框 */
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
  margin: 8px 0;
  background-image: var(--texture-bg); /* 羊皮纸纹理背景 */
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3), inset 0 1px 2px rgba(0,0,0,0.1); /* 金色光环 + 内阴影 */
}
textarea { resize: vertical; min-height: 80px; }

/* ------------------ 7. 卡片 & 面板 ------------------ */
.card, .card-panel {
  background: var(--surface);
  padding: 20px;
  border: 3px solid var(--border); /* 厚木框边框 */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 16px 0;
  background-image: var(--texture-bg), var(--border-texture); /* 双层纹理 */
  background-blend-mode: multiply;
}
.card-panel .date {
  display: block;
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.card-panel p { font-size: 1.4rem; margin: 12px 0; }
.card-panel a { color: var(--primary); font-weight: bold; text-decoration: underline wavy; }

/* ------------------ 8. 通知 & 提示 ------------------ */
.notification {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin: 12px 0;
  font-weight: bold;
  border: 2px solid; /* 边框通知 */
  background-image: var(--texture-bg);
}
.success { background: rgba(34, 139, 34, 0.1); color: var(--success); border-color: var(--success); }
.error   { background: rgba(139, 0, 0, 0.1); color: var(--error);   border-color: var(--error); }
.warning { background: rgba(205, 133, 63, 0.1); color: var(--warning); border-color: var(--warning); }
.info    { background: rgba(70, 130, 180, 0.1); color: var(--info);    border-color: var(--info); }

/* ------------------ 9. 列表 ------------------ */
ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
ul li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border); /* 虚线分隔线 */
}
ul li:last-child { border-bottom: none; }

/* ------------------ 10. 表格 ------------------ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border: 2px solid var(--border); /* 表格边框 */
}
table th, table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table th {
  background: linear-gradient(to bottom, #f5e8c7, #e8d5b7); /* 羊皮纸头 */
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

/* ------------------ 11. 模态框（原生） ------------------ */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); /* 更暗的模态背景 */
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
  background: var(--surface);
  padding: 24px;
  border: 3px solid var(--border); /* 木框模态 */
  border-radius: var(--radius);
  width: 90%;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); /* 更深阴影 */
  animation: modalShow .3s ease;
  background-image: var(--texture-bg);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border); /* 头部分隔 */
  padding-bottom: 8px;
}
.modal-title { font-size: 1.25rem; font-weight: bold; }
.close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}
.close:hover { color: var(--text); }
@keyframes modalShow {
  from { opacity: 0; transform: scale(0.9) rotate(-1deg); } /* 轻微旋转进入幻想感 */
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ------------------ 12. 响应式断点 ------------------ */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  h1 { font-size: 1.875rem; }
  .btn, button { height: 40px; font-size: 0.875rem; padding: 0 12px; }
  .card, .card-panel { padding: 16px; }
}
@media (min-width: 481px) and (max-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 769px) {
  .grid { gap: 20px; }
}

/* ------------------ 13. 实用工具类 ------------------ */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.round { border-radius: 50%; }
.shadow-lg { box-shadow: 0 8px 16px rgba(139, 69, 19, 0.4); }
.hidden { display: none; }

/* ------------------ 14. 滚动条美化 ------------------ */
::-webkit-scrollbar { width: 12px; } /* 更粗滚动条 */
::-webkit-scrollbar-track { 
  background: var(--surface); 
  border-left: 2px solid var(--border);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary), var(--primary-hover));
  border-radius: 0;
  border-right: 2px solid var(--border);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(to bottom, var(--primary-hover), var(--primary)); }

/* ------------------ 15. 友好点击（右下角） ------------------ */
.friendly-click {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  gap: 8px;
}
.friendly-click a {
  padding: 8px 14px;
  background: linear-gradient(to bottom, #8b4513, #5d4037);
  color: #ffd700; /* 金色文本 */
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .2s;
  font-weight: bold;
}
.friendly-click a:hover { 
  background: linear-gradient(to bottom, #a0522d, #8b4513); 
  color: #fff;
}

/* ============================================================
   使用说明：
   1. 在 <head> 中引入：
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://hiluoli.cn/LframeNGC.css">
   2. 旧版地址：https://hiluoli.cn/LframeC.css（已停更）
   3. 官网：https://hiluoli.cn/LframeNG
   4. 怀旧版：https://hiluoli.cn/LframeNGC.css
   ============================================================ */