/* Model detail page and title glow styles */
.model-title-link {
  color: white;
  text-decoration: none;
  transition: text-shadow 0.18s ease, transform 0.12s ease, color 0.18s ease;
  display: inline-block;
}
.model-title-link:focus {
  outline: 3px solid rgba(var(--accent-rgb), 0.12);
  outline-offset: 4px;
}
.model-title-glow:hover,
.model-title-glow:focus,
.model-title-glow.glow-active,
.card:hover .model-title-glow {
  text-shadow: 0 2px 14px rgba(var(--accent-rgb), 0.95), 0 0 36px rgba(var(--accent-rgb), 0.15);
  transform: translateY(-1px);
  color: var(--accent-color);
}

/* Detail page layout */
.model-detail {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}
/* translucent panel wrapper used across viewer and meta */
.model-panel {
  background: rgba(10,10,12,0.28);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

/* viewer area */
.model-viewer-wrapper {
  padding: 0;
}
.model-viewer {
  width: 100%;
  aspect-ratio: 1.3 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.05);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* meta panel */
.model-meta {
  color: #fff;
}

/* tags & pills */
.model-meta h2 {
  margin-bottom: 6px;
}
.model-meta .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.model-meta .tag {
  background: rgba(var(--accent-rgb), 0.08);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85em;
  border: 1px solid rgba(255,255,255,0.04);
}

/* buttons */
.btn-download, .btn-edit {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(var(--accent-rgb),0.08), rgba(255,255,255,0.02));
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn-download:hover, .btn-edit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.btn-edit {
  background: rgba(255,255,255,0.03);
}

/* Full width download button used in meta panel */
.btn-download-full {
  display: inline-block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  background: rgba(var(--accent-rgb),0.35);
  border: 1px solid rgba(var(--accent-rgb),0.55);
  color: #fff;
  margin-top: 12px;
}
.btn-download-full:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(var(--accent-rgb),0.08); }

/* image gallery (used for public view or thumbnails) */
.image-gallery {
  background: rgba(0,0,0,0.05);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
}

.image-gallery .main-image {
  width: 100%;
  height: auto;
  max-height: 680px;
  object-fit: contain;
  border-radius: 12px;
  background: transparent;
  
}

.image-gallery .main-image.fade { opacity:0.25; transition: opacity 140ms ease; }
.image-gallery .thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.image-gallery .thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.08s ease, border-color 0.08s ease;
  background-color: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.image-gallery .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  filter: none !important;
  mix-blend-mode: normal !important;
  background: transparent !important;
  color-scheme: only light !important;
  -webkit-color-scheme: only light !important;
}
.image-gallery .thumb:hover { transform: translateY(-3px); }
.image-gallery .thumb.active { border-color: var(--accent-color); transform: scale(1.03); }

@media (max-width: 900px) {
  .model-detail { grid-template-columns: 1fr; }
  .model-viewer { aspect-ratio: 1 / 1; }
}

/* Mini gallery under viewer: small horizontal thumbnail rail */
.mini-gallery {
  display:flex;
  gap:8px;
  margin-top:12px;
  align-items:center;
  justify-content:center;
  overflow-x:auto;
  padding-bottom:6px;
}
.mini-gallery .thumb {
  width:80px;
  height:60px;
  flex:0 0 auto;
  border-radius:8px;
  border:2px solid transparent;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mini-gallery .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  filter: none !important;
  mix-blend-mode: normal !important;
  background: transparent !important;
  color-scheme: only light !important;
  -webkit-color-scheme: only light !important;
}
.mini-gallery .thumb:hover { transform: none; }
.mini-gallery .thumb.active { border-color: var(--accent-color); transform: none; }

/* Meta sections (Details / Stats / Files / Actions) */
.meta-grid { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: 20px; 
}

.meta-section { 
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  padding: 18px; 
  border-radius: 14px; 
  border: 1px solid rgba(var(--accent-rgb), 0.12); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.meta-section h3 { 
  margin: 0 0 14px 0; 
  font-size: 0.95rem; 
  font-weight: 700;
  color: var(--accent-color); 
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.meta-details h2 { 
  margin: 0 0 10px 0; 
  font-size: 1.8rem; 
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.meta-details p { 
  margin: 0 0 12px 0; 
  font-size: 0.95rem; 
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
}

.meta-stats div { 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95rem;
}

.meta-stats div:last-child { 
  border-bottom: none; 
}

.meta-stats strong { 
  color: rgba(255,255,255,0.7); 
  font-weight: 600;
}

.meta-files { 
  display: flex; 
  flex-direction: column; 
  gap: 12px;
}

.meta-files > div:first-child { 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
}

.meta-files strong { 
  color: rgba(255,255,255,0.7); 
  font-weight: 600;
  font-size: 0.9rem;
}

.meta-files > div:first-child > div:last-child { 
  font-family: monospace; 
  font-size: 0.85rem; 
  color: var(--accent-color);
  word-break: break-all;
}

.meta-actions { 
  display: flex; 
  flex-direction: column; 
  gap: 10px;
}

@media (max-width: 900px) { 
  .meta-grid { grid-template-columns: 1fr; } 
}

/* small badges */
.badge { display:inline-block; padding:6px 10px; border-radius:999px; background: rgba(var(--accent-rgb),0.12); color:#ffffff; font-weight:700; border:1px solid rgba(var(--accent-rgb),0.18); }

/* icon button variant */
.icon-btn { background:transparent; border:1px solid rgba(255,255,255,0.04); padding:8px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; color:inherit; }
.icon-btn svg { width:18px; height:18px; }

/* viewer polish */
.model-viewer-wrapper .model-viewer, .model-panel .image-gallery { box-shadow: 0 12px 38px rgba(0,0,0,0.5); }

