/* Core Layout */
body {
  max-width: 800px;
  margin: auto;
  padding: 1rem;
  background-color: rgb(22,22,24);
  color: rgb(255, 255, 255);
  line-height: 1.42;
}

.highlight {
  overflow-x: auto;
  max-width: 100%;
}

.highlight code {
  font-family: monospace;
  display: block;
  background-color: transparent !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.3);
  border-radius: 4px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(150, 150, 150, 0.5);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/*color of hyperlinks*/
a {
  color: var(--link);
}

/* Container Heights */
.canvas-container {
  height: 60vh;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  touch-action: manipulation;
}

.iframe45 {width: 100%; aspect-ratio: 4/5; }
.iframe169 { width: 100%; aspect-ratio: 16/9; }
.iframe1 { width: 100%; aspect-ratio: 1; }

/* Code Styling */
.code-container {
  background: rgba(5, 5, 6, 0.8); /* Match body background */
  color: var(--text);
  overflow: auto;
}

/* Basic Elements */
img, iframe, video { 
  max-width: 100%; 
  border: 0;
  }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td { 
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Code Blocks Styling - Universal */
.highlight,
.code-container,
.highlight pre,
.highlight code {
  background: transparent !important;
  color: var(--text);
}

/* Shared Code Block Properties */
.highlight,
.code-container {
  overflow: auto;
}

/* Code Text Styling */
.highlight code,
.code-container code {
  font-family: monospace;
}