/* CSS Variables */
:root {
  --dark-bg: #150b25;
  --body-text: Rubik, sans-serif;
  --white: white;
  --headings: Rubik, sans-serif;
  --bright-links: #7366ff;
  --secondary-colour: #3d2266;
  --black: #000;
  --primary-colour: #cf3fd7;
  --matte-black: #1c1c1e;
  --blue: #0680d2;
  --neutral-text: #7b7d94;
  /* Dynamic height set by JavaScript, fallback to 100vh */
  --actual-height: 100vh;
}

/* HTML and Body reset for mobile browsers */
html {
  height: 100%;
  overflow: hidden;
}

/* Body Styles */
body {
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  background-color: var(--dark-bg);
  font-family: var(--body-text);
  color: var(--white);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5em;
  /* Use window dimensions, not viewport units for mobile browser compatibility */
  width: 100%;
  height: 100%;
  position: relative;
}

/* Heading Styles */
h1 {
  font-family: var(--headings);
  letter-spacing: -2px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 48px;
  font-weight: 500;
  line-height: 52px;
}

h2 {
  font-family: var(--headings);
  letter-spacing: -1px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 38px;
  font-weight: 500;
  line-height: 44px;
}

h3 {
  font-family: var(--headings);
  letter-spacing: -1px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 32px;
  font-weight: 500;
  line-height: 36px;
}

h4 {
  font-family: var(--headings);
  letter-spacing: -0.5px;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 500;
  line-height: 28px;
}

h5 {
  font-family: var(--headings);
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
}

h6 {
  font-family: var(--headings);
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

/* Paragraph Styles */
p {
  margin-bottom: 10px;
}

/* Link Styles */
a {
  text-decoration: underline;
}

/* List Styles */
ul,
ol {
  margin-top: 0;
  margin-bottom: 10px;
  padding-left: 40px;
}

/* Blockquote Styles */
blockquote {
  border-left: 5px solid #e2e2e2;
  margin-bottom: 10px;
  padding: 10px 20px;
  font-size: 18px;
  line-height: 22px;
}

/* Canvas Styles */
#unity-canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: fixed; /* Use fixed instead of absolute for mobile browser UI */
  top: 0;
  left: 0;
  /* Fix for iOS Safari zoom issues */
  touch-action: manipulation;
  /* Prevent text selection on canvas */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Remove any default Unity styling */
  border: none;
  outline: none;
  background: var(--dark-bg);
  /* Ensure canvas is above everything */
  z-index: 1000;
  /* Force hardware acceleration */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.capsule {
  border: 1px solid var(--neutral-text);
  background-color: var(--matte-black);
  padding: 10px;
  border-radius: 15px;
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 14px;
  color: var(--neutral-text);
  box-shadow: 0px 10px 10px 0px #00000056;
  z-index: 1001 !important;
}

.infotext {
  display: inline-block;
  margin-right: 10px;
  user-select: none;
}

#hide {
  background-color: var(--secondary-colour);
  border: 1px solid var(--neutral-text);
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  font-size: 14px;
}

.tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: var(--matte-black);
  color: var(--neutral-text);
  text-align: center;
  border-radius: 5px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  right: 2vw;
  bottom: 5vh;
}

#tooltip {
  display: inline-block;
  border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
  width: auto;
  padding: 5px;
}

#version:hover #tooltip {
  visibility: visible;
}
