body {
            background-image: url('color-gradient.jpg');
            background-repeat: no-repeat;
            background-position: center;
            background-size: 100vw 100vh;
            background-blend-mode: overlay;
            background-color: #222227;
	margin: 0;
	overflow: hidden;
	font-family: 'VT323', monospace;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
}

canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.terminal {
	overflow: hidden;
	position: absolute;
	top: 55%;
	height: 45%;
	width: 100%;
	z-index: 5;
}

.terminal-text {
	color: #33ff33;
	font-size: 40px;
	width: 90%;
	margin: 0 5%;
	position: relative;
}

.block {
	font-size: 30px;
}

/*** Mirror video ***/

#videoel {
	position: absolute;
	top: -1000px;
}

#overlay {
	transform: scaleX(-1);
	/* scaling w/h here since altering the source video screws up the faceDistance...pixelation may look ok on analog */
	/* width and height will be set by JavaScript to match video display */
	width: 800px;
	height: 600px;
/*	opacity: 0; for some reason pre-setting this kills the overlay draw, so trigger a fadeOut in the JS */
	position: absolute;
	margin: auto;
	top: 0; left: 0; bottom: 0; right: 0;
	z-index: 3;
	image-rendering: pixelated; /* Keep crisp when scaling */
}
 #overlay-wrapper {
 	position: absolute;
 	width: 100%;
 	height: 100%;
 	z-index: 3;
 }

/*#gif, #analytics, #reportCard, #about*/

.hoverWindow {
	position: absolute;
	margin: auto;
	top: 0; left: 0; bottom: 0; right: 0;
	height: 75%;
	width: 75%;
	border: 3px ridge;
    font-size: 29px;
    text-align: center;
	z-index: 15;
}

.grassTheme {
	background: #357542;
	color: #fbe293;
	border-color: #fbe293;
}

.oceanTheme {
	background: #2a67c9;
	color: white;
	border-color: white;
}

.homebrewTheme {
	background: black;
	color: #33ff33;
	border-color: #33ff33;
}

.windowbar {
	border-bottom: 3px solid;
	height: 35px;
    padding-top: 5px;
	padding-left: 20px;
	text-align: left;
	text-transform: uppercase;
}

.windowbar div {
    float: right;
    padding-top: 7px;
    border-left: 3px solid;
    text-align: center;
    width: 40px;
    height: 35px;
    position: relative;
    top: -7px;
}

.infoBox {
	margin: 20px 0;
	padding: 0 3%;
	height: 85%;
	position: relative;
}

#gif img, #analytics img {
    max-height: 300px;
    width: 40%;
    padding: 0 20px;
    display: inline-block;
}

#analytics img:nth-child(2) {
	transform: scale(-1, 1);
}

#gif .gifSrc {
	position: absolute;
	width: 75%;
	max-height: 75%;
	margin: auto;
	top: 0; left: 0; bottom: 0; right: 0;
}

#analytics .imgText {
}

.caps {
	text-transform: uppercase;
}

#graphBox {
    height: 25%;
    position: absolute;
    bottom: 0;
    margin: auto;
    left: 0;
    right: 0;
}

#happyCol, #sadCol, #surpriseCol, #angryCol {
    height: 12%;
    width: 10%;
    background: #fbe293;
    margin: 0 5%;
    display: inline-block;
    position: relative;
    bottom: -21%; /* MUST be calc'ed to be the negative of 100% minus the top emo value */
}

#happyCol p, #sadCol p, #surpriseCol p, #angryCol p {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -19px;
    margin: auto;
    font-size: 17px;
    line-height: 1.25em;
    background-color: #5daf2a;
}

.highlight, .faceboxTitle {
	display: inline-block;
	background-color: #b4492c;
}
.faceboxTitle {
	width: 100%;
	background-color: rgb(0,0,0,0.5);
}

