/* 生日彩蛋 · 天才交易员七七 天天涨停
   独立样式表，只服务 #bday77 遮罩，不继承也不污染主站排版。 */

#bday77 {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(900px 620px at 50% 8%, rgba(255, 214, 128, 0.28), transparent 62%),
    radial-gradient(700px 520px at 50% 110%, rgba(191, 58, 43, 0.42), transparent 66%),
    linear-gradient(170deg, #14110b 0%, #1d1a13 44%, #120f0a 100%);
  opacity: 0;
  transition: opacity 420ms ease;
  overflow: hidden;
  overscroll-behavior: contain;
}

#bday77.is-on {
  opacity: 1;
}

#bday77.is-closing {
  opacity: 0;
  pointer-events: none;
}

#bday77Fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.bday77-stage {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  padding: clamp(26px, 5vw, 52px) clamp(20px, 4vw, 48px);
  border-radius: 24px;
  border: 1px solid rgba(214, 176, 96, 0.42);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(255, 226, 158, 0.16), transparent 60%),
    rgba(26, 22, 15, 0.72);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 232, 176, 0.18);
  backdrop-filter: blur(6px);
  text-align: center;
  color: #f6efdd;
  transform: translateY(14px) scale(0.985);
  transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

#bday77.is-on .bday77-stage {
  transform: translateY(0) scale(1);
}

.bday77-eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: rgba(232, 200, 132, 0.82);
}

.bday77-title {
  margin: 0;
  font-family: var(--serif, "Songti SC", "Noto Serif SC", serif);
  font-weight: 700;
  font-size: clamp(30px, 6.2vw, 58px);
  line-height: 1.22;
  letter-spacing: 0.04em;
  background: linear-gradient(178deg, #fff7e2 4%, #f2cf83 46%, #c9973f 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 34px rgba(240, 197, 108, 0.24);
}

.bday77-name {
  display: inline-block;
  white-space: nowrap;
}

.bday77-sub {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bday77-seal {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1.5px solid rgba(214, 70, 48, 0.92);
  background: linear-gradient(180deg, rgba(196, 48, 33, 0.96), rgba(146, 32, 21, 0.96));
  color: #fff3e2;
  font-family: var(--serif, "Songti SC", "Noto Serif SC", serif);
  font-size: clamp(20px, 3.6vw, 30px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  box-shadow: 0 10px 26px rgba(146, 32, 21, 0.4), inset 0 1px 0 rgba(255, 214, 190, 0.35);
  transform: rotate(-1.4deg);
}

.bday77-seal b {
  font-size: 0.66em;
  letter-spacing: 0.02em;
  opacity: 0.95;
}

.bday77-quote {
  margin: 22px auto 0;
  max-width: 40em;
  font-size: clamp(13px, 1.9vw, 15px);
  line-height: 1.95;
  color: rgba(240, 228, 205, 0.78);
}

.bday77-quote em {
  font-style: normal;
  color: #f0c868;
}

.bday77-ticker {
  margin: 20px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(214, 176, 96, 0.32);
  background: rgba(0, 0, 0, 0.28);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(238, 220, 182, 0.9);
  font-variant-numeric: tabular-nums;
}

.bday77-ticker i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e0503a;
  box-shadow: 0 0 10px #e0503a;
  animation: bday77-pulse 1.6s ease-in-out infinite;
}

.bday77-ticker b {
  color: #ff8a72;
  font-weight: 700;
}

@keyframes bday77-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.78); }
}

.bday77-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.bday77-btn {
  appearance: none;
  cursor: pointer;
  padding: 11px 26px;
  border-radius: 999px;
  border: 1px solid rgba(214, 176, 96, 0.55);
  background: linear-gradient(180deg, rgba(249, 214, 140, 0.96), rgba(206, 158, 66, 0.96));
  color: #2a2011;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  box-shadow: 0 12px 30px rgba(206, 158, 66, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.bday77-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 16px 36px rgba(206, 158, 66, 0.4);
}

