@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=JetBrains+Mono&display=swap");

:root {
  --bg: #080808;
  --panel: #111;
  --text: #e6e6e6;
  --accent1: #e62e2e;
  --accent2: #22dd88;
  --accent3: #ffffff;
  --accent4: #ffaa00;
  --button-bg: rgba(255, 255, 255, 0.05);
  --button-border: rgba(255, 255, 255, 0.2);
  --button-hover-bg: rgba(255, 255, 255, 0.1);
  --button-hover-border: rgba(255, 255, 255, 0.3);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
}

a {
  color: var(--accent3);
  text-decoration: none;
}

a:hover {
  color: var(--accent4);
}

.site-header {
  background: var(--panel, #18191c);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  padding: 0 20px;
}

.site-header .container {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  height: 45px;
}

.menu-toggle {
  display: none;
  position: absolute;
  left: 20px;
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 2000;
  }
  .site-header .container {
    justify-content: space-between;
    padding-left: 0px !important;
    padding-right: 0px !important;
  }
  .menu-toggle {
    display: block;
  }
  .top-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--panel);
  }
  .top-nav.open {
    display: block;
  }
  .top-nav ul {
    flex-direction: column;
  }
}

.site-logo {
  position: absolute;
  left: 20px;
  font-family: "Share Tech Mono", monospace;
  color: var(--accent3);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.site-logo img {
  max-height: 35px;
  width: auto;
  display: block;
}

.top-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.top-nav ul li {
  display: flex;
  align-items: center;
}

.top-nav ul li a,
.login-button {
  height: 45px;
  padding: 0 16px;
  background: var(--button-bg);
  border: 1px solid var(--button-border);
  color: var(--text);
  font-family: "Share Tech Mono", monospace;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  min-width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-nav ul li a:hover,
.login-button:hover {
  background: var(--button-hover-bg);
  border-color: var(--button-hover-border);
  color: var(--text);
}

.top-nav ul li a:before,
.top-nav ul li a:after,
.top-nav ul li.menu-info a:before,
.top-nav ul li.menu-watch a:before,
.top-nav ul li.menu-play a:before,
.top-nav ul li.menu-merch a:before,
.top-nav ul li.menu-help a:before {
  display: none;
}

.mobile-nav {
  position: absolute;
  right: 20px;
  display: flex;
  align-items: center;
  display: none;
}

#content-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 16px;
  max-width: 1400px;
  margin: 16px auto;
  padding: 0 20px;
}

.sidebar {
  background: var(--panel);
  padding: 16px;
  font-family: "Share Tech Mono", monospace;
}

.content {
  background: var(--bg);
  padding: 0;
}

.hero {
  position: relative;
  height: 360px;
  background-size: cover;
  background-position: center;
  margin-bottom: 16px;
}

.hero a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.hero-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-family: "Share Tech Mono", monospace;
  font-size: 2rem;
  color: var(--text);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.9), 2px 2px 8px rgba(0, 0, 0, 0.8),
    -2px -2px 8px rgba(0, 0, 0, 0.6);
}
.hero-title {
  font-size: clamp(1rem, 3vw, 2rem);
  line-height: 1.1;
  font-weight: 700;
}

.hero-overlay::before {
  content: "[";
  color: var(--accent1);
  margin-right: 8px;
}

.hero-overlay::after {
  content: "]";
  color: var(--accent1);
  margin-left: 8px;
}

.hero-overlay .bracket {
  display: none;
}

/* ✅ Main content layout */
.content .post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 16px;
}

/* ✅ Sidebar layout (e.g., random entry card) */
.sidebar .post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  padding: 0 20px;
}

.post-card {
  background: var(--panel);
  padding: 8px;
  font-family: "Share Tech Mono", monospace;
  text-align: center;
}

.post-link {
  display: block;
  color: inherit;
}

.content .post-card .thumb {
  width: 100%;
  height: 100px;
  margin-bottom: 8px;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--accent-cyan);
  transition: border-color 0.2s;
}

.sidebar .post-card .thumb {
  width: 100px;
  height: 100px;
  margin: 0 auto 8px;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--accent-cyan);
}

.post-link:hover .thumb {
  border-color: var(--accent-gold);
}

