:root {
    --button-bg-color: #35744896;
    --button-hover-color: #22bb55;
}

body {
	font-family: Arial, sans-serif;
	overflow-x: hidden;
	overflow-y: scroll;
	margin: 0;
	background-color: #1d1d1d;
	/* background-image: url("https://64.media.tumblr.com/ad229d1c7e41ed826526efd27ee196b7/146f7f966d06d5a6-8b/s500x750/c0f52f9bb9b94be21f3458ccc374deb3c4f0e010.gif");
	background-repeat: no-repeat;
	background-size: cover;
	image-rendering: pixelated; */
}

.header {
	position: absolute;
	display: flex;
	right: 10px;
	align-items: center;
	padding: 10px;
	box-sizing: border-box;
}

.controls {
	display: flex;
	flex-direction: column;
	/* Stack sliders and buttons vertically */
	align-items: center;
	/* Center items horizontally */
}

.buttons {
	display: flex;
	flex-direction: column;
	margin-top: 100px;
	margin-right: 5px;
}

.grid-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 6fr));
	/* 6 columns in a row that adjusts to window size */
	gap: 17px;
	padding: 40px;
}

.s-grid-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, 300px 300px);
	gap: 10px;
	padding: 20px;
}

.vid-container {
	border: 8px groove #494949;
	margin-top: 40px;
	position: absolute;
	top: 45%;
	left: 72%;
	background-color: rgba(59, 58, 58, 0.4);
	padding: 0px;
	border-radius: 5px;
}

.news-container {
	border: 8px groove #494949;
	position: absolute;
	top: 10px;
	left: 72%;
	background-color: rgba(59, 58, 58, 0.4);
	padding: 0px;
	border-radius: 5px;
}

.img-container {
	border: 10px groove #494949;
	margin-top: 10px;
	position: absolute;
	background-color: rgba(59, 58, 58, 0.4);
	padding: 5px;
	border-radius: 5px;
}

.st-container {
	border: 10px groove #494949;
	position: absolute;
	background-color: rgba(59, 58, 58, 0.4);
	padding: 5px;
	border-radius: 5px;
}

.vidtext {
	position: absolute;
	bottom: 0;
	right: 0;
	font-family: 'Courier New', Courier, monospace;
}

.button-container {
	display: flex;
}

.linkbutton {
	font-family: 'Courier New', Courier, monospace;
	padding: 8px 16px;
	background-color: blue;
	border: 4px black ridge;
	color: white;
	border-radius: 5px;
	cursor: pointer;
	font-size: 16px;
	font-family: 'Courier New', Courier, monospace;
}

.rbutton {
	position: absolute;
	top: 10px;
	margin-left: 40px;
	padding: 8px 16px;
	background-color: var(--button-bg-color);
	border: none;
	border-top: 4px solid rgba(34, 187, 85, 0.568);
	color: white;
	border-radius: 5px;
	cursor: pointer;
	font-size: 16px;
	font-family: 'Courier New', Courier, monospace;
}


.credits {
	font-size: 3em;
	position: absolute;
	bottom: 10px;
	right: 15px;
	background-color: rgba(61, 61, 63, 0);
	padding: 0;
	border: none;
}

.loading-text {
	position: relative;
	width: 112px;
	color: white;
	animation: pulse 2s infinite;
	background-color: rgb(255, 0, 0);
}

@keyframes pulse {
	0% {
		opacity: 1;
	}

	50% {
		opacity: 0.5;
	}

	100% {
		opacity: 1;
	}
}

a:link,
a:visited {
	color: white;
	text-decoration: none;
}

.grid-item {
	border: 6px solid rgb(10, 10, 10);
	border-radius: 6px;
	text-align: center;
	position: relative;
	overflow: hidden;
	height: 450px;
	width: 275px;
	z-index: 1;
	cursor: pointer;
	transition: transform 0.2s ease-in-out;
}

.grid-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: filter 0.1s;
}

.kanji {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	font-size: 4em;
	text-wrap: nowrap;
	top: 20%;
	padding-left: 20px;
	padding-right: 20px;
	backdrop-filter: blur(8px);
	--webkit-backdrop-filter: blur(8px);
	--moz-backdrop-filter: blur(8px);
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 0.375rem;
}

