/* 基础样式 */
body {
  margin: 0;
  padding: 0;
  background: #151515;
  color: #eaeaea;
  font-size: 16px;
  line-height: 1.5;
  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}

.container {
  width: 90%;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
header {
  background: rgba(0, 0, 0, 0.1);
  width: 100%;
  border-bottom: 1px dashed #b5e853;
  padding: 20px 0;
  margin: 0 0 40px 0;
}

header h1 {
  font-size: 30px;
  margin: 0;
  text-align: center;
  color: #b5e853;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1),
    0 0 5px rgba(181, 232, 83, 0.1),
    0 0 10px rgba(181, 232, 83, 0.1);
}

/* 链接样式 */
a {
  color: #63c0f5;
  text-shadow: 0 0 5px rgba(104, 182, 255, 0.5);
}

/* 分割线 */
hr {
  margin: 12px 0;
  border: 0;
  border-bottom: 1px dashed #b5e853;
  color: #b5e853;
}

/* 搜索栏样式 */
.search-bar {
  margin: 3% 0;
  width: 100%;
}

form {
  background-color: rgba(0, 0, 0, 0.1);
  width: 100%;
  height: 44px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input {
  all: unset;
  font: 16px system-ui;
  color: #fff;
  height: 100%;
  width: 100%;
  padding: 6px 15px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}

.default-button {
  all: unset;
  cursor: pointer;
  width: 44px;
  height: 44px;
}

.prompt-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 10px;
}

.prompt-button img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

/* 搜索引擎图标样式 */
#search-engine-icon {
  display: none;
  align-items: center;
  padding-left: 15px;
  filter: grayscale(100%);
}

#search-engine-container {
  display: none;
  padding-left: 10px;
  max-width: 150px;
}

.search-engine-text {
  width: max-content;
  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
  font-size: 14px;
  padding: 2px 8px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

/* 修改列表项间距和图标 */
li {
  line-height: 1.5;
  margin: 6px 0;
  list-style: none;
  padding-left: 25px;
  position: relative;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

li::before {
  content: ">>";
  position: absolute;
  left: 2px;
  color: #b5e853;
  font-size: 14px;
  line-height: inherit;
}

/* details 内部的列表项样式 */
details ul li {
  line-height: 1.5;
  margin: 6px 0;
  padding: 1px 0 1px 25px;
}

/* 移除背景图片相关的样式 */
li, details ul li {
  background: none;
}

/* 移除默认的列表样式 */
ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

/* details 标签的样式 */
details {
  margin: 10px 0;
}

details summary {
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 1.05em;
}

/* 大屏幕两列布局 */
@media screen and (min-width: 768px) {
  details ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 20px;
  }
  
  /* Self 部分的列表也使用两列 */
  section > ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 20px;
  }
}

/* 确保标题和分割线占满整行 */
details summary, hr {
  grid-column: 1 / -1;
}

/* 修改主要内容区域样式 */
#main_content {
  width: 100%;
  margin: 0 auto;
}

/* 大屏幕布局调整 */
@media screen and (min-width: 768px) {
  #main_content {
  }
  
  details ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 20px;
  }
  
  section > ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 20px;
  }
}

/* 超大屏幕使用三列布局 */
@media screen and (min-width: 1200px) {
  details ul, section > ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 超超大屏幕使用四列布局 */
@media screen and (min-width: 1600px) {
  details ul, section > ul {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 大屏幕时增加更多边距 */
@media screen and (min-width: 1200px) {
  .container {
    width: 85%;
    padding: 0 30px;
  }
}

/* 超大屏幕时的边距 */
@media screen and (min-width: 1600px) {
  .container {
    width: 80%;
    padding: 0 40px;
  }
}
