/* About modal layer: dialog shells and script explorer surfaces. */
/* ── 弹窗 (Anonymous 窗口) ── */
.hacker-modal.hacker-modal-wide {
  width: min(900px, calc(100vw - 2rem));
  overflow: hidden;
}
.hacker-modal.hacker-modal-decoder {
  width: min(800px, 100%);
}
/* A generous hit area surrounds each small, recognizable window dot. */
.hacker-title-source {
  opacity: 0;
}
.hacker-title-decode {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
/* DL Data: Downloading 进度条 (Anonymous 风格) */
.hacker-modal-body.hacker-modal-download .modal-subtitle {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}
.hacker-modal-progress {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.hacker-modal-progress span {
  width: 10px;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.12s ease;
}
.hacker-modal-progress span.filled {
  background: rgba(255, 255, 255, 0.6);
}
/* All Scripts: 文件夹网格 */
.hacker-modal-scripts {
  padding: 0.5rem 0;
}
.hacker-modal-scripts-path {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 0.5rem;
}
.hacker-modal-scripts-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}
.hacker-script-card {
  position: relative;
  min-width: 0;
  height: 136px;
}
.hacker-script-folder {
  height: 100%;
  box-sizing: border-box;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.hacker-script-folder:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ad8c55;
  color: #eee9e0;
}
.hacker-script-folder-icon {
  width: 32px;
  height: 28px;
  color: rgba(255, 255, 255, 0.7);
}
.hacker-script-folder-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  max-width: 100%;
  max-height: 4.2em;
  font-size: 0.8125rem;
  text-align: center;
  word-break: break-word;
  line-height: 1.4;
}
@media (max-width: 600px) {
  .hacker-modal-scripts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.hacker-modal-actions .decoder-full-link {
  color: #c5d0c8;
  font:
    600 0.75rem/1.4 Consolas,
    monospace;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.hacker-modal-actions .decoder-full-link:hover {
  color: #8affaa;
}
.hacker-modal-actions .decoder-full-link:focus-visible {
  outline: 1px solid #a8ffc2;
  outline-offset: 4px;
}

.hacker-modal-decoder {
  background: rgba(7, 13, 10, 0.96);
  border-color: rgba(157, 181, 166, 0.3);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}
.hacker-modal-decoder .hacker-modal-body {
  padding: 1.25rem 1.4rem 1.4rem;
  font-size: 0.875rem;
}
.hacker-modal-decoder .hacker-modal-header {
  min-height: 44px;
}
.hacker-modal-actions .decoder-full-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(157, 181, 166, 0.28);
  border-radius: 5px;
  background: rgba(118, 157, 132, 0.06);
  letter-spacing: 0.04em;
}
.hacker-modal-actions .decoder-full-link:hover {
  border-color: #6ca780;
  background: rgba(80, 160, 110, 0.12);
}
.hacker-modal-actions .decoder-full-link span {
  font-size: 1rem;
  color: #a8c8b3;
}
@media (max-width: 600px) {
  .hacker-modal-decoder .hacker-modal-body {
    padding: 1rem;
  }
}

.hacker-modal-actions .decoder-full-link[hidden] {
  display: none;
}
.hacker-modal-actions .decoder-full-link {
  min-width: 0;
}

.hacker-script-copy {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #aaa7a0;
  cursor: pointer;
}
.hacker-script-copy:hover,
.hacker-script-copy:focus-visible {
  color: #dedbd5;
  transform: translateY(1px);
}
.hacker-script-copy:focus-visible,
.hacker-script-folder:focus-visible {
  outline: 2px solid #efbd66;
  outline-offset: 2px;
}
.hacker-script-copy-status {
  min-height: 1.5em;
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: #dfccaa;
}
.hacker-modal-scripts-wrap {
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #6e6556 #111113;
}
@media (max-width: 380px) {
  .hacker-modal-scripts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: hover) and (pointer: fine) {
  .hacker-script-copy {
    opacity: 0;
    pointer-events: none;
  }
  .hacker-script-card:hover .hacker-script-copy,
  .hacker-script-card:focus-within .hacker-script-copy {
    opacity: 1;
    pointer-events: auto;
  }
}

.hacker-script-copy:active {
  transform: translateY(2px);
  opacity: 0.7;
}
