@font-face {
  font-family: title-font;
  src: url(fonts/AveriaSerif-BoldItalic.ttf);
}
body
{
	background-color: white;
	font-family: "Inconsolata";
	background-image: url('');
 	background-size: 20%;
}
body.hovered #titlebox,
body.hovered th,
body.hovered td
{
	color: white;
	cursor: pointer;
	text-shadow: 1px 1px 2px black;
}
a
{
	color: inherit;
	text-decoration: none;
}
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 24px 0;
    border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.container
{
	/*border: 1px solid black;*/
	max-width: 80%;

  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.main
{
	height: 100%;
	display: flex;
	justify-content: center;

}
#titlebox
{
	font-size: 48px;
	font-family: title-font;
	font-style: bold;
    flex-shrink: 0;
}
.box
{
	margin: 20px;

}
#menu
{
	position: relative;

	float: right;
	font-size: 18px;
	font-family: "Inconsolata";
	font-weight: 600;
	font-style: bold;
	height: 48px;
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-left: auto;
}
.menuitem
{
	display: inline-block;
	padding-left: 20px;
	float: bottom;
	height: 48px;
  cursor: pointer;
}
th, td
{
	width: 130px;
	/*border: 1px solid black;*/
	font-size: 16px;
	padding-right: 20px;
}
th
{
	text-align: left;
}
#title-th, #title-td
{
	width: 200px;
	font-weight: 600;
}
#title-th
{
	padding-right: 33px;
}
#title-td
{
	padding-left: 15px;
}
#kind-th
{
	width: 68px;
}
#kind-td
{
	font-weight: 800;
}
#long-td
{
	width: auto;
}
#icon
{
	height: 20px;
  width: 20px;
}
/* overlay: no blur, just positioning */
#overlay.hidden {
  display: none;
}
#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* glass window */
#window {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px) saturate(1.4);

  width: 70%;
  height: 80%;
  max-width: 90%;
  max-height: 90%;

  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.2);

  box-shadow:
    0 30px 60px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.6);

  display: flex;
  flex-direction: column;

  position: absolute; /* required for dragging */
}

#window.small-window {
  width: 500px;
  height: auto;
  max-width: 90%;
  max-height: 80%;
}

#titlebar {
  height: 32px;
  background: linear-gradient(
    to bottom,
    #282e67,
    #3ba5ff
  );

  border-top-left-radius: 12px;
  border-top-right-radius: 12px;

  display: flex;
  align-items: center;
  padding: 12px 12px 12px 12px;
  gap: 8px;

  cursor: grab;
  user-select: none;
}

#titlebar span
{
    font-size: 28px;
}

#titlebar #icon
{
  width: 32px;
  height: 32px;
  margin-right: 5px;
}
#titlebar:active {
  cursor: grabbing;
}

/* scrollable area */
#window-content {
  padding: 24px;
  overflow-y: auto;
  max-height: 75vh;
}
/* close button */
#close {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: none;
  cursor: pointer;
  position: relative;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.6),
    0 1px 3px rgba(0,0,0,0.4);
}

#close::before,
#close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 5px;
  background: rgba(0,0,0,1.0);
  border-radius: 1px;
}

#close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#close:hover {
  background: white;
}
#window-title {
  color: white;
  font-size: 13px;
  font-weight: 600;
  margin-left: 6px;
}
#window-content {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(75vh - 32px);
}
.image
{
	width: 100%;
  margin-bottom: 25px;
}

/* hidden state */
.hidden {
  display: none;
}
#link:hover
{
  text-decoration: underline;
}

/* MOBILE */
@media (max-width: 1200px) {

  /* 1. Remove container margins and padding */
  .main,
  .container {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  /* optional: if body has padding */
  body {
    margin: 0;
    padding: 0;
  }


  /* 2. Fix menu layout */
  #menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px;
    margin-left: 0;
    margin-top: 8px;
  }

  #menu a,
  #menu button {
    padding: 6px 10px;
    font-size: 14px;
  }


  /* 3. Make window full screen */
  #window {
    position: fixed;

    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100vw;
    height: 100vh;

    max-width: 100vw;
    max-height: 100vh;

    margin: 0;
    border-radius: 0;
  }


  /* window content fills properly */
  #window-content {
    height: calc(100vh - 32px); /* subtract XP title bar height */
    overflow-y: auto;
  }


  /* disable transform centering on mobile */
  #window.centered {
    transform: none;
  }


  /* small window should ALSO be full screen on mobile */
  #window.small-window {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
  }

}