:root {
	--bee-yellow: #fac775;
	--bee-brown: #6b4423;
	--bee-brown-dark: #3c2510;
	--bg: #fdf1d6;
}

[x-cloak] {
	display: none !important;
}

input, select, textarea {
	border-radius: 8px;
	border: 1px solid var(--bee-brown);
	font-family: inherit;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: system-ui, sans-serif;
	background-color: var(--bg);
	color: var(--bee-brown-dark);
	position: relative;
}

.bg-image {
	position: fixed;
	inset: 0;
	z-index: -2;
	background-image: url('/theme/background');
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
}

.bg-overlay {
	position: fixed;
	inset: 0;
	z-index: -1;
	/* Sorgt dafuer, dass Text ueberall lesbar bleibt, egal wo er auf der Seite
	   liegt - unabhaengig davon, wie hell/dunkel/kontrastreich das Hintergrundbild ist */
	background: rgba(253, 241, 214, 0.82);
}

main {
	max-width: 960px;
	margin: 0 auto;
	padding: 1.5rem;
}

h1 {
	color: var(--bee-brown);
}

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

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: var(--bee-yellow);
	border: 1px solid var(--bee-brown);
	border-radius: 8px;
	padding: 0.55rem 1rem;
	cursor: pointer;
	font-size: 0.95rem;
	color: var(--bee-brown-dark);
	text-decoration: none;
}

.btn:hover {
	filter: brightness(0.97);
}

.btn-secondary {
	background: #fff;
}

.btn-icon-only {
	padding: 0.5rem 0.7rem;
}

.action-row {
	display: flex;
	gap: 1rem;
	margin: 1.25rem 0;
}

.action-row .btn {
	flex: 1;
	justify-content: center;
	padding: 1rem;
	font-size: 1rem;
}

.colony-picker {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 10px;
	padding: 0.75rem;
	margin-bottom: 1rem;
}

.colony-picker input {
	padding: 0.5rem;
	border-radius: 6px;
	border: 1px solid var(--bee-brown);
	width: 100px;
}

.card {
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 1rem;
}

.field.required label::after {
	content: " *";
	color: #b03;
}

.tile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1rem;
	margin-top: 1.5rem;
}

.tile {
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--bee-yellow);
	border-radius: 12px;
	padding: 1rem;
	position: relative;
	text-align: center;
}

.queen-dot {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid var(--bee-brown);
}

.frame-stack {
	display: flex;
	flex-direction: column-reverse;
	align-items: center;
	margin: 0.75rem 0 1rem;
}

.hive-box {
	width: 84px;
	height: 24px;
	background: linear-gradient(180deg, #fbd88a 0%, #f3bd63 100%);
	border: 1px solid var(--bee-brown);
	border-top: none;
	position: relative;
}

.hive-box:first-child {
	border-top: 1px solid var(--bee-brown);
}

/* Deckel: oberster Kasten bekommt eine leicht gewoelbte Haube */
.hive-box.hive-box-top {
	border-radius: 10px 10px 0 0;
	border-top: 1px solid var(--bee-brown);
}

/* Unterster Kasten: Anflugloch (Bogen) + Anflugbrett */
.hive-box.hive-box-bottom {
	border-radius: 0 0 3px 3px;
}

.hive-box.hive-box-bottom::before {
	/* Anflugloch, bogenfoermig */
	content: "";
	position: absolute;
	bottom: 5px;
	left: 50%;
	transform: translateX(-50%);
	width: 16px;
	height: 8px;
	background: var(--bee-brown-dark);
	border-radius: 8px 8px 0 0;
}

.hive-box.hive-box-bottom::after {
	/* Anflugbrett, ragt leicht ueber die Kastenbreite hinaus */
	content: "";
	position: absolute;
	bottom: -5px;
	left: 50%;
	transform: translateX(-50%);
	width: 48px;
	height: 5px;
	background: var(--bee-brown);
	border-radius: 0 0 2px 2px;
}
