/* 自定义样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.title {
  font-size: 3.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h2 {
  color: #1f2937;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.icon {
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

.card p {
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card li {
  color: #4b5563;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
  padding-left: 1.5rem;
}

.card li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

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

.buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
  text-decoration: none;
  color: white;
}

.footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  margin-top: 3rem;
}

.footer p {
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .title {
    font-size: 2.5rem;
  }
  
  .content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .buttons {
    flex-direction: column;
  }
  
  .button {
    text-align: center;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

/* 博客相关样式 */
.blog-section {
  grid-column: 1 / -1;
  margin-bottom: 2rem;
}

.section-title {
  color: #1f2937;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  border-bottom: 3px solid #667eea;
  padding-bottom: 0.5rem;
}

.blog-list {
  display: grid;
  gap: 1.5rem;
}

.blog-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.blog-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-title a {
  color: #1f2937;
  text-decoration: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.blog-title a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.blog-excerpt {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

.author, .date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.read-more {
  display: inline-block;
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.read-more:hover {
  color: #764ba2;
  text-decoration: underline;
  transform: translateX(3px);
}

/* 新的博客详情页布局 */
.blog-detail-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* 左侧导航栏 */
.blog-sidebar {
  width: 300px;
  min-height: 100vh;
  background: white;
  border-right: 1px solid #e2e8f0;
  padding: 2rem 1.5rem;
  box-shadow: 2px 0 10px rgba(0,0,0,0.05);
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  z-index: 10;
}

.sidebar-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #667eea;
}

.sidebar-header h3 {
  font-size: 1.25rem;
  font-weight: bold;
  color: #1f2937;
  margin: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-blog-card {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  border-left: 3px solid #667eea;
  transition: all 0.3s ease;
}

.sidebar-blog-card:hover {
  background: #e2e8f0;
  transform: translateX(3px);
}

.sidebar-blog-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.sidebar-blog-title a {
  color: #1f2937;
  text-decoration: none;
}

.sidebar-blog-title a:hover {
  color: #667eea;
}

.sidebar-blog-excerpt {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.4;
  margin: 0 0 0.5rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-blog-date {
  font-size: 0.75rem;
  color: #9ca3af;
}

.sidebar-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.sidebar-home-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.sidebar-home-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* 主要内容区域 */
.blog-main {
  flex: 1;
  margin-left: 300px;
  padding: 2rem;
  max-width: none;
}

.blog-article-new {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* 新的文章头部样式 */
.blog-header-new {
  background: white;
  padding: 3rem 3rem 2rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.blog-title-new {
  font-size: 3rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.blog-meta-new {
  display: flex;
  gap: 2rem;
  font-size: 1rem;
  color: #6b7280;
}

.blog-author, .blog-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 新的文章内容样式 */
.blog-content-new {
  padding: 3rem;
  line-height: 1.8;
  font-size: 1.125rem;
  color: #374151;
  max-width: none;
}

.blog-content-new h1,
.blog-content-new h2,
.blog-content-new h3 {
  color: #1f2937;
  margin: 3rem 0 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.blog-content-new h1 { 
  font-size: 2.5rem;
  border-bottom: 2px solid #667eea;
  padding-bottom: 0.5rem;
}
.blog-content-new h2 { 
  font-size: 2rem;
  margin-top: 2.5rem;
}
.blog-content-new h3 { 
  font-size: 1.5rem;
  margin-top: 2rem;
}

.blog-content-new p {
  margin-bottom: 2rem;
  text-align: justify;
}

.blog-content-new ul, 
.blog-content-new ol {
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.blog-content-new li {
  margin-bottom: 0.75rem;
}

.blog-content-new strong {
  color: #1f2937;
  font-weight: 600;
}

.blog-content-new code {
  background: #f1f5f9;
  color: #e11d48;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

/* 新的文章底部样式 */
.blog-footer-new {
  padding: 2rem 3rem;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.blog-tags {
  display: flex;
  gap: 0.5rem;
}

.tag {
  background: #667eea;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.blog-actions {
  display: flex;
  gap: 1rem;
}

.action-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.action-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* 错误页面样式 */
.blog-error {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.error-content {
  background: white;
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 500px;
}

/* 响应式博客样式 */
@media (max-width: 768px) {
  .blog-section {
    margin-bottom: 1.5rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .blog-card {
    padding: 1.5rem;
  }
  
  .blog-title {
    font-size: 1.25rem;
  }
  
  .blog-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* 新的博客详情页响应式样式 */
  .blog-detail-container {
    flex-direction: column;
  }
  
  .blog-sidebar {
    width: 100%;
    min-height: auto;
    position: static;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .sidebar-header h3 {
    font-size: 1.1rem;
  }
  
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.75rem;
  }
  
  .sidebar-blog-card {
    flex: 0 0 250px;
    margin-right: 0.5rem;
  }
  
  .sidebar-blog-title {
    font-size: 0.85rem;
  }
  
  .sidebar-blog-excerpt {
    font-size: 0.75rem;
    -webkit-line-clamp: 1;
  }
  
  .sidebar-footer {
    margin-top: 1rem;
    padding-top: 0.5rem;
  }
  
  .blog-main {
    margin-left: 0;
    padding: 1rem;
  }
  
  .blog-header-new {
    padding: 2rem 1.5rem 1.5rem;
  }
  
  .blog-title-new {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .blog-meta-new {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .blog-content-new {
    padding: 2rem 1.5rem;
    font-size: 1rem;
  }
  
  .blog-content-new h1 {
    font-size: 1.8rem;
  }
  
  .blog-content-new h2 {
    font-size: 1.5rem;
  }
  
  .blog-content-new h3 {
    font-size: 1.25rem;
  }
  
  .blog-footer-new {
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .error-content {
    margin: 1rem;
    padding: 2rem;
  }
}

/* 管理后台样式 */
.admin-login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-form-wrapper {
  background: white;
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: #6b7280;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #1f2937;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.login-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* 管理后台主界面 */
.admin-container {
  min-height: 100vh;
  background: #f8fafc;
}

.admin-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.admin-nav h1 {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1f2937;
  margin: 0;
}

.admin-actions {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5a67d8;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* 统计卡片 */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  text-align: center;
}

.stat-card h3 {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #667eea;
}

/* 博客管理表格 */
.blog-management {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}

.blog-management h2 {
  padding: 1.5rem 2rem;
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
}

.blog-table {
  overflow-x: auto;
}

.blog-table table {
  width: 100%;
  border-collapse: collapse;
}

.blog-table th,
.blog-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.blog-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #1f2937;
  font-size: 0.9rem;
}

.blog-table td {
  color: #374151;
}

.blog-table tr:hover {
  background: #f8fafc;
}

.status {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.status.published {
  background: #d1fae5;
  color: #047857;
}

.status.draft {
  background: #fef3c7;
  color: #92400e;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-edit {
  background: #3b82f6;
  color: white;
}

.btn-edit:hover {
  background: #2563eb;
}

.btn-delete {
  background: #ef4444;
  color: white;
}

.btn-delete:hover {
  background: #dc2626;
}

/* 博客表单 */
.blog-form {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.blog-form .form-group {
  margin-bottom: 1.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .admin-nav {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .admin-actions {
    justify-content: center;
  }
  
  .admin-main {
    padding: 1rem;
  }
  
  .admin-stats {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .blog-table {
    font-size: 0.8rem;
  }
  
  .blog-table th,
  .blog-table td {
    padding: 0.5rem;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .login-form-wrapper {
    padding: 2rem;
  }
}