/* ===== MODEL.CSS — карточка 3D-модели ===== */

/* ---- Хлебные крошки ---- */
.breadcrumbs {
  max-width: 1340px;
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #6d8fa0;
}

.breadcrumbs a {
  color: #7a98aa;
  text-decoration: none;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs a:hover {
  color: #b0d0e4;
}

.breadcrumbs .sep {
  color: #3f5a68;
  font-size: 18px;
  user-select: none;
}

/* ---- Основной контейнер ---- */
.model-detail {
  max-width: 1340px;
  margin: 24px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-areas:
    "gallery sidebar"
    "info sidebar";
  gap: 28px;
}

@media (max-width: 1024px) {
  .model-detail {
    grid-template-columns: 1fr;
    grid-template-areas:
      "gallery"
      "info"
      "sidebar";
    gap: 24px;
  }
}

/* ---- Галерея ---- */
.model-gallery {
  grid-area: gallery;
  background: #0f161b;
  border: 1px solid #1f2f38;
  border-radius: 24px;
  overflow: hidden;
}

.gallery-main {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0a1015;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-main .main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.gallery-main:hover .main-image {
  transform: scale(1.05);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 16, 21, 0.85);
  border: 1px solid #2f404a;
  color: #c0d6e4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.gallery-nav:hover {
  background: rgba(20, 40, 55, 0.9);
  border-color: #4f8aaa;
  color: #e0f0ff;
}

.gallery-nav.prev {
  left: 16px;
}

.gallery-nav.next {
  right: 16px;
}

.gallery-counter {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(10, 16, 21, 0.85);
  border: 1px solid #2f404a;
  color: #8aa6b8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  border-top: 1px solid #1a2a34;
  background: #0d1419;
}

.gallery-thumbs::-webkit-scrollbar {
  height: 4px;
}

.gallery-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: #2f404a;
  border-radius: 4px;
}

.thumb {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s;
  opacity: 0.6;
}

.thumb:hover {
  opacity: 0.9;
  border-color: #3f6a80;
}

.thumb.active {
  opacity: 1;
  border-color: #4f8aaa;
  box-shadow: 0 0 16px rgba(60, 150, 200, 0.25);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Информация о модели ---- */
.model-info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.model-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.model-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #eef4f8;
  margin: 0;
  letter-spacing: -0.5px;
}

.model-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: #11191e;
  border: 1px solid #29373f;
  color: #7a98aa;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  font-size: 16px;
}

.btn-icon:hover {
  background: #1a2832;
  border-color: #3f6a80;
  color: #c0dcee;
}

.btn-icon.favorited {
  color: #4f8aaa;
  border-color: #4f8aaa;
}

.btn-icon.favorited i {
  font-weight: 900;
}

/* ---- Мета-информация ---- */
.model-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
  color: #6d8fa0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item a {
  color: #7fa8c0;
  text-decoration: none;
  transition: 0.2s;
}

.meta-item a:hover {
  color: #b0d4ec;
}

.meta-item i {
  color: #4f7a92;
  font-size: 13px;
  width: 16px;
  text-align: center;
}

/* ---- Рейтинг ---- */
.model-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 16px;
  margin-top: 4px;
}

.stars {
  display: flex;
  gap: 4px;
  color: #4f8aaa;
  font-size: 24px;
}

.stars i {
  transition: color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.stars i:hover {
  transform: scale(1.15);
}

.rating-value {
  font-size: 24px;
  font-weight: 700;
  color: #eef4f8;
}

.rating-count {
  font-size: 14px;
  color: #5f8095;
}

/* ---- Теги ---- */
.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f1a21;
  border: 1px solid #1f303a;
  color: #8ab0c8;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  transition: 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.tag:hover {
  background: #162530;
  border-color: #3f6a80;
  color: #b8d8ee;
}

.tag i {
  font-size: 11px;
  opacity: 0.7;
}

/* ---- Секция скачивания ---- */
.download-section {
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 20px;
  padding: 24px;
}

