/* === 页面基础样式 === */
body {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	background-color: #f5f5f5;
	background-image: url(bd.jpg);
	color: #333;
	margin: 0;
	padding: 0;
}

#app-container {
	max-width: 720px;
	margin: 0 auto;
	position: relative;
}

/* === 书签树核心样式 === */
#bookmark-container {
	max-width: 800px;
	margin: auto;
	background-color: #fff;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	padding: 0;
}

ul.bookmark-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

li.bookmark-item.open > .collapsible {
	display: block;
	border-bottom: 1px solid #ffb75a;
}

.collapsible a {
	display: flex;
	align-items: center;
	color: #333;
	text-decoration: none;
	background-color: transparent;
	transition: background-color 0.2s;
	border-bottom: 1px solid #e0e0e0;
	padding: 10px 30px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.collapsible a:hover {
	background-color: #cee2fd;
}

/* === 标题 header === */
.folder-header {
	padding: 10px 30px;
	height: 24px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: inherit;
	color: #333;
	transition: background-color 0.3s, font-size 0.3s, font-weight 0.3s;
}

/* === 层级背景样式 === */
.depth-1 > .folder-header {
	font-size: 1.4rem;
	background-color: #ddd;
	border-bottom: 1px solid #bbb;
	height: 34px;
}

.depth-2 > .folder-header {
	font-size: 1.2rem;
	background-color: #f3eadf;
	border-bottom: 1px solid #e7c8a0;
}

.depth-3 > .folder-header {
	font-size: 1.1rem;
    background-color: #d5e6ff;
    border-bottom: 1px solid #91a5c9;
}

.depth-4 > .folder-header {
	font-size: 1rem;
	background-color: #e6efff;
	border-bottom: 1px solid #bbb;
}

/* 展开状态样式（sticky 顶部） */
.depth-1.open > .folder-header {
	background-color: #b94152 !important;
	color: #fff;
	height: 30px;
	font-weight: bold;
	font-size: 1.6rem;
	letter-spacing: 4px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	position: sticky;
	top: 0;
	z-index: 10;
}

.depth-2.open > .folder-header {
	background-color: #ffa05a !important;
	color: #b94152;
	height: 26px;
	font-weight: bold;
	font-size: 1.4rem;
	letter-spacing: 4px;
	position: sticky;
	top: 0;
	z-index: 11;
}

.depth-3.open > .folder-header {
	background-color: #4285f4 !important;
	color: #fff;
	height: 24px;
	font-weight: bold;
	font-size: 1.3rem;
	letter-spacing: 4px;
	position: sticky;
	top: 0;
	z-index: 12;
}

.depth-4.open > .folder-header {
	background-color: #a6ceff !important;
	color: #5a93ff;
	height: 22px;
	font-weight: bold;
	font-size: 1.2rem;
	letter-spacing: 4px;
	position: sticky;
	top: 0;
	z-index: 10;
}
li.bookmark-item.open .toggle-icon {
	transform: rotate(90deg);
}
li.bookmark-item.depth-2.open> .collapsible a {
	padding: 10px 60px;
}

/* === 复制文本项样式 === */
.chrome-extension-wrapper {
  margin: 0;
  overflow: hidden;
}

.chrome-extension-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: #fffbe6;
  border-bottom: 1px solid #ffc107;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
  border-left: 4px solid #ffc107;
}

.chrome-extension-header:hover {
  background-color: #fdf2b3;
}

.chrome-extension-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chrome-extension-copy {
  margin-left: 10px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.chrome-extension-copy:hover {
  opacity: 1;
}

.chrome-extension-content {
  margin: 0;
  padding: 15px;
  background: white;
  border-top: 1px solid #eee;
  max-height: 560px;
  overflow: auto;
  white-space: pre-wrap;
  font-family: monospace;
  line-height: 1.5;
  display: none;
}

/* 展开状态 */
.chrome-extension-wrapper.open .chrome-extension-content {
  display: block;

}
.chrome-extension-wrapper.open .chrome-extension-header {
    background-color: #ffc107;
	color: #b94152;
	font-weight: bold;
	font-size: 1.2rem;
	letter-spacing: 4px;
  height: 26px;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* 修复书签加载状态 */
.bookmark-loading {
  padding: 20px;
  text-align: center;
  color: #666;
}

.bookmark-error {
  padding: 20px;
  text-align: center;
  color: #d32f2f;
}

.retry-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* 顶部工具栏整体 */
#top-toolbar {
	display: flex;
	align-items: center;   /* 垂直居中 */
	justify-content: space-between;  /* 左右两边元素分散 */
	padding: 8px 30px;
	background-color: #333;  /* 深色背景 */
	color: white;
	height: var(--toolbar-height);
	box-sizing: border-box;
	box-shadow: 0 1px 2px rgba(0,0,0,0.1);
	user-select: none;    /* 禁止选中 */
	z-index: 1000;
	position: relative;
}




/* 顶部工具栏左侧区域：Logo + 标题 */
.header-left, .header-right {
	display: flex;
	align-items: center;
	gap: 16px;
}
	
/* Logo图标 */
#logo {
	width: 36px;
	height: 36px;
	object-fit: contain;
	display: block;
}

