@font-face {
	font-family: 'digital-7';
	src: url('/digital-7.ttf');
}

table.toe {
	margin: 25px;
	border: 1px solid #EEE;
}

table.toe td {
	margin: 25px;
	border: 1px solid #EEE;
}

.place-none {
	font-size: 10px;
	padding: 5px;
	opacity: 0.3;
}

.lamp {
	width: 30px;
	height: 30px;
	border: 2px solid #555;
	margin: 5px;
	box-sizing: border-box;
	border-radius: 50%;
	position: relative;
	background: #aaa;
	background: radial-gradient(circle at 35% 35%, #aaa 0%, #333 100%);
}

.lamp .bulb,
.lamp .glow {
	position: absolute;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	z-index: 1;
}

.lamp .bulb.second {
	filter: blur(8px);
}

.lamp .glow {
	z-index: 2;
	background: radial-gradient(circle at 35% 35%, #ffffffAA 0%, #fff0 60%, #0009 100%), radial-gradient(circle at 50% 50%, #ffffff80 0%, #fff0 100%);
}

.lamp-off .bulb,
.lamp-off .glow {
	display: none;
}

.lamp-on::after,
.lamp-off::after {
	content: "";
	position: absolute;
	top: 4px;
	left: 4px;
	width: 6px;
	height: 4px;
	background: rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	transform: rotate(-30deg);
}

.lamp-on::after {
	background: rgba(255, 255, 255, 0.8);
}

.switch {
	appearance: none;
	-webkit-appearance: none;

	width: 50px;
	height: 26px;
	display: inline-block;
	position: relative;
	cursor: pointer;

	background-color: #ccc;
	border-radius: 99px;
	transition: background-color 0.3s ease;
}

.switch::before {
	content: "";
	position: absolute;
	top: 4px;
	left: 4px;
	width: 18px;
	height: 18px;
	background-color: white;
	border-radius: 50%;

	transition: transform 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch:checked {
	background-color: #4CAF50;
	/* Grüner Hintergrund */
}

.switch:checked::before {
	transform: translateX(24px);
}

.switch:focus-visible {
	outline: 2px solid #2196F3;
	outline-offset: 2px;
}


div.seven-segment-display {
	position: relative;
	width: 70px;
	height: 90px;
}

div.seven-segment-display div.segment {
	position: absolute;
	background: red;
	border-radius: 4px;
}

div.seven-segment-display div.segment.disabled {
	background: #00000010;
}

div.seven-segment-display div.segment-top {
	top: 5px;
	left: 15px;
	width: 30px;
	height: 8px;
}

div.seven-segment-display div.segment-top-left {
	top: 12px;
	left: 8px;
	width: 8px;
	height: 30px;
}

div.seven-segment-display div.segment-top-right {
	top: 12px;
	left: 44px;
	width: 8px;
	height: 30px;
}

div.seven-segment-display div.segment-middle {
	top: 40px;
	left: 15px;
	width: 30px;
	height: 8px;
}

div.seven-segment-display div.segment-bottom-left {
	top: 47px;
	left: 8px;
	width: 8px;
	height: 30px;
}

div.seven-segment-display div.segment-bottom-right {
	top: 47px;
	left: 44px;
	width: 8px;
	height: 30px;
}

div.seven-segment-display div.segment-bottom {
	top: 75px;
	left: 15px;
	width: 30px;
	height: 8px;
}

div.seven-segment-display div.segment-dot {
	top: 75px;
	left: 55px;
	width: 8px;
	height: 8px;
}

div.text-input {
	position: relative;
	font-family: 'Courier New', Courier, monospace;
	border: 3px solid #aaa;
	border-radius: 6px;
	background: #020;
	height: 42px;
	overflow: hidden;
}

div.text-input div,
div.text-input input {
	position: absolute;
	display: block;
	text-align: left;
	font-family: 'Courier New', Courier, monospace;
	margin: 0;
	padding: 3px;
	color: #afa;
	background: transparent;
	border: 0 none;
	box-sizing: border-box;
}

div.text-input div {
	top: 0;
	right: 0;
	text-align: left;
	font-size: 10px;
	white-space: nowrap;
	width: auto;
	min-width: 100%;
}

div.text-input input {
	width: 100%;
	bottom: 0;
	left: 0;
	right: 0;
	font-size: 14px;
	outline: none;
}

div.text-input div.empty {
	width: 100%;
	color: #060;
	text-align: center;
	user-select: none;
}

div.terminal-display {
	display: block;
	position: relative;
	background: #000;
	color: #afa;
	border: 3px solid #aaa;
	border-radius: 6px;
}

/* Eine komplette Terminal-Zeile als Text; das Zellen-Raster kommt als
   wiederholtes SVG-Kachelmuster aus dem Hintergrund. Letter-Spacing bringt
   die 9px breiten Courier-Zeichen auf den 11px-Zellen-Raster. Line-Height 14px
   hebt die Baseline auf 10.5px an, damit in der 15px-Zelle unten der Unterstrich
   (liegt komplett unter der Baseline) und oben $ und # vollstaendig sichtbar sind. */
div.terminal-display-row {
	font-family: 'Courier New', Courier, monospace;
	font-size: 15px;
	line-height: 14px;
	display: block;
	position: absolute;
	left: 0;
	right: 2px;
	height: 15px;
	overflow: hidden;
	white-space: pre;
	letter-spacing: 2px;
	text-indent: 0.5px;
	color: #afa;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='15'%3E%3Crect width='10' height='15' rx='3' fill='%23002200'/%3E%3C/svg%3E");
}

/* Textauswahl im Terminal in den Cursor-Farben statt Browser-Blau */
div.terminal-display ::selection {
	background: #070;
	color: #fff;
}

span.terminal-display-cell {
	font-family: 'Courier New', Courier, monospace;
	font-size: 15px;
	line-height: 14px; /* gleiche Baseline wie die Terminal-Zeile darunter */
	display: block;
	position: absolute;
	background: #020;
	color: #afa;
	overflow: hidden;
	width: 10px;
	height: 15px;
	border-radius: 3px;
	text-align: center;
}

span.terminal-display-cell.cursor {
	background: #070;
	color: #fff;
	animation: cursorblick 1s steps(4) infinite;
	border-radius: 0;
}

@keyframes cursorblick {
  0% {
    background-color: #070; /* Startfarbe (z.B. Rot) */
  }
  49% {
    background-color: #070; /* Startfarbe (z.B. Rot) */
  }
  50% {
    background-color: #020; /* Blinkfarbe (z.B. Schwarz) */
  }
  100% {
    background-color: #020; /* Blinkfarbe (z.B. Schwarz) */
  }
}

div.byte-display {
	display: inline-block;
	white-space: pre;
}

div.line-display {
	display: inline-block;
	position: relative;
	background: #000;
	background: radial-gradient(ellipse at center,  #002e00 0%,#001000 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
	color: #afa;
	border: 3px solid #aaa;
	border-radius: 6px;
	overflow: hidden;
}

div.line-display canvas {
	position: relative;
	z-index: 1;

	image-rendering: -moz-crisp-edges;
	image-rendering: -webkit-crisp-edges;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

div.line-display div.dot {
	position: absolute;
	width: 1px;
	height: 1px;
	top: 128px;
	left: 128px;
	background: #fff;
	border: 1px solid #fff8;
	border-radius: 50%;
	z-index: 100;
	filter: drop-shadow(0px 0px 2px #fff);
}

div.line-display.no-cursor div.dot {
	display: none;
}