/* 戏乐风华单屏舞台，主题选择器在 home-themes.css 中共享。 */
.home-app,
.home-app body {
  width: 100%;
  height: 100%;
}

body.home-app {
  min-width: 0;
  min-height: 560px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #090708;
  color: #f3eadf;
  font-family: "Maple Mono CN", "PingFang SC", "Microsoft YaHei UI", sans-serif;
}

.home-app .home-particles,
.home-app .home-view {
  position: fixed;
  inset: 0;
}

.home-app .home-particles {
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.86;
}

.home-app .home-view {
  z-index: 0;
  min-height: 560px;
  overflow: hidden;
}

.home-app .home-view-new {
  isolation: isolate;
  background: #090708;
}

.home-app .home-view-new::before,
.home-app .home-view-new::after {
  position: absolute;
  inset: -3%;
  pointer-events: none;
  content: "";
}

.home-app .home-view-new::before {
  z-index: -3;
  background-image:
    linear-gradient(180deg, rgba(8, 6, 8, 0.2), rgba(8, 6, 8, 0.84)),
    radial-gradient(circle at var(--stage-glow-x, 50%) var(--stage-glow-y, 42%), rgba(230, 178, 99, 0.13), transparent 34%),
    url("/world/images/%E6%88%8F%E4%B9%90%E9%A3%8E%E5%8D%8E%E8%83%8C%E6%99%AF.png");
  background-position: center, center, center;
  background-size: cover, 100% 100%, cover;
  background-repeat: no-repeat;
  transform: translate3d(var(--stage-drift-x, 0px), var(--stage-drift-y, 0px), 0) scale(1.04);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.home-app .home-view-new.has-home-stage-video::before {
  background-image:
    linear-gradient(180deg, rgba(8, 6, 8, 0.24), rgba(8, 6, 8, 0.86)),
    radial-gradient(circle at var(--stage-glow-x, 50%) var(--stage-glow-y, 42%), rgba(230, 178, 99, 0.13), transparent 34%);
  background-size: cover, 100% 100%;
}

.home-app .home-stage-video {
  position: absolute;
  z-index: -2;
  inset: -3%;
  display: block;
  width: 106%;
  height: 106%;
  border: 0;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  filter: saturate(0.82) brightness(0.72) contrast(0.96);
  transform: translate3d(var(--stage-drift-x, 0px), var(--stage-drift-y, 0px), 0) scale(1.04);
  transition: opacity 0.8s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.8s ease;
  pointer-events: none;
}

.home-app .home-stage-video.is-ready { opacity: 0.86; }

.home-app .home-view-new::after {
  z-index: -1;
  inset: 0;
  background: linear-gradient(116deg, transparent 22%, rgba(237, 193, 110, 0.08) 44%, transparent 55%);
  transform: translateX(-70%);
  animation: home-light-sweep 9s ease-in-out infinite;
}

.home-app .home-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(1420px, 100%);
  height: 100%;
  min-height: 560px;
  margin: 0 auto;
  padding: clamp(15px, 3.2vh, 34px) clamp(16px, 4vw, 64px) 14px;
  box-sizing: border-box;
}

.home-app .home-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding-top: clamp(4px, 1.5vh, 18px);
}

.home-app .home-heading {
  flex: 0 0 auto;
  text-align: center;
}

.home-app .home-title {
  margin: 0;
  color: #f5ece0;
  font-family: "Maple Mono CN", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  font-size: clamp(3rem, 7.8vw, 6.25rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 0.94;
  text-shadow: 0 0 28px rgba(241, 194, 106, 0.16), 6px 7px 0 rgba(95, 20, 29, 0.62);
}

.home-app .home-subtitle {
  margin: clamp(9px, 1.4vh, 16px) 0 0;
  color: rgba(238, 197, 124, 0.9);
  font-size: clamp(0.72rem, 1.15vw, 0.94rem);
  letter-spacing: 0.2em;
}

.home-app .home-stage-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  width: min(220px, 36vw);
  margin: clamp(16px, 2.4vh, 28px) auto clamp(13px, 2.1vh, 24px);
}

.home-app .home-stage-line span {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(235, 190, 107, 0.65));
}

.home-app .home-stage-line span:last-child {
  background: linear-gradient(90deg, rgba(235, 190, 107, 0.65), transparent);
}

