/* ============================================================
   T07 — Cyberpunk Neon
   Dark base + neon cyan / magenta glow
   ============================================================ */

/* --- Tokens ------------------------------------------------ */
:root {
  --xxf-primary: #00f0ff;
  --xxf-accent: #ff00e5;
  --xxf-surface: #0a0a14;
  --xxf-ink: #e0e0ff;
  --xxf-muted: #6b6b8d;
  --xxf-line: rgba(0, 240, 255, .15);
  --xxf-card: rgba(15, 15, 30, .85);
  --xxf-radius: 4px;
  --xxf-shadow: 0 0 20px rgba(0, 240, 255, .15);
  --xxf-max: 1200px;

  --font-sans: "Inter", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

/* --- Reset & Base ------------------------------------------ */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--xxf-surface);
  color: var(--xxf-ink);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Scanline overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 240, 255, .015) 2px,
    rgba(0, 240, 255, .015) 4px
  );
}

/* Tech grid background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(var(--xxf-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--xxf-line) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .4;
}

a {
  color: var(--xxf-primary);
  text-decoration: none;
  transition: color .2s, text-shadow .2s;
}

a:hover,
a:focus-visible {
  color: var(--xxf-accent);
  text-shadow: 0 0 8px var(--xxf-accent);
}

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

ul, ol { list-style: none; }

/* --- Utility ------------------------------------------------ */
.container {
  max-width: var(--xxf-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Neon label (monospace tag) */
.neo-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--xxf-primary);
  display: inline-block;
  padding: .2em .6em;
  border: 1px solid rgba(0, 240, 255, .35);
  border-radius: var(--xxf-radius);
  background: rgba(0, 240, 255, .06);
}

/* Glow border card */
.glow-card {
  background: var(--xxf-card);
  border: 1px solid var(--xxf-line);
  border-radius: var(--xxf-radius);
  box-shadow: var(--xxf-shadow);
  backdrop-filter: blur(6px);
  transition: border-color .25s, box-shadow .25s;
}

.glow-card:hover {
  border-color: var(--xxf-primary);
  box-shadow: 0 0 28px rgba(0, 240, 255, .25);
}

/* Gradient accent line */
.grad-line {
  height: 2px;
  background: linear-gradient(90deg, var(--xxf-primary), var(--xxf-accent));
  border: none;
}

/* Section heading */
.sec-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--xxf-primary);
  padding-bottom: .5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--xxf-line);
  position: relative;
}

.sec-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--xxf-primary), var(--xxf-accent));
}

/* ---------- SEO Runtime Garbage Cleanup ---------- */
body[class*="template-"] :is(.container,.site-header,.header-top,.main-nav,.nav-list,.site-footer,.footer-links,.footer-bottom,.hero-section,.hero-card,.hero-overlay,.page-body,.main-content,.sidebar,.art-grid,.art-card,.info,.rank-list,.rank-item,.kw-cloud,.cat-grid,.cat-card,.list-header,.list-items,.list-row,.pagination,.show-header,.show-body,.prev-next,.widget,.breadcrumb,.glow-card) > :where(font,ins,small,sup,time,tt,var,area,map,bdo,dfn):not([class]) { display: none !important; }
body[class*="template-"] :is(.sec-title,.neo-label,.grad-line,.meta,.thumb,.brand,.header-search,.header-sitemap,.side-list,.cat-list,.link-cloud) :where(font,ins,small,sup,time,tt,var,area,map,bdo,dfn):not([class]) { display: none !important; }

/* --- Header ------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--xxf-line);
  background: rgba(10, 10, 20, .95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand a {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--xxf-primary);
  text-shadow: 0 0 12px rgba(0, 240, 255, .4);
}

.brand a:hover {
  text-shadow: 0 0 20px var(--xxf-primary);
}

.header-search {
  display: flex;
  gap: .25rem;
}

.header-search input {
  font-family: var(--font-mono);
  font-size: .8rem;
  padding: .45em .75em;
  background: rgba(0, 240, 255, .04);
  border: 1px solid var(--xxf-line);
  border-radius: var(--xxf-radius);
  color: var(--xxf-ink);
  outline: none;
  min-width: 180px;
  transition: border-color .2s;
}

.header-search input::placeholder {
  color: var(--xxf-muted);
}

.header-search input:focus {
  border-color: var(--xxf-primary);
  box-shadow: 0 0 10px rgba(0, 240, 255, .2);
}

.header-search button {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .45em .9em;
  background: linear-gradient(135deg, var(--xxf-primary), var(--xxf-accent));
  color: var(--xxf-surface);
  border: none;
  border-radius: var(--xxf-radius);
  cursor: pointer;
  font-weight: 700;
}

/* Nav */
.main-nav {
  padding: .25rem 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

.nav-list a {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .06em;
  padding: .35em .7em;
  border-radius: var(--xxf-radius);
  color: var(--xxf-ink);
  border: 1px solid transparent;
  transition: all .2s;
}

.nav-list a:hover,
.nav-list a[aria-current] {
  color: var(--xxf-primary);
  border-color: var(--xxf-line);
  background: rgba(0, 240, 255, .06);
  text-shadow: none;
}

.header-sitemap {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--xxf-muted);
  padding: .25rem 0 .5rem;
}

