* {
  box-sizing: border-box;
}

/* ================= BODY ================= */
body {
  margin: 0;
  font-family: sans-serif;
  background: black;
  -ms-overflow-style: none;
  scrollbar-width: none;
  overflow-x: hidden;
}

body::-webkit-scrollbar {
  display: none;
}

/* ================= LAYOUT ================= */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ================= SIDEBAR ================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 100vh;
  background: black;
  display: flex;
  flex-direction: column;
  z-index: 10;
  transition: width 0.25s ease, transform 0.25s ease;
}

.sidebar-section {
  flex: 1;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.sidebar-section:nth-child(1) {
  flex-direction: column;
}

.sidebar-section:nth-child(1) .content-box:first-of-type a {
  font-size: 24px;
  font-weight: bold;
}

.sidebar-section:nth-child(2) {
  background: url('zebra.jpg') no-repeat center center;
  background-size: 50% auto;
  opacity: 0.6;
  color: transparent;
}

/* Sidebar content */
.content-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 20px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.content-box a {
  color: white;
  text-decoration: none;
  font-family: Verdana, sans-serif;
  text-transform: lowercase;
}

.horizontal-links {
  display: flex;
  gap: 10px;
}

/* ================= MAIN ================= */
.main {
  margin-left: 400px;
  width: calc(100% - 400px);
  max-width: 1000px;
  min-height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  box-shadow: 20px 0 40px -5px rgba(0, 0, 0, 0.5);
  transition: margin-left 0.25s ease;
}

/* Post links and buttons */
#navigator-controls {
  text-align: center;
  margin-bottom: 10px;
  margin-top: 10px;
}

#navigator-controls button {
  padding: 6px 12px;
  margin: 0 5px;
  border: none;
  border-radius: 4px;
  background: black;
  color: white;
  cursor: pointer;
  font-family: Verdana, sans-serif;
  text-transform: uppercase;
  font-size: 12px;
  transition: opacity 0.3s ease;
}

#navigator-controls button:hover {
  opacity: 0.8;
}

/* Overlay background */
#tree-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  display: none;
  z-index: 1000;
  overflow-y: auto;
  padding: 40px 20px 20px 20px;
  box-sizing: border-box;
  font-family: monospace;
}

/* Tree container */
#tree-container {
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid #fff;
  border-radius: 8px;
  background-color: #000;
  color: #fff;
  padding: 15px 20px;
}

#tree-container .year,
#tree-container .post-item {
  user-select: none;
}

.year {
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  margin: 10px 0;
  display: flex;
  align-items: center;
}

.year::after {
  content: "▼";
  font-size: 0.9em;
  margin-left: 6px;
}

.post-item {
  padding-left: 20px;
  margin: 5px 0;
  cursor: pointer;
  border-bottom: none;
}

.post-item:hover {
  background-color: rgba(255,255,255,0.05);
  border-radius: 2px;
}

#tree-container .year {
  padding-left: 30px;
  font-weight: bold;
  font-size: 1.4em;
  cursor: pointer;
  margin: 10px 0;
  display: flex;
  align-items: center;
}

#tree-container .year::after {
  content: "▼";
  font-size: 1em;
  margin-left: 6px;
}

#tree-container .post-item {
  padding-left: 60px;
  margin: 6px 0;
  cursor: pointer;
  font-size: 1.1em;
}

#tree-container .post-item:hover {
  background-color: rgba(255,255,255,0.05);
  border-radius: 2px;
}

/* ================= POSTS ================= */
#posts {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem;
}

/* ================= MOBILE OVERRIDES ================= */
@media (max-width: 1020px) {
  .sidebar {
    width: 0;
    transform: translateX(-100%);
  }

  .main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding: 0px;
    box-shadow: none;
  }

  #tree-container {
    max-width: 100%;
    padding: 15px;
  }
}

/* Language toggle button */
.lang-toggle {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background: black;
  color: white;
  cursor: pointer;
  font-family: Verdana, sans-serif;
  text-transform: lowercase;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.lang-toggle:hover {
  opacity: 0.8;
}
