/* ============================================================================
 * 星屿 · Telescope Garden —— 学习资源入口样式
 * 作品与美术资源：Telescope Garden 1.0.0 · 作者 7uanm · GNU GPL v3.0
 * ==========================================================================*/

/* ---------------------------------------------------------------- 入口卡片 */
.xy-card {
  display: grid;
  grid-template-columns: 380px 1fr;
  margin: 0 16px 18px;
  border: 1px solid var(--line, rgba(212, 196, 168, 0.16));
  border-radius: var(--radius, 14px);
  background:
    radial-gradient(120% 140% at 8% 0%, rgba(141, 184, 198, 0.08), transparent 58%),
    linear-gradient(145deg, rgba(212, 196, 168, 0.045), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  box-shadow: var(--shadow, 0 18px 56px rgba(0, 0, 0, 0.36));
}

.xy-visual {
  position: relative;
  background: #06090f;
  overflow: hidden;
}

.xy-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  object-position: center;
  opacity: 0.94;
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.xy-card:hover .xy-visual img { transform: scale(1.03); }

.xy-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 10, 16, 0.12), rgba(8, 10, 16, 0.5) 78%, rgba(8, 10, 16, 0.86));
  pointer-events: none;
}

.xy-visual-tag {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 3px 9px;
  border: 1px solid rgba(212, 196, 168, 0.3);
  border-radius: 999px;
  background: rgba(6, 9, 15, 0.72);
  color: rgba(235, 224, 204, 0.85);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.xy-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  justify-content: center;
  min-width: 0;
}

.xy-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  color: var(--faint, #5e6b79);
}

.xy-ver {
  padding: 1px 7px;
  border: 1px solid rgba(141, 184, 198, 0.32);
  border-radius: 999px;
  letter-spacing: 0.08em;
  color: var(--ice, #8db8c6);
}

.xy-ver-web {
  border-color: rgba(134, 181, 160, 0.45);
  background: rgba(134, 181, 160, 0.12);
  color: var(--mint, #86b5a0);
}

.xy-title {
  margin: 0;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold-bright, #ebe0cc);
}

.xy-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted, #92a0af);
}

.xy-credit {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
}

.xy-credit-avatar {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(212, 196, 168, 0.42);
  background: linear-gradient(150deg, rgba(212, 196, 168, 0.28), rgba(212, 196, 168, 0.08));
  color: var(--gold-bright, #ebe0cc);
  font-size: 11px;
  font-weight: 500;
}

.xy-credit-text {
  font-size: 11.5px;
  color: var(--faint, #5e6b79);
  line-height: 1.7;
}

.xy-credit-text b { color: var(--gold, #d4c4a8); font-weight: 500; }

.xy-credit-text a {
  color: var(--ice, #8db8c6);
  text-decoration: none;
  border-bottom: 1px solid rgba(141, 184, 198, 0.35);
}

.xy-credit-text a:hover { color: #b8dfec; }

.xy-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.xy-tags span {
  padding: 2px 9px;
  border: 1px solid rgba(212, 196, 168, 0.16);
  border-radius: 999px;
  font-size: 10.5px;
  color: rgba(212, 196, 168, 0.75);
}

.xy-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.xy-note { font-size: 10.5px; color: var(--faint, #5e6b79); line-height: 1.8; }

.xy-sha {
  padding: 1px 6px;
  border: 1px solid rgba(134, 181, 160, 0.3);
  border-radius: 4px;
  background: rgba(134, 181, 160, 0.08);
  color: var(--mint, #86b5a0);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
}

.xy-dl {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid rgba(141, 184, 198, 0.4);
  border-radius: 999px;
  background: rgba(141, 184, 198, 0.12);
  color: var(--ice, #8db8c6);
  font-size: 10px;
}

.xy-facts {
  margin: 6px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(212, 196, 168, 0.1);
  list-style: none;
  display: grid;
  gap: 6px;
}

.xy-facts li {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--faint, #5e6b79);
}

.xy-facts b {
  display: inline-block;
  min-width: 40px;
  margin-right: 8px;
  color: rgba(212, 196, 168, 0.8);
  font-weight: 500;
}

/* ---------------------------------------------------------------- 按钮 */
.xy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(212, 196, 168, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(244, 242, 236, 0.9);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease, transform 200ms ease;
}

.xy-btn:hover {
  border-color: rgba(212, 196, 168, 0.48);
  background: rgba(212, 196, 168, 0.1);
  color: #fff;
}

.xy-btn:active { transform: translateY(1px); }

.xy-btn-primary {
  border-color: rgba(212, 196, 168, 0.55);
  background: linear-gradient(140deg, rgba(212, 196, 168, 0.26), rgba(212, 196, 168, 0.1));
  color: var(--gold-bright, #ebe0cc);
  font-weight: 500;
}

.xy-btn-primary:hover { background: linear-gradient(140deg, rgba(212, 196, 168, 0.4), rgba(212, 196, 168, 0.18)); }

.xy-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted, #92a0af);
  font-size: 14px;
  cursor: pointer;
  transition: all 200ms ease;
}

.xy-icon-btn:hover { color: #fff; border-color: rgba(212, 196, 168, 0.4); }

/* ---------------------------------------------------------------- 全屏层 */
.xy-root {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  background: #04060b;
}

.xy-root.show { display: block; }

body.xy-locked { overflow: hidden; }

.xy-shell {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #04060b;
}

.xy-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(212, 196, 168, 0.12);
  background: rgba(6, 9, 15, 0.9);
}

.xy-brand { display: flex; align-items: center; gap: 12px; }

.xy-brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(212, 196, 168, 0.5);
  background: radial-gradient(circle at 34% 30%, #f2e6cf, #a98d5f 58%, #5d4b2f);
  box-shadow: 0 0 16px rgba(235, 224, 204, 0.32);
}

.xy-brand-text { display: flex; flex-direction: column; gap: 2px; }

.xy-brand-text b {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--gold-bright, #ebe0cc);
}

.xy-brand-text i {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--faint, #5e6b79);
}

.xy-top-right { display: flex; align-items: center; gap: 10px; }

.xy-pill {
  padding: 4px 12px;
  border: 1px solid rgba(141, 184, 198, 0.3);
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ice, #8db8c6);
}

.xy-frame-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #04060b;
}

.xy-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #04060b;
}

.xy-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: #04060b;
  z-index: 2;
}

.xy-loading p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted, #92a0af);
}

.xy-spin {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(212, 196, 168, 0.2);
  border-top-color: var(--gold, #d4c4a8);
  border-radius: 50%;
  animation: xySpin 900ms linear infinite;
}

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

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1040px) {
  .xy-card { grid-template-columns: 1fr; }
  .xy-visual img { min-height: 190px; max-height: 230px; }
  .xy-visual::after { background: linear-gradient(180deg, rgba(8, 10, 16, 0.1), rgba(8, 10, 16, 0.75)); }
  .xy-body { padding: 20px 22px; }
}

@media (max-width: 820px) {
  .xy-card { margin: 0 12px 14px; }
  .xy-title { font-size: 18px; }
  .xy-desc { font-size: 12px; }
  .xy-facts li { font-size: 11px; }
  .xy-pill { display: none; }
}