.meaning {
	display: none;
	font-family: monospace;
	font-size: 1.6em;
	font-weight: bold;
	position: absolute;
	top: 25%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: rgba(255, 255, 255, 0.4);
	padding: 5px;
	border-radius: 5px;
	border-block-start-style: dashed;
}

.furi {
	display: none;
	font-family: monospace;
	font-size: 1.4em;
	font-weight: bold;
	position: absolute;
	top: 70%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: rgba(255, 255, 255, 0.4);
	padding: 5px;
	border-radius: 6px;
	border-block-end-style: dashed;
}

.grid-item:hover .meaning {
	display: block;
}

.show-tooltips .grid-item .meaning {
	display: block;
}

.grid-item:hover .furi {
	display: block;
}

.show-tooltips .grid-item .furi {
	display: block;
}

.enlarged {
	position: fixed;
	font-size: 2em;
	top: 50%;
	left: 50%;
	height: 800px;
	width: 500px;
	transform: translate(-50%, -50%);
	z-index: 1000;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
	transition: transform 0.05s ease-in-out;
}

.filter-options {
	position: absolute;
	bottom: 10px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	backdrop-filter: blur(11px);
	--webkit-backdrop-filter: blur(11px);
	--moz-backdrop-filter: blur(11px);
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 0.375rem;
	display: none;
	/* Hide by default */
}

.close-text {
	position: absolute;
	top: 5px;
	left: 18%;
	transform: translateX(-50%);
	font-family: 'Courier New', Courier, monospace;
	font-size: 20px;
	font-style: italic;
	gap: 10px;
	display: none;
	/* Hide by default */
}

.enlarged .close-text {
	display: flex;
	/* Show when enlarged */
}

.enlarged .filter-options {
	display: flex;
	/* Show when enlarged */
}

.filter-button {
	font-family: 'Courier New', Courier, monospace;
	font-weight: bold;
	padding: 10px 10px;
	cursor: pointer;
	backdrop-filter: blur(11px);
	--webkit-backdrop-filter: blur(11px);
	--moz-backdrop-filter: blur(11px);
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 0.375rem;
}

.filter-button:hover {
	background-color: #ddd;
}

.foil-effect::after {
	content: '';
	position: absolute;
	top: 0;
	left: -200%;
	width: 200%;
	height: 100%;
	background: linear-gradient(120deg, rgba(231, 58, 58, 0) 30%, rgba(196, 206, 233, 0.5) 50%, rgba(245, 103, 103, 0) 70%);
	transform: skewX(-25deg);
	transition: all 2s ease-in-out;
	z-index: 1;
	pointer-events: none;
	animation: shine 2s infinite;
}

.foil-effect.enlarged::after {
	animation: shine 2s infinite;
}

@keyframes shine {
	from {
		left: -300%;
	}

	to {
		left: 150%;
	}
}

/* Sentence.html specific */

.drive-container {
	display: flex;
	justify-content: center;
}

#drive {
    position: absolute;
	border: 8px ridge #494949;
    border-radius: 5px;
	background-color: rgba(59, 58, 58, 0.4);
}

video {
	width: 490px;
	z-index: -1;
}

.news {
	height: 300px;
}

.volume-control {
	position: relative;
	bottom: 5px;
	left: 5px;
	font-family: 'Courier New', Courier, monospace;
	margin-top: 10px;
}

.play-pause-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(255, 255, 255, 0.2);
	border: none;
	border-radius: 60%;
	width: 60px;
	height: 60px;
	font-size: 14px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	opacity: 1;
	transition: opacity 0.2s ease;
}

.news-container.playing .play-pause-button {
	opacity: 0;
}

.news-container:hover .play-pause-button {
	opacity: 1;
}

/* width */
::-webkit-scrollbar {
	width: 0.1px;
}

/* Track */
::-webkit-scrollbar-track {
	background: #2b2b2b;
}

/* Handle */
::-webkit-scrollbar-thumb {
	background: #2b2b2b;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
	background: #686868;
}

#tooltipToggleButton {
	position: absolute;
	top: 10px;
	right: 70px;
	padding: 8px 16px;
	background-color: var(--button-bg-color);
	border: none;
	border-top: 4px solid rgba(34, 187, 85, 0.568);
	color: white;
	border-radius: 5px;
	cursor: pointer;
	font-size: 16px;
	font-family: 'Courier New', Courier, monospace;
}

