/* 자료실 · 애드온 — files.js. 회원 화면과 관리자 화면이 함께 쓴다. */
.fx-tabs{ display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.fx-tab{
  background: rgba(13,26,42,.7); border: 1px solid #2a4460; color: #a9bfd2;
  padding: 7px 16px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer;
}
.fx-tab:hover{ color: #fff; border-color: #4d7ba3; }
.fx-tab.on{ color: #1b1305; background: #e8c979; border-color: #e8c979; font-weight: 700; }
.fx-hint{ font-size: 12.5px; color: #8fb3cc; margin: 2px 0 12px; line-height: 1.6; }

.fx-row{ cursor: pointer; }
.fx-row:focus-visible{ outline: 2px solid #8fd9f0; outline-offset: 2px; }
.fx-row-thumb{
  width: 64px; height: 44px; border-radius: 6px; overflow: hidden; flex: 0 0 auto;
  border: 1px solid #2a4460; background: #070d16; display: block;
}
.fx-row-thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.fx-title-line{ display: flex; align-items: center; gap: 7px; min-width: 0; }
.fx-badge{
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
  line-height: 1.4; white-space: nowrap; vertical-align: middle; flex: 0 0 auto;
}
.fx-badge.addon{ background: rgba(143,217,240,.14); color: #8fd9f0; border: 1px solid #3f7d8c; }
.fx-badge.ver{ background: rgba(232,201,121,.12); color: #e8c979; border: 1px solid #6b5a33; }
.fx-badge.gm{ background: rgba(226,104,90,.14); color: #ff9a8a; border: 1px solid #6d4034; }
.fx-tab.gm{ border-color: #6d4034; color: #ff9a8a; }
.fx-tab.gm.on{ background: #e2685a; border-color: #e2685a; color: #1b0705; }
.fx-hint.gm{ color: #ff9a8a; }
.fx-aud{ margin-bottom: 0; }
.fx-badge.new{ background: rgba(111,207,151,.14); color: #6fcf97; border: 1px solid #2f6b4a; }
.post-title .fx-badge{ font-size: 12px; margin: 0 8px; position: relative; top: -3px; }
.post-title .fx-badge:first-child{ margin-left: 0; }

.fx-dlbox{
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin: 16px 0 6px; padding: 14px 16px; border: 1px solid #2a4460; border-radius: 8px;
  background: rgba(7,13,22,.6);
}
.fx-dlinfo{ display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fx-dlinfo b{ color: #fff; font-size: 14px; word-break: break-all; }
.fx-dlinfo span{ color: #8ea6bc; font-size: 12.5px; }
.fx-accent{ border-color: #6b5a33 !important; color: #e8c979 !important; }
.fx-empty{ color: #8aa2b8; font-size: 13px; margin: 0; }

/* 설명 문서 */
.fx-body{ min-height: 0 !important; }
.fx-doc{ line-height: 1.85; }
.fx-doc .fx-p{ margin: 0 0 12px; }
.fx-doc .fx-h{ color: #e8c979; margin: 22px 0 10px; line-height: 1.4; }
.fx-doc h3.fx-h{ font-size: 19px; } .fx-doc h4.fx-h{ font-size: 16.5px; } .fx-doc h5.fx-h{ font-size: 14.5px; color: #cfe4f2; }
.fx-doc .fx-h:first-child{ margin-top: 0; }
.fx-doc .fx-list{ margin: 0 0 12px; padding-left: 22px; }
.fx-doc .fx-list li{ margin: 3px 0; }
.fx-doc code{
  background: rgba(143,217,240,.1); border: 1px solid #23415a; border-radius: 4px;
  padding: 1px 5px; font-size: .9em; color: #bfe9f7; font-family: Consolas, monospace;
}
.fx-doc b{ color: #fff; }
.fx-pre{
  background: #050a12; border: 1px solid #23415a; border-radius: 6px; padding: 10px 12px;
  font-family: Consolas, monospace; font-size: 12.5px; color: #cfe4f2; overflow-x: auto; margin: 0 0 12px;
  white-space: pre;
}
.fx-tip{
  border-left: 3px solid #8fd9f0; background: rgba(143,217,240,.07); padding: 9px 12px;
  border-radius: 0 6px 6px 0; margin: 0 0 12px; color: #d6ecf6;
}
.fx-table-wrap{ overflow-x: auto; margin: 0 0 14px; }
.fx-table{ border-collapse: collapse; font-size: 13.5px; min-width: 60%; }
.fx-table th, .fx-table td{ border: 1px solid #2a4460; padding: 6px 10px; text-align: left; vertical-align: top; line-height: 1.6; }
.fx-table th{ background: rgba(232,201,121,.08); color: #e8c979; }
.fx-fig{ margin: 6px 0 16px; }
.fx-fig img{
  max-width: 100%; max-height: 560px; border-radius: 6px; border: 1px solid #2a4460; display: block; cursor: zoom-in;
}
.fx-fig figcaption{ font-size: 12.5px; color: #8ea6bc; margin-top: 6px; }
.fx-missing{ color: #e2685a; font-size: 12.5px; }
.fx-gallery{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.fx-thumb{
  width: 180px; padding: 0; background: #070d16; border: 1px solid #2a4460; border-radius: 6px;
  overflow: hidden; cursor: zoom-in; display: flex; flex-direction: column; text-align: left; font: inherit;
}
.fx-thumb:hover{ border-color: #4d7ba3; }
.fx-thumb img{ width: 100%; height: 110px; object-fit: cover; display: block; }
.fx-thumb span{ font-size: 11.5px; color: #a9bfd2; padding: 5px 7px; line-height: 1.4; }

/* 버전 기록 */
.fx-releases{ margin-top: 18px; }
.fx-rel{
  border: 1px solid #2a4460; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
  background: rgba(7,13,22,.45);
}
.fx-rel.latest{ border-color: #3f7d8c; background: rgba(143,217,240,.04); }
.fx-rel-head{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fx-rel-ver{ font-size: 16px; color: #e8c979; }
.fx-rel-meta{ font-size: 12px; color: #8ea6bc; }
.fx-rel-acts{ margin-left: auto; display: flex; gap: 6px; }
.fx-rel-acts .ghost-btn{ padding: 4px 10px; font-size: 12px; text-decoration: none; }
.fx-rel .fx-doc{ font-size: 14px; color: #dae8f3; }
.fx-rel-sha{ font-family: Consolas, monospace; font-size: 10.5px; color: #4f6780; margin: 8px 0 0; word-break: break-all; }
.fx-comments{ margin-top: 22px; }

/* 크게 보기 */
.fx-lightbox{
  position: fixed; inset: 0; z-index: 90; background: rgba(2,5,9,.92);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.fx-lightbox[hidden]{ display: none !important; }
.fx-lightbox figure{ margin: 0; max-width: 92vw; text-align: center; }
.fx-lightbox img{ max-width: 92vw; max-height: 84vh; border-radius: 6px; }
.fx-lightbox figcaption{ color: #cfe4f2; font-size: 13px; margin-top: 8px; }
.fx-lightbox button{
  position: absolute; background: rgba(13,26,42,.8); border: 1px solid #2a4460; color: #e9f3fa;
  font-size: 26px; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
}
.fx-lb-x{ top: 16px; right: 16px; font-size: 18px !important; }
.fx-lb-prev{ left: 16px; top: 50%; } .fx-lb-next{ right: 16px; top: 50%; }

/* 쓰기 창 */
.fx-modal{ align-items: flex-start; overflow-y: auto; }
.fx-editor{ max-width: 820px !important; width: 100%; margin: 30px auto; }
.fx-kind{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.fx-kind-btn{
  background: rgba(13,26,42,.7); border: 1px solid #2a4460; border-radius: 8px; padding: 10px 12px;
  color: #a9bfd2; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px;
}
.fx-kind-btn b{ color: #fff; font-size: 14px; }
.fx-kind-btn span{ font-size: 12px; }
.fx-kind-btn.on{ border-color: #e8c979; background: rgba(232,201,121,.08); }
.fx-field-note{ display: block; font-size: 11.5px; color: #7f97ae; margin-top: 5px; line-height: 1.5; }
.fx-note-wrap textarea{ width: 100%; font-family: Consolas, 'Noto Sans KR', monospace; font-size: 13px; }
.fx-tools{ display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.fx-tool{
  background: #0d1a2a; border: 1px solid #2a4460; color: #cfe4f2; border-radius: 5px;
  padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
.fx-tool:hover{ border-color: #4d7ba3; }
.fx-tool-right{ margin-left: auto; }
.fx-preview{
  border: 1px dashed #2a4460; border-radius: 6px; padding: 12px 14px !important; max-height: 520px; overflow-y: auto;
  margin-top: 0 !important;
}
.fx-imgs{ display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.fx-imgcard{
  width: 170px; border: 1px solid #2a4460; border-radius: 6px; background: #070d16; padding: 6px;
  display: flex; flex-direction: column; gap: 5px; position: relative;
}
.fx-imgcard.removed{ opacity: .4; }
.fx-imgcard img{ width: 100%; height: 96px; object-fit: cover; border-radius: 4px; }
.fx-imgcard input{
  width: 100%; background: #0d1a2a; border: 1px solid #2a4460; color: #e9f3fa; border-radius: 4px;
  padding: 4px 6px; font: inherit; font-size: 12px;
}
.fx-imgno{
  position: absolute; top: 10px; left: 10px; background: rgba(4,7,13,.85); color: #e8c979;
  font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px;
}
.fx-imgbtns{ display: flex; gap: 4px; }
.fx-mini{
  flex: 1; background: #0d1a2a; border: 1px solid #2a4460; color: #cfe4f2; border-radius: 4px;
  font: inherit; font-size: 11.5px; padding: 3px 0; cursor: pointer;
}
.fx-mini.danger{ color: #ff9a8a; border-color: #6d4034; }
.fx-addimg{ position: relative; overflow: hidden; display: inline-block; cursor: pointer; }
.fx-addimg input{ position: absolute; inset: 0; opacity: 0; cursor: pointer; }

@media (max-width: 640px){
  .fx-kind{ grid-template-columns: 1fr; }
  .fx-thumb{ width: calc(50% - 5px); }
  .fx-imgcard{ width: calc(50% - 5px); }
  .fx-rel-acts{ margin-left: 0; }
}
