/* 全局样式 - 宝的编程心得 */
* { box-sizing: border-box; }

body {
  background: #0a0a1a;
  color: rgba(255,255,255,0.7);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  margin: 0;
  min-height: 100vh;
}

a { color: #00e5ff; text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header */
.header {
  background: rgba(10,10,26,0.8);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { color: #00e5ff; font-size: 1.5rem; }
.logo-text { color: #fff; font-size: 1.2rem; font-weight: bold; }

.nav { display: flex; gap: 16px; }
.nav-link { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-link:hover { color: #00e5ff; text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2a 100%);
  padding: 60px 20px;
  text-align: center;
}

.hero h1 { color: #fff; font-size: 2.5rem; margin-bottom: 16px; }
.hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; }

/* Section */
.section { padding: 40px 20px; }
.section-title { color: #fff; font-size: 1.8rem; margin-bottom: 32px; }
.section-title .accent { color: #00e5ff; }

/* Post Card */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.post-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 0;
  transition: transform 0.2s, border-color 0.2s;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,229,255,0.3);
}

.post-card h3 { margin: 12px 0; }
.post-card h3 a { color: #fff; text-decoration: none; }
.post-card h3 a:hover { color: #00e5ff; text-decoration: none; }

.tag {
  background: rgba(0,229,255,0.1);
  color: #00e5ff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: inline-block;
  margin-right: 8px;
}

/* Post Detail */
.post-container { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.post-title { color: #fff; font-size: 2rem; margin: 16px 0; }
.post-meta { color: rgba(255,255,255,0.7); font-size: 13px; margin: 8px 0; }
.post-meta span { margin-right: 16px; }

.post-content { color: rgba(255,255,255,0.9); line-height: 1.8; font-size: 15px; }
.post-content h1, .post-content h2, .post-content h3 { color: #fff; margin: 24px 0 16px; }
.post-content p { margin: 12px 0; }
.post-content code {
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Monaco', 'Menlo', monospace;
}
.post-content pre {
  background: rgba(0,0,0,0.3);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.1);
}
.post-content pre code { background: none; padding: 0; }

/* Comments */
.comments-section { margin-top: 40px; }
.comment {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.comment-name { color: #fff; font-size: 14px; font-weight: 500; }
.comment-time { color: rgba(255,255,255,0.5); font-size: 12px; }
.comment-content { color: rgba(255,255,255,0.7); font-size: 14px; line-height: 1.6; }

/* Comment Form */
.comment-form {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 24px;
  margin-top: 24px;
}
.form-group { margin-bottom: 12px; }
.form-group label { display: block; color: rgba(255,255,255,0.5); font-size: 12px; margin-bottom: 8px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: #00e5ff; }
textarea.form-control { min-height: 100px; resize: vertical; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 36px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.btn-primary {
  background: #00e5ff;
  color: #0a0a1a;
}
.btn-primary:hover { background: #00ccee; text-decoration: none; }

.back-link {
  color: #00e5ff;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
  display: inline-block;
}
.back-link:hover { text-decoration: underline; }

/* Footer */
.footer {
  background: rgba(10,10,26,0.8);
  padding: 20px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer p { color: rgba(255,255,255,0.5); font-size: 12px; margin: 0; }
.footer a { color: #00e5ff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Login Page */
.login-card {
  background: rgba(26,26,42,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 48px;
  max-width: 400px;
  width: 100%;
  margin: 100px auto;
}
.login-title { color: #fff; text-align: center; margin-bottom: 24px; }

.tip { color: rgba(255,255,255,0.5); font-size: 12px; text-align: center; margin-top: 16px; }

/* Utilities */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* Responsive */
@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .post-title { font-size: 1.5rem; }
  .login-card { margin: 50px 20px; padding: 32px; }
}
