.telegram-link,
.video-btn {
  align-items: center;
  text-decoration: none;
  transition: 0.3s;
}
.model-title.two-words,
.telegram-link {
  font-size: 1.2rem;
}
.model-description,
.model-title {
  overflow: hidden;
  text-overflow: ellipsis;
}
#logo,
.telegram-link,
.video-btn {
  text-decoration: none;
}
.footer,
.instruction-btn,
.model-title,
header {
  text-align: center;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: linear-gradient(135deg, #f8f9fa 0, #e9ecef 100%);
  font-family: Roboto, sans-serif;
  color: #333;
  min-height: 100vh;
  padding: 20px;
}
.model-title,
h1 {
  font-family: Montserrat, sans-serif;
}
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}
header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}
#logo {
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-image: url("https://wedophoto.github.io/lego/instructions/images/logo.webp");
  background-size: cover;
  background-position: center;
}
h1 {
  font-weight: 700;
  font-size: 2.8rem;
  color: #2c3e50;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.telegram-link {
  display: inline-flex;
  gap: 10px;
  color: #fff;
  font-weight: 500;
  padding: 10px 20px;
  background: #08c;
  border-radius: 25px;
  margin-bottom: 30px;
}
.telegram-link:hover {
  background: #0077b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.2);
}
.telegram-link i {
  font-size: 1.3rem;
}
.models-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}
.model-card {
  background: #fff;
  border-radius: 20px;
  padding: 25px;
  transition: 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.model-card:hover {
  transform: translateY(-10px);
  border-color: #4ecdc4;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.model-card:hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4ecdc4, #ff6b6b);
}
.model-image {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 12px;
  background: #f8f9fa;
  padding: 10px;
}
.model-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
  line-height: 1.4;
  white-space: nowrap;
  width: 100%;
}
.model-description {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: 400;
  min-height: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.model-details {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 15px;
}
.instruction-btn,
.video-btn {
  display: inline-flex;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
}
.video-btn {
  gap: 8px;
  padding: 8px 18px;
  background: #08c;
  border-radius: 25px;
  font-size: 0.95rem;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.2);
}
.back-link,
.instruction-btn {
  align-items: center;
  gap: 10px;
}
.video-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 136, 204, 0.3);
  background: #0077b3;
}
.video-btn i {
  font-size: 0.9rem;
}
.instruction-btn {
  justify-content: center;
  width: 100%;
  padding: 12px;
  background: #4ecdc4;
  text-decoration: none;
  border-radius: 12px;
  margin-top: auto;
  transition: 0.3s;
  border: none;
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}
.back-link,
.top-home-link {
  display: inline-flex;
  text-decoration: none;
  background: rgba(78, 205, 196, 0.1);
  transition: 0.3s;
}
.instruction-btn:hover {
  background: #3db9b0;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(78, 205, 196, 0.4);
}
.back-link:hover,
.top-home-link:hover {
  background: rgba(78, 205, 196, 0.2);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.2);
}
.back-link i,
.instruction-btn i {
  font-size: 1rem;
}
.back-link {
  color: #4ecdc4;
  font-size: 1.1rem;
  padding: 12px 25px;
  border-radius: 25px;
  border: 1px solid rgba(78, 205, 196, 0.2);
}
.back-link:hover {
  transform: translateX(-5px);
}
.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: #666;
  font-size: 0.9rem;
}
@media (max-width: 1200px) {
  .models-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .models-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.top-home-link {
  align-items: center;
  gap: 8px;
  color: #4ecdc4;
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 25px;
  border: 1px solid rgba(78, 205, 196, 0.2);
  margin: 15px auto 0;
  max-width: fit-content;
}
.top-home-link:hover {
  transform: translateX(-3px);
}
.top-home-link i {
  font-size: 0.9rem;
  transition: transform 0.2s;
}
.top-home-link:hover i {
  transform: translateX(-2px);
}
@media (max-width: 600px) {
  .model-description {
    font-size: 0.9rem;
    margin-bottom: 12px;
    -webkit-line-clamp: 3;
  }
  .models-grid {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 1.8rem;
  }
  body {
    padding: 10px;
  }
  .container {
    padding: 15px;
  }
  .top-home-link {
    font-size: 0.95rem;
    padding: 8px 16px;
    margin: 10px auto 0;
  }
}
