body {
  margin: 0;
  font-family: Menlo, monospace;
  background: #e6e6fa;
  color: #fff;
}
.link-marquee, .link-track, .link-track a, .media-row, .video-item, .side-content-container, .exit-btn, .side-content-container * {
  font-family: Menlo, monospace !important;
}
.link-marquee {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 9999 !important;
  pointer-events: auto !important;
  overflow: hidden;
}
.link-track {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 30s linear infinite !important;
  background: transparent;
  pointer-events: auto;
  will-change: transform;
}
.link-track a {
  color: #d48fff;
  text-decoration: none;
  font-size: 1.4rem;
  margin: 0 1.5rem;
  letter-spacing: 1px;
  font-weight: bold;
  transition: color 1.2s ease, transform 0.3s ease;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.link-track a:hover {
  background: linear-gradient(45deg, #FF00FF, #00FFFF, #FFFF00, #FF0080);
  background-size: 400% 400%;
  animation: y2kGradient 2s ease infinite;
  text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
  transform: scale(1.1);
  transition: all 0.3s ease;
}
@keyframes marquee {
  0% { 
    transform: translateX(0); 
  }
  100% { 
    transform: translateX(-50%); 
  }
}
@keyframes y2kGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.main-flex {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  align-items: stretch;
  justify-content: flex-start;
  transition: flex-direction 0.5s, background 0.8s cubic-bezier(.4,0,.2,1);
}
.media-row {
  flex: 1 1 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: #e6e6fa;
  min-width: 0;
  min-height: 0;
  gap: 0;
  width: 100vw;
  height: 100vh;
  transition: width 0.5s, height 0.5s;
}
.video-item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: Menlo, monospace;
  cursor: pointer;
  border: none;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  transform: scale(1);
}

.video-item:hover {
  transform: scale(1.02);
  z-index: 10;
}

.video-item:hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(212, 143, 255, 0.1), rgba(255, 255, 255, 0.05));
  z-index: 1;
  animation: hoverGlow 0.6s ease-out;
}

@keyframes hoverGlow {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
}
.video-item.stack-focus {
  flex: 0 0 60vw !important;
  z-index: 2;
  transform: none;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: focusExpand 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transition: none !important;
}

