:root {
	--bg-primary: #222630;
	--bg-secondary: #2B3040;
	--bg-tertiary: #2F3447;
	--text-primary: #ffffff;
	--text-secondary: #b0b0b0;
	--random-text: #bbbbbb;
	--accent: #596A95;
	--border: #2B3040;
	--input-bg: #3A3F50;
	--input-border: #44475A;
	--input-focus: #596A95;
	--game-bg: var(--bg-secondary);
	--shadow-color: rgba(0, 0, 0, 0.3);
	--shadow-dark: rgba(0, 0, 0, 0.5);
}

body {
	font-family: sans-serif;
	background: var(--bg-primary);
	color: var(--text-primary);
}

.glass-navbar {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	width: 50vw;
	padding: 15px 30px;
	background: rgba(43, 48, 64, 0.7);
	border: 1px solid var(--border);
	border-radius: 20px;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	z-index: 1999;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.nav-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.nav-left {
	font-size: 1.5rem;
	font-weight: bold;
	color: var(--text-primary);
}

.nav-right {
	display: flex;
	gap: 20px;
}

.nav-right a {
	display: flex;
	align-items: center;
	gap: 5px;
	color: var(--text-primary);
	text-decoration: none;
	font-weight: 600;
	padding: 8px 12px;
	border-radius: 10px;
	transition: background 0.2s ease;
}

.nav-right a:hover {
	background: var(--bg-tertiary);
}

.material-icons {
	font-size: 20px;
}

.content {
	padding: 120px 20px 40px;
	max-width: 800px;
	margin: auto;
}

.content h1 {
	font-size: 3rem;
	margin-bottom: 20px;
	color: var(--accent);
}

.content p {
	font-size: 1.1rem;
	margin-bottom: 20px;
	line-height: 1.6;
	color: var(--text-secondary);
}

#velara-snowflakes {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow-y: hidden;
	z-index: -1;
}

#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);

	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: 100%;
	max-width: 400px;

	background-color: var(--bg-primary);
	color: var(--text-primary);
	font-family: Arial, sans-serif;
}

#random-texts {
	font-size: 1.2rem;
	color: var(--random-text);
	margin: 20px 0 30px 0;
}

.search-bar input[type="text"] {
	padding: 20px 20px;
	width: 30vw;
	border-radius: 20px;
	border: 1px solid var(--input-border);
	background-color: var(--input-bg);
	color: var(--text-primary);
	font-size: 1rem;
	outline: none;
	transition: border 0.2s ease;
	text-align: center;
	font-family: Arial, sans-serif;
}

.search-bar input[type="text"]:focus {
	border-color: var(--input-focus);
}

.desc {
	margin-top: 10px;
	color: var(--text-secondary);
}

#proxy-error-msg {
	font-weight: bold;
}

#proxy-error-details {
	font-size: 0.9rem;
	white-space: pre-wrap;
}

h1 {
	font-size: 5rem;
	font-weight: bold;
	display: flex;
	gap: 0.1em;
	cursor: default;
}

h1 span {
	display: inline-block;
	transition: transform 0.3s ease;
}

h1 span.v:hover {
	animation: bounce 0.6s ease forwards;
}

@keyframes bounce {

	0%,
	100% {
		transform: translateY(0) scale(1);
	}

	50% {
		transform: translateY(-20px) scale(1.2);
	}
}

h1 span.e:hover {
	animation: rotate 0.5s linear forwards;
}

@keyframes rotate {
	0% {
		transform: rotate(0deg) scale(1);
	}

	50% {
		transform: rotate(15deg) scale(1.1);
	}

	100% {
		transform: rotate(0deg) scale(1);
	}
}

h1 span.l:hover {
	animation: skewScale 0.4s ease forwards;
}

@keyframes skewScale {
	0% {
		transform: skew(0deg) scale(1);
	}

	50% {
		transform: skew(20deg) scale(1.3);
	}

	100% {
		transform: skew(0deg) scale(1);
	}
}

h1 span.a:hover {
	animation: wiggle 0.4s ease forwards;
}

@keyframes wiggle {

	0%,
	100% {
		transform: rotate(0deg) scale(1);
	}

	25% {
		transform: rotate(10deg) scale(1.2);
	}

	50% {
		transform: rotate(-10deg) scale(1.1);
	}

	75% {
		transform: rotate(8deg) scale(1.15);
	}
}

h1 span.r:hover {
	animation: jumpScale 0.5s ease forwards;
}

@keyframes jumpScale {

	0%,
	100% {
		transform: translateY(0) scale(1);
	}

	40% {
		transform: translateY(-25px) scale(1.3);
	}

	60% {
		transform: translateY(-15px) scale(1.15);
	}
}

