html,
body {
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root {
  --background: #0a0a0a;
  --foreground: #f5f5f5;
  --card: #121212;
  --card-foreground: #f5f5f5;
  --muted: #1e1e1e;
  --muted-foreground: #a3a3a3;
  --border: #2a2a2a;
  --input: #2a2a2a;
  --accent: #2563eb;
  --accent-foreground: #ffffff;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

#main {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  background: var(--background);
}

#container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  flex: 1;
  background: var(--background);
}

.terminal_area {
  width: 100%;
  height: 100%;
  position: relative;
  border-right: 1px solid var(--border);
  background: #202020;
}

.terminal_area[data-active="1"] {
  /* 聚焦状态不添加额外样式 */
}

.terminal_area[data-drag-over="1"] {
  /* outline: 2px dashed rgba(37, 99, 235, 0.9); */
  /* outline-offset: -4px; */
}

.terminal_drop_cover {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-in-out;
  z-index: 3;
}

.terminal_drop_cover_inner {
  padding: 18px 22px;
  background: rgba(24, 24, 24, 0.9);
  border: 1px solid rgba(37, 99, 235, 0.8);
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.terminal_drop_cover_title {
  font-size: 16px;
  color: var(--foreground);
  margin-bottom: 6px;
}

.terminal_drop_cover_hint {
  font-size: 12px;
  color: var(--muted-foreground);
}

.terminal_area[data-drag-over="1"] .terminal_drop_cover {
  opacity: 1;
}

.terminal_bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: #151515;
  border-bottom: 1px solid #2a2a2a;
  z-index: 2;
}

.terminal_bar_left {
  display: inline-flex;
  gap: 6px;
  color: var(--muted-foreground);
  font-size: 14px;
  letter-spacing: 0.02em;
  justify-content: center;
  align-items: center;
}

.terminal_bar_icon .icon {
  width: 14px;
  height: 14px;
  color: var(--muted-foreground);
  display: flex;
  justify-content: center;
  align-items: center;
}

.terminal_title {
  white-space: nowrap;
}

.terminal_bar_right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.terminal {
  padding: 40px 0 8px 16px;
  height: 100%;
  overflow: hidden;
}

.terminal_each {
  width: 100%;
  height: 100%;
  z-index: 1;
  position: relative;
  background: #1f1f1f;
}

.action {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 24px;
  gap: 6px;
}

.action_btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 24px;
  cursor: pointer;
  color: var(--foreground);
  background: var(--muted);
  border-radius: 4px;
  font-size: 12px;
}

.action_btn .icon {
  width: 14px;
  height: 14px;
}

.btn_add {
  color: var(--accent-foreground);
  background: var(--muted);
  border-color: transparent;
}

.btn_close {
  color: #f5f5f5;
  background: var(--muted);
  border-color: transparent;
}

[data-shared="disallowed"] .action {
  display: none;
}

[data-count="1"] .btn_close {
  display: none;
}

[data-max="1"] .btn_add {
  display: none;
}

[data-count="4"] .terminal_area {
  width: 25%;
}

[data-count="3"] .terminal_area {
  width: 33.3%;
}

[data-count="2"] .terminal_area {
  width: 50%;
}

[data-count="1"] .terminal_area {
  width: 100%;
}

.xterm-viewport.xterm-viewport {
  scrollbar-width: thin;
}

.xterm-viewport::-webkit-scrollbar {
  width: 10px;
}

.xterm-viewport::-webkit-scrollbar-track {
  opacity: 0;
}

.xterm-viewport::-webkit-scrollbar-thumb {
  min-height: 20px;
  background-color: #333;
}