.header-sitemap a {
  color: var(--xxf-muted);
  letter-spacing: .06em;
}

.header-sitemap a:hover {
  color: var(--xxf-primary);
}

/* --- Footer ------------------------------------------------- */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--xxf-line);
  background: rgba(10, 10, 20, .92);
}

.footer-links {
  padding: 2rem 0 1rem;
}

.footer-links .footer-col {
  margin-bottom: 1.5rem;
}

.footer-links .sec-title {
  font-size: .8rem;
  margin-bottom: .75rem;
}

.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .5rem;
}

.link-cloud a {
  font-size: .8rem;
  color: var(--xxf-muted);
  padding: .15em .5em;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--xxf-radius);
  transition: all .2s;
}

.link-cloud a:hover {
  color: var(--xxf-primary);
  border-color: var(--xxf-line);
  text-shadow: none;
}

.footer-bottom {
  padding: 1rem 0;
  border-top: 1px solid var(--xxf-line);
  text-align: center;
  font-size: .75rem;
  color: var(--xxf-muted);
}

.footer-bottom a {
  color: var(--xxf-muted);
}

/* --- Hero --------------------------------------------------- */
.hero-section {
  padding: 2rem 0 1.5rem;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--xxf-radius);
  border: 1px solid var(--xxf-line);
  min-height: 320px;
  display: flex;
  align-items: flex-end;
}

.hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.7) brightness(.55);
}

.hero-card .hero-overlay {
  position: relative;
  z-index: 2;
  padding: 2rem;
  width: 100%;
  background: linear-gradient(transparent, rgba(10, 10, 20, .95) 40%);
}

.hero-card .hero-overlay h1 {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .5rem;
  text-shadow: 0 0 20px rgba(0, 240, 255, .35);
}

.hero-card .hero-overlay h1 a {
  color: #fff;
}

.hero-card .hero-overlay h1 a:hover {
  color: var(--xxf-primary);
}

.hero-card .hero-overlay p {
  font-size: .85rem;
  color: var(--xxf-muted);
  max-width: 640px;
}

.hero-card .hero-overlay .neo-label {
  margin-bottom: .5rem;
}

/* Neon corner accents */
.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-color: var(--xxf-primary);
  border-style: solid;
  pointer-events: none;
}

.hero-card::before {
  top: 12px; left: 12px;
  border-width: 2px 0 0 2px;
}

.hero-card::after {
  bottom: 12px; right: 12px;
  border-width: 0 2px 2px 0;
  border-color: var(--xxf-accent);
}

/* --- Main Layout -------------------------------------------- */
.page-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 1.5rem 0 2rem;
}

.main-content { min-width: 0; }

.sidebar { min-width: 0; }

/* --- Article Grid ------------------------------------------- */
.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.art-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.art-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}

.art-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.6) brightness(.7);
  transition: filter .3s, transform .3s;
}

.art-card:hover .thumb img {
  filter: saturate(.9) brightness(.8);
  transform: scale(1.04);
}

.art-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 240, 255, .08), rgba(255, 0, 229, .08));
  pointer-events: none;
}

.art-card .info {
  padding: .9rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.art-card .info h3 {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: .4rem;
}

.art-card .info h3 a {
  color: var(--xxf-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.art-card .info h3 a:hover {
  color: var(--xxf-primary);
}

.art-card .meta {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--xxf-muted);
  margin-top: auto;
}

/* --- Ranking List ------------------------------------------- */
.rank-list {
  counter-reset: rank;
}

.rank-item {
  counter-increment: rank;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.rank-item::before {
  content: counter(rank);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  min-width: 1.6em;
  height: 1.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--xxf-radius);
  flex-shrink: 0;
  background: rgba(0, 240, 255, .1);
  color: var(--xxf-primary);
  border: 1px solid rgba(0, 240, 255, .25);
}

.rank-item:nth-child(-n+3)::before {
  background: linear-gradient(135deg, var(--xxf-primary), var(--xxf-accent));
  color: var(--xxf-surface);
  border: none;
  text-shadow: none;
}

.rank-item a {
  font-size: .85rem;
  color: var(--xxf-ink);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-item a:hover {
  color: var(--xxf-primary);
}

/* --- Keywords Cloud ----------------------------------------- */
.kw-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.kw-cloud a {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  padding: .25em .6em;
  border: 1px solid var(--xxf-line);
  border-radius: var(--xxf-radius);
  color: var(--xxf-muted);
  background: rgba(0, 240, 255, .03);
  transition: all .2s;
}

.kw-cloud a:hover {
  color: var(--xxf-accent);
  border-color: var(--xxf-accent);
  background: rgba(255, 0, 229, .08);
  text-shadow: 0 0 8px rgba(255, 0, 229, .4);
}

/* --- Category Cards ----------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .75rem;
}

.cat-card {
  text-align: center;
  padding: .8rem .5rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--xxf-ink);
}

.cat-card:hover {
  color: var(--xxf-primary);
  text-shadow: 0 0 10px rgba(0, 240, 255, .3);
}

/* --- List Page ---------------------------------------------- */
.list-header {
  padding: 1.5rem 0 .75rem;
}

.list-header h1 {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--xxf-primary);
  text-shadow: 0 0 14px rgba(0, 240, 255, .3);
}

.list-items {
  display: flex;
  flex-direction: column;
}

.list-items .list-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  align-items: flex-start;
}

.list-row .info {
  flex: 1;
  min-width: 0;
}

.list-row .thumb {
  width: 180px;
  flex-shrink: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--xxf-radius);
  border: 1px solid var(--xxf-line);
}

