/* LoveQing Notes - 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部导航 */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #667eea;
}

/* 主体内容 */
main {
  padding: 40px 0;
}

/* 首页分类卡片 */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.category-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-top: 4px solid;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.category-card.html-css { border-top-color: #e34c26; }
.category-card.javascript { border-top-color: #f0db4f; }
.category-card.vue { border-top-color: #42b883; }
.category-card.react { border-top-color: #61dafb; }
.category-card.typescript { border-top-color: #3178c6; }
.category-card.nodejs { border-top-color: #68a063; }

.category-card h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.category-card p {
  color: #666;
  margin-bottom: 15px;
}

.article-count {
  display: inline-block;
  background: #f0f0f0;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #666;
}

/* 分类列表页 */
.category-header {
  text-align: center;
  margin-bottom: 40px;
  color: white;
}

.category-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.note-item {
  background: white;
  border-radius: 12px;
  padding: 25px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.note-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.note-item h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #333;
}

.note-item p {
  color: #666;
  font-size: 0.95rem;
}

/* 笔记详情页 */
.note-detail {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.back-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  margin-bottom: 20px;
  font-weight: 500;
}

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

.note-detail h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #333;
}

.note-meta {
  display: flex;
  gap: 20px;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.note-content h2 {
  font-size: 1.4rem;
  margin: 30px 0 15px;
  color: #444;
}

.note-content p {
  line-height: 1.8;
  margin-bottom: 15px;
  color: #555;
}

.note-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.note-content code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', 'Consolas', monospace;
  color: #e34c26;
}

.note-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.note-content ul, .note-content ol {
  margin: 15px 0 15px 25px;
  line-height: 1.8;
}

.note-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.note-content th, .note-content td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.note-content th {
  background: #f5f5f5;
  font-weight: 600;
}

/* 页脚 */
footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 30px 0;
  margin-top: 60px;
}

.footer-content {
  text-align: center;
}

.beian-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.beian-info img {
  height: 20px;
}

.beian-info a {
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
}

.beian-info a:hover {
  color: #667eea;
}

.copyright {
  color: #888;
  font-size: 0.85rem;
}

/* 响应式 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .logo-img { height: 28px; }
  .logo-text { font-size: 1.2rem; }
  
  .category-header h1 { font-size: 1.8rem; }
  .note-detail { padding: 25px; }
  .note-detail h1 { font-size: 1.5rem; }
}