/* ---------------------------------------------------------
   Base
--------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	color-scheme: dark;
}

body {
	margin: 0;
	min-height: 100vh;

	font-family: "Rubik", system-ui, Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.52;

	color: #b8c0cc;
	background-color: #0c0e13;
	background-image:
		url("https://jkhub.org/backline_teal.png"),
		url("https://jkhub.org/backline_teal_top.png");
	background-repeat: no-repeat;
	background-position:
		center bottom 400px,
		center 2%;
}


/* ---------------------------------------------------------
   Typography
--------------------------------------------------------- */

h1,
h2 {
	margin-top: 0;
	color: #fff;
	line-height: 1.2;
}

h1 {
	margin-bottom: 1rem;
	font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
	margin-bottom: 0.75rem;
	font-size: 1.4rem;
}

p {
	margin-top: 0;
	margin-bottom: 1rem;
}

a {
	color: #58bdc8;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}


/* ---------------------------------------------------------
   Layout
--------------------------------------------------------- */

.container {
	width: min(100% - 40px, 900px);
	margin-inline: auto;
	padding-block: 60px;
}

.page-header {
	margin-bottom: 32px;
}

.upload-section {
	margin-bottom: 40px;
}

.instructions {
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-footer {
	margin-top: 48px;
	padding-top: 24px;

	border-top: 1px solid rgba(255, 255, 255, 0.1);

	color: #7f8997;
	font-size: 0.9rem;
}


/* ---------------------------------------------------------
   Alert
--------------------------------------------------------- */

.alert {
	display: flex;
	align-items: flex-start;
	gap: 12px;

	margin: 20px 0;
	padding: 14px 16px;

	background: rgba(163, 36, 36, 0.4);
	border-left: 5px solid #950000;
	border-radius: 5px;

	color: #e4e7eb;
	font-weight: 500;
	line-height: 1.5;
}

.alert i {
	flex: 0 0 auto;
	margin-top: 1px;

	color: #e06a6a;
	font-size: 1.4rem;
}


/* ---------------------------------------------------------
   Uploader
--------------------------------------------------------- */

#uploader {
	width: 100%;
}

#dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	min-height: 220px;
	padding: 40px 20px;

	border: 2px dashed rgba(255, 255, 255, 0.25);
	border-radius: 10px;

	background: rgba(255, 255, 255, 0.04);

	text-align: center;
	cursor: pointer;

	transition:
		background 0.2s ease,
		border-color 0.2s ease,
		transform 0.2s ease;
}

#dropzone:hover {
	border-color: rgba(63, 169, 181, 0.7);
	background: rgba(63, 169, 181, 0.08);
}

#dropzone.dragover {
	border-color: #3fa9b5;
	background: rgba(63, 169, 181, 0.15);
	transform: scale(1.01);
}

#dropzone i {
	margin-bottom: 12px;

	color: #3fa9b5;
	font-size: 42px;
}

#dropzone strong {
	display: block;

	color: #fff;
	font-size: 1.1rem;
	font-weight: 500;
}

#dropzone span {
	display: block;
	margin-top: 4px;

	color: #7f8997;
	font-size: 0.9rem;
}


/* ---------------------------------------------------------
   Uploaded File
--------------------------------------------------------- */

#filelist {
	margin-top: 20px;
}

.upload-item {
	padding: 18px;

	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
}

.upload-file {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.upload-file strong {
	min-width: 0;

	color: #fff;
	font-weight: 500;

	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.upload-file span {
	flex: 0 0 auto;

	color: #7f8997;
	font-size: 0.85rem;
}


/* ---------------------------------------------------------
   Progress
--------------------------------------------------------- */

.upload-progress {
	height: 10px;
	margin-top: 14px;

	overflow: hidden;

	background: rgba(255, 255, 255, 0.12);
	border-radius: 999px;
}

.upload-progress-bar {
	width: 0;
	height: 100%;

	background: #3fa9b5;
	border-radius: inherit;

	transition: width 0.2s ease;
}

.upload-percent {
	margin-top: 6px;

	color: #8d97a5;
	font-size: 0.8rem;
	text-align: right;
}


/* ---------------------------------------------------------
   Uploaded URL
--------------------------------------------------------- */

.uploaded-url {
	display: flex;
	gap: 8px;

	margin-top: 16px;
}

.uploaded-url input[type="text"] {
	flex: 1;
	min-width: 0;

	padding: 10px 12px;

	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 5px;
	outline: none;

	background: rgba(0, 0, 0, 0.25);
	color: #fff;

	font: inherit;
	font-size: 0.9rem;
}

.uploaded-url input[type="text"]:focus {
	border-color: #3fa9b5;
}

.copy-url {
	flex: 0 0 auto;

	padding: 10px 18px;

	border: 0;
	border-radius: 5px;

	background: #3fa9b5;
	color: #071012;

	font: inherit;
	font-weight: 500;

	cursor: pointer;

	transition:
		background 0.2s ease,
		transform 0.1s ease;
}

.copy-url:hover {
	background: #58bdc8;
}

.copy-url:active {
	transform: translateY(1px);
}


/* ---------------------------------------------------------
   Instructions
--------------------------------------------------------- */

.instruction-image {
	display: block;

	width: 100%;
	max-width: 700px;
	height: auto;
	margin-top: 20px;

	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
}


/* ---------------------------------------------------------
   Mobile
--------------------------------------------------------- */

@media (max-width: 600px) {

	.container {
		width: min(100% - 28px, 900px);
		padding-block: 32px;
	}

	#dropzone {
		min-height: 180px;
		padding: 30px 16px;
	}

	.upload-file {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
	}

	.uploaded-url {
		flex-direction: column;
	}

	.copy-url {
		width: 100%;
	}

}