.list-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.6) brightness(.7);
  transition: filter .3s;
}

.list-row:hover .thumb img {
  filter: saturate(.9) brightness(.85);
}

.list-row .info h3 {
  font-size: .95rem;
  line-height: 1.4;
  margin-bottom: .35rem;
}

.list-row .info h3 a {
  color: var(--xxf-ink);
}

.list-row .info h3 a:hover {
  color: var(--xxf-primary);
}

.list-row .info p {
  font-size: .8rem;
  color: var(--xxf-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .35rem;
}

.list-row .info .meta {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--xxf-muted);
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: 1.5rem 0;
  justify-content: center;
}

.pagination a {
  font-family: var(--font-mono);
  font-size: .78rem;
  padding: .35em .7em;
  border: 1px solid var(--xxf-line);
  border-radius: var(--xxf-radius);
  color: var(--xxf-muted);
  background: rgba(0, 240, 255, .03);
  transition: all .2s;
}

.pagination a:hover,
.pagination a[aria-current="page"] {
  color: var(--xxf-surface);
  background: linear-gradient(135deg, var(--xxf-primary), var(--xxf-accent));
  border-color: transparent;
  text-shadow: none;
}

/* --- Show Page ---------------------------------------------- */
.show-header {
  padding: 2rem 0 1rem;
}

.show-header h1 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: .6rem;
  text-shadow: 0 0 14px rgba(0, 240, 255, .2);
}

.show-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--xxf-muted);
  margin-bottom: .75rem;
}

.show-meta span {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.show-body {
  padding: 1.5rem 0;
  font-size: .95rem;
  line-height: 1.85;
}

.show-body p {
  margin-bottom: 1rem;
}

.show-body img {
  border-radius: var(--xxf-radius);
  border: 1px solid var(--xxf-line);
  margin: 1rem 0;
}

.show-body h2,
.show-body h3 {
  font-family: var(--font-mono);
  color: var(--xxf-primary);
  margin: 1.5rem 0 .75rem;
}

.show-body a {
  border-bottom: 1px solid var(--xxf-line);
}

.show-body a:hover {
  border-color: var(--xxf-primary);
}

.show-body ul,
.show-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.show-body li {
  margin-bottom: .25rem;
  list-style: disc;
}

.show-body ol li {
  list-style: decimal;
}

/* Prev / Next */
.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--xxf-line);
  margin-top: 1.5rem;
}

.prev-next a {
  font-size: .85rem;
  color: var(--xxf-ink);
  padding: .75rem 1rem;
  display: block;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prev-next a:hover {
  color: var(--xxf-primary);
}

.prev-next a[rel="prev"] {
  border-left: 2px solid var(--xxf-primary);
}

.prev-next a[rel="next"] {
  text-align: right;
  border-right: 2px solid var(--xxf-accent);
}

/* --- Sidebar Widgets ---------------------------------------- */
.sidebar .widget {
  margin-bottom: 1.5rem;
}

.sidebar .widget .sec-title {
  font-size: .78rem;
}

.sidebar .side-list a {
  display: block;
  padding: .4rem 0;
  font-size: .82rem;
  color: var(--xxf-ink);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .side-list a:hover {
  color: var(--xxf-primary);
  padding-left: .4rem;
}

.sidebar .cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.sidebar .cat-list a {
  font-family: var(--font-mono);
  font-size: .72rem;
  padding: .2em .5em;
  border: 1px solid var(--xxf-line);
  border-radius: var(--xxf-radius);
  color: var(--xxf-muted);
  transition: all .2s;
}

.sidebar .cat-list a:hover {
  color: var(--xxf-primary);
  border-color: var(--xxf-primary);
  text-shadow: none;
}

/* --- Breadcrumb -------------------------------------------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--xxf-muted);
  padding: .75rem 0;
}

.breadcrumb a {
  color: var(--xxf-muted);
}

.breadcrumb a:hover {
  color: var(--xxf-primary);
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 900px) {
  .page-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-top: 1px solid var(--xxf-line);
    padding-top: 1.5rem;
  }
}

@media (max-width: 640px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-search input {
    min-width: 140px;
  }

  .art-grid {
    grid-template-columns: 1fr;
  }

  .list-row {
    flex-direction: column;
  }

  .list-row .thumb {
    width: 100%;
  }

  .hero-card {
    min-height: 240px;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

  .prev-next a[rel="next"] {
    text-align: left;
    border-right: none;
    border-left: 2px solid var(--xxf-accent);
  }

  .cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