.download-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #d4e6f2;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-section h3 i {
  color: #4f8aaa;
}

.format-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-format {
  background: #0a1318;
  border: 1px solid #29373f;
  color: #d0e0ee;
  padding: 14px 20px;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
}

.btn-format:hover {
  background: #162530;
  border-color: #4f8aaa;
  transform: translateY(-1px);
}

.btn-format i {
  color: #6fa0c0;
  font-size: 16px;
}

.btn-format small {
  color: #5f8095;
  font-size: 12px;
  font-weight: 400;
}

.btn-format.btn-all {
  background: linear-gradient(135deg, #1f3e4f, #0f2838);
  border-color: #2f5a70;
  color: #e0f0ff;
}

.btn-format.btn-all:hover {
  background: linear-gradient(135deg, #2a5068, #163240);
  border-color: #4080a0;
  box-shadow: 0 6px 20px rgba(0, 80, 140, 0.3);
}

.license-info {
  margin-top: 16px;
  font-size: 13px;
  color: #5f8095;
  display: flex;
  align-items: center;
  gap: 8px;
}

.license-info strong {
  color: #8ab0c8;
}

/* ---- Описание ---- */
.model-description {
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 20px;
  padding: 24px;
}

.model-description h3 {
  font-size: 18px;
  font-weight: 600;
  color: #d4e6f2;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-description h3 i {
  color: #4f8aaa;
}

.model-description p {
  color: #9ab6c8;
  line-height: 1.7;
  font-size: 15px;
  margin: 0 0 12px 0;
}

.model-description ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.model-description ul li {
  color: #8ab0c4;
  padding: 6px 0;
  font-size: 14px;
}

/* ---- Характеристики ---- */
.model-specs {
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 20px;
  padding: 24px;
}

.model-specs h3 {
  font-size: 18px;
  font-weight: 600;
  color: #d4e6f2;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-specs h3 i {
  color: #4f8aaa;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.spec-item {
  background: #0a1318;
  border: 1px solid #1a2a34;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.spec-item i {
  color: #4f7a92;
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.spec-label {
  font-size: 12px;
  color: #5f8095;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex: 1;
}

.spec-value {
  font-size: 15px;
  font-weight: 600;
  color: #c0d8ea;
  width: 100%;
  padding-left: 28px;
}

/* ---- Комментарии ---- */
.model-comments {
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 20px;
  padding: 24px;
}

.model-comments h3 {
  font-size: 18px;
  font-weight: 600;
  color: #d4e6f2;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-comments h3 i {
  color: #4f8aaa;
}

.comments-count {
  font-size: 14px;
  color: #5f8095;
  font-weight: 400;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1f2f38;
}

.comment-form textarea {
  background: #0a1318;
  border: 1px solid #29373f;
  border-radius: 14px;
  padding: 14px 18px;
  color: #eef4f8;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: 0.2s;
}

.comment-form textarea:focus {
  border-color: #3f8ab0;
  box-shadow: 0 0 0 3px rgba(60, 150, 200, 0.1);
}

.comment-form textarea::placeholder {
  color: #4f6a7a;
}

.btn-comment {
  align-self: flex-end;
  background: linear-gradient(135deg, #1f3e4f, #0f2838);
  border: 1px solid #2f5a70;
  color: #e0f0ff;
  padding: 10px 24px;
  border-radius: 40px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}

.btn-comment:hover {
  background: linear-gradient(135deg, #2a5068, #163240);
  border-color: #4080a0;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comment {
  display: flex;
  gap: 14px;
}

.comment-reply {
  margin-left: 48px;
  padding-left: 16px;
  border-left: 2px solid #1f303a;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0a1318;
  border: 1px solid #1f303a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #4f7a92;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.comment-author {
  font-weight: 600;
  color: #c0d8ea;
  font-size: 14px;
}

.comment-badge {
  background: #2a4a5f;
  color: #90c8e8;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comment-date {
  font-size: 12px;
  color: #4f6a7a;
}

.comment-body p {
  color: #8aa6b8;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.comment-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.comment-actions button {
  background: none;
  border: none;
  color: #5f8095;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  transition: 0.2s;
}

.comment-actions button:hover {
  color: #90bcd8;
}

.comment-delete {
  background: none;
  border: none;
  color: #4f6a7a;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: 0.2s;
  margin-left: auto;
}

.comment-delete:hover {
  color: #d08080;
  background: rgba(208, 128, 128, 0.1);
}

/* Бейджи статуса в комментариях */
.comment-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.comment-badge i {
  font-size: 9px;
}

.comment-badge-pro {
  background: rgba(245, 166, 35, 0.15);
  color: #f5a623;
  border: 1px solid rgba(245, 166, 35, 0.3);
}

.comment-badge-author {
  background: rgba(80, 180, 120, 0.15);
  color: #50b478;
  border: 1px solid rgba(80, 180, 120, 0.3);
}

.comment-badge-owner {
  background: rgba(100, 140, 200, 0.15);
  color: #7aa0c8;
  border: 1px solid rgba(100, 140, 200, 0.3);
}

/* Загрузка комментариев */
.comments-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: #5f8095;
}

.comments-loading i {
  font-size: 24px;
  color: #4f8aaa;
}

/* Текст комментария */
.comment-text {
  margin-top: 4px;
}

.comment-text p {
  color: #8aa6b8;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Аватар комментария — fallback при ошибке */
.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.comment-avatar img.error {
  display: none;
}

/* ---- Сайдбар ---- */
.model-sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 1024px) {
  .model-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .model-sidebar {
    grid-template-columns: 1fr;
  }
  .specs-grid {
    grid-template-columns: 1fr 1fr;
  }
  .model-detail {
    padding: 0 16px;
  }
  .model-header h1 {
    font-size: 24px;
  }
  .gallery-thumbs {
    padding: 10px 12px;
  }
  .thumb {
    width: 90px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .model-detail {
    padding: 0 12px;
    margin: 12px auto 40px;
  }
  .model-header h1 {
    font-size: 20px;
  }
  .model-header {
    flex-direction: column;
  }
  .model-actions {
    align-self: flex-end;
  }
  .model-sidebar {
    grid-template-columns: 1fr;
  }
  .specs-grid {
    grid-template-columns: 1fr;
  }
  .comments-list .comment {
    flex-direction: column;
  }
  .comment-reply {
    margin-left: 24px;
  }
  .download-section,
  .model-description,
  .model-specs,
  .model-comments {
    padding: 16px;
  }
  .format-buttons {
    flex-direction: column;
  }
  .btn-format {
    width: 100%;
    justify-content: center;
  }
  .breadcrumbs {
    padding: 12px 12px 0;
    font-size: 12px;
  }
  .model-meta {
    font-size: 12px;
    gap: 4px 12px;
  }
  .stars {
    font-size: 18px;
  }
  .rating-value {
    font-size: 18px;
  }
}

/* ---- Карточка автора ---- */
.author-card {
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  transition: 0.2s;
}

.author-card:hover {
  border-color: #2f5a70;
}

.author-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #0a1318;
  border: 2px solid #2f404a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #4f7a92;
  margin: 0 auto 14px;
  overflow: hidden;
}
.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-card h4 {
  color: #d4e6f2;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* PRO имя в сайдбаре */
.author-card h4.username-pro {
  color: #f5a623 !important;
  text-shadow: 0 0 12px rgba(245, 166, 35, 0.25);
}

.author-card .pro-badge i {
  font-size: 14px;
  color: #f5a623;
  filter: drop-shadow(0 0 4px rgba(245, 166, 35, 0.4));
}

.author-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: #6d8fa0;
  margin-bottom: 16px;
}

/* ===== DEV-аватар в author-card (пульсация + конфетти) ===== */
.author-avatar.avatar-dev-glow {
  position: relative !important;
  overflow: visible !important;
  z-index: 1 !important;
}

.author-avatar.avatar-dev-glow .dev-avatar-content {
  position: relative !important;
  z-index: 2 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}

.author-avatar.avatar-dev-glow .dev-avatar-content img,
.author-avatar.avatar-dev-glow .dev-avatar-content i {
  filter: drop-shadow(0 0 10px rgba(23, 255, 255, 0.5));
  transition: filter 0.3s ease;
}

.author-avatar.avatar-dev-glow .dev-avatar-content:hover img,
.author-avatar.avatar-dev-glow .dev-avatar-content:hover i {
  filter: drop-shadow(0 0 20px rgba(23, 255, 255, 0.8));
}

.author-avatar.avatar-dev-glow .dev-confetti-container {
  position: absolute;
  inset: -24px;
  pointer-events: none;
  z-index: 0 !important;
  overflow: visible;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 42%, black 46%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 42%, black 46%);
}

.author-avatar.avatar-dev-glow .dev-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #17ffff;
  opacity: 0;
  animation: dev-pulse-ring 3s ease-in-out infinite;
  z-index: 0 !important;
  pointer-events: none;
}

.author-avatar.avatar-dev-glow .dev-pulse-ring-2 {
  inset: -12px;
  border: 1px solid #66ffff;
  animation-delay: 1.5s;
}

.author-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.author-stats i {
  color: #4f7a92;
  font-size: 12px;
}

/* Соцсети автора в сайдбаре модели */
.author-card .author-social-links {
  justify-content: center;
  margin-bottom: 14px;
}

.btn-follow {
  background: linear-gradient(135deg, #1f3e4f, #0f2838);
  border: 1px solid #2f5a70;
  color: #e0f0ff;
  padding: 10px 24px;
  border-radius: 40px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}

.btn-follow:hover {
  background: linear-gradient(135deg, #2a5068, #163240);
  border-color: #4080a0;
}

/* ---- Рекламный блок в сайдбаре ---- */
.sidebar-ad {
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  overflow: hidden;
}

.sidebar-ad > div {
  width: 100%;
}

/* На широких экранах реклама занимает одну колонку сайдбара */
@media (max-width: 1024px) {
  .sidebar-ad {
    grid-column: 1 / -1;
  }
}

/* ---- Похожие модели ---- */
.related-models {
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 20px;
  padding: 24px;
}

.related-models h4 {
  font-size: 16px;
  font-weight: 600;
  color: #d4e6f2;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-models h4 i {
  color: #4f8aaa;
}

.related-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #1a2a34;
}

.related-item:last-child {
  border-bottom: none;
}

.related-item img {
  width: 72px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.related-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.related-info a {
  color: #a0c0d8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: 0.2s;
}

.related-info a:hover {
  color: #c0e0f8;
}

.related-info span {
  font-size: 12px;
  color: #6d8fa0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.related-info span i {
  color: #e0a030;
  font-size: 11px;
}

/* ---- Статистика в сайдбаре ---- */
.model-stats-sidebar {
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 20px;
  padding: 24px;
}

.model-stats-sidebar h4 {
  font-size: 16px;
  font-weight: 600;
  color: #d4e6f2;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-stats-sidebar h4 i {
  color: #4f8aaa;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #1a2a34;
  font-size: 14px;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row span:first-child {
  color: #6d8fa0;
}

.stat-row span:last-child {
  color: #c0d8ea;
  font-weight: 500;
}

/* .bookmark-btn - стили определены в index.css */

/* ============================================================
   3D ПРОСМОТР В ГАЛЕРЕЕ  (как на loader.html)
   ============================================================ */
.model-3d-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0a0f13;
  overflow: hidden;
}

.model-3d-container #model3dCanvas {
  width: 100%;
  height: 100%;
}

.model-3d-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

.model-3d-container canvas:active {
  cursor: grabbing;
}

/* Индикатор загрузки 3D */
.model-3d-loader {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 19, 0.88);
  backdrop-filter: blur(4px);
  z-index: 8;
}

.model-3d-loader.active {
  display: flex;
}

.model-3d-loader .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #1a2a34;
  border-top-color: #4f8aaa;
  border-radius: 50%;
  animation: tmorph-spin 0.8s linear infinite;
}

.model-3d-loader .loader-text {
  margin-top: 16px;
  font-size: 14px;
  color: #8aa6b8;
  letter-spacing: 0.3px;
}

@keyframes tmorph-spin {
  to { transform: rotate(360deg); }
}

/* Кнопки управления 3D */
.model-3d-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.model-3d-container:hover .model-3d-controls {
  opacity: 1;
}

.model-3d-controls .btn-preview {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(10, 16, 21, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid #2f404a;
  color: #c0d6e4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  font-size: 16px;
}

.model-3d-controls .btn-preview:hover {
  background: rgba(20, 40, 55, 0.9);
  border-color: #4f8aaa;
  color: #e0f0ff;
  transform: scale(1.05);
}

.model-3d-controls .btn-preview:active {
  transform: scale(0.95);
}

/* Подсказка */
.model-3d-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 15, 19, 0.75);
  backdrop-filter: blur(6px);
  padding: 8px 20px;
  border-radius: 30px;
  border: 1px solid #2a4a5a;
  font-size: 13px;
  color: #a0c0d0;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  letter-spacing: 0.3px;
  opacity: 0.75;
  transition: opacity 0.4s ease;
  z-index: 5;
}

