/**
 * 视频侧面板组件样式
 * 类似图片中的设计风格
 */

/* 侧面板容器 */
.video-panel-container {
  position: fixed;
  top: calc(50% - 200px + 60px);
  left: 0;
  transform: translateY(-50%);
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.video-trigger {
  position: relative;
}

/* 触发器按钮 */
.video-trigger {
  display: flex;
  align-items: center;
  background: #404040;
  border-radius: 0 25px 25px 0;
  padding: 0;
  border: 4px solid #cc3300;
  border-left: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
}

/* 默认展开状态：按钮隐藏 */
.video-trigger.expanded {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-100px) !important; /* 移动更远，确保完全消失 */
  pointer-events: none !important;
  box-shadow: none !important;
  border: none !important; /* 移除边框，避免留下痕迹 */
  background: transparent !important; /* 背景透明 */
}

/* 当作为第二层显示时：按钮可见，显示在第一层上方 */
.video-trigger.as-second-layer {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important; /* 保持原来的位置，不移动 */
  pointer-events: auto !important;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2) !important;
  z-index: 10001 !important; /* 确保在消息与公告面板之上 */
}

.video-trigger:hover {
  border-color: #ff4422;
}

/* 触发器内容 */
.trigger-content {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  justify-content: center;
  min-height: 24px;
}

/* 段子按钮特定样式 */
.video-trigger:not(.video-trigger-2) .trigger-content {
  padding: 8px 8px;
  min-height: 20px;
  width: 75px;
  white-space: nowrap;
  overflow: hidden;
}

/* 段子文字 */
.video-text {
  color: white;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 3px;
  transition: font-size 0.2s ease;
}

/* 段子按钮文字特定样式 */
.video-trigger:not(.video-trigger-2) .video-text {
  white-space: nowrap;
  letter-spacing: 2px;
}

.video-trigger:hover .video-text {
  font-size: 24px;
}

/* 消息与公告按钮 */
.video-trigger-2 {
  position: fixed;
  top: calc(50% - 200px + 60px + 80px + 30px + 60px + 60px);
  left: 0;
  transform: translateY(-50%);
  border-color: #ff7a45;
}

.video-trigger-2:hover {
  border-color: #ff5722;
}

.video-trigger-2 .trigger-content {
  padding: 12px 16px;
  width: 140px;
  white-space: nowrap;
  overflow: hidden;
}

.video-trigger-2 .video-text {
  font-size: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.video-trigger-2:hover .video-text {
  font-size: 22px;
}

/* 默认展开状态：按钮隐藏 */
.video-trigger-2.expanded {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-100px) translateY(-50%) !important; /* 保持原有的translateY，同时移动更远 */
  pointer-events: none !important;
  box-shadow: none !important;
  border: none !important; /* 移除边框，避免留下痕迹 */
  background: transparent !important; /* 背景透明 */
}

/* 当作为第二层显示时：按钮可见，显示在第一层上方 */
.video-trigger-2.as-second-layer {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) !important; /* 消息与公告按钮保持原来的transform */
  pointer-events: auto !important;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2) !important;
  z-index: 10001 !important; /* 确保在段子面板之上 */
}

/* 展开的面板 */
.video-panel {
  position: fixed;
  left: -20px;
  transform: none;
  width: 1000px;
  height: 300px;
  background: rgba(64, 64, 64, 0.7); /* 70%透明度的深灰色背景 */
  border: 4px solid #cc5a2e;
  border-radius: 24px;
  box-shadow: 2px 0 25px rgba(0, 0, 0, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  overflow: visible;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0);
  transform-origin: 0 0;
  backdrop-filter: blur(5px); /* 添加背景模糊效果，增强透明感 */
  -webkit-backdrop-filter: blur(5px); /* Safari兼容性 */
}

/* 段子面板 - 设置为最高层级，暗红色边框 */
.video-panel-1 {
  top: calc(50% - 200px + 150px);
  z-index: 25000 !important; /* 比消息与公告面板更高 */
  border-color: #8B0000 !important; /* 暗红色边框 */
}

/* 消息与公告面板 - 设置为高层级，确保不被导航栏遮挡 */
.video-panel-2 {
  top: calc(50% - 200px + 150px - 80px + 20px + 80px + 50px); /* 向下移动额外50px */
  z-index: 20000 !important; /* 设置为20000，确保高于所有导航栏元素 */
  border-color: #ff7a45 !important; /* 橘色边框 */
  background: rgba(64, 64, 64, 0.7) !important; /* 确保与段子面板相同的70%透明度 */
  width: 1500px !important; /* 原来1400px + 100px = 1500px */
  height: 600px !important; /* 原来500px + 100px = 600px */
}

/* 段子面板激活时保持最高层级 */
.video-panel-1.active {
  z-index: 25000 !important; /* 最高层级，始终在消息与公告面板之上 */
}

/* 消息与公告面板激活时保持高层级 */
.video-panel-2.active {
  z-index: 20000 !important; /* 高层级，确保不被导航栏遮挡 */
}

.video-panel.active {
  opacity: 1;
  transform: scale(1);
}

/* 面板头部 */
.panel-header {
  background: transparent;
  color: #333;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  position: absolute;
  top: 8px;
  right: 8px;
  width: auto;
  height: auto;
  z-index: 10;
}

.panel-title {
  display: none;
}

.panel-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-close:hover {
  color: #cc3300; /* 橘红色 */
  transform: scale(1.1);
}

.panel-close svg {
  width: 24px;
  height: 24px;
}