/* 标题 */
#top-toolbar h1 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	color: white;
}
   
    /* 搜索框样式 */
	.search-toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
}
.search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0,0,0,0.5);
	display: flex;
	justify-content: center;     /* 水平居中 */
	align-items: flex-start;     /* 靠顶部对齐 */
	padding-top: 0;           /* 距离顶部一定距离 */
	z-index: 1000;
}


.search-overlay.hidden {
	display: none;
}

.search-box {
  display: flex;
  position: relative; 
  background: #222;
  padding: 10px;
  width: 100%;
  max-width: 700px; /* 和书签容器保持一致 */
  margin: 0 auto;    /* 水平居中 */
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);  
  justify-content: center; /* 水平居中子元素 */
  align-items: center;     /* 如果需要垂直居中（单行输入） */
  flex-direction: column;  /* 如果后续还有提示或按钮等竖向堆叠内容 */
}

.search-input {
  width: 100%; /* 占满 search-box 宽度 */
  max-width: 580px;
  padding: 8px 30px;
  border: 2px solid #4a90e2;
  border-radius: 30px;
  font-size: 16px;
  outline: none;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
}


.search-input:focus {
  border-color: #2a6496;
  box-shadow: 0 2px 12px rgba(74, 144, 226, 0.3);
}

.search-input::placeholder {
  color: rgba(255,255,255,0.7);
}

.search-clear {
  position: absolute;
  right: 40px;
  top: 30px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 0 10px;
  z-index: 1005;
}

.search-clear:hover {
  color: #666;
}
  
/* 搜索结果样式 */
.search-results {
  position: flex;
  top: 60px;
  width: 100%;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1001;
}

.search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-result-item {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.search-result-item:hover {
  background: #f8f8f8;
}

.search-result-item a {
  display: block;
  text-decoration: none;
  color: #333;
  
}
/* 包裹图标和标题，放在一行 */
.result-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 图标样式（已存在，保留） */
.favicon-icon {
  width: 16px;
  height: 16px;
  opacity: 0.8;
  flex-shrink: 0;
}

/* 标题在图标右侧显示 */
.result-title {
  color:#000;
  font-weight: 500;
  padding: 5px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 路径信息独立一行并对齐标题文本 */
.result-path {
  display: block;
  font-size: 12px;
  color: #bbb;
  margin-left: 24px; /* 图标宽度 + gap */
  line-height: 1.4;
}


.highlight {
  color: #4a90e2;
  font-weight: bold;
}

.no-results, .search-error {
  padding: 20px;
  text-align: center;
  color: #666;
}

.more{
	font-size: 1.4rem;
}

/* 底部工具栏整体 */
#bottom-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	background-color: #333;
	box-sizing: border-box;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
	flex-shrink: 0;
	margin: 0 auto;
	border-top: 4px solid #444;
}

.footer-tabs {
	display: flex;
	width: 100%;
}

.tab-button {
	flex: 1;
	border: none;
	color: #ddd;
	background: none;
	padding: 8px;
	font-size: 14px;
	cursor: pointer;
	
}

.tab-button.active {
	color:#ddd;
	background: #444;
	font-size:1.2em;
	border-radius: 0 0 12px 12px ;
	margin-bottom:8px;
}
    

/* 工具弹出框 */
#tool-popup {
	position: absolute;
	z-index: 999;
}

.hidden {
	display: none !important;
}

/* 图标按钮浮窗工具箱 */
#tool-popup.tool-popup-icons {
	position: absolute;
	right: 0;
	bottom: 60px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 12px;
	background: white;
	border-radius: 10px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
	border: 1px solid #ccc;
	min-width: 100px;
	max-width: 260px;
	overflow-y: auto;
}




.tool-popup-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tool-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px 8px;
  font-family: inherit;
  user-select: none;
}

.tool-icon-btn .tool-icon {
  font-size: 24px; /* 图标大小 */
  line-height: 1;
}

.tool-icon-btn .tool-name {
  margin-top: 4px;
  font-size: 12px; /* 文字大小 */
  color: #333;
  white-space: nowrap;
}

    
    /* 响应式设计 */
@media (max-width: 480px) {
.search-input {
  max-width: 260px;
}

.search-results {
  width: 100%;
}
.search-clear {
  right: 40px;
}
}
