/* General styling */
body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	scroll-behavior: smooth;
	align-items: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 340px;
}

/* Content container */
main {
	width: 100%;
	max-width: 1200px;
	padding: 20px;
	box-sizing: border-box;
}

/* Markdown container */
#rendered-markdown {
	background: #36393f;
	border-radius: 16px;
	max-width: 1200px;
	margin: 20px auto;
	padding: 20px;
	text-align: left;
	color: #fff;
	box-sizing: border-box;
}

/* Compatibility container */
.compatibility-container {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	max-width: 1200px;
	margin: 20px auto;
	box-sizing: border-box;
}

.compatibility-box {
	flex: 1 1 calc(33.33% - 20px);
	min-width: 280px;
	background: #36393f;
	border-radius: 16px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-sizing: border-box;
}

.compatibility-box h3 {
	font-size: 1.2rem;
	color: #f5f5f5;
	margin-bottom: 10px;
}

.compatibility-box p {
	color: #c9c9c9;
	margin: 5px 0;
}

.compatibility-box a {
	text-decoration: none;
	color: #ff6f61;
	font-weight: 600;
	margin-right: 10px;
	transition: color 0.3s ease;
}

.compatibility-box a:hover {
	color: #ff967e;
}

/* Downloads grid */
.download-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
}

.download-button {
	background-color: #4f545c;
	padding: 10px;
	text-align: center;
	border-radius: 8px;
	color: #fff !important;
	 !imp;
	 !i;
	 !;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	transition: background 0.3s;
}

.download-button:hover {
	background-color: #4f545c87;
}

/* Responsive behavior */
@media (max-width: 1024px) {
	.compatibility-container {
		flex-direction: column;
		align-items: center;
	}

	.compatibility-box {
		min-width: 100%;
	}

	.nav-container {
		justify-content: center;
		flex-wrap: wrap;
	}
}

@media (max-width: 768px) {
	.download-grid {
		grid-template-columns: 1fr;
	}

	.compatibility-container {
		gap: 15px;
	}
}

.img-parent {
	display: flex;
	justify-content: space-between;
	width: 100%;
	gap: 5px;
}

.img-sub {
	max-width: 50% !important;
	height: auto;
	cursor: url(https://www.davids-repo.dev/chunker/assets/open.png) 16 16, pointer;
	/* Open cursor */
}

@media (max-width: 768px) {
	.img-parent {
		flex-direction: column;
		align-items: center;
	}

	.img-sub {
		max-width: 100% !important;
	}
}

/* Full-screen mode */
.fullscreen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw !important;
	height: 100vh !important;
	object-fit: contain !important;
	background-color: rgba(0, 0, 0, 0.9) !important;
	z-index: 1000 !important;
	max-width: 100% !important;
	cursor: url(https://www.davids-repo.dev/chunker/assets/close.png) 16 16, pointer;
	/* Close cursor */
}

/* Collapsible Details */
details {
	background: #2f3136;
	border: 1px solid #4f545c;
	border-radius: 8px;
	padding: 10px;
	transition: background 0.3s, border-color 0.3s;
	display: inline-block !important;
	margin: 10px 0px;
}

summary {
	cursor: pointer;
	font-weight: 600;
	color: #f5f5f5;
	outline: none;
}

summary::-webkit-details-marker {
	display: none;
}

summary:before {
	display: inline-block;
	transition: transform 0.2s ease;
}

details[open] summary:before {
	transform: rotate(90deg);
}

details[open] {
	background: #424549;
	border-color: #6f747c;
	display: block !important;
}

/* Cards */
.card {
  margin-bottom: var(--card-margin);
  border-radius: var(--radius);
  background: transparent;
}

/* Media card */
.card.media-card {
  padding: 0;
}

/* Video */
.video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  width: 100%;
}

.video-wrap iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-wrap.loaded iframe {
  display: block !important;
}

/* Responsive video height */
@media (max-width: var(--bp-tablet)) {
  .video-wrap iframe {
    height: 18.75rem;
  }
}