.btn {
	background-color: var(--accent);
	color: var(--text-primary);
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.3s ease;
	font-family: Arial, sans-serif;
}

.btn:hover {
	background-color: var(--input-focus);
}

.btn:active {
	background-color: var(--bg-tertiary);
}

.discord-btn {
    background-color: #5865F2;
    color: #fff;
    border: none; /* No border for Discord button */
    padding: 14px 22px;
    border-radius: 8px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center content */
    gap: 10px;
    font-weight: 600;
	text-decoration: none;
    box-sizing: border-box;
    height: 52px;
    width: 190px;
}

.discord-btn:hover {
    background-color: #4752C4;
    transform: translateY(-2px);
}

.discord-btn:active {
    transform: translateY(0);
}

.about-blank-btn {
    background-color: #2F3447;
    color: #fff;
    border: 2px solid #44475A;
    padding: 14px 22px;
    border-radius: 8px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center content */
    gap: 10px;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box; /* Ensure padding and border are included in width */
    height: 52px;
    width: 190px;
}

.about-blank-btn:hover {
    background-color: #3A3F50;
    border-color: #596A95;
    transform: translateY(-2px);
}

.about-blank-btn:active {
    transform: translateY(0);
    background-color: #222630;
}

.search-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
	width: 100%;
	max-width: 500px;
	margin: 0 auto 30px auto;
}

.search-input {
	width: 100%;
	padding: 20px 25px;
	font-size: 1.1rem;
	border: 2px solid rgba(89, 106, 149, 0.3);
	border-radius: 25px;
	background: rgba(43, 48, 64, 0.8);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: var(--text-primary);
	outline: none;
	transition: all 0.3s ease;
	text-align: center;
	font-family: Arial, sans-serif;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	box-sizing: border-box;
}

.search-input::placeholder {
	color: var(--text-secondary);
	opacity: 0.8;
}

.search-input:focus {
	border-color: var(--accent);
	box-shadow: 0 8px 32px rgba(89, 106, 149, 0.4);
	transform: translateY(-2px);
}

.search-input:hover {
	border-color: rgba(89, 106, 149, 0.5);
	transform: translateY(-1px);
}

.button-container {
	background-color: var(--bg-secondary);
	padding: 20px 30px;
	border-radius: 12px;
	display: inline-block;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.grid-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	min-height: 100vh;
	padding: 20px;
}

.grid {
	display: grid;
	place-items: center;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.game-container {
	position: relative;
	width: 100%;
	background: var(--game-bg);
	border-radius: 25px;
	overflow: hidden;
	box-shadow: 0 8px 20px var(--shadow-color);
	transition: all 0.3s ease;
}

.game-container:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 15px var(--shadow-dark);
	filter: brightness(0.8);
}

.game-container a {
	text-decoration: none;
	color: var(--text-primary);
	display: block;
	position: relative;
	font: 800 40px Arial;
	text-shadow:
		-2px -2px 0 #000,
		0 -2px 0 #000,
		2px -2px 0 #000,
		2px 0 0 #000,
		2px 2px 0 #000,
		0 2px 0 #000,
		-2px 2px 0 #000,
		-2px 0 0 #000;
}

.game-img {
	position: relative;
	width: 100%;
	height: 225px;
	overflow: hidden;
}

.game-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.game-container:hover .game-img img {
	transform: scale(1.1);
	filter: brightness(0.9);
}

.game-name {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 15px;
	background: linear-gradient(to top, var(--shadow-dark), transparent);
	color: var(--text-primary);
	font-size: 17px;
	font-weight: 600;
	text-align: center;
	text-shadow: 0 1px 4px var(--shadow-color);
	text-shadow:
		-1px -1px 0 var(--shadow-dark),
		1px -1px 0 var(--shadow-dark),
		-1px 1px 0 var(--shadow-dark),
		1px 1px 0 var(--shadow-dark),
		0 0 5px var(--shadow-dark);

}

.settings-container {
	background-color: var(--bg-secondary);
	padding: 30px;
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	max-width: 1000px;
	margin: 100px auto 40px auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 30px;
	z-index: 10;
    position: relative;
}

.settings-section {
	background-color: var(--bg-tertiary);
	padding: 25px;
	border-radius: 12px;
	border: 1px solid var(--border);
	display: flex;
	flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.settings-section h2 {
	font-size: 20px;
    font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 10px;
}

.settings-section p {
	font-size: 14px;
	color: var(--text-secondary);
	margin-bottom: 20px;
}

/* Cloak Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-header i {
    font-size: 24px;
    color: var(--text-primary);
}

.section-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.section-header p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Setting Row (Toggle) */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.setting-row label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #4CAF50; /* Green */
}

