/* H-Donghua V2 Single Page Sidebar Stylesheet */
/* 3. STICKY SIDEBAR GLASS CARD */
.hd-single-layout-grid .hd-single-sidebar {
  position: sticky;
  top: 92px; /* Header navbar height + margin */
  background: var(--hd-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hd-border-glass);
  border-radius: var(--hd-radius-xl);
  padding: var(--hd-spacing-lg);
  box-shadow: var(--hd-shadow-xl);
  transition: var(--hd-transition-all);
  z-index: 20;
}

.hd-single-poster-wrap {
  width: 100%;
  border-radius: var(--hd-radius-md);
  overflow: hidden;
  box-shadow: var(--hd-shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: var(--hd-spacing-md);
}

.hd-mobile-title-area {
  display: none;
}

.hd-single-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

/* Radial Gauge Rating Score */
.hd-rating-gauge-wrap {
  display: flex;
  align-items: center;
  gap: var(--hd-spacing-md);
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hd-border-glass);
  padding: var(--hd-spacing-sm);
  border-radius: var(--hd-radius-md);
  margin-bottom: var(--hd-spacing-md);
}

.hd-radial-svg-box {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hd-radial-svg-box svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.hd-radial-bg {
  fill: none;
  stroke: var(--hd-border);
  stroke-width: 5;
}

.hd-radial-fill {
  fill: none;
  stroke: var(--hd-accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 188.4;
  transition: stroke-dashoffset 1.2s var(--hd-ease-out);
}

.hd-radial-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hd-radial-text .score {
  font-family: var(--hd-font-display);
  font-size: var(--hd-text-md);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.hd-radial-text .label {
  font-size: 8px;
  font-weight: 800;
  color: var(--hd-text-dim);
  letter-spacing: 0.05em;
  margin-top: 1px;
}

.hd-gauge-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--hd-text-muted);
}

.status-badge.airing {
  color: var(--hd-status-airing);
  text-shadow: 0 0 10px var(--hd-status-airing-glow);
}

.ep-badge {
  font-size: var(--hd-text-xs);
  color: var(--hd-text-muted);
  font-weight: 500;
}

/* Sidebar Actions */
.hd-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: var(--hd-spacing-xs);
  margin-bottom: var(--hd-spacing-md);
}

.hd-btn.full-width {
  width: 100%;
}

.hd-sidebar-meta-list {
  border-top: 1px solid var(--hd-border);
  padding-top: var(--hd-spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--hd-spacing-xs);
}

.hd-side-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: var(--hd-text-xs);
  gap: 12px;
}

.hd-side-meta-item .label {
  color: var(--hd-text-dim);
  font-weight: 600;
  flex-shrink: 0;
}

.hd-side-meta-item .val {
  color: var(--hd-text-main);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
  min-width: 0;
  overflow-wrap: break-word;
}

/* 7. NEXTJS CHARACTER CARDS */
.hd-character-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--hd-spacing-md);
}

.nextjs-char-card {
  display: flex;
  background-color: var(--hd-surface-glass);
  border: 1px solid var(--hd-border-glass);
  border-radius: var(--hd-radius-lg);
  padding: var(--hd-spacing-md);
  justify-content: space-between;
  align-items: center;
  transition: var(--hd-transition-all);
}

.nextjs-char-card:hover {
  border-color: var(--hd-primary);
  box-shadow: var(--hd-shadow-md);
}

.hd-char-avatar-fallback {
  width: 52px;
  height: 52px;
  background-color: var(--hd-primary-glow);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--hd-radius-full);
  font-family: var(--hd-font-display);
  font-weight: 800;
  font-size: 20px;
}

.hd-char-name-tag {
  display: flex;
  flex-direction: column;
}

.char-name {
  font-weight: 700;
  font-size: var(--hd-text-sm);
  color: #fff;
}

.char-role {
  font-size: 11px;
  color: var(--hd-text-dim);
  font-weight: 500;
}

.va-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--hd-text-muted);
}

.text-right {
  text-align: right;
}

