:root {
  --article-bg: #44515a;
  --article-content-bg: #38444d;
  --article-text: #ffffff;
  --article-text-light: #b0b8c0;
  --article-border: #5a6570;
  --article-accent: #5e8fc4;
  --article-accent-hover: #4a7aad;
  --article-link: #5e8fc4;
  --article-link-hover: #4a7aad;
  --article-code-bg: #2a3035;
  --transition-speed: 0.3s;
}

body.article-page {
  margin: 0;
  padding: 0;
  font-family: 'OpenDyslexic', sans-serif;
  background: var(--article-bg);
  color: var(--article-text);
  height: 100vh;
  overflow: hidden;
}

#content.article-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 16px;
  transition: padding var(--transition-speed) cubic-bezier(0.25, 0.1, 0.25, 1);
}

#content.article-wrapper.navbar-top {
  padding-top: calc(var(--navbar-height, 0px) + 16px);
}

#content.article-wrapper.navbar-bottom {
  padding-bottom: calc(var(--navbar-height, 0px) + 16px);
}

#content.article-wrapper.navbar-left {
  padding-left: calc(var(--navbar-width, 0px) + 16px);
}

#content.article-wrapper.navbar-right {
  padding-right: calc(var(--navbar-width, 0px) + 16px);
}

.article-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
}

.article-header {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--article-border);
}

.article-title {
  font-size: 2.8rem;
  line-height: 1.2;
  margin: 0 0 16px 0;
  color: var(--article-text);
}

.article-subtitle {
  font-size: 1.4rem;
  color: var(--article-text-light);
  margin: 0 0 20px 0;
  font-weight: normal;
}

.article-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--article-text-light);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.article-nav a {
  padding: 10px 18px;
  background: var(--article-content-bg);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: all var(--transition-speed);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.article-nav a:hover {
  background: var(--article-accent);
  transform: translateY(-2px);
}

.article-toc {
  background: var(--article-content-bg);
  border: 1px solid var(--article-border);
  border-radius: 8px;
  padding: 20px;
  margin: 30px 0;
}

.article-toc h3 {
  margin: 0 0 16px 0;
  font-size: 1.2rem;
}

.article-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-toc li {
  margin: 8px 0;
}

.article-toc a {
  color: var(--article-link);
  text-decoration: none;
  transition: color var(--transition-speed);
}

.article-toc a:hover {
  color: var(--article-link-hover);
  text-decoration: underline;
}

.article-content {
  background: var(--article-content-bg);
  padding: 40px;
  border-radius: 8px;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 2rem;
  margin: 40px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--article-border);
}

.article-content h3 {
  font-size: 1.6rem;
  margin: 30px 0 16px 0;
}

.article-content h4 {
  font-size: 1.3rem;
  margin: 24px 0 12px 0;
}

.article-content p {
  margin: 20px 0;
}

.article-content a {
  color: var(--article-link);
  text-decoration: underline;
  transition: color var(--transition-speed);
}

.article-content a:hover {
  color: var(--article-link-hover);
}

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

.article-content blockquote {
  margin: 30px 0;
  padding: 20px 25px;
  border-left: 4px solid var(--article-accent);
  background: var(--article-code-bg);
  font-style: italic;
  color: var(--article-text-light);
}

.article-content pre {
  background: var(--article-code-bg);
  padding: 20px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 30px 0;
  border: 1px solid var(--article-border);
}

.article-content code {
  background: var(--article-code-bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.article-content pre code {
  background: none;
  padding: 0;
}

.article-content ul,
.article-content ol {
  margin: 20px 0;
  padding-left: 30px;
}

.article-content li {
  margin: 10px 0;
}

.comments-button {
  position: fixed;
  bottom: 10px;
  right: 24px;
  padding: 12px 24px;
  background: var(--article-content-bg);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'OpenDyslexic', sans-serif;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 900;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-button:hover {
  background: var(--article-accent);
  transform: translateY(-2px);
}

.comments-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 500px;
  max-height: 80vh;
  background: var(--article-content-bg);
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.5);
  z-index: 950;
  display: none;
  flex-direction: column;
  border-radius: 8px 8px 0 0;
}

.comments-panel.active {
  display: flex;
}

.comments-header {
  padding: 16px;
  background: #2a3035;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comments-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.comments-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 24px;
  padding: 0;
  width: 32px;
  height: 32px;
}

.comments-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

@media screen and (max-width: 768px) {
  .article-container {
    padding: 20px;
  }
  
  .article-content {
    padding: 20px;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .article-subtitle {
    font-size: 1.1rem;
  }
  
  .comments-panel {
    width: 100vw;
    max-height: 70vh;

  }
  
  .comments-button {
    bottom: 10px;
    right: 10px;
  }
}