/* ============================================================================
   HF GAMES - GAME DETAIL PAGE STYLES (game-detail.css)
   ============================================================================ */

.game-detail-hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  margin-bottom: 2.5rem;
  background-color: var(--panel);
  box-shadow: var(--card-shadow);
}

.key-features-list {
  display: grid;
  gap: 0.55rem;
  max-width: 100%;
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.6;
}

.key-features-list li::marker {
  color: var(--accent);
}

.game-comments-section {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-top: 42px;
}

.game-comments-section .section-heading h2 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-bright);
}

.game-comments-box {
  box-sizing: border-box;
  width: 100%;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

.comments-description {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.comments-count {
  display: inline-flex;
  min-width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.45rem;
  color: var(--accent);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
}

.no-comments {
  color: var(--muted);
}

.game-comment-form {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
}

.comment-form-field {
  display: grid;
  gap: 0.45rem;
}

.game-comment-form label {
  color: var(--text-bright);
  font-weight: 700;
  font-size: 0.88rem;
}

.comment-form-label-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.comment-form-hint {
  color: var(--muted);
  font-size: 0.75rem;
  opacity: 1;
}

.game-comment-form input,
.game-comment-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 0.85rem;
  color: var(--text-bright);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.game-comment-form input::placeholder,
.game-comment-form textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.game-comment-form input:focus,
.game-comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.game-comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.comment-form-actions > span {
  color: var(--muted);
  font-size: 0.8rem;
}

.comment-form-actions .btn {
  justify-self: start;
}

.game-comment-list {
  display: grid;
  gap: 0.85rem;
}

.game-comment {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.game-comment-content {
  min-width: 0;
}

.game-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  color: var(--text-bright);
}

.game-comment-meta strong {
  overflow-wrap: anywhere;
}

.game-comment-meta time {
  color: var(--muted);
  font-size: 0.8rem;
}

.game-comment p {
  margin: 0.6rem 0 0;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.game-comment-text.is-collapsed {
  max-height: 8em;
  overflow: hidden;
}

.comment-read-more {
  margin-top: 0.25rem;
  padding: 0;
  color: var(--accent);
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.comment-read-more:hover {
  color: var(--accent-hover);
}

.game-comment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.comment-vote-button,
.comment-reply-toggle,
.comment-replies-toggle {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.comment-vote-button:hover,
.comment-reply-toggle:hover,
.comment-replies-toggle:hover {
  color: var(--text-bright);
  background: var(--panel2);
}

.comment-vote-button.is-voted {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.comment-vote-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.comment-replies-toggle {
  color: var(--accent);
}

.comment-action-status {
  color: var(--danger);
  font-size: 0.78rem;
}

.game-comment-reply-form {
  margin: 0.75rem 0 0 1rem;
  padding: 1rem;
  border-left: 2px solid var(--line-strong);
  background: var(--bg-subtle);
  border-radius: 0 10px 10px 0;
}

.comment-reply-context,
.comment-reply-form-context {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.comment-reply-context a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.comment-reply-context a:hover {
  text-decoration: underline;
}

.comment-reply-form-context {
  margin-bottom: 0;
}

.comment-reply-form-context strong {
  color: var(--text);
}

.game-comment-replies {
  display: grid;
  gap: 0.65rem;
  margin: 0.75rem 0 0 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
}

.game-comment-replies[hidden],
.game-comment-reply-form[hidden],
.game-comment-reply-page[hidden] {
  display: none;
}

.comment-show-more-replies {
  justify-self: start;
  padding: 0.4rem 0.65rem;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.comment-show-more-replies:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.game-comment-reply {
  padding: 0.8rem;
  background: var(--bg-subtle);
  box-shadow: none;
}

.no-comments {
  margin: 0;
  padding: 1.1rem;
  background: var(--bg-subtle);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  text-align: center;
}

.comment-notice {
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.comment-notice.success {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.comment-notice.error {
  color: var(--danger);
  background: rgba(244, 63, 94, 0.12);
}

@media (max-width: 520px) {
  .game-comments-box {
    padding: 1rem;
  }

  .game-comments-section .section-heading {
    align-items: flex-start;
  }

  .game-comment {
    padding: 0.8rem;
  }

  .game-comment-replies,
  .game-comment-reply-form {
    margin-left: 0.5rem;
    padding-left: 0.65rem;
  }

  .comment-form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.game-detail-hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) brightness(0.35);
  transform: scale(1.08);
}

.game-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 19, 21, 0.4) 0%, rgba(17, 19, 21, 0.85) 60%, var(--panel) 100%);
}

[data-theme="light"] .game-detail-hero-overlay {
  background: linear-gradient(180deg, rgba(244, 245, 246, 0.5) 0%, rgba(244, 245, 246, 0.9) 60%, var(--panel) 100%);
}

.game-detail-header-inner {
  position: relative;
  z-index: 5;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.25rem;
  align-items: start;
}

.game-cover-poster-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  background: var(--bg-subtle);
}

.game-cover-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-header-meta {
  display: flex;
  flex-direction: column;
}

.game-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.5rem;
}

.game-main-title {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.15;
}

.game-meta-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.game-meta-subtitle strong {
  color: var(--text);
}

.game-short-summary {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.5rem;
  max-width: 720px;
}

.game-quick-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.75rem;
}

/* Quick specs ribbon */
.quick-specs-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  padding: 1rem 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: auto;
}

.quick-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-spec-item span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.quick-spec-item strong {
  font-size: 0.85rem;
  color: var(--text-bright);
}

/* Screenshots Gallery */
.gallery-section {
  margin-bottom: 2.75rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--panel);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-overlay-hint {
  position: absolute;
  inset: 0;
  background: rgba(17, 19, 21, 0.4);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  transition: opacity 0.15s ease;
}

.gallery-item:hover .gallery-overlay-hint {
  opacity: 1;
}

/* Modal Lightbox */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(10, 12, 14, 0.94);
  display: none;
  place-items: center;
  padding: 24px;
}

.gallery-modal.is-active {
  display: grid;
  animation: fadeIn 0.2s ease-out;
}

.gallery-modal-content {
  position: relative;
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--line-strong);
}

