:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #0070f3;
  --accent-soft: #ebf5ff;
  --danger: #eb5757;
  --danger-soft: #ffebeb;
  --border: #eaeaea;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --text: #eee;
    --muted: #888;
    --accent: #3291ff;
    --accent-soft: #072a4d;
    --danger: #ff4d4d;
    --danger-soft: #3d0a0a;
    --border: #333;
  }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

header h1 a {
  text-decoration: none;
  color: inherit;
}

nav a {
  margin-left: 1rem;
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

article {
  margin-bottom: 4rem;
}

article h2 {
  margin-top: 0;
}

article .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.post-content {
  font-size: 1.1rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

pre {
  background: var(--border);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

.mermaid {
  background: transparent !important;
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

/* Admin Styles */
.admin-container {
  max-width: 700px;
  margin: 0 auto;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.admin-list {
  list-style: none;
  padding: 0;
}

.admin-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Premium Material Icon Buttons */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  padding: 0;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

.icon-btn .material-symbols-rounded {
  font-size: 22px;
  transition: transform 0.2s;
}

.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.icon-btn:hover .material-symbols-rounded {
  transform: scale(1.1);
}

/* Danger Button Style */
.icon-btn.delete:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}