/* 消息与公告面板的关闭按钮 - 默认白色，悬停橘色，更大尺寸 */
.panel-close-2 {
  color: white !important; /* 默认白色 */
  padding: 12px !important; /* 增加内边距，使按钮更大 */
  width: 48px !important; /* 设置固定宽度 */
  height: 48px !important; /* 设置固定高度 */
}

.panel-close-2:hover {
  color: #ff7a45 !important; /* 悬停时变为橘色 */
  transform: scale(1.15); /* 悬停时稍微放大 */
}

/* 消息与公告面板关闭按钮的SVG图标也要更大 */
.panel-close-2 svg {
  width: 32px !important; /* SVG图标更大 */
  height: 32px !important;
}

/* 面板内容 */
.panel-content {
  padding: 20px;
  text-align: center;
  height: calc(100% - 40px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.development-status {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.status-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff7a45, #ff9a6b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.status-icon::before {
  content: "⚠️";
  font-size: 24px;
}

.status-title {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
}

.status-description {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 25px 0;
}

.progress-section {
  width: 100%;
  margin-bottom: 20px;
}

.progress-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
  text-align: left;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff7a45, #ff9a6b);
  border-radius: 5px;
  width: 0%;
  transition: width 1s ease-out;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

.progress-text {
  font-size: 12px;
  color: #999;
  text-align: right;
}

.coming-soon {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.coming-soon-text {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
}

/* 遮罩层 */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.video-overlay.active {
  opacity: 1;
  /* visibility: visible; */
}

/* 动画效果 */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 122, 69, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 122, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 122, 69, 0);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .video-panel-container {
    top: calc(40% - 100px + 60px);
  }

  .video-panel {
    width: 600px;
    height: 250px;
    left: -15px;
    top: calc(40% - 100px + 60px + 80px);
  }

  /* 消息与公告面板在移动端的尺寸和位置调整 */
  .video-panel-2 {
    width: 1000px !important; /* 移动端：900px + 100px = 1000px */
    height: 500px !important; /* 移动端：400px + 100px = 500px */
    top: calc(40% - 100px + 60px + 80px - 80px + 20px + 80px + 50px) !important; /* 向下移动额外50px */
  }

  .trigger-content {
    padding: 8px 16px;
    min-height: 18px;
  }

  .video-text {
    font-size: 18px;
    letter-spacing: 2px;
  }

  .video-trigger:hover .video-text {
    font-size: 20px;
  }

  .video-trigger {
    border-width: 3px;
  }

  .video-trigger-2 .video-text {
    font-size: 18px;
  }

  .video-trigger-2:hover .video-text {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .video-panel-container {
    top: calc(30% - 50px + 60px);
  }

  .video-panel {
    width: calc(100vw - 40px);
    height: 200px;
    left: 20px;
    right: 20px;
    top: calc(30% - 50px + 60px + 20px);
    border-radius: 16px;
  }

  /* 消息与公告面板在小屏幕的尺寸和位置调整 */
  .video-panel-2 {
    width: calc(100vw - 10px) !important; /* 小屏幕时更宽一些 */
    height: 450px !important; /* 小屏幕：350px + 100px = 450px */
    top: calc(30% - 50px + 60px + 20px - 80px + 20px + 50px) !important; /* 向下移动额外50px */
  }

  .trigger-content {
    padding: 6px 14px;
    min-height: 16px;
  }

  .video-text {
    font-size: 16px;
    letter-spacing: 1px;
  }

  .video-trigger:hover .video-text {
    font-size: 18px;
  }

  .video-trigger {
    border-width: 2px;
    border-radius: 0 20px 20px 0;
  }

  .panel-content {
    padding: 15px 12px;
  }

  .status-title {
    font-size: 18px;
  }
  
  .status-description {
    font-size: 14px;
  }

  .video-trigger-2 .video-text {
    font-size: 16px;
  }

  .video-trigger-2:hover .video-text {
    font-size: 18px;
  }
}

/* 中等屏幕 */
@media (max-width: 1024px) and (min-width: 769px) {
  .video-panel-container {
    top: calc(45% - 120px);
  }

  .video-panel {
    width: 800px;
    height: 280px;
    top: calc(45% - 120px + 200px);
  }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
  .video-panel-container {
    top: calc(50% - 200px + 60px);
  }

  .video-trigger {
    border-width: 5px;
  }

  .trigger-content {
    padding: 12px 22px;
    min-height: 24px;
  }

  .video-text {
    font-size: 24px;
    letter-spacing: 4px;
  }

  .video-trigger:hover .video-text {
    font-size: 26px;
  }

  .video-trigger-2 .video-text {
    font-size: 22px;
  }

  .video-trigger-2:hover .video-text {
    font-size: 24px;
  }

  .video-panel {
    width: 1200px;
    height: 350px;
    border-radius: 28px;
    top: calc(50% - 200px + 150px);
  }

  /* 消息与公告面板在大屏幕的尺寸和位置调整 */
  .video-panel-2 {
    width: 1700px !important; /* 大屏幕时：1600px + 100px = 1700px */
    height: 650px !important; /* 大屏幕时：550px + 100px = 650px */
    top: calc(50% - 200px + 150px - 80px + 20px + 50px) !important; /* 向下移动额外50px */
  }
}

/* 超小屏幕 */
@media (max-width: 360px) {
  .video-panel-container {
    top: calc(25% - 30px + 60px);
  }

  .video-panel {
    top: calc(25% - 30px + 60px + 0px);
    height: 180px;
  }

  .trigger-content {
    padding: 5px 12px;
    min-height: 14px;
  }

  .video-text {
    font-size: 12px;
    letter-spacing: 0.5px;
  }

  .video-trigger:hover .video-text {
    font-size: 14px;
  }
}
