/* ========== 全局样式 ========== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  background-attachment: fixed;
}

/* ========== 顶部公告栏 - 炫彩版 ========== */
.announcement {
  background: linear-gradient(90deg, #ff0080, #ff8c00, #ffd700, #00ff88, #00bfff, #ff0080);
  background-size: 200% 100%;
  color: #fff;
  padding: 8px 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  z-index: 1001;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0,0,0,0.3);
  animation: announceFlow 3s linear infinite;
}

@keyframes announceFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.announcement-content {
  display: inline-block;
  animation: scroll 25s linear infinite;
  letter-spacing: 2px;
}

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

/* ========== 主内容区 iframe ========== */
.main-content {
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 1;
}

#contentFrame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}

/* ========== 超级弹窗公告 ========== */
#splashAnnouncement {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.85), rgba(0,0,0,0.75));
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeInBackdrop 0.4s ease;
}

@keyframes fadeInBackdrop {
  from { opacity: 0; backdrop-filter: blur(0px); }
  to { opacity: 1; backdrop-filter: blur(8px); }
}

.announcement-modal {
  background: linear-gradient(145deg, #ffffff, #fff5f0);
  border-radius: 40px;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.3), 0 0 0 4px rgba(255,105,180,0.3);
  padding: 25px 24px;
  max-width: 420px;
  width: 88%;
  text-align: center;
  position: relative;
  animation: modalBounce 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
  border: 1px solid rgba(255,255,255,0.5);
}

