
@charset "UTF-8";

/* ========================================
   FLASH ARCHIVE
======================================== */

:root {
  --accent: #F5BF02;
  --background: #0b0b0b;
  --surface: #111111;
  --surface-light: #181818;
  --border: #292929;
  --border-light: #222222;
  --white: #ffffff;
  --text: #dddddd;
  --text-light: #bbbbbb;
  --text-muted: #888888;
  --content-width: 1600px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: var(--background);
}

body {
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans KR", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ========================================
   HOMEPAGE
======================================== */

body#tt-body-index #main,
body.homepage-redirect #main {
  display: none !important;
}

/* ========================================
   HEADER
======================================== */

#header {
  width: 100%;
  border-bottom: 1px solid #191919;
}

.header-inner {
  width: 100%;
  max-width: var(--content-width);
  min-height: 140px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 42px;
}

.site-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.5px;
}

.logo-flash {
  color: var(--accent);
}

.logo-archive {
  color: var(--white);
  font-weight: 700;
}

.search-form {
  width: 360px;
  height: 46px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
}

.search-form:focus-within {
  border-color: #806700;
}

.search-form input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 18px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  font-size: 14px;
}

.search-form input::placeholder {
  color: #777777;
}

.search-form button {
  width: 48px;
  height: 100%;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 23px;
  cursor: pointer;
}

/* ========================================
   MAIN LAYOUT
======================================== */

#container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 28px;
}

#main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: start;
  gap: 32px;
  padding: 30px 0 90px;
}

#content {
  width: 100%;
  min-width: 0;
}

#sidebar {
  width: 240px;
  min-width: 0;
}

/* ========================================
   HOMEPAGE CARD FALLBACK
======================================== */

body#tt-body-index #content {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  column-gap: 14px;
  row-gap: 28px;
}

body#tt-body-index #content > s_article_rep,
body#tt-body-index #content s_index_article_rep {
  display: contents;
}

/* ========================================
   GAME CARDS
======================================== */

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 28px;
  width: 100%;
  min-width: 0;
}

.game-card {
  display: block;
  width: 100%;
  min-width: 0;
  color: var(--text);
}

.game-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-light);
}

.game-thumb img {
  display: block;
  width: 100% !important;
  max-width: none;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.game-card:hover .game-thumb img {
  transform: scale(1.04);
  opacity: 0.92;
}

.game-title {
  margin-top: 10px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.game-card:hover .game-title {
  color: var(--accent);
}

/* ========================================
   CATEGORY / SEARCH PAGE
======================================== */

.content-header {
  grid-column: 1 / -1;
  margin: 0 0 22px;
}

.content-header h1 {
  margin: 0;
  color: var(--white);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.4px;
}

.empty-message {
  grid-column: 1 / -1;
  padding: 60px 0;
  color: var(--text-muted);
  text-align: center;
}

/* ========================================
   ARTICLE
======================================== */

.article-page {
  width: 100%;
  min-width: 0;
}

.article-header {
  margin-bottom: 34px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-category {
  margin-bottom: 12px;
}

.article-category a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.article-header h1 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}

.article-date {
  color: var(--text-muted);
  font-size: 13px;
}

.article-content {
  min-width: 0;
  color: #cccccc;
  font-size: 15px;
  line-height: 1.85;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 24px auto;
}

.article-content h2 {
  margin: 40px 0 16px;
  color: var(--white);
  font-size: 21px;
  line-height: 1.5;
}

.article-content h3 {
  margin: 32px 0 14px;
  color: var(--white);
  font-size: 18px;
  line-height: 1.5;
}

.article-content p {
  margin: 0 0 18px;
}

.article-content a {
  color: var(--accent);
}

.article-content table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  padding: 10px;
  border: 1px solid #444444;
}

.article-content th {
  background: #171717;
  color: var(--accent);
}

.article-content td {
  background: #111111;
}

.article-content iframe,
.article-content video {
  max-width: 100%;
}

/* ========================================
   SIDEBAR
======================================== */

.sidebar-section {
  margin-bottom: 38px;
}

.sidebar-title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.25px;
}

/* ========================================
   POPULAR GAMES
======================================== */

.popular-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: popular-rank;
}

.popular-item {
  margin: 0;
  padding: 0;
  counter-increment: popular-rank;
}

.popular-item:nth-child(n + 4) {
  display: none !important;
}

.popular-item a {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.popular-thumb {
  width: 60px !important;
  height: 60px !important;
  max-width: none;
  flex: 0 0 60px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--surface-light);
}

.popular-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #d6d6d6;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.popular-title::before {
  content: "TOP " counter(popular-rank) " ";
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.popular-item a:hover .popular-title {
  color: var(--accent);
}

/* ========================================
   CATEGORY LIST
   티스토리 기본 카테고리 구조 대응
======================================== */

.category-list,
.category-list * {
  box-sizing: border-box !important;
}

.category-list {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  background: #0b0b0b !important;
  color: #cccccc !important;
}

/* 티스토리가 생성하는 전체 카테고리 영역 */
.category-list .tt_category {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #0b0b0b !important;
  background-color: #0b0b0b !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 전체보기 링크 */
.category-list .link_tit {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  background: #0b0b0b !important;
  background-color: #0b0b0b !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid #252525 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #cccccc !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  text-indent: 0 !important;
  text-decoration: none !important;
}

/* 상위 카테고리 목록 */
.category-list .category_list {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #0b0b0b !important;
  background-color: #0b0b0b !important;
  border: 0 !important;
  list-style: none !important;
}

/* 모든 카테고리 항목 */
.category-list .category_list li,
.category-list .sub_category_list li {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #0b0b0b !important;
  background-color: #0b0b0b !important;
  background-image: none !important;
  border: 0 !important;
  list-style: none !important;
}

/* 카테고리 목록의 기본 글머리표만 제거 */
.category-list ul,
.category-list li {
  list-style-type: none !important;
  list-style-image: none !important;
}

/* 상위 카테고리 링크 */
.category-list .link_item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  background: #0b0b0b !important;
  background-color: #0b0b0b !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid #252525 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #cccccc !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  text-indent: 0 !important;
  text-decoration: none !important;
}

