/* ===== базовые настройки ===== */

body {
  margin: 0;
  padding: 20px;
  background-color: #fdf3f7;
  background-image: url("./images/backgr.jpg"); 
  font-family: "Verdana", "Trebuchet MS", sans-serif;
  color: #4a3b40;
  font-size: 15px;
  line-height: 1.6;
}

.page {
  max-width: 800px;
  margin: 0 auto;
  background-color: #fffafd;
  border: 2px solid #e8a8c0;
  border-radius: 12px;
  padding: 25px 35px;
  box-shadow: 3px 3px 0px #e8a8c0;
}

/* ===== шапка ===== */

.header {
  text-align: center;
  border-bottom: 2px dashed #e8a8c0;
  padding-bottom: 15px;
  margin-bottom: 15px;
}


.avatar {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #e8a8c0;
}

.nickname {
  font-weight: bold;
  color: #c15c85;
  font-size: 14px;
}

.header h1 {
  font-size: 26px;
  color: #c15c85;
  margin: 0 0 6px 0;
}

.subtitle {
  font-style: italic;
  color: #8a6b75;
  margin: 0;
}

/* ===== навигация ===== */

.nav {
  text-align: center;
  margin-bottom: 25px;
}

.nav a {
  display: inline-block;
  margin: 0 10px;
  padding: 4px 12px;
  color: #c15c85;
  text-decoration: none;
  border: 1px solid #e8a8c0;
  border-radius: 20px;
  background-color: #fff0f5;
}

.nav a:hover {
  background-color: #e8a8c0;
  color: #ffffff;
}

/* ===== поиск по постам ===== */

.post-search {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.post-search-input {
  width: 100%;
  max-width: 400px;
  font-family: inherit;
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid #e8a8c0;
  border-radius: 20px;
  background-color: #ffffff;
  color: #4a3b40;
}

.post-search-input:focus {
  outline: none;
  border-color: #c15c85;
}

/* ===== хэштеги под постом ===== */

.post-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-tag {
  font-size: 12px;
  color: #c15c85;
  text-decoration: none;
  background-color: #fff0f5;
  border: 1px solid #e8a8c0;
  border-radius: 12px;
  padding: 2px 9px;
}

.post-tag:hover,
.post-tag.active {
  background-color: #c15c85;
  color: #ffffff;
  border-color: #c15c85;
}

.read-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: bold;
  color: #c15c85;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-bottom: 15px;
  font-size: 13px;
  color: #c15c85;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.post-loading {
  text-align: center;
  color: #b593a0;
  font-style: italic;
}

/* ===== карточки (для постов с картами/списками) ===== */

.card-grid {
  display: grid;
  gap: 15px;
  margin: 15px 0;
  justify-content: start;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.info-card {
  position: relative;
  background-color: #fff0f5;
  border: 1px solid #e8a8c0;
  /*border-radius: 10px;*/
  overflow: hidden;
  text-align: center;
  box-shadow: 2px 2px 0px #e8a8c0;
  transition: transform 0.15s ease;
}

.info-card:hover {
  transform: translateY(-3px);
}

.info-card img {
  display: block;
  max-width: 80px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 16px auto 10px;
}

.info-card-body {
  padding: 10px 12px;
}

.info-card h3 {
  margin: 0 0 4px 0;
  color: #c15c85;
  font-size: 14px;
}

.info-card p {
  margin: 0;
  font-size: 12px;
  color: #8a6b75;
}

.info-card .card-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  color: #c15c85;
  background-color: #ffffff;
  border: 1px solid #e8a8c0;
  border-radius: 10px;
  padding: 1px 8px;
}

.card-btn {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: bold;
  color: #c15c85;
  text-decoration: none;
}

.card-btn:hover {
  text-decoration: underline;
}

/* ===== записи блога ===== */

.post {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px dotted #e8a8c0;
}

.post h2 {
  color: #c15c85;
  margin-bottom: 3px;
}

.post-title-link {
  color: inherit;
  text-decoration: none;
}

.post-title-link:hover {
  text-decoration: underline;
}

.post-date {
  font-size: 12px;
  color: #b593a0;
  margin-top: 0;
  margin-bottom: 10px;
}

/* ===== переключатель "сколько показывать" ===== */

.limit-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  justify-content: center;
  margin-bottom: 10px;
}

/* ===== фильтры по тегам ===== */

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px;
  background-color: #fff0f5;
  border: 1px dashed #e8a8c0;
  border-radius: 10px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.filter-group-label {
  font-size: 12px;
  font-weight: bold;
  color: #c15c85;
  margin-right: 3px;
  text-transform: uppercase;
}

.tag-btn {
  font-family: inherit;
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid #e8a8c0;
  border-radius: 12px;
  background-color: #ffffff;
  color: #8a6b75;
  cursor: pointer;
}

.tag-btn:hover {
  background-color: #f7d3e0;
}

.tag-btn.active {
  background-color: #c15c85;
  color: #ffffff;
  border-color: #c15c85;
}

.reset-btn {
  border-style: dashed;
  color: #b593a0;
}

.filter-count {
  text-align: center;
  font-size: 12px;
  color: #b593a0;
  margin: 0 0 15px 0;
}

/* ===== галереи (стемпы / гифки) ===== */

.gallery-note {
  font-size: 13px;
  color: #8a6b75;
  text-align: center;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.stamp img {
  object-fit: cover;
  border: 2px solid #e8a8c0;
}

.gif-item img {
  max-width: 200px;
  border: 2px solid #e8a8c0;
  display: block;
}

figure {
  margin: 0;
  text-align: center;
}

figcaption {
  font-size: 11px;
  color: #8a6b75;
  margin-top: 4px;
}

/* ===== пагинация (листание страниц) ===== */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pager-indicator {
  font-size: 12px;
  color: #8a6b75;
}

/* ===== подвал ===== */

.footer {
  text-align: center;
  font-size: 12px;
  color: #b593a0;
  border-top: 2px dashed #e8a8c0;
  padding-top: 15px;
  margin-top: 20px;
}

.webring {
  margin-top: 10px;
}

.info-card-body img.rabbit {
  display: inline-block;
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
  margin: 0 2px;
}

.info-card img.craft {
  position: absolute;
  width: 150px !important;
  height: 20px !important;
  max-width: none !important;
  max-height: none !important;

  top: 72px;
  left: 50%;
  transform: translateX(-50%);

  z-index: 1001;
}

.user-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mem {
  position:absolute;
  width: 200px !important;
  height: 200px !important;
  z-index: 1000;
}