html {
  width: 100%;
  height: 100%;
}
body {
  width: 100%;
  background-color: #a0d7eb;
  margin: 0;
  padding: 0px;
  padding-bottom: 20px;
  font-family:
    Arial Cyr,
    Arial,
    Tahoma;
  font-size: 15px;
}
h1,
h2 {
  text-align: center;
  color: #246e89;
}
li {
  list-style-type: none;
  line-height: 23px;
}
nav {
  display: table;
  margin: 0 auto;
}
p {
  text-align: center;
  vertical-align: top;
}
#logo {
  display: block;
  width: 256px;
  height: 160px;
  background: url("../images/logo.png") no-repeat center;
  margin: 0 auto;
  margin-top: 10px;
  margin-bottom: 10px;
}
.pdf:before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  float: left;
  margin: 4px 6px 0 0;
  background: url("../images/pdf.png") no-repeat;
}
.lst:before {
  content: "";
  display: block;
  width: 16px;
  height: 15px;
  float: left;
  margin: 5px 6px 0 0;
  background: url("../images/lst.png") no-repeat;
}
.new:before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  float: left;
  margin: 5px 6px 0 0;
  background: url("../images/new.png") no-repeat;
}
.new {
  line-height: 30px;
}
.l1 {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 7px;
  background: url("../images/l1.png") no-repeat;
}
.l2 {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 7px;
  background: url("../images/l2.png") no-repeat;
}
hr {
  width: 90%;
}
.man {
  display: inline-table;
  width: 220px;
  height: 240px;
  border: 2px solid #e0e0ef;
  border-radius: 20px;
  padding: 15px;
  background-color: #ffffff;
  margin: 5px;
  text-align: center;
  text-decoration: none;
}
.man img {
  display: inline-block;
}
.man:hover {
  box-shadow: 0px 4px 10px rgba(89, 129, 204, 0.18);
}
.rem {
  font-size: 12px;
  color: #777777;
}
@media (max-width: 1024px) {
  #defenderToggle,
  #christmasToggle,
  #march8Toggle {
    display: none;
  }
}

.footer {
  background-color: #f5f5f5;
  padding: 20px;
  text-align: center;
  font-family: Arial, sans-serif;
  border-top: 1px solid #ddd;
}

.footer p {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
}

.creation-link {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid #ccc;
  border-radius: 20px;
  transition: all 0.3s ease;
  background-color: white;
  letter-spacing: 0.3px;
}

.creation-link:hover {
  color: #0088cc;
  border-color: #0088cc;
  background-color: #f0f9ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.arrow {
  font-size: 14px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.creation-link:hover .arrow {
  transform: translate(2px, -2px);
}

/* Контейнер поиска */
.search-container {
  max-width: 700px;
  margin: 0 auto 30px auto; /* Отступ снизу до сетки */
  text-align: center;
  position: relative;
  z-index: 10;
}

/* Поле ввода */
.search-box {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50px; /* Полное скругление как у кнопок */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  padding: 5px 10px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.search-box:focus-within {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

/* Иконка поиска */
.search-icon {
  color: #3b82f6;
  font-size: 1.2rem;
  padding: 0 15px;
  opacity: 0.7;
}

/* Инпут */
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  color: #2c3e50;
  padding: 12px 0;
  outline: none;
  width: 100%;
}

.search-box input::placeholder {
  color: rgba(44, 62, 80, 0.5);
  font-style: italic;
}

/* Кнопка очистки */
.search-clear {
  background: transparent;
  border: none;
  color: #95a5a6;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  display: none; /* Скрыта по умолчанию */
}

.search-clear:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #e74c3c;
}

.search-clear.active {
  display: block;
}

/* Подсказки под поиском */
.search-hint {
  margin-top: 10px;
  font-size: 0.85rem;
  color: rgba(44, 62, 80, 0.6);
  font-family: "Roboto", sans-serif;
}

.hint-item {
  color: #3b82f6;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}

.hint-item:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .search-container {
    margin: 0 auto 20px auto;
    padding: 0 10px;
  }
  .search-box {
    padding: 3px 8px;
  }
  .search-box input {
    font-size: 0.9rem;
    padding: 10px 0;
  }
  .search-icon {
    padding: 0 10px;
    font-size: 1rem;
  }
}

/*  */

/*  */

/* --- Стили поиска --- */
.search-wrapper {
  max-width: 700px;
  margin: 0 auto 30px auto;
  position: relative;
  z-index: 10;
}

.search-box {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  padding: 5px 15px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.search-box:focus-within {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.25);
  transform: translateY(-2px);
}

.search-icon {
  color: #3b82f6;
  font-size: 1.2rem;
  padding-right: 12px;
  opacity: 0.7;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  color: #2c3e50;
  padding: 12px 0;
  outline: none;
  width: 100%;
}

.search-box input::placeholder {
  color: rgba(44, 62, 80, 0.5);
  font-style: italic;
}

.search-clear {
  background: transparent;
  border: none;
  color: #95a5a6;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  display: none;
  margin-left: 5px;
}

.search-clear:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #e74c3c;
}

.search-clear.active {
  display: block;
}

.search-stats {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: rgba(44, 62, 80, 0.6);
  font-family: "Roboto", sans-serif;
  min-height: 20px;
}

/* --- Сетка результатов поиска --- */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
  animation: fadeIn 0.4s ease;
}

/* Карточка модели в поиске */
.model-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
}

.model-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.model-image {
  width: 100%;
  height: 160px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 12px;
  background: rgba(240, 240, 240, 0.5);
  transition: transform 0.3s ease;
}

.model-card:hover .model-image {
  transform: scale(1.05);
}

.model-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.model-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  font-family: "Roboto", sans-serif;
}

.btn-video {
  background: linear-gradient(135deg, #ff6b6b, #ee5253);
  color: white;
  box-shadow: 0 3px 8px rgba(255, 107, 107, 0.3);
}

.btn-video:hover {
  background: linear-gradient(135deg, #ee5253, #ff6b6b);
  transform: translateY(-2px);
}

.btn-pdf {
  background: linear-gradient(135deg, #4ecdc4, #45b7d1);
  color: white;
  box-shadow: 0 3px 8px rgba(78, 205, 196, 0.3);
}

.btn-pdf:hover {
  background: linear-gradient(135deg, #45b7d1, #4ecdc4);
  transform: translateY(-2px);
}

/* Пагинация */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 10px 16px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #2c3e50;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination button:hover {
  background: #fff;
  transform: translateY(-2px);
}

.pagination button.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптив */
@media (max-width: 768px) {
  .models-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
  .model-image {
    height: 140px;
  }
  .search-box {
    padding: 5px 10px;
  }
  .search-box input {
    font-size: 0.9rem;
  }
}

/* Метка категории в карточке поиска */
.model-category {
  display: inline-block;
  font-size: 0.75rem;
  color: #7f8c8d;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 10px;
  border-radius: 12px;
  text-decoration: none;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.model-category:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  transform: translateY(-1px);
}

.model-category i {
  margin-right: 4px;
  font-size: 0.65rem;
  opacity: 0.7;
}
