@font-face {
  font-family: 'Consolas';
  src: url('Consolas.ttf') format('truetype');
}

@font-face {
  font-family: 'LinjaSike';
  src: url('mrfont.ttf') format('truetype');
}

body {
  font-family: 'Consolas', monospace;
  margin: 0; padding: 0;
  font-size: 16px; color: #fff;

  background-image: url('dark.png');
  background-repeat: repeat;
  background-position: 0 0;
  background-size: 400px 400px;
  animation: scrollBackground 60s linear infinite;
}


h1, h2, h3 {
  font-family: 'Barlow', sans-serif;
  font-weight: 700; margin: 16px 0;
}
p { margin: 8px 0; }
a {
  color: #0ff; text-decoration: none;
}
a:visited, a:active {
  color: #00d0ff;
}
v {
  font-weight: 700;
  font-style: italic;
}
.centered { text-align: center; }
.section {
  max-width: 928px; padding: 18px; margin: 0 auto;
}
@keyframes letterWiggle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-1px) rotate(-2deg); }
  50% { transform: translateY(1px) rotate(2deg); }
  75% { transform: translateY(-1px) rotate(-1deg); }
}
.wiggle span {
  display: inline-block;
  margin-right: 0.05em;
  white-space: pre;
}
.wiggle:hover span {
  animation: letterWiggle 0.6s ease-in-out infinite;
}
.header h1 {
  font-size: 3em; display: flex;
  align-items: center; justify-content: center;
  text-align: center;
}
.header svg {
  width: 56px; height: 56px;
  flex-shrink: 0; margin-right: 8px;
}

.spoiler {
  background-color: rgba(0, 100, 255, 0.2);
  color: transparent;
  border-radius: 8px;
  padding: 0 4px;
  transition: color 0.4s ease, background-color 0.3s ease;
  cursor: pointer;
}

.spoiler.revealed {
  color: inherit;
}

.light-theme .spoiler {
  background-color: rgba(255, 0, 0, 0.2);
}

.censored {
  font-family: 'Flow Rounded', sans-serif;
  transition: font-family 0.5s ease;
  cursor: pointer;
}
.censored.revealed {
  font-family: inherit;
}

@media (max-width: 750px) {
  .header h1 { flex-direction: column; }
  .header svg { margin: 0 0 8px 0; }
}

@media (prefers-color-scheme: dark) {
  html, body {
    background-color: #090010;
  }
}

@media (prefers-color-scheme: light) {
  html, body {
    background-color: #fff;
  }
}

@media (max-width: 450px) {
  .underline-tooltip::after {
    max-width: 90vw;
  }
}

.array-table {
  margin: 1em auto;
  border-collapse: collapse;
  text-align: center;
}
.array-table td {
  border: 1px solid #aaa;
  padding: 0.5em 1em;
}

.infobox, .development-tools {
  padding: 12px; margin: 6px 0;
  border-radius: 20px;
  background: rgba(0,10,100,0.245);
  border: 2px solid rgba(0,50,150,0.604);

  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.infobox-red {
  background: rgba(255,0,0,0.245);
  border-color: rgba(255,0,0,0.446);
}
.infobox-header, .collapsible-header {
  cursor: pointer;
  font-family: 'Barlow', sans-serif;
  font-weight: 700; font-size: 18px;
  color: #0de; display: flex;
  align-items: center; justify-content: space-between;
  padding-right: 10px;
}
.arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.arrow.open { transform: rotate(180deg); }
.collapsible-content {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.collapsible-content.open { max-height: 1000px; }
.button-container {
  text-align: center; margin: 40px 0;
}
.button-link {
  display: inline-block; padding: 12px 24px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600; font-size: 16px;
  color: #fff !important;
  background: #00d0ff;
  border: none; border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
}
.button-link:hover {
  background: #00a0cc; color: #fff !important;
}
.blue {
  background: rgba(200,0,255,0.245);
  border-color: rgba(234,0,255,0.604);
}
.blue h2 { font-size: 1em; }
footer {
  opacity: 0.8; width: 100%;
  text-align: center; margin-bottom: 16px;
}
footer p { margin: 0 0 8px 0; }

.light-theme {
  background-image: url('light.png');
  background-size: 400px 400px;
  color: #090010;
}
.light-theme a {
  color: #d00;
}
.light-theme a:visited, .light-theme a:active {
  color: #a00;
}
.light-theme .infobox, .light-theme .development-tools {
  background: rgba(255, 200, 200, 0.4);
  border: 2px solid rgba(200, 50, 50, 0.6);
}
.light-theme .infobox-red {
  background: rgba(255, 150, 150, 0.5);
  border-color: rgba(255, 80, 80, 0.7);
}
.light-theme .infobox-header, .light-theme .collapsible-header {
  color: #d22;
}
.light-theme .button-link {
  background: #ff4c4c;
  color: #fff !important;
}
.light-theme .button-link:hover {
  background: #e03c3c;
}

#theme-toggle-button {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 999;
}

#theme-toggle-content img {
  height: 48px;
  vertical-align: middle;
}