.post-card .tile-info {
  display: inline-block;
  font-size: 1rem;
  color: var(--text);
  padding: 0 4px;
}

.post-card .tile-info::before {
  content: "[";
  color: var(--accent1);
  margin-right: 4px;
  display: inline;
}

.post-card .tile-info::after {
  content: "]";
  color: var(--accent1);
  margin-left: 4px;
  display: inline;
}

.site-footer {
  background: var(--panel);
  text-align: center;
  padding: 12px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
}

.fishtank-video-888 {
  width: 888px;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.fishtank-video-888 iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ✅ Single wiki entry page sidebar hide */
body.single-wiki_entry .sidebar-right {
  display: none !important;
}

body.single-wiki_entry #content-wrapper {
  grid-template-columns: 240px 1fr !important;
}

body.single-wiki_entry #content-wrapper > .content {
  width: 100% !important;
  max-width: 100% !important;
  flex-grow: 1;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  padding: 0 20px;
}
.post-card {
  background: var(--panel);
  padding: 8px;
  font-family: "Share Tech Mono", monospace;
  text-align: center;
}

body.post-type-archive-wiki_entry .post-card .thumb,
body.tax-wiki_category .post-card .thumb {
  width: 100px !important;
  height: 100px !important;
  margin: 0 auto 8px;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--accent-cyan);
}

body.post-type-archive-wiki_entry .post-card .tile-info,
body.tax-wiki_category .post-card .tile-info {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  color: var(--text);
  text-align: center;
}

.wiki-post-grid .post-card .thumb {
  width: 100px !important;
  height: 100px !important;
}

.tile-info {
  font-size: 1rem;
  color: var(--text);
  text-align: center;
  width: 100%;
}

/* Responsive menu toggle button */
.menu-toggle {
  display: none;
  position: absolute;
  left: 20px;
  background: none;
  border: none;
  color: var(--accent3);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.2s ease;
}

.menu-toggle:hover {
  color: var(--accent4);
}

/* 🔘 Mobile responsive styles */
@media (max-width: 768px) {
  /* Hide sidebars on mobile */
  .sidebar {
    display: none !important;
  }

  /* Remove all padding from site-header on mobile */
  .site-header {
    padding: 0 !important;
    padding-left: 4px !important;
  }

  /* Show menu toggle button on the right */
  .menu-toggle {
    display: block;
    position: absolute;
    right: 0px;
    left: auto;
    top: 12px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--accent3);
    z-index: 1001;
  }

  /* Let logo flow in flex, not absolute, on mobile */
  .site-logo {
    position: static;
    left: auto;
  }

  /* Force header container padding for mobile */
  .site-header .container {
    padding-left: 0px !important;
    padding-right: 0px !important;
  }

  /* Hide top nav and login area by default */
  .top-nav,
  .login-area {
    display: none;
  }

  /* Show nav when open class is applied */
  .top-nav.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--panel);
    border-top: 1px solid var(--button-border);
    z-index: 1000;
  }

  /* Style mobile nav menu */
  .top-nav.open ul {
    flex-direction: column;
    padding: 16px 20px;
  }

  .top-nav.open ul li {
    margin: 8px 0;
  }

  .top-nav.open ul li a {
    width: 100%;
    justify-content: flex-start;
    border: none;
    background: transparent;
    padding: 12px 16px;
    border-radius: 4px;
  }

  .top-nav.open ul li a:hover {
    background: var(--button-hover-bg);
  }

  /* Show login area when nav is open */
  .mobile-nav.mobile-visible {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    right: 0;
    margin: 0 auto;
    background: var(--panel, #18191c);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    border-top: 1px solid var(--button-border, #333);
    padding: 12px;
    z-index: 1000;
    width: 100%;
    max-width: 25vw;
  }
  .mobile-nav nav ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 0;
  }
  .mobile-nav nav ul li {
    display: flex;
    width: 100%;
  }
  .mobile-nav nav ul li a {
    width: 100%;
    height: 45px;
    padding: 0 16px;
    background: var(--button-bg, #18191c);
    border: 1px solid var(--button-border, #333);
    color: var(--text, #fff);
    font-family: "Share Tech Mono", monospace;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    box-sizing: border-box;
  }

  /* Adjust content wrapper for mobile */
  #content-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0 auto;
    padding: 0;
  }
}