@keyframes focusExpand {
  0% {
    transform: none;
    opacity: 0.8;
  }
  50% {
    transform: none;
    opacity: 0.9;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

/* 点击动画类 */
.video-item.clicking {
  transform: none !important;
  transition: none !important;
}

/* 退出动画类 */
.video-item.exiting {
  transform: none !important;
  opacity: 0 !important;
  transition: none !important;
}

/* 在side-mode下禁用所有过渡效果 */
.main-flex.side-mode .video-item.clicking,
.main-flex.side-mode .video-item.exiting {
  transition: none !important;
}
.video-item.stack-move-left,
.video-item.stack-move-right {
  display: none !important;
}
.video-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #d8d8f0;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
  filter: brightness(1) contrast(1);
}

.video-item:hover .video-preview {
  filter: brightness(1.1) contrast(1.05);
  transform: scale(1.02);
}
.side-content-container {
  display: none;
}

/* 点击后切换为三栏布局：左滚动文本-中视频-右滚动文本 */
.main-flex.side-mode {
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.main-flex.side-mode .media-row {
  width: 60vw;
  height: 100vh;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.main-flex.side-mode .video-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: none !important;
}
.main-flex.side-mode .video-item .footer {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #d48fff;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: center;
  z-index: 10;
  display: block;
}
.main-flex.side-mode .video-preview {
  max-width: 80vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  transition: none !important;
}
.main-flex.side-mode .side-content-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 20vw;
  min-width: 120px;
  max-width: 350px;
  height: 100vh;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: none;
  line-height: 1.7;
  z-index: 1;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.main-flex.side-mode .side-content-container.left,
.main-flex.side-mode .side-content-container.right {
  background: none !important;
  pointer-events: none !important;
}
.main-flex.side-mode .side-content-container .scroll-list-inner {
  display: flex;
  flex-direction: column;
  animation: none;
  overflow: hidden;
  pointer-events: auto;
}
.main-flex.side-mode .side-content-container .scroll-list-line {
  height: 1.5em;
  line-height: 1.5em;
  white-space: nowrap;
  font-size: 1.1em;
  font-family: Menlo, monospace;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
/* 移除逐行出现的动画延迟 */
/* 移除line-symmetry动画 */
.main-flex.side-mode .side-content-container .footer {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  color: #d48fff;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: left;
  display: none;
}
.exit-btn {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(30,30,40,0.85);
  color: #fff;
  font-size: 1.7rem;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.3s ease;
  display: none;
  transform: scale(0.8);
  opacity: 0;
  animation: exitBtnAppear 0.5s ease-out 0.3s forwards;
}

@keyframes exitBtnAppear {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.exit-btn.show {
  display: flex !important;
}
.exit-btn:hover {
  background: #d48fff;
  color: #222;
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(212, 143, 255, 0.3);
}

/* 视频详情页社交链接绝对定位到顶部 */
.main-flex.side-mode .link-marquee {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 9999 !important;
  pointer-events: auto !important;
  overflow: hidden;
}

/* 第五行文本在视频中间偏下位置，样式突出 */
.main-flex.side-mode .video-item .water-text {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, 0);
  font-size: 1.5em;
  color: #fff;
  font-family: Menlo, monospace;
  text-shadow: 0 2px 16px #000, 0 0 2px #fff;
  pointer-events: none;
  z-index: 20;
  white-space: pre;
  opacity: 1;
  transition: opacity 0.3s;
  user-select: none;
}

.main-flex.side-mode .video-item .water-text.water-link {
  color: #8fd6ff;
  text-decoration: underline;
  font-size: 1.1em;
  cursor: pointer;
  background: rgba(0,0,0,0.25);
  border-radius: 0.5em;
  padding: 0.2em 0.7em;
  transition: background 0.2s, color 0.2s;
}
.main-flex.side-mode .video-item .water-text.water-link:hover {
  color: #fff;
  background: #23607a;
}

.main-flex.side-mode .video-item .water-text.water-box {
  background: rgba(30,30,40,0.65);
  color: #e0e0e0;
  font-size: 0.92em;
  border-radius: 0.7em;
  padding: 0.7em 1.2em;
  box-shadow: 0 4px 24px 0 #0008;
  max-width: 50vw;
  min-width: 100px;
  max-height: 18vh;
  overflow: hidden;
  word-break: break-all;
  text-align: center;
  font-family: Menlo, monospace;
  pointer-events: auto;
  opacity: 0.7;
  user-select: text;
  line-height: 1.7;
  letter-spacing: 0.01em;
  position: absolute;
  left: 50%;
  top: 80%;
  transform: translate(-50%, 0);
  transition: opacity 0.2s, background 0.2s;
}
.main-flex.side-mode .video-item .water-text.water-box:hover {
  opacity: 1;
  background: rgba(30,30,40,0.92);
}

.main-flex.side-mode .video-item .water-text.water-short {
  background: none;
  color: #fff;
  font-size: 1.1em;
  top: 65%;
  opacity: 0.95;
  box-shadow: none;
  padding: 0.2em 1em;
}

.main-flex.side-mode .video-item .water-text.water-scroll {
  max-height: 28vh;
  font-size: 0.88em;
  overflow: hidden;
}

.link-marquee .link-track {
  pointer-events: auto !important;
}

.link-marquee a {
  pointer-events: auto !important;
}

/* 确保在side-mode下链接也可以点击 */
.main-flex.side-mode .link-marquee .link-track {
  pointer-events: auto !important;
  z-index: 9999 !important;
  animation: marquee 30s linear infinite !important;
}

.main-flex.side-mode .link-marquee a {
  pointer-events: auto !important;
  z-index: 9999 !important;
}

/* 确保链接在所有情况下都可以点击 */
.link-marquee,
.link-marquee *,
.link-track,
.link-track * {
  pointer-events: auto !important;
  z-index: 9999 !important;
}

/* 强制marquee动画在所有情况下都工作 */
.link-track,
.link-marquee .link-track,
.main-flex.side-mode .link-marquee .link-track {
  animation: marquee 30s linear infinite !important;
  will-change: transform !important;
} 