.home-app .home-stage-line i {
  width: 5px;
  height: 5px;
  border: 1px solid #e9bc70;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(233, 188, 112, 0.1), 0 0 16px rgba(233, 188, 112, 0.84);
}

.home-app .home-cards {
  --card-slope: clamp(34px, 4.2vw, 68px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  height: min(42vh, 380px);
  min-height: 260px;
  flex: 0 1 380px;
  perspective: 1200px;
  overflow: hidden;
}

.home-app .home-card {
  width: calc(100% + var(--card-slope));
  margin-left: 0;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(151, 157, 154, 0.92);
  background: #a6aba9;
  clip-path: polygon(var(--card-slope) 0, 100% 0, calc(100% - var(--card-slope)) 100%, 0 100%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(67, 74, 71, 0.36);
  transform: perspective(1100px) rotateX(0deg) rotateY(0deg);
  transform-style: preserve-3d;
  transition: background-color 0.7s ease, border-color 0.7s ease, box-shadow 0.7s ease;
  will-change: transform;
}

.home-app .home-card::before {
  position: absolute;
  inset: -12% -36%;
  z-index: 4;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 248, 214, 0.92) 49%, rgba(233, 177, 90, 0.7) 52%, transparent 59%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-70%) skewX(-12deg);
  clip-path: polygon(var(--card-slope) 0, 100% 0, calc(100% - var(--card-slope)) 100%, 0 100%);
}

.home-app .home-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(112, 118, 115, 0.08);
  content: "";
  opacity: 0.58;
  pointer-events: none;
  transition: opacity 0.8s ease, background 0.8s ease;
}

.home-app .home-card:hover,
.home-app .home-card:focus-within {
  border-color: rgba(239, 197, 112, 0.86);
  background: #243033;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.46), 0 0 30px rgba(214, 132, 63, 0.2);
}

.home-app .home-card:hover::before,
.home-app .home-card:focus-within::before {
  animation: home-card-glint 1.15s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.home-app .home-card:hover::after,
.home-app .home-card:focus-within::after {
  opacity: 0.06;
}

.home-app .home-card a,
.home-app .home-card a > .home-card-image,
.home-app .home-card a > .home-card-copy,
.home-app .home-card > .home-card-image,
.home-app .home-card > .home-card-copy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  color: inherit;
  text-decoration: none;
}

.home-app .home-card a { z-index: 3; display: block; }

.home-app .home-card-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #a6aba9;
  animation: home-card-breathe 8s ease-in-out infinite alternate;
}

.home-app .home-card-image::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(108, 114, 111, 0.1);
  content: "";
  pointer-events: none;
  transition: background 0.85s ease, opacity 0.85s ease;
}

.home-app .home-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) saturate(0) contrast(0.98) brightness(0.96);
  transform: scale(1.06);
  transition: filter 0.9s ease, transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home-app .home-card-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  filter: grayscale(1) saturate(0) contrast(0.98) brightness(0.96);
  transform: scale(1.06);
  transition: opacity 0.8s ease, filter 0.9s ease, transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.home-app .home-card-video.is-ready { opacity: 0; }
.home-app .home-card.is-video-active .home-card-video.is-ready { opacity: 1; }
.home-app .home-card.is-video-active .home-card-image img { opacity: 0; }

.home-app .home-card:hover .home-card-image::after,
.home-app .home-card:focus-within .home-card-image::after {
  background: linear-gradient(180deg, rgba(12, 17, 18, 0.08), rgba(8, 11, 12, 0.72));
}

.home-app .home-card:hover .home-card-image img,
.home-app .home-card:focus-within .home-card-image img {
  filter: grayscale(0) saturate(1.15) contrast(1.04) brightness(0.86);
  transform: scale(1.11);
}

.home-app .home-card:hover .home-card-video,
.home-app .home-card:focus-within .home-card-video {
  filter: grayscale(0) saturate(1.15) contrast(1.04) brightness(0.86);
  transform: scale(1.11);
}

.home-app .home-card-copy {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(12px, 1.5vw, 20px);
  box-sizing: border-box;
  color: #222b2b;
  text-align: center;
  transition: color 0.7s ease;
}

.home-app .home-card a > .home-card-copy,
.home-app .home-card > .home-card-copy {
  inset: 0 var(--card-slope);
  width: auto;
  height: auto;
}

.home-app .home-card-copy h2 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - 24px);
  margin: 0;
  color: inherit;
  font-family: "Maple Mono CN", "STKaiti", "KaiTi", serif;
  font-size: clamp(0.94rem, 1.55vw, 1.38rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translate(-50%, -50%);
  transition: color 0.7s ease, text-shadow 0.7s ease;
}