#bug {
	position: absolute;
	right: 7%;
	bottom: 5%;
	font-size: 40px;
	color: #33ff33;
	z-index: 5;
}

#facebox {
	position: absolute;
	height: 67%;
	width: 67%;
	border: 5px solid rgb(51,255,51,0.75);
	margin: auto;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 57px;
	color: #33ff33;
	z-index: 10;
}

.pre {
	white-space: pre;
	font-size: 17px;
	font-family: Courier, monospace;
	line-height: 1.19;
}



/* D3 SHITS */

#graphBox svg {
	height: 100%;
	width: 720px;
	position: absolute;
	margin: auto;
	left: 0;
	right: 0;
}
#graphBox rect {
	background-color: #5daf2a;
}


/* DASHBOARD */

#dashboardFilters {
	padding: 10px 0;
	font-size: 29px;
}

.dashboard-mode {
	padding: 2px 6px;
	margin-right: 8px;
	border: 1px solid #fbe293;
	cursor: default;
}

.dashboard-filter {
	padding: 2px 4px;
	cursor: default;
}

.dashboard-filter.active {
	background: #fbe293;
	color: #357542;
	padding: 2px 6px;
}

#dashboardList {
	scrollbar-width: none;
}

#dashboardList::-webkit-scrollbar {
	display: none;
}

.dashboard-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	text-align: left;
}

.dashboard-card {
	border: 1px solid rgba(251, 226, 147, 0.3);
	padding: 10px;
}

.dashboard-card-inner {
	display: flex;
	gap: 10px;
}

.dashboard-card-thumb {
	position: relative;
	width: 50%;
	flex-shrink: 0;
	max-height: 250px;
	overflow: hidden;
}

.dashboard-card-thumb img {
	width: 100%;
	height: 100%;
	max-height: 250px;
	object-fit: cover;
	display: block;
	border: 1px solid #fbe293;
}

.dashboard-card-rank {
	position: absolute;
	top: 4px;
	left: 4px;
	background: rgba(53, 117, 66, 0.85);
	padding: 2px 6px;
	font-size: 18px;
}

.dashboard-card-info {
	width: 50%;
	min-width: 0;
}

.dashboard-card-name {
	font-size: 29px;
	margin-bottom: 4px;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.emotion-bar-container {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 29px;
	margin: 2px 0;
}

.emotion-bar-label {
	width: 55px;
	flex-shrink: 0;
	text-transform: uppercase;
}

.emotion-bar-track {
	flex: 1;
	height: 6px;
	background: rgba(251, 226, 147, 0.2);
}

.emotion-bar {
	height: 6px;
	background: #fbe293;
	transition: width 0.3s;
}

.emotion-bar.highlighted {
	background: #fff;
}

.emotion-bar-value {
	font-size: 29px;
	width: 55px;
}

.dashboard-card-count {
	font-size: 29px;
	margin-top: 4px;
	opacity: 0.7;
}


/* ===== CRT TV FRAME ===== */

.pvm-container {
	position: relative;
	width: min(95vw, calc(95vh * (4 / 3.6)));
	max-height: 87vh;
	aspect-ratio: 4 / 3.6;
	background: #2a2a2e;
	border-radius: 12px;
	padding: 4vh;
	box-shadow:
		inset 2px 2px 5px rgba(255,255,255,0.1),
		inset -8px -8px 20px rgba(0,0,0,0.6),
		0 40px 100px rgba(0,0,0,0.9);
	display: flex;
	flex-direction: column;
	border: 2px solid #111;
}

.bezel {
	position: relative;
	flex-grow: 1;
	background: #0a0a0a;
	border-radius: 30px;
	padding: 2%;
	box-shadow:
		inset 0 15px 40px rgba(0,0,0,1),
		inset 0 -10px 20px rgba(255,255,255,0.05);
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

.screen-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	background: #000;
	overflow: hidden;
	box-shadow: 0 0 30px rgba(0,0,0,1);
	border-radius: 15px;
}

.screen-content {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #000;
}

.crt-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 20;
	background:
		linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%),
		linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
	background-size: 100% 3px, 3px 100%;
	transform: scale(1.1);
}

