/**
 * AITradePal 标题分析模块样式
 * 独立前缀：.aitrade-pc-wrapper / .aitrade-m-wrapper
 * 完全隔离，不影响主站其他元素
 */

/* ========== PC端样式 ========== */
.aitrade-pc-wrapper {
  max-width: 1400px;
  margin: 0 auto 20px auto;   /* 底部留白，与下方表单隔开 */
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.aitrade-pc-panel {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px);
  border-radius: 36px;
  box-shadow: 0 25px 40px -12px rgba(0, 90, 150, 0.2),
              inset 0 1px 2px rgba(255,255,255,0.9),
              0 0 0 1px rgba(100, 180, 255, 0.3);
  border: 1px solid rgba(255,255,255,0.6);
  height: 32vh;
  height: 32dvh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.aitrade-pc-header {
  display: flex;
  align-items: center;
  padding: 14px 20px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(45,127,249,0.15);
}

.aitrade-pc-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.aitrade-pc-tab {
  background: transparent;
  border: none;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e4b7c;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.aitrade-pc-tab.active {
  background: #2d7ff9;
  color: white;
  box-shadow: 0 4px 10px rgba(45,127,249,0.3);
}

.aitrade-pc-content {
  flex: 1;
  min-height: 0;
  padding: 12px 20px 16px;
}

.aitrade-pc-carousel {
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
}

.aitrade-pc-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease-out;
}

.aitrade-pc-slide {
  flex: 0 0 100%;
  height: 100%;
  padding-right: 4px;
}

.aitrade-pc-card {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  padding: 16px 20px;
  height: 100%;
  border: 1px solid rgba(110,180,255,0.3);
  box-shadow: inset 0 1px 4px rgba(255,255,255,0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.aitrade-pc-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  align-items: start;
}

.aitrade-pc-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aitrade-pc-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e4b7c;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.aitrade-pc-text {
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 500;
}

.aitrade-pc-highlight {
  color: #2d7ff9;
  font-weight: 700;
}

.aitrade-pc-accent {
  color: #0a3e6d;
  font-weight: 700;
}

.aitrade-pc-red {
  color: #d32f2f;
  font-weight: 800;
  font-size: 1.1em;
}

/* PC LIVE卡片 */
.aitrade-pc-livecard {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.aitrade-pc-liverow {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px 4px;
}

.aitrade-pc-liveitem {
  text-align: center;
  min-width: 70px;
}

.aitrade-pc-livenum {
  font-size: 1.3rem;
  font-weight: 900;
  color: #0f3460;
  line-height: 1.2;
  text-shadow: 0 0 4px rgba(15, 52, 96, 0.15);
}

.aitrade-pc-livelabel {
  font-size: 0.7rem;
  font-weight: 600;
  color: #1e4b7c;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.aitrade-pc-slogan {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: #0f3460;
  text-shadow: 0 0 12px rgba(15, 52, 96, 0.2);
  letter-spacing: 0.5px;
  animation: aitradePcGlow 2.5s infinite ease-in-out;
  line-height: 1.3;
}

@keyframes aitradePcGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(15, 52, 96, 0.1); opacity: 0.95; }
  50% { text-shadow: 0 0 18px rgba(15, 52, 96, 0.35); opacity: 1; }
}

/* PC显示控制 */
.aitrade-pc-only {
  display: block;
}
.aitrade-mobile-only {
  display: none !important;
}

/* ========== 移动端样式（仅影响 .aitrade-m-wrapper 内部） ========== */
@media (max-width: 700px) {
  .aitrade-pc-only {
    display: none !important;
  }
  .aitrade-mobile-only {
    display: block !important;
  }

  .aitrade-m-wrapper {
    max-width: 500px;
    margin: 0 auto 12px auto;   /* 底部留白 */
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .aitrade-m-panel {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(24px);
    border-radius: 24px;
    box-shadow: 0 20px 30px -10px rgba(0, 90, 150, 0.2);
    border: 1px solid rgba(255,255,255,0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    position: relative;
  }

  /* 三条激光线 */
  .aitrade-m-panel::before,
  .aitrade-m-panel::after,
  .aitrade-m-content::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2d7ff9, #6ec8ff, transparent);
    animation: aitradeMLaser 6s linear infinite;
    pointer-events: none;
    z-index: 3;
    opacity: 0.5;
  }

  .aitrade-m-panel::before { top: 15%; animation-delay: 0s; }
  .aitrade-m-panel::after { top: 50%; animation-delay: 2s; }
  .aitrade-m-content::after { top: 85%; animation-delay: 4s; }

  @keyframes aitradeMLaser {
    0% { left: -50%; }
    100% { left: 150%; }
  }

  .aitrade-m-header {
    padding: 5px 5px 2px;
    border-bottom: 1px solid rgba(45,127,249,0.15);
    position: relative;
    z-index: 2;
  }

  .aitrade-m-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .aitrade-m-tabs::-webkit-scrollbar { display: none; }

  .aitrade-m-tab {
    background: transparent;
    border: none;
    padding: 4px 9px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #1e4b7c;
    border-radius: 30px;
    white-space: nowrap;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
  }

  .aitrade-m-tab.active {
    background: #2d7ff9;
    color: white;
    box-shadow: 0 4px 12px rgba(45,127,249,0.4);
  }

  .aitrade-m-content {
    flex: 1;
    padding: 5px 8px 6px;
    position: relative;
    z-index: 2;
  }

  .aitrade-m-carousel {
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
  }

  .aitrade-m-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-out;
  }

  .aitrade-m-slide {
    flex: 0 0 100%;
    height: 100%;
    padding-right: 2px;
  }

  .aitrade-m-card {
    background: transparent;
    padding: 2px 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* LIVE卡片移动端 */
  .aitrade-m-livegrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 3px;
    margin-bottom: 10px;
  }

  .aitrade-m-liveitem { text-align: center; }
  .aitrade-m-livenum {
    font-size: 1.2rem;
    font-weight: 900;
    color: #0f3460;
    line-height: 1.2;
  }
  .aitrade-m-livelabel {
    font-size: 0.65rem;
    font-weight: 700;
    color: #1e4b7c;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

/* 移动端标语基础样式（适用于英文，默认较小自适应） */
.aitrade-m-slogan1,
.aitrade-m-slogan2 {
  text-align: center;
  font-weight: 900;
  color: #0f3460;
  line-height: 1.2;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  /* 英文使用较小的视口字体，防止过长 */
  font-size: clamp(0.9rem, 4.5vw, 1.3rem);
}

.aitrade-m-slogan1 {
  margin-bottom: 4px;
}

.aitrade-m-slogan1 span {
  margin: 0 6px;
  display: inline-block;
  animation: aitradeMIconBounce 2s infinite;
}

/* 中文环境下覆盖为固定大字体 */
html:lang(zh) .aitrade-m-slogan1,
html:lang(zh) .aitrade-m-slogan2 {
  font-size: 1.3rem;        /* 中文保持大而清晰 */
  white-space: nowrap;       /* 强制一行显示，因为中文短 */
}

/* 如果中文在小屏也希望强制一行但允许缩小，可用下面的替代（推荐） */
@media (max-width: 360px) {
  html:lang(zh) .aitrade-m-slogan1,
  html:lang(zh) .aitrade-m-slogan2 {
    font-size: 1.2rem;       /* 极小屏中文稍缩，仍比英文大 */
    white-space: normal;      /* 若真超长可换行 */
  }
}

/* 英文极小屏进一步缩小 */
@media (max-width: 460px) {
  .aitrade-m-slogan1,
  .aitrade-m-slogan2 {
    font-size: clamp(0.8rem, 4.3vw, 1.1rem);
  }
}

  @keyframes aitradeMIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
  }

  .aitrade-m-text {
    font-size: 0.85rem;
    line-height: 1.35;
    margin-bottom: 5px;
    font-weight: 400;
  }
  .aitrade-m-label { font-weight: 700; color: #1e4b7c; }
  .aitrade-m-highlight { color: #2d7ff9; font-weight: 700; }
  .aitrade-m-red { color: #d32f2f; font-weight: 700; }
  .aitrade-m-redtitle { color: #d32f2f; font-weight: 800; }
}