.home-app .home-card-copy p {
  position: absolute;
  right: clamp(8px, 0.8vw, 14px);
  bottom: clamp(24px, 8%, 42px);
  left: clamp(8px, 0.8vw, 14px);
  display: -webkit-box;
  min-height: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(237, 241, 237, 0.82);
  font-size: clamp(0.58rem, 0.78vw, 0.74rem);
  line-height: 1.62;
  opacity: 0;
  transform: translateY(10px);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  transition: max-height 0.55s ease, margin 0.55s ease, opacity 0.38s ease, transform 0.55s ease;
}

.home-app .home-card:hover .home-card-copy,
.home-app .home-card:focus-within .home-card-copy { color: #f3eadf; }

.home-app .home-card:hover .home-card-copy h2,
.home-app .home-card:focus-within .home-card-copy h2 {
  text-shadow: 0 0 18px rgba(238, 193, 112, 0.42);
}

.home-app .home-card:hover .home-card-copy p,
.home-app .home-card:focus-within .home-card-copy p {
  max-height: 6.2em;
  opacity: 1;
  transform: translateY(0);
}

.home-app .home-card-disabled { display: flex; flex-direction: column; }
.home-app .home-card-disabled { opacity: 0.6; }
.home-app .home-card-disabled:hover { border-color: rgba(151, 157, 154, 0.92); box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(67, 74, 71, 0.36); }

.home-app .home-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-top: clamp(13px, 2.5vh, 25px);
  color: rgba(235, 221, 207, 0.58);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.home-app .home-footer i { color: #c84f45; font-style: normal; }
@keyframes home-light-sweep {
  0%, 100% { transform: translateX(-70%); opacity: 0; }
  34% { opacity: 0.66; }
  58% { transform: translateX(70%); opacity: 0.22; }
}

@keyframes home-card-glint {
  0% { opacity: 0; transform: translateX(-70%) skewX(-12deg); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translateX(70%) skewX(-12deg); }
}

@keyframes home-card-breathe {
  0% { transform: scale(1.04) translate3d(-0.5%, 0.3%, 0); }
  100% { transform: scale(1.07) translate3d(0.5%, -0.3%, 0); }
}

@media (max-width: 760px) {
  body.home-app { min-height: 600px; }
  .home-app .home-shell,
  .home-app .home-view { min-height: 600px; }
  .home-app .home-title { font-size: clamp(2.7rem, 12vw, 4.4rem); }
  .home-app .home-subtitle { letter-spacing: 0.12em; }
  .home-app .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); height: min(54vh, 470px); min-height: 360px; flex-basis: 470px; }
  .home-app .home-cards { --card-slope: clamp(30px, 8vw, 42px); }
  .home-app .home-card-copy { padding: 9px 10px; }
  .home-app .home-card-copy h2 { font-size: 1rem; }
  .home-app .home-card-copy p { font-size: 0.62rem; line-height: 1.5; -webkit-line-clamp: 4; }
}

@media (max-width: 430px) {
  .home-app .home-shell { padding-right: 12px; padding-left: 12px; }
  .home-app .home-main { padding-top: 0; }
  .home-app .home-stage-line { margin-top: 12px; margin-bottom: 10px; }
  .home-app .home-cards { height: min(55vh, 450px); min-height: 360px; }
  .home-app .home-card-copy h2 { font-size: 0.9rem; }
  .home-app .home-card-copy p { font-size: 0.58rem; }
  .home-app .home-footer { margin-top: 10px; font-size: 0.61rem; }
}

@media (max-height: 720px) and (min-width: 431px) {
  .home-app .home-shell { padding-top: 12px; padding-bottom: 9px; }
  .home-app .home-title { font-size: clamp(2.6rem, 7vw, 4.4rem); }
  .home-app .home-stage-line { margin-top: 10px; margin-bottom: 10px; }
  .home-app .home-cards { height: min(39vh, 290px); min-height: 230px; flex-basis: 290px; }
  .home-app .home-card-copy p { -webkit-line-clamp: 2; }
  .home-app .home-footer { margin-top: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-app .home-view-new::after,
  .home-app .home-view-new::before,
  .home-app .home-card-image,
  .home-app .home-card::before,
  .home-app .home-card-image img { animation: none; transition: none; }
}
