* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background: white;
  font-style: normal;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", sans-serif;
}

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

a:visited {
  color: plum;
}

a:hover {
  text-decoration: underline;
}

.mobile-block {
  display: none;
}

@media (max-width: 768px) {
  .mobile-block {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2em;
  }
}

body {
  display: flex;
}

.sidebar {
  width: 350px;
  height: 100vh;
  padding: 2em;
  display: flex;
  flex-direction: column;
  gap: 2em;
  overflow-y: auto;
}

.sidebar h1 s {
  color: plum;
}

.tooltip-wrap {
  position: relative;
  display: inline-block;
}

.tooltip-icon {
  cursor: pointer;
}

.tooltip-inline .tooltip-icon {
  color: plum;
}

.tooltip-text {
  display: none;
  position: fixed;
  background: white;
  border: 1px solid #ccc;
  padding: 1.5em;
  font-size: 0.85em;
  width: 500px;
  max-width: 90vw;
  z-index: 10001;
  line-height: 1.6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tooltip-wrap:hover .tooltip-text {
  display: block;
}

.sidebar p {
  line-height: 1.6;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

a.nav-link {
  color: black;
  text-decoration: none;
  font-weight: bold;
}

.nav-link:hover {
  text-decoration: underline;
}

a.nav-link.active {
  color: plum;
}

.nav-divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 0.3em 0;
}

.now-playing {
  margin-top: auto;
}

.now-playing p {
  margin-bottom: 0.5em;
}

.content {
  flex: 1;
  position: relative;
  padding: 2em;
  overflow-y: auto;
  height: 100vh;
}

/* Barter */
.barter-columns {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.barter-column+.barter-column {
  border-top: 1px solid #ccc;
  padding-top: 2em;
}

.barter-column h2 {
  margin-bottom: 1em;
}

/* Feed */
.feed {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
}

.feed-item {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding: 1.5em 0;
  border-bottom: 1px solid #ccc;
}

.feed-item:first-child {
  padding-top: 0;
}

.feed-image {
  width: 100%;
  height: auto;
  display: block;
}

.feed-text {
  font-size: 0.85em;
  line-height: 1.4;
}

.feed-text p {
  margin: 0;
}

.feed-date {
  font-size: 0.75em;
  color: #999;
}

/* Guestbook */
.guestbook-frame {
  width: 100%;
  max-width: 600px;
  height: calc(100vh - 4em);
  border: none;
  display: block;
  margin: 0 auto;
}

/* Grid of cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5em;
}

.card-clickable {
  cursor: pointer;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 1;
  background: #eee;
  margin-bottom: 0.5em;
  object-fit: cover;
}

#books .card-thumb,
#movies .card-thumb {
  aspect-ratio: auto;
  object-fit: contain;
}

.card-thumb-placeholder {
  background: #eee;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.card-title {
  font-weight: bold;
}

.card-date {
  font-size: 0.85em;
  color: #666;
}

.card-clickable:hover .card-title {
  text-decoration: underline;
}

/* Popover */
.popover-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.popover {
  width: 50vw;
  max-height: 50vw;
  background: white;
  padding: 2em;
  position: relative;
  overflow-y: auto;
}

.popover-close {
  position: absolute;
  top: 0.5em;
  right: 0.75em;
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", sans-serif;
}

.popover-content {
  line-height: 1.7;
}

.popover-content h2 {
  margin-bottom: 0.3em;
}

.popover-date {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 1em;
}

.popover-body p {
  margin-bottom: 1em;
}

.popover-body img {
  max-width: 100%;
  margin: 1em 0;
}

.popover-body blockquote {
  border-left: 2px solid #ccc;
  padding-left: 1em;
  margin: 1em 0;
  color: #444;
}

.card-rating {
  font-style: normal;
  color: plum;
}

/* Eyes */
.eyes-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  pointer-events: none;
}

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

.eye:not(:first-child) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.left-closed,
.right-closed {
  display: none;
}
