/* 基础重置 - 兼容旧内核 */
* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
  background: #eceff1;
  color: #263238;
  font-size: 14px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* 容器 */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 16px;
}

/* 头部与LOGO */
.header {
  text-align: right;
  margin-bottom: 12px;
  padding: 4px 0;
}

.logo-link {
  display: inline-block;
  text-decoration: none;
}

.logo {
  width: 36px;
  height: 36px;
  display: block;
  border: none;
}

/* 标题 */
.page-title,
.project-title {
  font-size: 22px;
  font-weight: 400;
  color: #1b5e20;
  margin-bottom: 16px;
}

.project-title {
  border-left: 3px solid #2e7d32;
  padding-left: 12px;
  letter-spacing: 0.5px;
}

/* 卡片 - 扁平mdui风格 */
.card {
  background: #fff;
  border: 1px solid #cfd8dc;
  -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  margin-bottom: 14px;
  border-radius: 2px;
  overflow: hidden;
}

.card-header {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #eceff1;
  font-weight: 600;
  color: #1b5e20;
  font-size: 15px;
}

.card-body {
  padding: 14px 16px;
  color: #455a64;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 8px 20px;
  background: #2e7d32;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: #1b5e20;
}

.btn-small {
  padding: 3px 10px;
  font-size: 12px;
}

.btn-large {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
}

/* 文件树 */
.file-tree {
  list-style: none;
}

.file-tree li {
  padding: 8px 0;
  border-bottom: 1px solid #eceff1;
}

.file-tree li:last-child {
  border-bottom: none;
}

.file-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 8px;
  border: none;
}

.file-name,
.file-link {
  color: #37474f;
  text-decoration: none;
  font-size: 14px;
}

.file-link {
  color: #2e7d32;
  cursor: pointer;
}

.file-link:hover {
  text-decoration: underline;
}

/* 依赖库 */
.lib-list {
  list-style: none;
}

.lib-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eceff1;
}

.lib-list li:last-child {
  border-bottom: none;
}

.lib-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 8px;
  border: none;
}

/* 代码预览 */
.code-preview {
  background: #263238;
  color: #aed581;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  white-space: pre;
  word-wrap: normal;
  -webkit-overflow-scrolling: touch;
}

/* 语法高亮 */
.code-preview .comment { color: #546e7a; font-style: italic; }
.code-preview .string { color: #c3e88d; }
.code-preview .keyword { color: #c792ea; }
.code-preview .number { color: #f78c6c; }
.code-preview .preprocessor { color: #82aaff; }
.code-preview .header { color: #ffcb6b; }

/* 项目卡片（索引页） */
.project-card {
  -webkit-transition: box-shadow 0.2s;
  transition: box-shadow 0.2s;
}

.project-card:hover {
  -webkit-box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-name {
  font-size: 17px;
  color: #1b5e20;
  margin-bottom: 4px;
  font-weight: 500;
}

.project-desc {
  font-size: 13px;
  color: #78909c;
  line-height: 1.5;
}

/* 文本内容 */
.intro-text,
.author-text {
  font-size: 14px;
  line-height: 1.8;
  color: #455a64;
}

/* 状态提示 */
.loading,
.error {
  text-align: center;
  padding: 36px;
  color: #78909c;
}

.error {
  color: #b71c1c;
}

/* 响应式 - 照顾小屏与老设备 */
@media screen and (max-width: 480px) {
  .container {
    padding: 12px;
  }
  .project-title {
    font-size: 20px;
  }
  .btn-large {
    display: block;
    width: 100%;
    text-align: center;
  }
}