.gallery-modal-caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.gallery-modal-close,
.gallery-modal-prev,
.gallery-modal-next {
  position: absolute;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--text-bright);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.15s ease;
  z-index: 10;
}

.gallery-modal-close {
  top: -50px;
  right: 0;
}

.gallery-modal-prev {
  top: 50%;
  left: -60px;
  transform: translateY(-50%);
}

.gallery-modal-next {
  top: 50%;
  right: -60px;
  transform: translateY(-50%);
}

.gallery-modal-close:hover,
.gallery-modal-prev:hover,
.gallery-modal-next:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Detail Main Grid */
.detail-layout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* System Requirements Side-by-Side */
.specs-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.spec-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}

.spec-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
  margin-bottom: 1.2rem;
}

.spec-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-bright);
}

.spec-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spec-tag.min {
  background: var(--panel2);
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

.spec-tag.rec {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.spec-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.spec-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.65rem;
}

.spec-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.spec-label {
  color: var(--muted);
  font-weight: 600;
}

.spec-val {
  color: var(--text-bright);
  line-height: 1.45;
}

/* Download Section Options */
.download-options-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.download-option-group {
  padding: 1.25rem;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
}

.download-option-group h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-option-group p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.official-store-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid var(--line-strong);
}

.btn-store-steam {
  background: #1b2838;
  color: #c7d5e0;
  border-color: #2a475e;
}

.btn-store-steam:hover {
  background: #2a475e;
  color: #ffffff;
}

.btn-store-epic {
  background: #202020;
  color: #ffffff;
  border-color: #300133;
}

.btn-store-epic:hover {
  background: #300133;
  color: #ffffff;
}

.btn-store-other {
  background: var(--panel2);
  color: var(--text-bright);
  border-color: var(--line-strong);
}

.btn-store-other:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.unofficial-warning-card {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.04);
}

.unofficial-warning-card h4 {
  color: var(--danger);
}

.btn-unofficial-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-unofficial-trigger:hover {
  background: var(--danger);
  color: #ffffff;
}

/* Safety Confirmation Modal */
.safety-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(10, 12, 14, 0.85);
  display: none;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
}

.safety-modal-backdrop.is-visible {
  display: grid;
  animation: fadeIn 0.18s ease-out;
}

.safety-modal-box {
  box-sizing: border-box;
  width: min(600px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--panel-solid);
  border: 1px solid var(--danger);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  padding: 2rem;
  position: relative;
}

.safety-modal-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.15);
  color: var(--danger);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.safety-modal-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.35rem;
  color: var(--text-bright);
}

.safety-modal-body p {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.safety-risk-list {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem 1rem 2rem;
  margin: 1rem 0 1.5rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.safety-risk-list li {
  margin-bottom: 0.4rem;
}

.safety-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 1.75rem;
}

.btn-modal-cancel {
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-cancel:hover {
  background: var(--panel2);
  color: var(--text-bright);
}

.btn-modal-proceed {
  padding: 9px 20px;
  border-radius: 8px;
  border: 1px solid var(--danger);
  background: var(--danger);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-modal-proceed:hover {
  background: #e11d48;
}
