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

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #001e3c 0%, #000a18 100%);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: auto;
  overflow-y: auto;
}

/* Metro UI 顶部栏 */
.metro-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.metro-title {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-button {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s;
}

.back-button.visible {
  display: flex;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.metro-time {
  font-size: 16px;
  opacity: 0.8;
}

/* 主要内容区域 */
.metro-container {
  padding: 100px 80px 80px;
  min-height: 100vh;
}

/* 标题区 */
.page-title {
  font-size: 56px;
  font-weight: 200;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.page-subtitle {
  font-size: 18px;
  opacity: 0.7;
  margin-bottom: 30px;
  font-weight: 300;
}

/* 搜索栏 */
.search-bar {
  margin-bottom: 40px;
}

.search-bar input {
  width: 100%;
  max-width: 500px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
}

.search-bar input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #0078d7;
}

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

/* Metro 磁贴网格 */
.metro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  gap: 4px;
}

/* Metro 磁贴 */
.metro-tile {
  width: 150px;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s;
  position: relative;
  overflow: hidden;
  padding: 14px;
  text-align: center;
  box-sizing: border-box;
}

.metro-tile:hover {
  transform: scale(1.02);
  outline: 3px solid rgba(255, 255, 255, 0.3);
  outline-offset: -3px;
}

.metro-tile:active {
  transform: scale(0.98);
}

.metro-tile.large {
  width: 304px;
  height: 150px;
  grid-column: span 2;
  align-items: flex-start;
  text-align: left;
  justify-content: space-between;
  padding: 16px;
}

/* Metro 颜色方案（10 色） */
.metro-blue { background: #0078d7; }
.metro-green { background: #107c10; }
.metro-orange { background: #ff8c00; }
.metro-red { background: #d13438; }
.metro-purple { background: #744da9; }
.metro-teal { background: #008272; }
.metro-magenta { background: #d8479b; }
.metro-dark { background: #2d2d2d; }
.metro-lime { background: #b8d432; color: #000; }
.metro-brown { background: #8e5621; }

.metro-tile-text {
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  opacity: 0.95;
  line-height: 1.25;
  word-break: break-word;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metro-tile.large .metro-tile-text {
  font-size: 15px;
  text-align: left;
  width: 100%;
  -webkit-line-clamp: 2;
}

.metro-tile-date {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
  font-weight: 300;
}

.metro-tile.large .metro-tile-date {
  font-size: 12px;
  margin-top: 4px;
  text-align: left;
  width: 100%;
}

.metro-tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
  justify-content: center;
  max-width: 100%;
}

.metro-tile.large .metro-tile-tags {
  justify-content: flex-start;
}

.metro-tag {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0;
  opacity: 0.9;
  white-space: nowrap;
}

/* 空状态 */
.empty-state {
  padding: 80px 20px;
  text-align: center;
  opacity: 0.5;
  font-size: 18px;
  font-weight: 300;
}

/* 详情视图 */
.detail-back {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 30px;
  transition: all 0.1s;
}

.detail-back:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.post-detail {
  max-width: 900px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 50px 60px;
}

.post-detail h1 {
  font-size: 40px;
  font-weight: 200;
  margin-bottom: 16px;
  letter-spacing: 1px;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  opacity: 0.7;
  font-weight: 300;
  flex-wrap: wrap;
}

.post-meta .post-tag {
  padding: 3px 10px;
  background: rgba(0, 120, 215, 0.3);
  border-left: 2px solid #0078d7;
  font-size: 12px;
}

.post-content {
  font-size: 16px;
  line-height: 1.8;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.92);
}

.post-content h1 {
  font-size: 32px;
  font-weight: 200;
  margin: 40px 0 18px;
  letter-spacing: 1px;
  color: #ffffff;
}

.post-content h2 {
  font-size: 26px;
  font-weight: 300;
  margin: 36px 0 16px;
  letter-spacing: 1px;
  color: #ffffff;
}

.post-content h3 {
  font-size: 20px;
  font-weight: 300;
  margin: 28px 0 12px;
  color: #ffffff;
}

.post-content h4 {
  font-size: 17px;
  font-weight: 400;
  margin: 24px 0 10px;
  color: #ffffff;
}

.post-content p {
  margin-bottom: 16px;
}

.post-content code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 14px;
  color: #b8d432;
}

.post-content pre {
  background: rgba(0, 0, 0, 0.5);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 20px 0;
  border-left: 3px solid #0078d7;
}

.post-content pre code {
  background: transparent;
  padding: 0;
  color: rgba(255, 255, 255, 0.9);
}

.post-content blockquote {
  border-left: 3px solid #ff8c00;
  padding: 8px 16px;
  margin: 20px 0;
  background: rgba(255, 140, 0, 0.08);
  opacity: 0.9;
}

.post-content blockquote p {
  margin-bottom: 0;
}

.post-content a {
  color: #4ea3e0;
  text-decoration: none;
  border-bottom: 1px dotted #4ea3e0;
}

.post-content a:hover {
  color: #7cbef0;
  border-bottom-style: solid;
}

.post-content ul,
.post-content ol {
  margin: 12px 0 16px 24px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content img {
  max-width: 100%;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 30px 0;
}

/* 加载提示 */
.loading {
  text-align: center;
  padding: 60px 20px;
  opacity: 0.5;
  font-size: 16px;
  font-weight: 300;
}

/* 错误提示 */
.error-msg {
  text-align: center;
  padding: 40px 20px;
  color: #ff6b6e;
  font-size: 16px;
  font-weight: 300;
}

/* 页脚 */
.metro-footer {
  padding: 40px 80px;
  text-align: center;
  opacity: 0.5;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.metro-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
}

.metro-footer a:hover {
  color: #4ea3e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .metro-header {
    padding: 0 20px;
  }

  .metro-container {
    padding: 80px 20px 40px;
  }

  .page-title {
    font-size: 36px;
  }

  .page-subtitle {
    font-size: 16px;
  }

  .metro-grid {
    grid-template-columns: repeat(auto-fill, 130px);
  }

  .metro-tile {
    width: 130px;
    height: 130px;
    padding: 12px;
  }

  .metro-tile.large {
    width: 264px;
    height: 130px;
  }

  .metro-tile-text {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .metro-tile.large .metro-tile-text {
    font-size: 13px;
  }

  .post-detail {
    padding: 30px 20px;
  }

  .post-detail h1 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .metro-container {
    padding: 70px 12px 30px;
  }

  .metro-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
  }

  .metro-tile {
    width: 100%;
    height: 150px;
    padding: 10px 8px;
  }

  .metro-tile.large {
    width: 100%;
    height: 150px;
    grid-column: span 2;
  }

  .metro-tile-text {
    font-size: 12px;
    line-height: 1.2;
    -webkit-line-clamp: 3;
  }

  .metro-tile.large .metro-tile-text {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .metro-tile-date {
    font-size: 10px;
    margin-top: 2px;
  }

  .metro-tile-tags {
    display: none;
  }
}
