/* Custom styles for your site */
:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --text-color: #1f2937;
  --bg-color: #ffffff;
  --border-color: #e5e7eb;
  --card-bg: #ffffff;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Custom button styles */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background-color 0.2s;
  display: inline-block;
  font-weight: 500;
}

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

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
  font-weight: 500;
}

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

/* Custom card styles */
.post-card {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.2s;
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
}

.post-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.post-card h2 {
  margin-top: 0;
  color: var(--primary-color);
}

.post-meta {
  color: var(--secondary-color);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Alert styles */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-info {
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.alert-success {
  background-color: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.alert-warning {
  background-color: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.alert-error {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

/* Code block enhancements */
.code-block {
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-title {
  background-color: var(--secondary-color);
  color: white;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-family: monospace;
}

.code-content {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  overflow-x: auto;
}

/* Tag styles */
.post-tags {
  margin-top: 1rem;
}

.tag {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  text-decoration: none;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: background-color 0.2s;
}

.tag:hover {
  background-color: #d97706;
  color: white;
}

/* Reading time */
.reading-time {
  color: var(--secondary-color);
  font-size: 0.875rem;
  font-style: italic;
  margin-top: 1rem;
}

/* Table of contents */
.post-toc {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.post-toc h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.post-toc ul {
  list-style: none;
  padding-left: 0;
}

.post-toc li {
  margin-bottom: 0.5rem;
}

.post-toc a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s;
}

.post-toc a:hover {
  color: var(--primary-color);
}

/* Dark mode improvements */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #3b82f6;
    --secondary-color: #94a3b8;
    --text-color: #f1f5f9;
    --bg-color: #0f172a;
    --border-color: #334155;
    --card-bg: #1e293b;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  }
  
  body {
    background-color: var(--bg-color);
    color: var(--text-color);
  }
  
  .post-card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
  }
  
  .post-toc {
    background-color: #1e293b;
    border-color: var(--border-color);
  }
}

/* Responsive improvements */
@media (max-width: 768px) {
  .post-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .alert {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .alert-icon {
    align-self: center;
  }
}