.model-3d-container:hover .model-3d-hint {
  opacity: 1;
}

/* Сообщение об ошибке 3D */
.model-3d-error {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 19, 0.9);
  z-index: 9;
  text-align: center;
  padding: 20px;
}

.model-3d-error.active {
  display: flex;
}

.model-3d-error i {
  font-size: 40px;
  color: #8a3a3a;
  margin-bottom: 12px;
}

.model-3d-error p {
  color: #d08080;
  font-size: 15px;
  max-width: 380px;
  line-height: 1.5;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО ЖАЛОБЫ
   ============================================================ */
.report-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 8, 10, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.report-modal-overlay.active {
  display: flex;
}

.report-modal {
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 24px;
  padding: 24px 28px 20px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  animation: report-modal-in 0.25s ease;
  display: flex;
  flex-direction: column;
}

@keyframes report-modal-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.report-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #eef4f8;
  margin: 0;
}

.report-modal-close {
  background: none;
  border: none;
  color: #5f8095;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.report-modal-close:hover {
  background: #1a2832;
  color: #c0dcee;
}

/* ---- Поля формы ---- */
.report-field {
  margin-bottom: 14px;
}

.report-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #a0c0d8;
  margin-bottom: 8px;
}

.report-hint {
  font-weight: 400;
  color: #5f8095;
  font-size: 13px;
}

