/*
 * Azeroth UI · 共享设计层（ui/wow-reskin）
 * 方向：暖石 + 皮革 + 黄铜描边，魔兽式卡框；强调色只用传奇橙与金。
 * 类名沿用旧 cosmic-* / glass-panel，所有旧页面零改动即可换皮。
 */
@font-face { font-family: "Cinzel"; src: url("/frontend/assets/fonts/cinzel.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Azeroth Serif SC"; src: url("/frontend/assets/fonts/serif-sc-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  /* 底与面 */
  --az-bg: #0c0a08;
  --az-bg-2: #13100c;
  --az-surface: #1a1510;
  --az-surface-2: #221b14;
  --az-inset: #0f0c09;
  /* 线 */
  --az-line: #3a2f22;
  --az-line-soft: rgba(201, 164, 92, .16);
  --az-brass: #8a6a3a;
  --az-gold: #d7b36a;
  --az-gold-hi: #f3d58f;
  /* 文字 */
  --az-text: #ede4d3;
  --az-text-2: #c9bca5;
  --az-muted: #9a8c76;
  --az-faint: #6d6252;
  /* 语义色：WCL 品质色 + 战斗色 */
  --q-legendary: #ff8000;
  --q-epic: #a335ee;
  --q-rare: #0070dd;
  --q-uncommon: #1eff00;
  --q-artifact: #e6cc80;
  --c-kill: #6fcf6a;
  --c-wipe: #e0533d;
  --c-fel: #7ed957;
  --c-info: #6ab0e6;
  /* 字体 */
  --f-display: "Cinzel", "Azeroth Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  --f-title: "Azeroth Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", serif;
  --f-body: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --f-num: "Cinzel", Georgia, serif;
  /* 形 */
  --az-radius: 4px;
  --az-shadow: 0 18px 40px rgba(0, 0, 0, .55);

  /* 兼容旧变量名：旧页面内联样式仍引用 --space-* */
  --space-bg: var(--az-bg);
  --space-surface: var(--az-surface);
  --space-surface-strong: var(--az-surface-2);
  --space-line: var(--az-line);
  --space-line-hover: var(--az-brass);
  --space-text: var(--az-text);
  --space-muted: var(--az-muted);
  --space-cyan: var(--az-gold);
  --space-violet: var(--q-epic);
  --space-amber: var(--az-gold-hi);
  --space-green: var(--c-kill);
  --space-red: var(--c-wipe);
  --space-radius: var(--az-radius);
  --space-shadow: var(--az-shadow);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--az-bg); }
::selection { background: rgba(255, 128, 0, .35); color: #fff; }

body.cosmic-page {
  min-height: 100vh;
  margin: 0;
  color: var(--az-text);
  font: 15px/1.65 var(--f-body);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 128, 0, .07), transparent 70%),
    linear-gradient(180deg, rgba(12, 10, 8, .55), rgba(12, 10, 8, .92) 60%, var(--az-bg)),
    url("/frontend/assets/theme/leather.webp") center / 640px repeat,
    var(--az-bg);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: var(--f-title); font-weight: 700; letter-spacing: .02em; color: var(--az-text); }
a { color: var(--az-gold); }
a:hover { color: var(--az-gold-hi); }
:focus-visible { outline: 2px solid var(--q-legendary); outline-offset: 2px; }

#cosmicCanvas { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.cosmic-content { position: relative; z-index: 1; }
.cosmic-shell { width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: 32px 0 80px; }

/* 卡框：深皮面 + 双线黄铜边 + 四角铆钉（伪元素），不用毛玻璃 */
.glass-panel {
  position: relative;
  border: 1px solid var(--az-line);
  border-radius: var(--az-radius);
  background:
    linear-gradient(180deg, rgba(255, 220, 160, .035), transparent 40%),
    var(--az-surface);
  box-shadow: var(--az-shadow), inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 0 2px var(--az-line-soft);
}
.glass-panel::before {
  content: "";
  position: absolute; inset: 5px; pointer-events: none;
  background:
    radial-gradient(circle, var(--az-brass) 0 1.6px, transparent 2.2px) 0 0 / 8px 8px no-repeat,
    radial-gradient(circle, var(--az-brass) 0 1.6px, transparent 2.2px) 100% 0 / 8px 8px no-repeat,
    radial-gradient(circle, var(--az-brass) 0 1.6px, transparent 2.2px) 0 100% / 8px 8px no-repeat,
    radial-gradient(circle, var(--az-brass) 0 1.6px, transparent 2.2px) 100% 100% / 8px 8px no-repeat;
  opacity: .8;
}