@keyframes scrollBackground {
  from { background-position: 0 0; }
  to   { background-position: 1600px 0; }
}

#theme-toggle {
  width: 64px;
  height: 64px;
  background: url('button.png') no-repeat center center;
  background-size: contain;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}

#theme-toggle-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 36px;
  pointer-events: none;
}

.underline-tooltip {
  position: relative;
  border-bottom: 2px dotted currentColor;
  cursor: pointer;
}

.underline-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 20px;
  background: rgba(0,25,75,0.2);
  border: 2px solid rgba(0,50,150,0.604);
  color: #fff;
  padding: 8px 12px;
  font-size: 0.9em;
  max-width: 480px;
  min-width: 480px;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, background-color 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  box-sizing: border-box;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}


.underline-tooltip.tooltip-active::after {
  opacity: 1;
  pointer-events: auto;
}

.light-theme .underline-tooltip::after {
  background: rgba(255, 200, 200, 0.4);
  border: 2px solid rgba(200, 50, 50, 0.6);
  box-shadow: 0 4px 12px rgba(100, 0, 0, 0.4);
  color: #000;
}


.light-theme #theme-toggle {
  background-image: url('buttonred.png');
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;

  background-color: #090010;
  background-image: url('dark.png');
  background-repeat: repeat;
  background-size: 400px 400px;
}

.light-theme html, .light-theme body {
  background-color: #ffeaea;
  background-image: url('light.png');
}

.page {
  display: none;
}
.page.active {
  display: block;
}

.translation-block {
  margin: 24px 0 24px 24px;
  line-height: 1.6;
  font-size: 1em;
  border-left: 4px solid #0ff;
  padding-left: 12px;
}

linja {
  font-family: 'LinjaSike', sans-serif;
  font-feature-settings: "liga" 1, "calt" 1, "dlig" 1;
  color: #0ff;
  font-size: 1em;
  letter-spacing: 1em;
  word-spacing: 1em;
}

.light-theme linja{
  color: #d00;
}

.translation-block .latin {
  font-family: 'Consolas', sans-serif;
  color: #fff;
  font-style: italic;
}

.translation-block .linja {
  font-family: 'LinjaSike', sans-serif;
  color: #0ff;
  font-size: 1.4em;
}

.translation-block .english {
  font-family: 'Consolas', sans-serif;
  color: #fff;
}

.light-theme .translation-block {
  border-left-color: #f22;
}

.light-theme .translation-block .english {
  color: #000;
}

.light-theme .translation-block .linja {
  color: #f22;
}

gap::before {
  content: '';
  display: inline-block;
  width: 1em;
}

.row {
  display: flex;
  justify-content: center;
  gap: 1em;
}

.page .header h1:first-child {
  margin-top: 0;
}

.array-table {
  margin: 1em auto;
  border-collapse: collapse;
  text-align: center;
}
.array-table td {
  border: 2px solid #aaa;
  padding: 0.5em 1em;
}

</style>