.wiki-page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px;
  color: #fff;
}

.wiki-header {
  margin-bottom: 22px;
}

.wiki-title-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(280px, 520px);
  align-items: center;
  gap: 16px;
}

.wiki-title-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 4px solid #074866;
  border-radius: 8px;
  background: #08749b;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 10px 18px rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 24px;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.wiki-title-text {
  min-width: 0;
}

.wiki-title-text h1 {
  margin: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.wiki-title-text h1 span {
  color: #ffd76a;
}

.wiki-search-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 14px;
  border: 4px solid #074866;
  border-radius: 8px;
  background: #08749b;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 10px 18px rgba(0, 0, 0, 0.22);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.wiki-search-container i {
  font-size: 18px;
}

.wiki-main-search {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 900;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.wiki-main-search::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.wiki-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.wiki-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 132px;
  padding: 14px;
  border: 4px solid #074866;
  border-radius: 8px;
  background: #08749b;
  color: #fff;
  text-decoration: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 14px 26px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.wiki-card:active {
  transform: translateY(2px) scale(0.985);
  border-color: #06384f;
  background: #07698d;
  box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.34), inset 0 0 0 2px rgba(0, 0, 0, 0.18), 0 5px 10px rgba(0, 0, 0, 0.2);
}

.wiki-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  border-radius: 6px;
  background: rgba(0, 77, 119, 0.45);
}

.wiki-card-icon img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.36));
}

.wiki-card-body {
  min-width: 0;
}

.wiki-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 25px;
  line-height: 1.06;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.wiki-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.28;
  font-weight: 800;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
}

.wiki-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1000;
  display: none;
  max-height: 450px;
  overflow-y: auto;
  border: 4px solid #074866;
  border-radius: 8px;
  background: #08749b;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.wiki-search-results.active {
  display: block;
}

.wiki-search-result-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
}

.wiki-search-result-item:last-child {
  border-bottom: 0;
}

.wiki-search-result-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.wiki-search-result-item-image {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.32));
}

.wiki-search-result-item-info {
  min-width: 0;
  flex: 1;
}

.wiki-search-result-item-name {
  margin-bottom: 4px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
}

.wiki-search-result-item-type {
  margin-bottom: 2px;
  color: #ffd76a;
  font-size: 12px;
  font-weight: 900;
  text-transform: capitalize;
}

.wiki-search-result-item-description {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wiki-search-result-item-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.wiki-search-result-item-link {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.wiki-search-result-item-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.wiki-search-results-loading,
.wiki-search-results-empty {
  padding: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.wiki-search-results::-webkit-scrollbar {
  width: 8px;
}

.wiki-search-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.wiki-search-results::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.24);
}

@media (max-width: 900px) {
  .wiki-title-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .wiki-search-container {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .wiki-page {
    padding: 14px;
  }

  .wiki-title-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .wiki-title-mark {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .wiki-title-text h1 {
    font-size: 25px;
  }

  .wiki-sections {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wiki-card {
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 110px;
    padding: 12px;
  }

  .wiki-card-icon {
    min-height: 78px;
  }

  .wiki-card-icon img {
    width: 62px;
    height: 62px;
  }

  .wiki-card h3 {
    font-size: 21px;
  }

  .wiki-card p {
    font-size: 13px;
  }

  .wiki-search-results {
    position: fixed;
    inset: 0;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: 106px 14px 14px;
    box-sizing: border-box;
    background: #08749b;
  }

  .wiki-search-results-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000001;
    display: flex;
    align-items: center;
    height: 92px;
    padding: 14px 54px 14px 14px;
    box-sizing: border-box;
    background: #08749b;
    border-bottom: 4px solid #074866;
  }

  .wiki-search-results-header .wiki-main-search {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
  }

  .wiki-search-results-close {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000002;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: #fff;
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
  }
}