.scan-line {
	position: absolute;
	width: 100%;
	height: 20px;
	background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.04), transparent);
	top: -20%;
	pointer-events: none;
	z-index: 21;
	animation: scan 10s linear infinite;
}

@keyframes scan {
	from { top: -20%; }
	to { top: 120%; }
}

@keyframes flicker {
	0% { opacity: 0.995; }
	5% { opacity: 0.985; }
	10% { opacity: 0.995; }
	100% { opacity: 1; }
}

.flicker {
	animation: flicker 0.1s infinite;
}

/* CRT animations */
@keyframes degauss-shake {
	0% { transform: scale(1); filter: brightness(1); }
	5% { transform: scale(1.1) translate(5px, 3px); filter: brightness(5) contrast(2); }
	10% { transform: scale(0.98) translate(-5px, -2px); }
	15% { transform: scale(1.05) translate(2px, 4px); }
	20% { transform: scale(1) translate(0, 0); filter: brightness(1.5); }
	100% { filter: brightness(1); }
}

@keyframes power-off-blip {
	0% { transform: scale(1); filter: brightness(1); opacity: 1; }
	40% { transform: scale(1.2, 0.01); filter: brightness(10); opacity: 1; }
	100% { transform: scale(0, 0); filter: brightness(20); opacity: 0; }
}

@keyframes power-on-blip {
	0% { transform: scale(0, 0); filter: brightness(20); opacity: 0; }
	40% { transform: scale(1.2, 0.01); filter: brightness(10); opacity: 1; }
	100% { transform: scale(1); filter: brightness(1); opacity: 1; }
}

.degaussing .screen-wrapper { animation: degauss-shake 0.4s ease-out; }
.power-off-anim .screen-wrapper { animation: power-off-blip 0.3s ease-in forwards; }
.power-on-anim .screen-wrapper { animation: power-on-blip 0.3s ease-out forwards; }

.off-hidden .screen-content,
.off-hidden .crt-overlay,
.off-hidden .scan-line { display: none; }
.off-hidden .screen-wrapper { background: #020202; }

/* TV Controls */
.controls {
	height: clamp(40px, 10vh, 80px);
	margin-top: 2%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #777;
	font-size: clamp(0.4rem, 1vw, 0.7rem);
	font-weight: bold;
	font-family: 'Courier New', Courier, monospace;
	padding: 0 10px;
}

.branding {
	color: #aaa;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.branding span {
	font-size: clamp(0.6rem, 1.5vw, 1.1rem);
	font-weight: 900;
}

.model-num {
	font-size: 0.55rem;
	color: #555;
	display: block;
	margin-top: 2px;
}

.buttons {
	display: flex;
	gap: 15px;
	align-items: flex-end;
}

.button-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.round-btn {
	width: clamp(12px, 2.5vw, 20px);
	height: clamp(12px, 2.5vw, 20px);
	background: #333;
	border-radius: 50%;
	border: 2px solid #111;
	box-shadow: inset 1px 1px 2px rgba(255,255,255,0.1), 2px 2px 4px rgba(0,0,0,0.5);
	cursor: pointer;
}

.round-btn:active {
	transform: scale(0.95);
	box-shadow: inset 2px 2px 5px #000;
}

.power-btn {
	width: clamp(18px, 3.5vw, 28px);
	height: clamp(18px, 3.5vw, 28px);
	background: #444;
	border: 3px solid #111;
}

.power-led {
	width: 6px;
	height: 6px;
	background: #220000;
	border-radius: 50%;
	margin-bottom: 2px;
}

.power-on .power-led {
	background: #ff0000;
	box-shadow: 0 0 6px #f00;
}
