/* ========================================================
   Google Gemini Aura - 4K Clean HUD Overlay
   Canvas: 3840 x 2160 | Width: 2560px | Height: 88px
   Architecture: Zero Interior Glare, 2px Conic Rim with
                 Outset-only Glow, Translucent Obsidian Core.
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@500;700;800;900&family=Noto+Sans+SC:wght@500;700;800;900&family=JetBrains+Mono:wght@600;700;800&display=swap');

:root {
  /* OBS Custom CSS live parameters */
  --brand-domain: "keita.cc";
  --game-title: "黑神话：悟空";
  --notices: "✨ 欢迎来到直播间！点赞关注不迷路，交流群：888-666-999 || 🌌 每天晚上 20:00 准时开播，感谢支持！ || 🎮 PC最高画质全景光追 | 欢迎弹幕互动点歌！";

  --canvas-width: 3840px;
  --canvas-height: 2160px;
  --overlay-width: 2560px;
  --overlay-height: 88px;

  /* Typography scale */
  --font-hero: 32px;
  --font-sub: 18px;
  --font-label-sm: 14px;

  /* Obsidian glass tokens */
  --bg-obsidian-translucent: rgba(10, 13, 18, 0.68);
  --bg-bay-clean: rgba(255, 255, 255, 0.04);
  --border-bay-clean: rgba(255, 255, 255, 0.08);

  /* Text tokens */
  --text-main: #f8fafc;
  --text-pure-white: #ffffff;
  --text-muted: #8b9bb4;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  width: 3840px;
  height: 2160px;
  overflow: hidden;
  background-color: transparent;
  font-family: 'Google Sans', 'Noto Sans SC', sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* ================= Chassis & Gemini Conic Rim ================= */
@property --rainbow-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotate-overlay-rainbow {
  0% { --rainbow-angle: 0deg; }
  100% { --rainbow-angle: 360deg; }
}

.overlay-container {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--overlay-width);
  height: var(--overlay-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 10px;

  background: var(--bg-obsidian-translucent);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);

  border-radius: 20px;
  box-shadow: 
    0 16px 36px rgba(0, 0, 0, 0.7),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;

  z-index: 100;
  overflow: visible;
}

/* 2px Conic rim with 3-tier optical aura diffusion strictly anchored to the border */
.overlay-container::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  padding: 2px;
  background: conic-gradient(
    from var(--rainbow-angle, 0deg),
    #4285f4 0%,
    #8b5cf6 25%,
    #ec4899 50%,
    #f59e0b 75%,
    #4285f4 100%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotate-overlay-rainbow 6.5s linear infinite;
  pointer-events: none;
  z-index: 2;
  opacity: 0.95;

  /* Calibrated 4-tier optical aura diffusion: visible rich glow bloom without interior wash */
  filter: 
    drop-shadow(0 0 4px rgba(139, 92, 246, 0.95))
    drop-shadow(0 0 10px rgba(66, 133, 244, 0.8))
    drop-shadow(0 0 20px rgba(236, 72, 153, 0.55))
    drop-shadow(0 0 36px rgba(139, 92, 246, 0.35));
}

/* Remove full-surface ::after backplate to eliminate all interior text wash */
.overlay-container::after {
  display: none;
}

/* ================= Bay 1: Brand Domain & Spectrum ================= */
.panel-section {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 10;
}

.left-panel {
  flex: 0 0 auto;
  gap: 10px;
}

.live-indicator-bay {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 70px;
  background: var(--bg-bay-clean);
  border: 1px solid var(--border-bay-clean);
  border-radius: 14px;
}

.sparkle-housing {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sparkle-icon {
  width: 24px;
  height: 24px;
  fill: url(#gemini-sparkle-gradient);
  opacity: 0.95;
}

.live-text-group {
  display: flex;
  align-items: center;
}

.brand-domain-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--font-hero);
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #60a5fa;
  line-height: 1.2;
}

.vu-meter-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  height: 70px;
  background: var(--bg-bay-clean);
  border: 1px solid var(--border-bay-clean);
  border-radius: 14px;
}

.vu-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 32px;
}

.vu-bar {
  width: 6px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.vu-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, #ec4899 0%, #8b5cf6 50%, #4285f4 100%);
  border-radius: 3px;
  transition: height 0.15s ease-out;
}

/* ================= Bay 2: Game Title ================= */
.game-panel {
  flex: 0 0 auto;
  max-width: 900px;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.035);
  border-radius: 14px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) inset;
  transition: all 0.3s ease;
}