/* 主行动按钮（开始选股）带一层呼吸光晕，落点在金色实心按钮上 */
#bday77Pick {
  animation: bday77-glow 2.8s ease-in-out infinite;
}

@keyframes bday77-glow {
  0%, 100% { box-shadow: 0 12px 30px rgba(206, 158, 66, 0.28); }
  50% { box-shadow: 0 12px 34px rgba(246, 206, 122, 0.58), 0 0 0 3px rgba(246, 206, 122, 0.14); }
}

#bday77Pick:hover,
#bday77Pick:focus-visible {
  animation-play-state: paused;
}

.bday77-btn:active {
  transform: translateY(0) scale(0.985);
}

.bday77-ghost {
  border-color: rgba(240, 228, 205, 0.28);
  background: transparent;
  color: rgba(240, 228, 205, 0.82);
  box-shadow: none;
  font-weight: 600;
}

.bday77-ghost:hover {
  background: rgba(240, 228, 205, 0.08);
  box-shadow: none;
}

/* 第三行低调文字按钮：只有它才抑制当天 */
.bday77-mute {
  margin-top: 16px;
  border: 0;
  background: none;
  padding: 6px 10px;
  font-family: var(--sans, -apple-system, "PingFang SC", sans-serif);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(240, 228, 205, 0.42);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(240, 228, 205, 0.22);
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.bday77-mute:hover,
.bday77-mute:focus-visible {
  color: rgba(240, 228, 205, 0.86);
  text-decoration-color: rgba(240, 228, 205, 0.6);
}

.bday77-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(240, 228, 205, 0.24);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(240, 228, 205, 0.8);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.bday77-close:hover {
  background: rgba(240, 228, 205, 0.14);
  color: #fff;
}

/* 大厅里的「涨停」印章飘字：字号由 JS 用 --fs 注入，营造近大远小 */
.bday77-float {
  position: absolute;
  z-index: 1;
  font-family: var(--serif, "Songti SC", serif);
  font-weight: 800;
  font-size: min(var(--fs, 28px), 5.2vw);
  letter-spacing: 0.08em;
  color: rgba(255, 138, 114, 0.92);
  background: rgba(224, 80, 58, 0.06);
  border: 1.5px solid rgba(232, 96, 74, 0.72);
  border-radius: 8px;
  padding: 4px 12px;
  white-space: nowrap;
  pointer-events: none;
  animation: bday77-rise linear forwards;
  text-shadow: 0 0 16px rgba(240, 96, 70, 0.62), 0 0 38px rgba(224, 80, 58, 0.28);
  will-change: transform, opacity;
}

@keyframes bday77-rise {
  0% { transform: translateY(0) rotate(var(--r, 0deg)) scale(0.7); opacity: 0; }
  14% { opacity: 1; }
  80% { opacity: 0.94; }
  100% { transform: translateY(-70vh) rotate(var(--r, 0deg)) scale(1.12); opacity: 0; }
}

/* 窄屏：行情条改为竖排，避免「七七专属行情」被挤成两行 */
@media (max-width: 520px) {
  .bday77-ticker {
    flex-direction: column;
    gap: 5px;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    max-width: 100%;
  }
  .bday77-ticker i {
    display: none;
  }
  .bday77-ticker b {
    font-size: 15px;
  }
  .bday77-quote {
    font-size: 13px;
    line-height: 1.85;
  }
  .bday77-stage {
    padding: 34px 22px 30px;
  }
  .bday77-actions {
    gap: 10px;
  }
  .bday77-btn {
    flex: 1 1 auto;
    min-width: 128px;
    padding: 11px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #bday77,
  .bday77-stage,
  .bday77-btn {
    transition: none;
  }
  #bday77Fx {
    display: none;
  }
  .bday77-float {
    animation-duration: 6s;
    opacity: 0.5;
  }
  .bday77-ticker i {
    animation: none;
  }
}
