﻿/* Custom Tags and edits for Nier Automata: Hacking Layout */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500&display=swap');

/* Nier Automata parchment UI helpers */

.nier-scroll {
  background: var(--bg);
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.04) 0px,
    rgba(0, 0, 0, 0.04) 1px,
    transparent 1px,
    transparent 24px
  ); /* faint scanline grid */
  min-height: 100vh;
}

.nier-banner {
  text-align: center;
  padding: 2rem 1rem;
  border-bottom: 2px solid var(--text-subtle);
}

.nier-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
}

.nier-subtitle {
  color: var(--text-subtle);
  margin-top: .5rem;
  font-style: italic;
}

.nier-panel {
  margin: 2rem auto;
  padding: 1rem 2rem;
  background: var(--surface);
  border: 2px solid var(--surface-active);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.15);
  max-width: 1000px;
  overflow-x: auto;
}

.nier-section {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--text-subtle);
  padding-bottom: .25rem;
}

.nier-row {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
  border-bottom: 1px dashed var(--text-subtle);
}

.nier-row:last-child {
  border-bottom: none;
}

.label {
  font-weight: 500;
  color: var(--text);
}

.value {
  font-weight: 600;
  color: var(--accent-hover);
}

/* === Nier Automata Data Entry Layout === */

.nier-database {
  display: flex;
  gap: 2rem;
  margin: 2rem auto;
  padding: 1rem;
  max-width: 1100px;
  background: var(--surface);
  border: 2px solid var(--surface-active);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
}

/* Left list */

.db-list {
  flex: 1;
  border-right: 1px solid var(--text-subtle);
  padding-right: 1rem;
}

.db-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.db-list li {
  padding: 0.6rem 0.4rem;
  cursor: pointer;
  color: var(--text-subtle);
  transition: color 0.2s, background 0.2s;
}

.db-list li:hover {
  color: var(--accent-hover);
}

.db-list li.active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.05);
}

/* Right detail panel */

.db-detail {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.db-image {
  max-width: 100%;
  border: 2px solid var(--surface-active);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.db-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0.5rem 0;
}

.db-description {
  color: var(--text);
  line-height: 1.5;
}

.db-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.db-tags li {
  background: var(--surface-active);
  color: var(--text-subtle);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}

/* Selection cursor (like Nier Automata arrow) */

.db-cursor {
  position: absolute;
  left: -1.2rem; /* adjust to sit just outside the list */
  width: 8px;
  background: var(--accent);
  border-radius: 4px;
  transition: top 0.25s ease, height 0.25s ease;
}

.db-list {
  position: relative; /* so cursor is positioned correctly */
}

.db-list li {
  position: relative;
  padding: 0.6rem 0.4rem 0.6rem 1rem;
}

.database {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.db-list-container {
  position: relative;
}

.db-section-header {
  font-family: var(--font), sans-serif;
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
}

.db-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.db-list li {
  cursor: pointer;
  padding: 0.6rem 0.4rem 0.6rem 1rem;
  transition: background 0.2s;
}

.db-list li.active {
  background: var(--surface-active);
}

.db-detail h2.db-title {
  margin-bottom: 1rem;
  font-size: 1.6rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

.db-detail img {
  width: 100%;
  max-width: 400px;
  margin-bottom: 1rem;
  border: 2px solid var(--accent);
  background: var(--surface);
}

.db-tags {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  gap: 0.4rem;
}

.db-tags li {
  background: var(--accent);
  color: var(--bg);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.na-link a {
  color: var(--accent-hover);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.na-link a:hover {
  color: var(--accent);
}

/* === Database Layout === */

.database-container {
  margin-top: 2rem;
  background: var(--surface);
  border: 2px solid var(--surface-active);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
  padding: 1rem;
}

.database-header {
  font-family: var(--font), sans-serif;
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

/* Inner split */

.database {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

/* List section */

.db-list-container {
  position: relative;
}

.db-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.db-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.db-list li {
  cursor: pointer;
  padding: 0.6rem 0.4rem 0.6rem 1.5rem;
  transition: background 0.2s;
  position: relative;
}

.db-list li.active {
  background: var(--surface-active);
}

/* NieR-style cursor (triangle) */

.db-cursor {
  position: absolute;
  left: 0;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 14px solid var(--accent);
  transition: top 0.2s ease;
  pointer-events: none;
}

/* Detail panel */

.db-detail h2.db-title {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

.db-detail img {
  width: 100%;
  max-width: 400px;
  margin-bottom: 1rem;
  border: 2px solid var(--accent);
  background: var(--surface);
}

.db-detail .db-description {
  margin-bottom: 0;
  margin-top: 0;
  color: var(--text-subtle);
}

.db-tags {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.db-tags li {
  background: var(--accent);
  color: var(--bg);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* Wrap both elements as a centered unit */

.nier-section {
  max-width: 900px; /* limit width for readability */
  margin: 3rem auto; /* center horizontally with spacing */
  text-align: left; /* keep text aligned properly */
  border-bottom: none;
}

/* Menu-style header */

.nier-menu-header {
  background: var(--surface);
  border: 2px solid var(--surface-active);
  padding: 0.6rem 1rem;
  font-family: var(--font, 'Tiny5', monospace), sans-serif;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  border-bottom: none; /* connect visually with paragraph below */
  border-radius: 6px 6px 0 0; /* rounded top */
}

/* Paragraph block */

.nier-paragraph {
  background: var(--surface-active);
  border: 2px solid var(--surface-active);
  border-top: none; /* seamless join with header */
  padding: 1.2rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  font-family: var(--font, 'Noto Sans JP', sans-serif), sans-serif;
  color: var(--text);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
  border-radius: 0 0 6px 6px; /* rounded bottom */
}

.nier-paragraph p {
  margin: 0;
}

/* Container matches parchment-style blocks */
.gallery-container {
  background: var(--surface);
  border: 2px solid var(--surface-active);
  padding: 2rem;
  margin: 3rem auto;
  max-width: 1000px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.15);
}

/* Section header styled like a menu button */
.gallery-header {
  font-family: var(--font, 'Noto Sans JP', sans-serif), sans-serif;
  font-size: 1.5rem;
  text-align: center;
  color: var(--accent);
  border-bottom: 2px solid var(--text-subtle);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  display: inline-block;
}

/* Flex entries for alternating layout */
.gallery-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  gap: 2rem;
}

.gallery-entry.reverse {
  flex-direction: row-reverse;
}

/* Image styling */
.gallery-image img {
  width: 100%;
  max-width: 400px;
  border: 2px solid var(--text-subtle);
  background: var(--bg);
  padding: 0.5rem;
  display: block;
}

/* Text block */
.gallery-text {
  flex: 1;
  text-align: left;
}

.gallery-text h3 {
  font-size: 1.2rem;
  color: var(--accent-hover);
  margin-bottom: 0.5rem;
}

.gallery-text p {
  font-size: 1rem;
  color: var(--text-subtle);
  line-height: 1.6;
}

/* Responsive stack */
@media (max-width: 768px) {
  .gallery-entry,
  .gallery-entry.reverse {
    flex-direction: column;
    text-align: center;
  }

  .gallery-text {
    text-align: center;
  }
}