.game-content-single {
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
}

.game-title {
  font-family: 'Google Sans', 'Noto Sans SC', sans-serif;
  font-size: var(--font-hero);
  font-weight: 800;
  color: var(--text-pure-white);
  letter-spacing: 0.8px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================= Bay 3: Seamless Marquee Notice ================= */
.notice-panel {
  flex: 1 1 0%;
  min-width: 400px;
  height: 70px;
  background: rgba(255, 255, 255, 0.035);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) inset;
}

.notice-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.32);
  padding: 4px 16px;
  border-radius: 9999px;
  margin-right: 18px;
  z-index: 5;
}

.notice-badge-icon {
  width: 24px;
  height: 24px;
  fill: #a78bfa;
}

.notice-badge-text {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--font-hero);
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #ffffff;
  line-height: 1.2;
}

.notice-viewport {
  flex: 1 1 0%;
  overflow: hidden;
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(90deg, transparent 0px, #000 24px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0px, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.notice-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
  animation: marquee-seamless 35s linear infinite;
}

@keyframes marquee-seamless {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.notice-item {
  display: inline-flex;
  align-items: center;
  font-family: 'Google Sans', 'Noto Sans SC', sans-serif;
  font-size: var(--font-hero);
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1.2;
  color: #f8fafc;
  padding-right: 48px;
}

.notice-separator {
  display: inline-flex;
  align-items: center;
  margin-left: 48px;
  color: #8b5cf6;
  font-size: 20px;
  opacity: 0.85;
}

/* ================= Bay 4: Digital Clock & Date ================= */
.time-panel {
  flex: 0 0 auto;
  height: 70px;
  background: var(--bg-bay-clean);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-bay-clean);
}

.date-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.date-day {
  font-family: 'Google Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 1.5px;
  line-height: 1.1;
  text-transform: uppercase;
}

.date-calendar {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: 1px;
  line-height: 1.1;
  margin-top: 2px;
}

.clock-display {
  display: flex;
  align-items: baseline;
}

.clock-digits {
  display: inline-block;
  font-family: 'Google Sans', 'JetBrains Mono', sans-serif;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  line-height: 1;
  will-change: transform, filter, opacity;
}

.clock-digits.animate {
  animation: clock-converge-major 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.clock-seconds {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 800;
  margin-left: 6px;
  color: #a78bfa;
  min-width: 32px;
  will-change: transform, filter, opacity;
}

.clock-seconds.animate {
  animation: clock-converge-minor 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Diffuse-to-convergence micro-animation: energy bloom condensing into crisp typography */
@keyframes clock-converge-minor {
  0% {
    transform: scale(1.08);
    filter: blur(4px) drop-shadow(0 0 8px rgba(167, 139, 250, 0.9));
    opacity: 0.45;
  }
  50% {
    filter: blur(1.5px) drop-shadow(0 0 4px rgba(167, 139, 250, 0.6));
    opacity: 0.85;
  }
  100% {
    transform: scale(1);
    filter: blur(0) drop-shadow(0 0 0 rgba(167, 139, 250, 0));
    opacity: 1;
  }
}

@keyframes clock-converge-major {
  0% {
    transform: scale(1.06);
    filter: blur(6px) drop-shadow(0 0 14px rgba(96, 165, 250, 0.95));
    opacity: 0.35;
  }
  60% {
    filter: blur(2px) drop-shadow(0 0 6px rgba(167, 139, 250, 0.6));
    opacity: 0.85;
  }
  100% {
    transform: scale(1);
    filter: blur(0) drop-shadow(0 0 0 rgba(96, 165, 250, 0));
    opacity: 1;
  }
}

/* Quick setting drawer */
.quick-drawer {
  position: absolute;
  top: 106px;
  left: 50%;
  transform: translateX(-50%);
  width: 580px;
  background: rgba(13, 16, 23, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  display: none;
  flex-direction: column;
  gap: 16px;
  z-index: 1000;
  backdrop-filter: blur(20px);
}

.quick-drawer.active {
  display: flex;
}

.quick-drawer h3 {
  font-family: 'Google Sans', sans-serif;
  font-size: 19px;
  color: #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quick-drawer label {
  font-size: 14px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.quick-drawer input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}

.quick-drawer input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}

.quick-drawer .drawer-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.quick-drawer button {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.quick-drawer button.btn-primary {
  background: linear-gradient(135deg, #4285f4 0%, #8b5cf6 50%, #ec4899 100%);
  border: none;
}