.report-required {
  color: #d08080;
}

/* ---- Варианты причин (radio-кнопки) ---- */
.report-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.report-option {
  position: relative;
  cursor: pointer;
}

.report-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.report-option-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #0a1318;
  border: 1px solid #1f2f38;
  border-radius: 12px;
  transition: 0.2s;
  height: 100%;
  box-sizing: border-box;
}

.report-option-content .report-option-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #0f1a21;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: 0.2s;
}

.report-option-content .report-option-icon i {
  font-size: 12px;
  color: #5f8095;
  transition: 0.2s;
}

.report-option-content .report-option-text {
  font-size: 13px;
  font-weight: 500;
  color: #9ab6c8;
  transition: 0.2s;
}

/* Hover */
.report-option:hover .report-option-content {
  border-color: #2f4a5a;
  background: #0f1a21;
}

.report-option:hover .report-option-content .report-option-icon {
  background: #162530;
}

.report-option:hover .report-option-content .report-option-icon i {
  color: #7aa0c0;
}

/* Checked */
.report-option input[type="radio"]:checked + .report-option-content {
  border-color: #4f8aaa;
  background: rgba(60, 150, 200, 0.08);
}

.report-option input[type="radio"]:checked + .report-option-content .report-option-icon {
  background: rgba(60, 150, 200, 0.15);
}