/* 按钮：普通 = 皮面黄铜边；主按钮 = 魔兽红底金字按钮 */
.cosmic-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--az-brass);
  border-radius: 3px;
  background: linear-gradient(180deg, #2a2118, #1a140e);
  box-shadow: inset 0 1px rgba(255, 220, 160, .08), 0 1px 0 rgba(0, 0, 0, .6);
  color: var(--az-text-2);
  font: 600 14px/1.2 var(--f-body);
  letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.cosmic-button:hover { border-color: var(--az-gold); color: var(--az-gold-hi); background: linear-gradient(180deg, #33281c, #1f1811); }
.cosmic-button:active { transform: translateY(1px); }
.cosmic-button.primary {
  border: 1px solid #c79a3e;
  background: linear-gradient(180deg, #9c1c10 0%, #6e0f08 55%, #4d0904 100%);
  box-shadow: inset 0 1px rgba(255, 190, 120, .35), inset 0 -2px rgba(0, 0, 0, .35), 0 0 0 1px #000, 0 6px 18px rgba(0, 0, 0, .5);
  color: #ffd66b;
  font-family: var(--f-title);
  font-size: 16px;
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(255, 170, 60, .25);
}
.cosmic-button.primary:hover { background: linear-gradient(180deg, #b5241a 0%, #801409 55%, #5a0b05 100%); color: #ffe59a; }
.cosmic-button:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.6); }

/* 小标题：不再用英文大写眉标，改为带左右饰线的中文衬线小标 */
.cosmic-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--az-gold); font: 700 13px/1 var(--f-title); letter-spacing: .18em;
}
.cosmic-eyebrow::before, .cosmic-eyebrow::after { content: ""; width: 18px; height: 1px; background: linear-gradient(90deg, transparent, var(--az-brass)); }
.cosmic-eyebrow::after { transform: scaleX(-1); }
.cosmic-muted { color: var(--az-muted); }

.cosmic-field { display: grid; gap: 7px; color: var(--az-text-2); font-size: 13px; }
.cosmic-field input, .cosmic-field select, select.az-select {
  width: 100%; min-height: 42px; padding: 8px 36px 8px 12px;
  border: 1px solid var(--az-line); border-radius: 3px; outline: 0;
  background: var(--az-inset); color: var(--az-text); font: inherit;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6);
}
.cosmic-field select, select.az-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--az-gold) 50%), linear-gradient(135deg, var(--az-gold) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.cosmic-field input { padding-right: 12px; }
.cosmic-field input:focus, .cosmic-field select:focus, select.az-select:focus { border-color: var(--az-gold); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 0 0 3px rgba(215, 179, 106, .12); }
.cosmic-status { min-height: 24px; color: var(--c-kill); }
.cosmic-status.error { color: var(--c-wipe); }

/* 公告弹窗：羊皮卷 */
.release-open { overflow: hidden; }
.release-layer { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(5, 3, 2, .82); }
.release-layer[hidden] { display: none; }
.release-modal {
  width: min(780px, 100%); max-height: min(84vh, 860px); overflow: auto;
  border: 1px solid var(--az-brass); border-radius: var(--az-radius);
  background: var(--az-surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7), inset 0 0 0 3px #0a0806, inset 0 0 0 4px var(--az-line);
}
.release-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 28px 16px; border-bottom: 1px solid var(--az-line); background: var(--az-surface-2); }
.release-head h2 { margin: 6px 0 0; font-size: 22px; color: var(--az-gold-hi); }
.release-close { flex: none; width: 34px; height: 34px; border: 1px solid var(--az-brass); border-radius: 50%; background: #2a1510; color: var(--az-gold); cursor: pointer; font: 20px/1 system-ui; }
.release-close:hover { background: #6e0f08; color: #ffd66b; }
.release-content { padding: 20px 28px 28px; color: var(--az-text-2); font-size: 14px; line-height: 1.85; }
.release-content h3 { margin: 0 0 8px; color: var(--q-artifact); font-size: 16px; }
.release-content section + section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--az-line); }
.release-content ul { display: grid; gap: 6px; margin: 0; padding-left: 20px; }
.release-content li::marker { color: var(--az-brass); }
.release-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* 通用小件 */
.az-rule { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, transparent, var(--az-brass) 20%, var(--az-brass) 80%, transparent); opacity: .6; }
.az-kbd { padding: 1px 6px; border: 1px solid var(--az-line); border-radius: 3px; background: var(--az-inset); font-size: 12px; }

@media (max-width: 720px) { .cosmic-shell { width: calc(100% - 24px); padding-top: 16px; } }
@media (max-width: 560px) { .release-layer { padding: 10px; } .release-head { padding: 18px; } .release-content { padding: 16px 18px 22px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