/* 하위 카테고리 목록: 들여쓰기 제거 */
.category-list .sub_category_list,
.category-list .category_list .sub_category_list,
.category-list ul ul,
.category-list ul ul ul {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-left: 0 !important;
  background: #0b0b0b !important;
  background-color: #0b0b0b !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  list-style: none !important;
}

/* 하위 카테고리 링크 */
.category-list .link_sub_item,
.category-list .sub_category_list a,
.category-list ul ul a,
.category-list ul ul ul a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  padding-left: 12px !important;
  background: #0b0b0b !important;
  background-color: #0b0b0b !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid #252525 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #cccccc !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  text-indent: 0 !important;
  text-decoration: none !important;
}

/* 모든 카테고리 링크 상태 */
.category-list a:link,
.category-list a:visited,
.category-list a:active {
  color: #cccccc !important;
  text-decoration: none !important;
}

/* 링크 내부 요소의 배경 제거 */
.category-list a *,
.category-list .link_tit *,
.category-list .link_item *,
.category-list .link_sub_item * {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

/* 티스토리 기본 트리 이미지 및 버튼 제거 */
.category-list img,
.category-list button,
.category-list input,
.category-list .c_category {
  display: none !important;
}

/* 혹시 남아 있는 기본 가상 아이콘 제거 */
.category-list a::before,
.category-list a::after,
.category-list .link_tit::before,
.category-list .link_tit::after,
.category-list .link_item::before,
.category-list .link_item::after,
.category-list .link_sub_item::before,
.category-list .link_sub_item::after {
  content: none !important;
  display: none !important;
}

/* 마우스를 올렸을 때 */
.category-list .link_tit:hover,
.category-list .link_item:hover,
.category-list .link_sub_item:hover,
.category-list a:hover {
  background: #181818 !important;
  background-color: #181818 !important;
  color: #F5BF02 !important;
}

/* 게시글 수 */
.category-list .c_cnt {
  display: inline-block !important;
  flex-shrink: 0 !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #777777 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

/* 마우스를 올렸을 때 게시글 수 */
.category-list a:hover .c_cnt {
  color: #F5BF02 !important;
}

/* ========================================
   RELATED POSTS
======================================== */

.related-section {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.related-card {
  display: block;
  min-width: 0;
}

.related-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-light);
}

.related-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.related-card:hover .related-thumb img {
  transform: scale(1.035);
  opacity: 0.9;
}

.related-title {
  display: -webkit-box;
  margin-top: 9px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-card:hover .related-title {
  color: var(--accent);
}


/* ========================================
   PAGINATION
======================================== */

.pagination {
  grid-column: 1 / -1;
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination a {
  min-width: 34px;
  min-height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: #999999;
  font-size: 13px;
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========================================
   FOOTER
======================================== */

#footer {
  width: 100%;
  border-top: 1px solid #1c1c1c;
}

.footer-inner {
  width: 100%;
  max-width: var(--content-width);
  min-height: 80px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #666666;
  font-size: 12px;
}

.footer-logo {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ========================================
   RESPONSIVE: TABLET
======================================== */

@media (max-width: 1100px) {
  #main {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 24px;
  }

  #sidebar {
    width: 230px;
  }

  .header-inner {
    gap: 30px;
  }

  .search-form {
    width: 320px;
  }

  .game-grid,
  body#tt-body-index #content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 26px;
  }

  .popular-thumb {
    width: 54px !important;
    height: 54px !important;
    flex-basis: 54px;
  }
}

/* ========================================
   RESPONSIVE: SMALL TABLET
======================================== */

@media (max-width: 800px) {
  .header-inner {
    min-height: 120px;
    padding: 0 24px;
    gap: 24px;
  }

  .site-logo {
    font-size: 30px;
  }

  .search-form {
    width: 280px;
    height: 42px;
  }

  #container {
    padding: 0 24px;
  }

  #main {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-top: 26px;
  }

  #sidebar {
    width: 100%;
  }

  .game-grid,
  body#tt-body-index #content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 26px;
  }

  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-inner {
    padding: 0 24px;
  }
}

/* ========================================
   RESPONSIVE: MOBILE
======================================== */

@media (max-width: 560px) {
  .header-inner {
    min-height: 148px;
    padding: 24px 18px;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
  }

  .site-logo {
    font-size: 30px;
  }

  .search-form {
    width: 100%;
    max-width: 360px;
    height: 42px;
  }

  #container {
    padding: 0 18px;
  }

  #main {
    padding-top: 22px;
    padding-bottom: 60px;
    gap: 42px;
  }

  .game-grid,
  body#tt-body-index #content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 24px;
  }

  .content-header {
    margin-bottom: 18px;
  }

  .content-header h1 {
    font-size: 19px;
  }

  .game-title {
    margin-top: 8px;
    font-size: 13px;
  }

  .article-header {
    margin-bottom: 26px;
  }

  .article-header h1 {
    font-size: 21px;
  }

  .article-content {
    font-size: 14px;
  }

  .related-section {
    margin-top: 42px;
    padding-top: 24px;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .popular-thumb {
    width: 56px !important;
    height: 56px !important;
    flex-basis: 56px;
  }

  .footer-inner {
    min-height: 70px;
    padding: 0 18px;
    font-size: 11px;
  }
}