.report-option input[type="radio"]:checked + .report-option-content .report-option-icon i {
  color: #4f8aaa;
}

.report-option input[type="radio"]:checked + .report-option-content .report-option-text {
  color: #d4e6f2;
}

.report-error {
  font-size: 13px;
  color: #d08080;
  margin-top: 6px;
  min-height: 18px;
}

/* ---- Textarea ---- */
.report-textarea {
  width: 100%;
  background: #0a1318;
  border: 1px solid #29373f;
  border-radius: 14px;
  padding: 12px 16px;
  color: #eef4f8;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  transition: 0.2s;
  box-sizing: border-box;
}

.report-textarea:focus {
  border-color: #3f8ab0;
  box-shadow: 0 0 0 3px rgba(60, 150, 200, 0.1);
}

.report-textarea::placeholder {
  color: #4f6a7a;
}

.report-char-count {
  font-size: 12px;
  color: #5f8095;
  text-align: right;
  margin-top: 6px;
}

/* ---- Прогресс-бар описания ---- */
.report-progress-wrap {
  margin-top: 8px;
}

.report-progress-bar {
  width: 100%;
  height: 6px;
  background: #1a2832;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.report-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #3d5a6e;
  box-shadow: none;
}

/* 0–30% — красный */
.report-progress-fill.stage-low {
  background-color: #e74c5e;
  box-shadow: 0 0 8px rgba(231, 76, 94, 0.4);
}