#tooltipToggleButton:hover {
    background-color: var(--button-hover-color);
}

#testModeButton {
	position: absolute;
	top: 10px;
	right: 240px;
	padding: 8px 16px;
	background-color: var(--button-bg-color);
	border: none;
	border-top: 4px solid rgba(34, 187, 85, 0.568);
	color: white;
	border-radius: 5px;
	cursor: pointer;
	font-size: 16px;
	font-family: 'Courier New', Courier, monospace;
}

#testModeButton.active {
	background-color: #f44336;
}

.title {
	font-family: Arial, Helvetica, sans-serif;
	text-align: center;
	color: #FFF;
	display: block;
	flex-direction: column;
	letter-spacing: 1px;
}

h1 {
	background-image: url("https://64.media.tumblr.com/ad229d1c7e41ed826526efd27ee196b7/146f7f966d06d5a6-8b/s500x750/c0f52f9bb9b94be21f3458ccc374deb3c4f0e010.gif");
	background-position: center;
	color: rgba(255, 255, 255, 0.363);
	background-clip: text;
	-moz-background-clip: text;
	-webkit-background-clip: text;
	text-transform: uppercase;
	font-size: 120px;
	margin: 1px 0;
}

.scroll-container {
    display: flex;
	position: absolute;
	border: groove #494949;
	bottom: 5px;
	left: 50%;
	transform: translateX(-50%);
	overflow: hidden;
	width: 30%;
	height: 44px;
	text-align: center;
	background-color: rgba(188, 93, 252);
	-webkit-box-shadow: 0px 0px 256px 20px rgba(188, 93, 252);
	-moz-box-shadow: 0px 0px 256px 20px rgba(188, 93, 252);
	box-shadow: 0px 0px 256px 20px rgba(188, 93, 252);
	z-index: 1000;
}

.colourbutton {
	font-size: 1.5em;
	bottom: -5px;
	right: 630px;
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 2em;
	width: 4em;
	color: black;
	background-color: rgba(61, 61, 63, 0);
	padding: 0;
	border: none;
	z-index: 1000;
}

.scroll-text {
	font-family: 'Courier New', Courier, monospace;

	-moz-transform: translateX(100%);
	-webkit-transform: translateX(100%);
	transform: translateX(100%);

	-moz-animation: my-animation 8s linear infinite;
	-webkit-animation: my-animation 8s linear infinite;
	animation: my-animation 8s linear infinite;
}

/* for Firefox */
@-moz-keyframes my-animation {
	from {
		-moz-transform: translateX(100%);
	}

	to {
		-moz-transform: translateX(-100%);
	}
}

/* for Chrome */
@-webkit-keyframes my-animation {
	from {
		-webkit-transform: translateX(100%);
	}

	to {
		-webkit-transform: translateX(-100%);
	}
}

@keyframes my-animation {
	from {
		-moz-transform: translateX(100%);
		-webkit-transform: translateX(100%);
		transform: translateX(100%);
	}

	to {
		-moz-transform: translateX(-100%);
		-webkit-transform: translateX(-100%);
		transform: translateX(-100%);
	}
}

#music-volume-slider {
	position: fixed;
	top: 3px;
	right: 10px;
	z-index: 9999;
	width: 120px;
	height: 15px;
}

.slider {
	-webkit-appearance: none;
	width: 10px;
	height: 15px;
	background: black;
	outline: none;
	border: 4px ridge grey;
	border-radius: 0px;
}


.slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 15px;
	background: #000;
	cursor: pointer;
	border: 5px ridge blue;
	border-radius: 2px;
}

.slider::-moz-range-thumb {
	appearance: none;
	width: 10px;
	height: 15px;
	background: #000;
	cursor: pointer;
	border: 5px ridge blue;
	border-radius: 2px;
}

#video-volume-slider {
	position: fixed;
	top: 30px;
	right: 10px;
	z-index: 9999;
	width: 120px;
	height: 15px;
}

.volumetext {
	position: fixed;
	right: 10px;
	top: 60px;
}

#ad {
	position: absolute;
	width: 175px;
	height: 400px;
    top: 5px;
    left: 10px;
	border: 5px groove #494949;
}

.skipbutton {
	top: 40px;
	right: 0px;
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 3em;
	width: 4em;
	color: white;
	background-color: rgb(61, 61, 63);
	padding: 8px 16px;
}