[x-cloak] {
  display: none !important;
}

:root {
  --bg-color: #000;
  --text-color: #fff;
  --border-color: #fff;
  --modal-bg: rgba(0, 0, 0, 0.8);
}

body.light-mode {
  --bg-color: #fff;
  --text-color: #000;
  --border-color: #000;
  --modal-bg: rgba(255, 255, 255, 0.9);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: monospace;
  margin: 0;
  padding: 0;
}

body.loaded {
  transition:
    background-color 0.3s,
    color 0.3s;
}

img {
  height: 32rem;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  object-fit: cover;
}

.photo {
  height: 32rem;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border-color);
  max-width: 100%;
  object-fit: cover;
}

header {
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border-color);
}

body {
  display: flex;
  flex-direction: column;
  height: 98svh;
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}

main > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

.details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.nav {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  gap: 2rem;
  width: 30%;
}

.nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

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

button {
  background-color: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
}

header > button {
  border: 0px;
}

body.loaded button {
  transition:
    background-color 0.3s,
    color 0.3s;
}

a {
  color: var(--text-color);
}

.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-bg);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  text-align: center;
}

.modal-content h3 {
  margin-top: 0;
}

.modal-content p {
  margin: 1rem 0;
}

.close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-color);
}

.close:hover {
  opacity: 0.7;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  img,
  .photo {
    height: auto;
    max-height: 70vh;
    width: 90vw;
  }

  header {
    height: auto;
    min-height: 3rem;
    padding: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  main {
    justify-content: flex-start;
    padding: 1rem 0;
  }

  main > div {
    gap: 1rem;
    padding: 0 1rem;
  }

  .details {
    gap: 0.75rem;
    width: 100%;
    padding: 0 1rem;
  }

  .nav {
    width: 100%;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav a {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .modal-content {
    width: 85%;
    padding: 1.5rem;
    max-width: none;
  }

  .close {
    font-size: 1.5rem;
    top: 0.25rem;
    right: 0.75rem;
  }
}

@media (max-width: 480px) {
  img,
  .photo {
    height: auto;
    max-height: 60vh;
    width: 80vw;
  }

  header {
    padding: 0.5rem;
  }

  main > div {
    gap: 0.75rem;
  }

  .details {
    gap: 0.5rem;
    font-size: 0.9rem;
  }

  .nav {
    gap: 0.5rem;
  }

  .nav a {
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
  }

  button {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
  }

  .modal-content {
    width: 90%;
    padding: 1rem;
  }

  .modal-content h3 {
    font-size: 1.1rem;
  }

  .modal-content p {
    font-size: 0.9rem;
    margin: 0.75rem 0;
  }

  .close {
    font-size: 1.25rem;
  }
}