/* 30–99% — оранжевый */
.report-progress-fill.stage-mid {
  background-color: #e6a832;
  box-shadow: 0 0 8px rgba(230, 168, 50, 0.4);
}

/* 100% — зелёный */
.report-progress-fill.stage-full {
  background-color: #2ecc71;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.report-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.report-progress-status {
  font-size: 13px;
  font-weight: 600;
  color: #5f8095;
  transition: color 0.3s ease;
}

.report-progress-status.stage-low {
  color: #e74c5e;
}

.report-progress-status.stage-mid {
  color: #e6a832;
}

.report-progress-status.stage-full {
  color: #2ecc71;
}

.report-progress-count {
  font-size: 12px;
  color: #4f6a7a;
}

/* ---- Кнопки действий ---- */
.report-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #1f2f38;
}

.btn-report-cancel {
  background: #11191e;
  border: 1px solid #29373f;
  color: #7a98aa;
  padding: 9px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: 0.2s;
}

.btn-report-cancel:hover {
  background: #1a2832;
  border-color: #3f6a80;
  color: #c0dcee;
}

.btn-report-submit {
  background: linear-gradient(135deg, #1f3e4f, #0f2838);
  border: 1px solid #2f5a70;
  color: #e0f0ff;
  padding: 9px 22px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}

.btn-report-submit:hover {
  background: linear-gradient(135deg, #2a5068, #163240);
  border-color: #4080a0;
}

.btn-report-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-report-submit i {
  font-size: 14px;
}

/* ---- Toast-уведомление ---- */
.report-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #11191e;
  border: 1px solid #1f2f38;
  border-radius: 16px;
  padding: 14px 24px;
  color: #d4e6f2;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  z-index: 11000;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.report-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.report-toast.success {
  border-color: #2f6a4a;
}

.report-toast.success i {
  color: #50b478;
  font-size: 18px;
}

.report-toast.error {
  border-color: #6a2f2f;
}

.report-toast.error i {
  color: #d08080;
  font-size: 18px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .report-modal {
    padding: 18px 20px 16px;
    border-radius: 20px;
  }

  .report-modal-title {
    font-size: 18px;
  }

  .report-options {
    grid-template-columns: 1fr;
  }

  .report-option-content {
    padding: 10px;
  }

  .report-option-content .report-option-icon {
    width: 28px;
    height: 28px;
  }

  .report-option-content .report-option-icon i {
    font-size: 12px;
  }

  .report-option-content .report-option-text {
    font-size: 13px;
  }

  .report-actions {
    flex-direction: column-reverse;
  }

  .btn-report-cancel,
  .btn-report-submit {
    width: 100%;
    justify-content: center;
  }
}