/* 7b. CHARACTER AVATAR IMAGES (Bangumi) */
.hd-char-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: var(--hd-radius-full);
  object-fit: cover;
  border: 2px solid var(--hd-border-glass);
  flex-shrink: 0;
  transition: var(--hd-transition-all);
}

.nextjs-char-card:hover .hd-char-avatar-img {
  border-color: var(--hd-primary);
  box-shadow: 0 0 12px rgba(var(--hd-primary-rgb, 99, 102, 241), 0.4);
}

.hd-char-info-side {
  display: flex;
  align-items: center;
  gap: var(--hd-spacing-sm);
}

.hd-va-info-side {
  display: flex;
  align-items: center;
  gap: var(--hd-spacing-sm);
}

.char-sub-name {
  font-size: 10px;
  color: var(--hd-text-dim);
  font-weight: 500;
  font-style: italic;
  opacity: 0.7;
}

/* Glassmorphic Anime Short Info Panel */
.hd-anime-short-info-panel {
  margin-top: var(--hd-spacing-xl);
  margin-bottom: var(--hd-spacing-xl);
}

.hd-anime-info-card {
  display: flex;
  gap: var(--hd-spacing-lg);
  background: var(--hd-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hd-border-glass);
  border-radius: var(--hd-radius-lg);
  padding: var(--hd-spacing-lg);
  box-shadow: var(--hd-shadow-xl);
}

.hd-anime-info-cover-wrap {
  width: 120px;
  flex-shrink: 0;
  border-radius: var(--hd-radius-md);
  overflow: hidden;
  box-shadow: var(--hd-shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hd-anime-info-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.hd-anime-info-details {
  display: flex;
  flex-direction: column;
  gap: var(--hd-spacing-sm);
  flex-grow: 1;
}

.hd-anime-info-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hd-anime-info-title {
  font-family: var(--hd-font-display);
  font-size: var(--hd-text-lg);
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.hd-anime-info-title a {
  color: #fff;
  transition: color var(--hd-transition-all);
}

.hd-anime-info-title a:hover {
  color: var(--hd-primary);
}

.hd-anime-info-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hd-spacing-xs);
  align-items: center;
}

.hd-meta-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--hd-radius-xs);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hd-border-glass);
  color: var(--hd-text-muted);
}

.hd-meta-badge.rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.2);
  color: rgb(234, 179, 8);
}

.hd-meta-badge.status {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--hd-status-airing);
}

.hd-meta-badge.status.completed {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--hd-primary);
}

.hd-anime-info-synopsis {
  font-size: var(--hd-text-sm);
  line-height: 1.6;
  color: var(--hd-text-muted);
  margin: 0;
}

.hd-anime-info-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .hd-anime-info-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hd-anime-info-cover-wrap {
    width: 100px;
  }
  .hd-anime-info-meta-row {
    justify-content: center;
  }
  .hd-anime-info-genres {
    justify-content: center;
  }
}

/* Responsive overrides */
@media (max-width: 768px) {
  .hd-single-layout-grid .hd-single-sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: var(--hd-spacing-md);
    border-radius: var(--hd-radius-lg);
    position: relative;
    top: 0;
    box-shadow: none;
  }

  .hd-single-sidebar .hd-sidebar-sticky-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .hd-rating-gauge-wrap {
    width: 100%;
    max-width: 340px;
    justify-content: center;
    margin: var(--hd-spacing-md) auto;
    display: flex;
    align-items: center;
  }

  .hd-sidebar-actions {
    width: 100%;
    max-width: 340px;
    margin: 0 auto var(--hd-spacing-md) auto;
    display: flex;
    flex-direction: column;
    gap: var(--hd-spacing-xs);
  }

  .hd-sidebar-actions .hd-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 0;
  }

  .hd-sidebar-meta-list {
    width: 100%;
    max-width: 340px;
    margin: var(--hd-spacing-md) auto 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--hd-spacing-xs);
  }

  .hd-side-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    text-align: left;
  }

  /* 7. Character Cards vertical alignment */
  .nextjs-char-card {
    flex-direction: column;
    align-items: stretch;
    gap: var(--hd-spacing-sm);
  }
  
  .hd-va-info-side {
    justify-content: flex-end;
  }
}

}