@tailwind base;
@tailwind components;
@tailwind utilities;

/* ==================== 全局高度修复 ==================== */

html, body, #__next {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* ==================== 全局暗色滚动条 ==================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #333 #050505;
}

/* ==================== Glass Panel 组件类 ==================== */

@layer components {
  .glass-panel {
    @apply bg-white/5 backdrop-blur-2xl border border-white/10 rounded-2xl;
  }
}

/* ==================== 动画定义 ==================== */

@layer utilities {
  /* Loading 流光效果 */
  @keyframes shimmer {
    0% {
      transform: translateX(-100%);
    }
    100% {
      transform: translateX(100%);
    }
  }
  
  .animate-shimmer {
    animation: shimmer 2s infinite;
  }
  
  /* 脉冲发光效果 */
  @keyframes pulse-glow {
    0%, 100% {
      box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
    }
    50% {
      box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }
  }
  
  .animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
  }
}

/* ==================== XYFlow 覆盖样式 ==================== */

.react-flow {
  --xy-edge-stroke: rgba(255, 255, 255, 0.2) !important;
  --xy-edge-stroke-selected: rgba(255, 255, 255, 0.5) !important;
  --xy-handle-background: rgba(255, 255, 255, 0.2) !important;
  --xy-handle-border-color: rgba(255, 255, 255, 0.3) !important;
}

.react-flow__controls button {
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.react-flow__controls button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.react-flow__minimap {
  background: rgba(5, 5, 5, 0.8) !important;
}

/* 物理屏蔽 Dock 栏及其文字叠加 */
div[class*='dock'], div[class*='Dock'], section[class*='dock'] {
}


div[class*='dock'], div[class*='Dock'], section[class*='dock'] {
}


[class*="dock"], [class*="Dock"], #dock-container, section[class*="dock"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


* { 
    --dock-display: none !important; 
}
[class*="dock"], [class*="Dock"], #dock, .dock, section > div:last-child {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}


* { 
    --dock-visibility: hidden !important; 
}
[class*="dock"], [class*="Dock"], #dock, .dock, section > div:last-child {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


* { 
    --dock-visibility: hidden !important; 
}
[class*="dock"], [class*="Dock"], #dock, .dock, section > div:last-child {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


* { 
    --dock-display: none !important; 
}
[class*="dock"], [class*="Dock"], #dock, .dock, section > div:last-child {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


* { 
    --dock-display: none !important; 
}
[class*="dock"], [class*="Dock"], #dock, .dock, section > div:last-child {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


/* 🔥 脉冲流速控制：降速至舒适的呼吸感 (约0.75x) */
.generating-edge-fast path {
    animation-duration: 1.5s !important;
    stroke-dasharray: 6, 6 !important;
}

/* 🔥 圆形按钮内部元素绝对居中：抹杀一切自带边距，强制锁定在物理中心 */
.aspect-square.rounded-full > * {
    margin: 0 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}
.aspect-square.rounded-full {
    position: relative !important;
}

/* 🔒 强制锁死：全局约束使用 class 的连线手柄尺寸为原先的一半 */
.hover-handle {
  width: 10px !important;
  height: 10px !important;
}
.hover-handle .plus-icon {
  font-size: 10px !important;
  line-height: 10px !important;
}


/* 🔥 画板 UI 终极悬停修复 (安全注入版) */
.react-flow__node .react-flow__handle {
    z-index: 9999 !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease-in-out !important;
}
.react-flow__node:hover .react-flow__handle,
.react-flow__handle:hover {
    opacity: 1 !important;
}