@keyframes modalBounce {
  0% { opacity: 0; transform: scale(0.7) translateY(-50px); }
  60% { opacity: 1; transform: scale(1.02) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.announcement-modal::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(135deg, #ff0080, #ff8c00, #ffd700, #00ff88, #00bfff, #ff0080);
  border-radius: 42px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: borderRotate 3s linear infinite;
}

.announcement-modal:hover::before { opacity: 1; }

@keyframes borderRotate {
  0% { filter: blur(3px); transform: rotate(0deg); }
  100% { filter: blur(3px); transform: rotate(360deg); }
}

.announcement-modal h2 {
  margin: 0 0 10px 0;
  background: linear-gradient(135deg, #ff0080, #ff8c00, #ffd700);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  display: inline-block;
}

.announcement-modal h2:first-of-type {
  font-size: 30px;
  margin-bottom: 5px;
}

.announcement-modal h2:first-of-type::before,
.announcement-modal h2:first-of-type::after {
  content: '✨';
  position: absolute;
  top: -5px;
  font-size: 24px;
  animation: sparkle 1s ease-in-out infinite;
}

.announcement-modal h2:first-of-type::before { left: -30px; animation-delay: 0s; }
.announcement-modal h2:first-of-type::after { right: -30px; animation-delay: 0.5s; }

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.announcement-modal h2:nth-of-type(2) {
  font-size: 18px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 15px;
}

/* ========== 关闭按钮 X 样式（只有靠近 X 才翻转） ========== */
.close-x-btn {
  position: absolute;
  top: 12px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
}

.close-x-btn span {
  font-size: 22px;
  color: #999;
  transition: all 0.3s ease;
  display: inline-block;
}

.close-x-btn:hover {
  background: rgba(255, 0, 128, 0.1);
}

.close-x-btn:hover span {
  color: #ff0080;
  transform: rotate(90deg);
}

/* 移除之前的伪元素关闭按钮 */
.announcement-modal::after {
  display: none;
}

/* ========== 流程说明卡片样式 ========== */
.flow-container {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: 20px;
  padding: 15px;
  margin: 15px 0;
  border: 1px solid rgba(0,255,255,0.3);
}

.flow-title {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #0284c7;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.flow-type {
  flex: 1;
  min-width: 180px;
  background: white;
  border-radius: 16px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.flow-type:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.flow-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 8px;
}

.flow-badge.type-a {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.flow-badge.type-b {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.flow-steps {
  font-size: 12px;
  color: #334155;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.flow-divider {
  font-size: 14px;
  font-weight: bold;
  color: #94a3b8;
  padding: 0 5px;
}

.flow-note {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
}

/* 简化流程步骤样式（随身WiFi版） */
.flow-steps-simple {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  background: white;
  padding: 10px;
  border-radius: 30px;
  word-break: keep-all;
}

.flow-steps-simple span {
  display: inline-block;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  margin: 0 2px;
  font-size: 12px;
}

/* 提示卡片样式（随身WiFi版） */
.tips-container {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 20px;
  padding: 12px 15px;
  margin: 15px 0;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.tips-title {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #b45309;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.7);
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 12px;
  color: #78350f;
}

.tip-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.tip-text {
  text-align: left;
  line-height: 1.4;
}

/* 规则列表样式 */
.rules-list {
  text-align: left;
  margin: 15px 0 10px;
}

.rule-item {
  background: #f8fafc;
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 25px;
  font-size: 13px;
  color: #334155;
  transition: all 0.2s ease;
  border-left: 3px solid #ff69b4;
}

.rule-item:hover {
  transform: translateX(5px);
  background: #fff0f5;
}

.rule-item a {
  color: #ff69b4;
  text-decoration: none;
  font-weight: bold;
}

.rule-item a:hover {
  text-decoration: underline;
}

.know-btn {
  background: linear-gradient(135deg, #ff0080, #ff8c00, #ffd700);
  background-size: 200% 200%;
  color: white;
  border: none;
  border-radius: 60px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.4s ease;
  margin-top: 15px;
  box-shadow: 0 8px 20px rgba(255,0,128,0.4);
  animation: gradientShift 2s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.know-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(255,0,128,0.6);
}

.know-btn:active { transform: scale(0.98); }

/* ========== 悬浮按钮 ========== */
.right-vertical-link {
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  padding: 14px 6px;
  background: linear-gradient(to bottom, #10b981, #059669);
  color: white;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  z-index: 1001;
}

.right-vertical-link:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.right-vertical-link img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.right-vertical-link span {
  writing-mode: vertical-lr;
  text-orientation: upright;
  font-size: 11px;
  letter-spacing: 1px;
}

.share-btn {
  position: fixed;
  top: calc(50% + 160px);
  right: 10px;
  transform: translateY(-50%);
  padding: 14px 6px;
  background: linear-gradient(to bottom, #06b6d4, #0891b2);
  color: white;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  z-index: 1001;
}

.share-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.share-btn img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.share-btn span {
  writing-mode: vertical-lr;
  text-orientation: upright;
  font-size: 11px;
  letter-spacing: 1px;
}

/* ========== 音乐控制按钮 ========== */
#musicControl {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

#musicControl:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6);
}

#musicControl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: rotate 5s linear infinite;
}

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

/* ========== 音乐侧滑面板 ========== */
#musicPanel {
  position: fixed;
  top: 80px;
  right: 0;
  width: 270px;
  max-width: 85vw;
  height: 85px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px 0 0 18px;
  box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  transform: translateX(240px);
  transition: transform 0.35s ease;
  z-index: 1000;
  overflow: hidden;
}

#musicPanel.collapsed { transform: translateX(240px); }
#musicPanel.expanded { transform: translateX(0); }

#musicToggle {
  width: 34px;
  height: 100%;
  background: linear-gradient(to bottom, #ff69b4, #ff1493);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 18px 0 0 18px;
  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
}

#musicToggle:hover { background: linear-gradient(to bottom, #ff1493, #c71585); }

.music-body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 6px 10px 6px 6px;
  gap: 8px;
  min-width: 0;
}

.music-cover img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  animation: rotate 6s linear infinite;
  animation-play-state: paused;
  border: 2px solid #ff69b4;
}

.music-info {
  flex: 1;
  min-width: 0;
  font-size: 11px;
}

.music-title {
  font-weight: bold;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  color: #999;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.music-controls button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #555;
}

.music-controls button:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: scale(1.05);
}

.play-pause-btn {
  background: #333;
  color: white;
}

.play-pause-btn:hover { background: #000; }

/* ========== 版权样式 ========== */
.copyright {
  position: fixed;
  bottom: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  z-index: 1000;
  left: 0;
  right: 0;
  text-align: center;
}

.copyright a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.copyright a:hover { color: #ffd700; }

/* ========== 移动端适配 ========== */
@media (max-width: 480px) {
  #musicPanel { width: 240px; transform: translateX(210px); }
  #musicPanel.collapsed { transform: translateX(210px); }
  .music-cover img { width: 38px; height: 38px; }
  .music-title { font-size: 10px; }
  .music-artist { font-size: 9px; }
  .music-controls button { width: 26px; height: 26px; font-size: 12px; }
  
  .announcement-modal { padding: 18px 16px; max-width: 92%; }
  .announcement-modal h2:first-of-type { font-size: 24px; }
  .announcement-modal h2:first-of-type::before,
  .announcement-modal h2:first-of-type::after { display: none; }
  .announcement-modal h2:nth-of-type(2) { font-size: 16px; }
  .know-btn { padding: 10px 22px; font-size: 14px; }
  
  /* 移动端 X 按钮调整 */
  .close-x-btn { top: 8px; right: 12px; width: 28px; height: 28px; }
  .close-x-btn span { font-size: 18px; }
  
  .right-vertical-link, .share-btn { padding: 10px 5px; }
  .right-vertical-link span, .share-btn span { font-size: 9px; }
  #musicControl { width: 44px; height: 44px; top: 15px; right: 15px; }
  
  /* 流程卡片移动端适配 */
  .flow-row { flex-direction: column; }
  .flow-divider { transform: rotate(90deg); padding: 5px 0; }
  .flow-type { width: 100%; }
  .flow-steps { font-size: 11px; }
  .rule-item { font-size: 11px; padding: 6px 10px; }
  
  /* 随身WiFi移动端适配 */
  .flow-steps-simple { font-size: 11px; }
  .flow-steps-simple span { font-size: 10px; padding: 3px 8px; }
  .tip-item { font-size: 11px; padding: 6px 10px; }
  .tip-icon { font-size: 16px; }
}