/* Дополнительные стили только для страниц статей Wiki */

/* Блок "Поделиться" (Share) */
.share-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
  flex-wrap: wrap;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-share:hover {
  background: linear-gradient(145deg, #333, #222);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.btn-share:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-share svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.share-links {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.share-links[aria-hidden="true"] {
  display: none;
}

.share-links a {
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 500;
  transition: all 0.2s ease;
}

.share-links a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Уведомление (Toast) для Share */
.share-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.share-toast.show {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Мета-информация статьи */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: #888;
  font-size: 0.9rem;
  margin: 1rem 0 2rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-meta-item svg {
  width: 16px;
  height: 16px;
  fill: #888;
}

.article-meta-item time {
  color: #aaa;
}

/* Улучшенные стили для сайдбара */
.article-aside {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.article-aside::-webkit-scrollbar {
  width: 4px;
}

.article-aside::-webkit-scrollbar-track {
  background: transparent;
}

.article-aside::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.article-aside::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.article-aside ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1rem 0;
}

.article-aside li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.article-aside a {
  color: var(--text-muted);
  display: block;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.article-aside a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
  border-left-color: var(--primary);
  padding-left: 1rem;
}

.article-aside a:active {
  transform: translateX(2px);
}

/* Активная ссылка в сайдбаре при скролле */
.article-aside a.active {
  background: rgba(110, 168, 255, 0.1);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 500;
}

/* Стили для контента статей */
.warning-box {
  background: rgba(220, 53, 69, 0.15);
  border-left: 6px solid #dc3545;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.info-box {
  background: rgba(23, 162, 184, 0.15);
  border-left: 6px solid #17a2b8;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.tip-box {
  background: rgba(40, 167, 69, 0.15);
  border-left: 6px solid #28a745;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.step-number {
  display: inline-block;
  background: linear-gradient(145deg, #00a2ff, #0066cc);
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-align: center;
  line-height: 36px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.step-image {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin: 1.5rem 0;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: #888;
  font-style: italic;
}

.step-image img {
  max-width: 100%;
  border-radius: 8px;
}

.table-of-contents {
  background: rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.table-of-contents ul {
  columns: 2;
  column-gap: 2rem;
  margin-bottom: 0;
}

.related-articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.related-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem;
  transition: transform 0.2s;
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: #00a2ff;
}

/* Стили для изображений */
.article-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Темы для light mode в специальных блоках */
:root[data-theme='light'] .btn-share {
  background: linear-gradient(145deg, #e0e0e0, #d0d0d0);
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme='light'] .btn-share:hover {
  background: linear-gradient(145deg, #d0d0d0, #c0c0c0);
}

:root[data-theme='light'] .share-links a {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
}

:root[data-theme='light'] .share-toast {
  background: linear-gradient(145deg, #e0e0e0, #d0d0d0);
  color: #1a1a1a;
}

:root[data-theme='light'] .article-meta {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme='light'] .article-aside a:hover {
  background: rgba(0, 0, 0, 0.03);
}

:root[data-theme='light'] .article-aside a.active {
  background: rgba(43, 111, 255, 0.1);
}

:root[data-theme='light'] .step-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

:root[data-theme='light'] .table-of-contents {
  background: rgba(0, 0, 0, 0.02);
}

:root[data-theme='light'] .related-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

/* Медиа-запросы специфичные для wiki */
@media (max-width: 768px) {
  .article-content > div:first-child {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
  
  .btn-share {
    width: 100%;
    justify-content: center;
  }
  
  .share-links {
    width: 100%;
    justify-content: center;
  }
  
  .share-links a {
    flex: 1;
    text-align: center;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .step-number {
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .table-of-contents ul {
    columns: 1;
  }
  
  .step-card {
    padding: 1rem;
  }
  
  .step-title {
    font-size: 1.2rem;
  }
  
  .warning-box,
  .info-box,
  .tip-box {
    padding: 1rem;
  }
  
  .btn-share {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .share-links a {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}
