/* Detail member features — game_tgn_0004 */

/* Comments — aligned with section-description-details card style */
.g04-comments-section {
  --g04-star-full: #fde047;
  --g04-star-empty: rgba(253, 224, 71, 0.22);
}

#commentFormWrap {
  width: 100%;
}

.g04-comment-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
}

.g04-comment-form-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.g04-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9375rem;
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: 1px solid rgba(0, 242, 234, 0.35);
}

.g04-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g04-comment-author {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-light);
}

.g04-rating-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 12px;
}

.g04-rating-label {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.g04-rating-input {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
}

.g04-rating-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--g04-star-full);
  letter-spacing: 0.02em;
}

.g04-rating-star {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g04-star-empty);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.g04-rating-star .fa {
  font-size: 1.125rem;
  line-height: 1;
  pointer-events: none;
  color: inherit;
}

.g04-rating-star.active {
  color: var(--g04-star-full);
}

.g04-rating-star:hover,
.g04-rating-star:focus-visible {
  color: #fef08a;
  transform: scale(1.08);
  outline: none;
}

.g04-rating-star:not(.active):hover {
  color: rgba(253, 224, 71, 0.5);
}

.g04-comment-textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-light);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  resize: vertical;
  outline: none;
  margin-bottom: 12px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.g04-comment-textarea::placeholder {
  color: var(--text-muted);
}

.g04-comment-textarea:focus {
  border-color: rgba(0, 242, 234, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 242, 234, 0.12);
}

.g04-btn-post-comment {
  align-self: flex-start;
  min-height: 42px;
  padding: 0 20px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--bg-dark);
  background: var(--primary-color);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0, 242, 234, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.g04-btn-post-comment:hover {
  background: #5ffbf5;
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 242, 234, 0.5);
}

.g04-comment-login-prompt {
  width: 100%;
  padding: 1.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  text-align: center;
  margin-bottom: 1.25rem;
}

.g04-comment-login-prompt[hidden] {
  display: none !important;
}

.g04-comment-login-prompt__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  font-size: 1.375rem;
  line-height: 1;
  background: rgba(0, 242, 234, 0.08);
  border: 1px solid rgba(0, 242, 234, 0.22);
  border-radius: 50%;
}

.g04-comment-login-prompt__title {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
}

.g04-comment-login-prompt__text {
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.g04-comment-login-prompt__btn {
  min-width: 140px;
  color: var(--bg-dark);
}

.g04-comment-login-prompt__footer {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.g04-comment-login-prompt__footer a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.g04-comment-form[hidden] {
  display: none !important;
}

.g04-comment-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.g04-comment-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.g04-comment-item:first-child {
  border-top: none;
  padding-top: 4px;
}

.g04-comment-item:hover {
  background: rgba(0, 242, 234, 0.03);
}

.g04-comment-item--folded {
  display: none;
}

.g04-comment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.g04-comment-actions .g04-btn-load-comments {
  margin: 0;
}

.g04-comment-meta {
  flex: 1;
  min-width: 0;
}

.g04-comment-meta-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.g04-comment-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-light);
}

.g04-comment-time {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.g04-comment-rating {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--g04-star-full);
  font-size: 0.75rem;
}

.g04-comment-rating .fa-star-o {
  color: var(--g04-star-empty);
}

.g04-comment-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
  word-break: break-word;
}

.g04-comments-empty {
  text-align: center;
  padding: 2rem 1.25rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(0, 242, 234, 0.22);
  border-radius: 10px;
}

.g04-comments-empty span {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 8px;
  opacity: 0.85;
}

.g04-btn-load-comments {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-width: 140px;
  min-height: 42px;
  margin: 0 auto;
  padding: 0 20px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 242, 234, 0.28);
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.g04-btn-load-comments--expand {
  min-width: 120px;
}

.g04-btn-load-comments--expand .fa {
  font-size: 0.8125rem;
}

.g04-btn-load-comments[hidden] {
  display: none !important;
}

.g04-comment-actions .g04-btn-load-comments[hidden] {
  display: none !important;
}

.g04-btn-load-comments:hover {
  color: var(--bg-dark);
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.g04-loading {
  text-align: center;
  padding: 1.25rem;
  color: var(--text-muted);
}

.g04-loading-spinner {
  display: inline-block;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: g04-detail-spin 0.7s linear infinite;
}

@keyframes g04-detail-spin {
  to { transform: rotate(360deg); }
}

/* Toast */
.g04-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 40000;
  max-width: min(420px, 90vw);
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  border-radius: 10px;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.28s ease;
  pointer-events: none;
}

.g04-toast.show {
  transform: translateX(-50%) translateY(0);
}

.g04-toast.success {
  color: #86efac;
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
}

.g04-toast.error {
  color: #fda4af;
  background: rgba(255, 0, 85, 0.12);
  border-color: rgba(255, 0, 85, 0.35);
}

.g04-toast.warning {
  color: #fde047;
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.35);
}

@media (max-width: 480px) {
  .g04-comment-form,
  .g04-comment-login-prompt {
    padding: 1rem;
  }

  .g04-comment-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }

  .g04-rating-row {
    margin-bottom: 10px;
    gap: 4px 8px;
  }

  .g04-rating-star {
    width: 32px;
    height: 32px;
  }

  .g04-rating-star .fa {
    font-size: 1rem;
  }

  .g04-btn-post-comment {
    width: 100%;
    align-self: stretch;
  }

  .g04-comment-item {
    padding: 14px 0;
  }

  .g04-toast {
    font-size: 0.8125rem;
    padding: 10px 16px;
  }
}
