body {
	margin: 0;
	font-family: 'Verdana';
	height: 100vh;
	height: 100dvh;
	display: flex;
	flex-direction: column;
}

.logo {
	position: absolute;
}

#button1 {
	position:relative;
	left:120px;
}

.topnav {
	background-color: #333;
	overflow: hidden;
	height: 40px;
	flex: 0 0 40px;
}

.topnav a {
	float: left;
	display: block;
	color: white;
	text-align: center;
	padding: 8px 4px;
	text-decoration: none;
	transition: background-color 0.3s ease;
}

.topnav a:hover {
	background-color: #222;
}

.topnav a.active {
	background-color: #4CAF50;
	border-radius: 5px;
}

.topnav a.active:hover {
	background-color: #45a049;
}

.content {
	background-color: #111;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	scroll-snap-type: y mandatory;
	overscroll-behavior-y: contain;
	overflow-anchor: none;
}

.video {
	flex: 0 0 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	position: relative;
}

.video-media {
	position: relative;
	width: min(100vw, calc((100vh - 40px) * 9 / 16));
	width: min(100vw, calc((100dvh - 40px) * 9 / 16));
	height: min(calc(100vh - 40px), calc(100vw * 16 / 9));
	height: min(calc(100dvh - 40px), calc(100vw * 16 / 9));
}

.content img,
.content .feed-video {
	width: min(100vw, calc((100vh - 40px) * 9 / 16));
	width: min(100vw, calc((100dvh - 40px) * 9 / 16));
	height: min(calc(100vh - 40px), calc(100vw * 16 / 9));
	height: min(calc(100dvh - 40px), calc(100vw * 16 / 9));
	object-fit: cover;
	border-radius: 15px;
	background: #000;
}

.video-actions {
	position: absolute;
	right: -74px;
	bottom: 80px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.video-title {
	position: absolute;
	right: 88px;
	bottom: 20px;
	left: 16px;
	z-index: 2;
	margin: 0;
	color: white;
	font-size: clamp(18px, 4vw, 28px);
	text-shadow: 0 2px 8px #000;
	overflow-wrap: anywhere;
	pointer-events: none;
}

.video-action {
	width: 64px;
	min-height: 56px;
	padding: 6px;
	border: 0;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.72);
	color: white;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}

.comments-panel {
	position: fixed;
	top: 40px;
	right: 0;
	bottom: 0;
	z-index: 10;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: min(380px, 100vw);
	padding: 16px;
	background: white;
	color: #111;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.comments-panel[hidden] {
	display: none;
}

.comments-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.comments-header h2,
.comments-header p {
	margin: 0 0 8px;
}

.comments-list {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.comment-item {
	padding: 10px 0;
	border-bottom: 1px solid #DDD;
	overflow-wrap: anywhere;
}

.comment-item p {
	margin: 6px 0;
	white-space: pre-wrap;
}

.comment-item time {
	color: #666;
	font-size: 12px;
}

.comment-form {
	display: grid;
	gap: 8px;
	padding-top: 12px;
}

.comment-form textarea {
	box-sizing: border-box;
	width: 100%;
	resize: vertical;
	font: inherit;
}

.comment-form p {
	margin: 0;
}

.chain-list {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 0;
}

.chain-entry {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	border: 1px solid #666;
	border-radius: 8px;
	background: #333;
	color: white;
	text-align: left;
	font: inherit;
	overflow-wrap: anywhere;
	cursor: pointer;
}

.chain-entry:hover {
	background: #444;
}

#comments-load-older[hidden] {
	display: none;
}

@media (max-width: 600px) {
	.video-actions {
		right: 12px;
	}
}

.feed-sentinel {
	flex: 0 0 1px;
	height: 1px;
	scroll-snap-align: none;
	pointer-events: none;
}

.video-playback-error {
	position: absolute;
	max-width: 80%;
	color: white;
	text-align: center;
	pointer-events: none;
}

.video-playback-error[hidden] {
	display: none;
}

.feed-message {
	flex: 0 0 100%;
	display: grid;
	place-items: center;
	margin: 0;
	padding: 24px;
	color: white;
	text-align: center;
}

.whitetextglow {
	color: white;
	text-shadow: 0 0 10px gray, 0 0 20px gray;
	align-self: center;
}

.buttonglow {
	background-color: #e6c1e2;
	padding: 10px;
	width: 100px;
	align-self: center;
	border-radius: 8px;
	border-color: white;
	border-style:solid;
}

.buttonglow:hover {
	background-color: #d9b0d7;
}

.hrg {
	width:100%;
}

.upload-back {
	color: #AAA
}

.video-preview {
	height: 20vh;
}

.textinputglow {
	margin: 5px;
	padding: 10px;
	border: white;
	background-color: #333;
	color: #DDD;
	font-size: 16px;
	border-radius:5px;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.search-page {
	box-sizing: border-box;
	flex: 1;
	overflow-y: auto;
	padding: 24px;
	background: #111;
	color: white;
}

.search-form {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 640px;
}

.search-input {
	box-sizing: border-box;
	flex: 1;
	min-width: 0;
}

.search-submit {
	flex: 0 0 auto;
}

.search-results {
	max-width: 640px;
	margin: 16px 0;
	padding: 0;
	list-style: none;
}

.search-results li {
	padding: 12px;
	border-bottom: 1px solid #444;
}

.search-results a {
	color: white;
	text-decoration: none;
}

.search-results a:hover {
	text-decoration: underline;
}

#video-title {
	box-sizing: border-box;
	width: min(80vw, 420px);
}

.bigtext {
	font-size: 32px;
}

.comment-item {
	color: white;
	text-shadow: 0 0 10px gray, 0 0 20px gray;
	align-self: center;
}