@font-face {
	font-family: 'font';
	src: url('files/font.ttf') format('truetype');
	font-weight: normal;
	font-style: normal
}

:root {
	--accent: #a78bfa;
	--accent-dark: #6d4fc7;
	--bg: #111;
	--card: #1a1a1a
}

* {
	font-family: 'font',system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif !important;
	box-sizing: border-box
}

body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: #eee;
	height: 100vh;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative
}

body::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to right,rgba(167,139,250,0.03) 1px,transparent 1px),linear-gradient(to bottom,rgba(167,139,250,0.03) 1px,transparent 1px);
	background-size: 60px 60px;
	pointer-events: none;
	z-index: 0;
	opacity: .6
}

.screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	opacity: 0;
	pointer-events: none;
	transition: opacity .6s cubic-bezier(0.4,0,0.2,1),transform .6s cubic-bezier(0.4,0,0.2,1);
	z-index: 10
}

.screen.active {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0)
}

.screen.hidden {
	opacity: 0;
	transform: scale(0.94);
	pointer-events: none
}

#welcome-screen {
	text-align: center;
	z-index: 20
}

#welcome-text {
	font-size: 7.8rem;
	letter-spacing: -0.06em;
	margin: 0;
	line-height: 1;
	font-weight: 700;
	color: #e8e0f5
}

.welcome-subtitle {
	font-size: 1.8rem;
	letter-spacing: .4em;
	margin-top: 12px;
	opacity: .85;
	font-weight: 500;
	text-transform: uppercase
}

.main-options {
	display: flex;
	gap: 80px;
	justify-content: center;
	align-items: center
}

.option-card {
	width: 360px;
	height: 360px;
	background: var(--card);
	border: 3px solid var(--accent-dark);
	border-radius: 32px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 32px;
	cursor: pointer;
	transition: all .4s cubic-bezier(0.4,0,0.2,1);
	position: relative;
	overflow: hidden
}

.option-card:hover {
	transform: scale(1.08) translateY(-8px);
	background: #222;
	border-color: var(--accent)
}

.option-card img {
	width: 158px;
	height: 158px;
	object-fit: contain;
	transition: transform .4s cubic-bezier(0.4,0,0.2,1)
}

.option-card:hover img {
	transform: scale(1.12)
}

.option-card span {
	font-size: 2.35rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #e8e0f5
}

.sub-options {
	display: flex;
	flex-direction: column;
	gap: 32px;
	width: 560px;
	margin-top: 40px
}

.sub-option-btn {
	width: 100%;
	height: 138px;
	background: var(--card);
	border: 3px solid var(--accent-dark);
	border-radius: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.15rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #e8e0f5;
	cursor: pointer;
	transition: all .35s cubic-bezier(0.4,0,0.2,1);
	position: relative
}

.sub-option-btn:hover {
	transform: scale(1.06);
	background: #222;
	border-color: var(--accent)
}

#encode-drop-zone {
	width: 560px;
	min-height: 240px;
	border: 4px dashed var(--accent-dark);
	border-radius: 32px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	background: var(--card);
	color: #e8e0f5;
	font-size: 1.9rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: all .35s cubic-bezier(0.4,0,0.2,1);
	margin-bottom: 40px
}

#encode-drop-zone:hover,#encode-drop-zone.dragover {
	border-color: var(--accent);
	background: #222
}

#encode-drop-zone p {
	margin: 0;
	font-size: 1.4rem;
	opacity: .8;
	letter-spacing: .05em
}

#result-screen {
	flex-direction: column;
	padding: 40px
}

#result-image-container {
	max-width: 92vw;
	max-height: 68vh;
	background: #151515;
	border-radius: 28px;
	padding: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 3px solid var(--accent-dark);
	margin-bottom: 40px
}

#result-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 16px
}

#result-file-container {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
	min-height: 320px;
	background: #151515;
	border-radius: 28px;
	padding: 40px;
	border: 3px solid var(--accent-dark);
	margin-bottom: 40px
}

.result-actions {
	display: flex;
	gap: 24px;
	justify-content: center;
	flex-wrap: wrap
}

.result-actions button {
	padding: 18px 48px;
	font-size: 1.65rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	border-radius: 9999px;
	cursor: pointer;
	transition: all .35s cubic-bezier(0.4,0,0.2,1)
}

#download-btn {
	background: var(--accent);
	color: #111;
	border: 0
}

#close-btn {
	padding: 18px 56px;
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	background: #1a1a1a;
	color: #eee;
	border: 3px solid var(--accent-dark);
	border-radius: 9999px;
	cursor: pointer;
	transition: all .35s cubic-bezier(0.4,0,0.2,1)
}

#download-btn:hover {
	transform: scale(1.08);
	background: #c7b4ff
}

#close-btn:hover {
	background: var(--accent-dark);
	color: #111;
	transform: scale(1.08)
}

.toast {
	position: fixed;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--accent);
	color: #111;
	padding: 18px 48px;
	border-radius: 9999px;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: .08em;
	opacity: 0;
	transition: all .4s cubic-bezier(0.4,0,0.2,1);
	pointer-events: none;
	z-index: 10000;
	white-space: nowrap
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0)
}