input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Styled Input Group */
.input-group-styled {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    padding: 0 12px;
}

.input-group-styled label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 10px;
    white-space: nowrap;
    width: 80px; /* Fixed width for alignment */
}

.input-group-styled input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 12px 0;
    font-size: 14px;
    outline: none;
}

/* Presets Container */
.presets-container {
    margin-top: 20px;
}

.presets-container h3 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* Cloak Grid */
.cloak-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.cloak-option {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cloak-option:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.cloak-option.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.cloak-option img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.cloak-option span {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
}


/* Theme Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.theme-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.theme-card.selected {
    border-color: #4CAF50; /* Green border for selected theme */
    box-shadow: 0 0 0 1px #4CAF50;
}

.theme-preview {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-card span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Legacy Theme Options (Removed/Replaced) */
/*.theme-options { ... } */
/*.theme-option { ... } */

#resetTheme {
	display: block;
	margin: 20px auto 0;
    width: auto;
	padding: 10px 20px;
	background-color: var(--bg-secondary);
	color: var(--text-primary);
	border: 1px solid var(--border);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
    text-align: center;
}

#resetTheme:hover {
	background-color: var(--accent);
    border-color: var(--accent);
}

#search-bar {
	width: 280px;
	padding: 12px 16px;
	font-size: 16px;
	border: 2px solid var(--input-border);
	border-radius: 8px;
	background-color: var(--input-bg);
	color: var(--text-primary);
	outline: none;
	transition: border-color 0.1s ease;
	display: block;
	margin: 0 auto;
	margin-top: 100px;
	cursor: text;
	pointer-events: auto;
}

#search-bar:focus {
	border-color: var(--input-focus);
}

/* Account related styles removed */

.mobile-menu-toggle {
	display: none;
	cursor: pointer;
	color: var(--text-primary);
	font-size: 24px;
	background: none;
	border: none;
	padding: 8px;
}

.nav-right.mobile-active {
	display: flex;
}

.game-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.search-input:focus,
#search-bar:focus {
	outline: 2px solid var(--input-focus);
	outline-offset: 2px;
}

.btn:focus,
.iframe-button:focus {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.loading-indicator {
	display: none;
	text-align: center;
	padding: 20px;
	color: var(--text-secondary);
}

.loading-indicator.active {
	display: block;
}

.error-message {
	display: none;
	background: rgba(220, 53, 69, 0.2);
	border: 1px solid #dc3545;
	color: #dc3545;
	padding: 12px;
	border-radius: 8px;
	margin: 10px 0;
	text-align: center;
}

.error-message.active {
	display: block;
}

@media (max-width: 768px) {
	.glass-navbar {
		width: 90vw;
		max-width: 100%;
		padding: 12px 20px;
		top: 10px;
	}

	.nav-content {
		position: relative;
	}

	.mobile-menu-toggle {
		display: block;
	}

	.nav-right {
		display: none;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: rgba(43, 48, 64, 0.95);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border-radius: 12px;
		margin-top: 10px;
		padding: 15px;
		gap: 10px;
		box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	}

	.nav-right.mobile-active {
		display: flex;
	}

	.nav-right a {
		width: 100%;
		justify-content: flex-start;
		padding: 12px;
	}

	.search-bar input[type="text"],
	.search-input {
		width: 90vw;
		max-width: 500px;
	}

	.container {
		width: 90%;
		max-width: 100%;
		padding: 20px;
	}

	h1 {
		font-size: 3rem;
	}

	.grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 15px;
	}

	.game-img {
		height: 180px;
	}

	.game-name {
		font-size: 14px;
		padding: 10px;
	}

	.button-container {
		padding: 15px 20px;
	}

	.btn {
		padding: 10px 20px;
		font-size: 0.9rem;
	}

	.settings-container {
		margin: 80px 10px 20px;
		padding: 15px;
		grid-template-columns: 1fr;
	}

	#search-bar {
		width: 90vw;
		max-width: 500px;
		margin-top: 80px;
	}

	.controls {
		display: flex;
		justify-content: center;
		width: 100%;
		padding: 0 10px;
	}

}

@media (max-width: 480px) {
	.glass-navbar {
		width: 95vw;
		padding: 10px 15px;
	}

	h1 {
		font-size: 2.5rem;
	}

	.grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 10px;
	}

	.game-img {
		height: 150px;
	}

	.game-name {
		font-size: 12px;
		padding: 8px;
	}

	.search-bar input[type="text"],
	.search-input,
	#search-bar {
		width: 95vw;
		font-size: 0.9rem;
		padding: 15px 20px;
	}

	.container {
		width: 95%;
	}
}