.raindrop {
	position: absolute;
	background-color: white;
	border-radius: 50%;
	pointer-events: none;
	z-index: 1;
}

.star,
.snowflake {
	position: absolute;
	background-color: white;
	border-radius: 50%;
	pointer-events: none;
	z-index: 1;
}

.star {
	animation: twinkle ease-in-out infinite alternate;
}

.shooting-star {
	position: absolute;
	background: linear-gradient(90deg, white, transparent);
	width: 100px;
	height: 2px;
	opacity: 0.8;
	border-radius: 2px;
	transform-origin: left center;
}

@keyframes twinkle {
	from {
		opacity: 0.3;
		transform: scale(1);
	}
	to {
		opacity: 1;
		transform: scale(1.2);
	}
}

#loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;

	transition: opacity 0.5s ease;
}

.loading-spinner {
	width: 50px;
	height: 50px;
	border: 5px solid var(--border-color);
	border-top: 5px solid var(--progress-fill);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* actual styles below */
body {
	font-family: system-ui, sans-serif;
	background-color: var(--background);
	color: var(--text-color);
	margin: 0;
	padding: 2rem;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.open-source-logo {
	width: 2rem;
	height: 2rem;
	margin: 0;
	padding: 0;
	cursor: pointer;

	position: fixed;
	bottom: 1rem;
	right: .5rem;
	z-index: 1000;

	opacity: 0.5;
	transition: opacity 0.3s ease;
}

.open-source-logo:hover {
	opacity: 1;
}

.hidden {
	display: none !important;
}

.activity-header.hidden {
	display: none;
}

.user-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 2rem;
	max-width: 700px;
	width: 100%;
}

.avatar-status-wrapper {
	display: flex;
	align-items: center;
	gap: 2rem;

	width: fit-content;
	max-width: 700px;
}

.avatar-wrapper {
	position: relative;
	width: 128px;
	height: 128px;
}

.avatar {
	width: 128px;
	height: 128px;
	border-radius: 50%;
}

.badges {
	max-width: 700px;
	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	gap: 0.3rem;
	flex-wrap: wrap;
	margin-top: 0.5rem;
	padding: 0.5rem;
	background-color: var(--card-bg);
	border-radius: 10px;
	border: 1px solid var(--border-color);
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.badge {
	width: 26px;
	height: 26px;
	border-radius: 50%;
}

.decoration {
	position: absolute;
	top: -18px;
	left: -18px;
	width: 164px;
	height: 164px;
	pointer-events: none;
}

.status-indicator {
	position: absolute;
	bottom: 4px;
	right: 4px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 4px solid var(--background);
	display: flex;
	align-items: center;
	justify-content: center;
}

.status-indicator.online {
	background-color: var(--status-online);
}

.status-indicator.idle {
	background-color: var(--status-idle);
}

.status-indicator.dnd {
	background-color: var(--status-dnd);
}

.status-indicator.offline {
	background-color: var(--status-offline);
}

.status-indicator.streaming {
	background-color: var(--status-streaming);
}

.platform-icon.mobile-only {
	position: absolute;
	bottom: 0;
	right: 4px;
	width: 30px;
	height: 30px;
	pointer-events: none;
	background-color: var(--background);
	padding: 0.3rem 0.1rem;
	border-radius: 8px;
}

.platform-icon.mobile-only.dnd {
	fill: var(--status-dnd);
}
.platform-icon.mobile-only.idle {
	fill: var(--status-idle);
}
.platform-icon.mobile-only.online {
	fill: var(--status-online);
}
.platform-icon.mobile-only.offline {
	fill: var(--status-offline);
}
.platform-icon.mobile-only.streaming {
	fill: var(--status-streaming);
}

.user-info {
	display: flex;
	flex-direction: column;
}

.user-info-inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	text-align: center;
	gap: .5rem;
}

.user-info-inner h1 {
	font-size: 2rem;
	margin: 0;
}

.clan-badge {
	width: fit-content;
	height: fit-content;
	border-radius: 8px;
	background-color: var(--card-bg);

	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	padding: .3rem .5rem;

	text-align: center;
	align-items: center;
	justify-content: center;
}

.clan-badge img {
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
}

.clan-badge span {
	font-size: .9rem;
	color: var(--text-color);
	margin: 0;

	font-weight: 600;
}

h1 {
	font-size: 2.5rem;
	margin: 0;
	color: var(--link-color);
}

.custom-status {
	font-size: 1.2rem;
	color: var(--text-subtle);
	margin-top: 0.25rem;
	word-break: break-word;
	overflow-wrap: anywhere;
	white-space: normal;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.custom-status .custom-emoji {
	width: 20px;
	height: 20px;
	vertical-align: text-bottom;
	margin-right: 4px;
	display: inline-block;
}

h2 {
	font-size: 1.8rem;
	margin: 2rem 0 1rem;
}

ul {
	list-style: none;
	padding: 0;
	width: 100%;
	max-width: 700px;
}

.activities {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
	max-width: 700px;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

.activity {
	display: flex;
	flex-direction: row;
	gap: 1rem;
	background-color: var(--card-bg);
	padding: 0.75rem 1rem;
	border-radius: 10px;
	border: 1px solid var(--border-color);
}

.activity:hover {
	background: var(--card-hover-bg);
}

.activity-wrapper {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.activity-wrapper-inner {
	display: flex;
	flex-direction: row;
	gap: 1rem;
}

.activity-image-wrapper {
	position: relative;
	width: 80px;
	height: 80px;
}

.no-asset {
	display: none !important;
}

.activity-image-small {
	width: 25px;
	height: 25px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border-color: var(--card-bg);
	border-width: 2px;
	border-style: solid;

	position: absolute;
	bottom: -6px;
	right: -10px;
}

.activity-image {
	width: 80px;
	height: 80px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.activity-content {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 1;
	gap: 0.5rem;
	position: relative;
}

.activity-top {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.activity-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.activity-bottom {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.activity-name {
	font-weight: 600;
	font-size: 1rem;
	color: var(--text-color);
}

.activity-detail {
	font-size: 0.875rem;
	color: var(--text-secondary);
}

.activity-timestamp {
	font-size: 0.75rem;
	color: var(--text-secondary);
	text-align: right;
	margin-left: auto;
	white-space: nowrap;
}

.progress-bar {
	height: 4px;
	background-color: var(--border-color);
	border-radius: 2px;
	margin-top: 1rem;
	overflow: hidden;
}

.progress-fill {
	background-color: var(--progress-fill);
	transition: width 0.4s ease;
	height: 100%;
}

.progress-bar,
.progress-time-labels {
	width: 100%;
}

.progress-time-labels {
	display: flex;
	justify-content: space-between;
	font-size: 0.75rem;
	color: var(--text-muted);
	margin-top: 0.25rem;
}

.activity-type-wrapper {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.activity-type-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--blockquote-color);
	margin-bottom: 0.50rem;
	display: block;
}

.activity-header.no-timestamp {
	justify-content: flex-start;
}

.progress-time-labels.paused .progress-current::after {
	content: " ⏸";
	color: var(--status-idle);
}

.activity-buttons {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
	justify-content: flex-end;
}

.activity-button {
	background-color: var(--progress-fill);
	color: white;
	border: none;
	border-radius: 3px;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease;
	display: inline-block;
}

.activity-button:hover {
	background-color: var(--button-hover-bg);
	text-decoration: none;
}

.activity-button:disabled {
	background-color: var(--button-disabled-bg);
	cursor: not-allowed;
	opacity: 0.8;
}

@media (max-width: 600px) {
	html {
		font-size: clamp(14px, 2vw, 16px);
	}

	body {
		padding: 0;
		margin: 0;
		align-items: stretch;
	}

	.user-card {
		width: 100%;
		align-items: center;
	}

	.badges {
		max-width: 100%;
		border-radius: 0;
		border: none;
		background-color: transparent;
		margin-top: 0;
		box-shadow: none;
	}

	.avatar-status-wrapper {
		flex-direction: column;
		align-items: center;
		gap: 1rem;
		text-align: center;
		width: 100%;
	}

	.activity-image-wrapper {
		max-width: 100%;
		max-height: 100%;
		width: 100%;
		height: 100%;
	}

	.avatar-wrapper {
		width: 96px;
		height: 96px;
	}

	.avatar {
		width: 96px;
		height: 96px;
	}

	.decoration {
		width: 128px;
		height: 128px;
		top: -16px;
		left: -16px;
	}

	.status-indicator,
	.platform-icon.mobile-only {
		width: 20px;
		height: 20px;
		bottom: 2px;
		right: 2px;
	}

	.user-info {
		align-items: center;
		text-align: center;
	}

	h1 {
		font-size: 2rem;
	}

	.custom-status {
		font-size: 1rem;
		flex-direction: column;
		gap: 0.2rem;
	}

	h2 {
		font-size: 1.4rem;
		text-align: center;
	}

	.activities {
		gap: 0.75rem;
	}

	.activity {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 1rem;
		border-radius: 0;
	}

	.activity-image {
		width: 100%;
		max-width: 100%;
		height: auto;
		border-radius: 8px;
	}

	.activity-image-small {
		width: 40px;
		height: 40px;
	}

	.activity-content {
		width: 100%;
		align-items: center;
	}

	.activity-wrapper-inner {
		flex-direction: column;
		align-items: center;
	}

	.activity-header {
		flex-direction: column;
		align-items: center;
		gap: 0.25rem;
	}

	.activity-timestamp {
		text-align: center;
		font-size: 0.75rem;
	}

	.activity-detail {
		text-align: center;
	}

	.progress-time-labels {
		justify-content: space-between;
		font-size: 0.7rem;
		margin-top: 0.25rem;
		width: 100%;
	}

	.activity-buttons {
		justify-content: center;
		margin-top: 0.5rem;
		width: 100%;
	}

	.activity-button {
		font-size: 0.85rem;
		padding: 0.4rem 0.8rem;
	}
}

/* readme :p */
.readme {
	max-width: fit-content;
	min-width: 700px;
	overflow: hidden;
	width: 100%;
	background: var(--readme-bg);
	padding: 1.5rem;
	border-radius: 8px;
	border: 1px solid var(--border-color);

	margin-top: 1rem;

	box-sizing: border-box;
	overflow: hidden;
	overflow-y: auto;
}

.readme h2 {
	margin-top: 0;
	color: var(--link-color);
}

.markdown-body {
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text-color);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
	color: var(--text-color);
	margin-top: 1.25rem;
	margin-bottom: 0.5rem;
}

.markdown-body p {
	margin: 0.5rem 0;
}

.markdown-body a {
	color: var(--link-color);
	text-decoration: none;
}

.markdown-body a:hover {
	text-decoration: underline;
}

.markdown-body code {
	background: var(--border-color);
	padding: 0.2em 0.4em;
	border-radius: 4px;
	font-family: monospace;
	color: #f8f8f2;
}

.markdown-body pre {
	background: var(--border-color);
	padding: 1rem;
	border-radius: 6px;
	overflow-x: auto;
	font-family: monospace;
	color: #f8f8f2;
}

.markdown-body ul,
.markdown-body ol {
	padding-left: 1.5rem;
	margin: 0.5rem 0;
}

.markdown-body blockquote {
	border-left: 4px solid var(--link-color);
	padding-left: 1rem;
	color: var(--blockquote-color);
	margin: 1rem 0;
}

.markdown-body img {
	max-width: 100%;
}

@media (max-width: 600px) {
	.readme {
		max-width: 100%;
		min-width: 100%;
		padding: 1rem;

		margin-top: 1rem;
		border-radius: 0;
	}

	.markdown-body {
		font-size: 0.95rem;
	}
}