@import "baueros-variables-styles.css";
html,
body {
	height: 100%;
	margin: 0;
	background: var(--bg-gradient);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
	color: var(--text);
	-webkit-user-select: none;
	user-select: none;
	--bg: var(--bg-dark);
	--bg-gradient: var(--bg-gradient-dark);
}

body.light-theme {
	--bg: var(--bg-light);
	--panel: var(--panel-light);
	--accent: var(--accent-light);
	--titlebar: var(--titlebar-light);
	--titlebar-inactive: var(--titlebar-inactive-light);
	--text: var(--text-light);
	--muted: var(--muted-light);
	--taskbar: var(--taskbar-light);
	--window-shadow: var(--window-shadow-light);
	--bg-gradient: var(--bg-gradient-light);
}

/* Desktop area */
#desktop {
	position: relative;
	/* nur für Icon-Dragging: display:block; */
	height: calc(100vh - 48px);
	overflow: hidden;
	padding: 20px;
	box-sizing: border-box;
	background: url('https://cdn.pixabay.com/photo/2017/10/10/07/48/hills-2836301_1280.jpg');
	background-size: cover;
	/* oder contain, je nach gewünschtem Effekt */
	background-repeat: no-repeat;
	background-position: center;
}

/* App icons */
.icons {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.icon {
	width: 130px;
	/*position: absolute;*/
	/* nur für Icon-Dragging */
	cursor: move;
	height: 84px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(2, 6, 23, 0.45);
	transition: transform .12s ease, box-shadow .12s;
	padding: 8px;
}

.icon:hover {
	box-shadow: 0 14px 30px rgba(2, 6, 23, 0.6);
}

.icon .label {
	font-size: 12px;
	color: white;
	text-shadow: 1px 1px 2px #000000;
	text-align: center;
}

/* Window / app container */
.window {
	position: absolute;
	border-radius: 8px;
	background: var(--panel);
	border: 1px solid transparent;
	transition: box-shadow 0.15s, border-color 0.15s, opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
	min-width: 220px;
	min-height: 120px;
	box-shadow: var(--window-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	user-select: none;
	box-sizing: border-box;
	transform: scale(0.8);
	opacity: 0;
}

.window.visible {
	opacity: 1;
	transform: scale(1);
}

.window.closing {
	opacity: 0;
	transform: scale(0.8);
}

.window.focused {
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4),
		0 0 0 1px var(--accent);
}

.window:not(.focused) {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2),
		0 0 0 1px rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.1);
}

.window.maximized {
	border-radius: 0px;
}

.window.maximized .resizer {
	display: none;
	/* Resizer im Vollbildmodus ausblenden */
	pointer-events: none;
	/* Interaktionen mit Resizern deaktivieren */
}

.window .titlebar {
	background: var(--titlebar-inactive);
}

.window.focused .titlebar {
	background: var(--titlebar);
}

/* Titlebar */
.titlebar {
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px;
	background: linear-gradient(180deg, var(--titlebar), color-mix(in srgb, var(--titlebar) 80%, black 20%));
	cursor: grab;
	flex-shrink: 0;
}

.titlebar:active {
	cursor: grabbing;
}

.titlebar .left {
	display: flex;
	align-items: center;
	gap: 8px;
}

.titlebar .title {
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
}

.titlebar .right {
	display: flex;
	align-items: center;
	gap: 6px;
}

.titlebar .left .title-icon {
	width: 16px;
	height: 16px;
}

.titlebar .btn {
	width: 34px;
	height: 28px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	cursor: pointer;
	transition: background .12s, transform .08s, color .12s;
}

body.light-theme .titlebar .btn {
	color: var(--text-light);
}

.titlebar .btn:active {
	transform: scale(.90);
}

.titlebar .btn:hover {
	background: rgba(255, 255, 255, 0.04);
}

.titlebar .btn.close:hover {
	background-color: #f97316;
	color: white;
}

body.light-theme .titlebar .btn:hover {
	background: rgba(0, 0, 0, 0.04);
}

body.light-theme .titlebar .btn.close:hover {
	background: rgba(255, 0, 0, 0.65);
	color: white;
}

/* Window content */
.content {
	flex: 1;
	/*padding:12px;*/
	overflow: auto;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
}

/* Make content not interactive when not focused (we toggle a class) */
.window:not(.focused) .content {
	pointer-events: none;
	opacity: 0.98;
	filter: grayscale(.02) contrast(.98);
}

/* Resizers on edges & corners */
.resizer {
	position: absolute;
	z-index: 20;
	background: transparent;
}

.resizer.corner {
	width: 14px;
	height: 14px;
}

.resizer.edge {
	background: transparent;
}

.resizer.t {
	top: -6px;
	left: 0;
	right: 0;
	height: 12px;
	cursor: n-resize;
}

.resizer.b {
	bottom: -6px;
	left: 0;
	right: 0;
	height: 12px;
	cursor: s-resize;
}

.resizer.l {
	left: -6px;
	top: 0;
	bottom: 0;
	width: 12px;
	cursor: w-resize;
}

.resizer.r {
	right: -6px;
	top: 0;
	bottom: 0;
	width: 12px;
	cursor: e-resize;
}

.resizer.tl {
	top: -6px;
	left: -6px;
	cursor: nw-resize;
}

.resizer.tr {
	top: -6px;
	right: -6px;
	cursor: ne-resize;
}

.resizer.bl {
	bottom: -6px;
	left: -6px;
	cursor: sw-resize;
}

.resizer.br {
	bottom: -6px;
	right: -6px;
	cursor: se-resize;
}

/* Taskbar */
.taskbar {
	height: 48px;
	background: var(--taskbar);
	border-top: 2px solid #cccccc33;
	display: none;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	box-sizing: border-box;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
}

.screen.active#desktop~.taskbar {
	display: flex;
	/* Taskleiste anzeigen, wenn Desktop aktiv ist */
}

.taskbar .task-icon {
	height: 36px;
	min-width: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 6px;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.05);
	color: var(--muted);
	position: relative;
	border-top: 2px solid grey;
	transition: all 0.1s;
}

.taskbar .task-icon.focused {
	box-shadow: 0 6px 18px var(--accent);
	color: var(--accent);
	border-top: 2px solid var(--accent);
}

.taskbar .task-icon .dot {
	position: absolute;
	left: 6px;
	bottom: 4px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: transparent;
}

.taskbar .task-icon.minimized .dot {
	background: var(--muted);
	opacity: 0.6;
}

.taskbar .task-icon.maximized .dot {
	background: var(--accent);
}

body.light-theme .taskbar .task-icon {
	background: rgba(0, 0, 0, 0.04);
	/* Dunklerer Hintergrund für Taskbar-Icons im hellen Modus */
	color: var(--muted);
}

.taskbar-context-menu {
	display: none;
	position: absolute;
	background-color: var(--panel);
	border: 1px solid #ccc;
	border-radius: 5px;
	box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
	min-width: 100px;
	z-index: 10001;
}

.taskbar-context-menu span {
	display: block;
	padding: 8px 12px;
	text-decoration: none;
	color: var(--text);
	cursor: pointer;
}

/* Simple icons */
.app-body {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.4;
}

/* Prevent text selection on double click */
.titlebar,
.icon,
.task-icon {
	-webkit-user-select: none;
	user-select: none;
}

/* Responsive: shrink icons on small widths */
@media (max-width:520px) {
	.icon {
		width: 64px;
		height: 64px;
	}

	.icon .label {
		font-size: 11px;
	}
}

/* Styles für Settings-App: */

body:not(.light-theme) .section {
	background-color: #1e1e1e;
	box-shadow: none;
}

body:not(.light-theme) .sidebar {
	background-color: #1e1e1e;
	border-right: 1px solid #333;
}

body:not(.light-theme) .sidebar-item {
	color: #ccc;
}

body:not(.light-theme) .sidebar-item.active {
	background-color: #2a2a2a;
	color: var(--accent);
}

body:not(.light-theme) .sidebar-item:hover {
	background-color: #2a2a2a;
}

body:not(.light-theme) #baueros-settings-systeminfo-logo-container {
	border: 2px solid color-mix(in srgb, var(--accent) 70%, white);
	background: color-mix(in srgb, var(--accent) 20%, #1e1e1e);
}

/* Profilbereich in Sidebar Darkmode */
body:not(.light-theme) .sidebar-profile {
	border: 2px solid color-mix(in srgb, var(--accent) 70%, white);
	background: color-mix(in srgb, var(--accent) 20%, #1e1e1e);
}

/* Anpassungen für die Platzierung der Sidebar und Content in der Einstellungen-App innerhalb eines Fensters */
.settings-container {
	display: flex;
	width: 100%;
	height: 100%;
	position: relative;
	user-select: none;
}

.sidebar {
	position: fixed;
	left: 0;
	top: 0;
	width: 250px;
	background-color: #ffffff;
	border-right: 1px solid #e0e0e0;
	padding-top: 20px;
	height: 100%;
	overflow-y: auto;
}

.window.focused .sidebar {
	top: 36px;
}

.settings-container .settings-content {
	margin-left: 250px;
	padding: 20px;
	width: calc(100% - 250px);
	height: 100%;
	overflow-y: auto;
	box-sizing: border-box;
}

.sidebar-item {
	padding: 12px 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	position: relative;
	color: #333;
	transition: background-color 0.2s;
}

.sidebar-item:hover {
	background-color: #f0f0f0;
}

.sidebar-item.active {
	color: var(--accent);
	background-color: #f0f0f0;
}

.sidebar-item.active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 4px;
	background-color: var(--accent);
}

.sidebar-item i {
	margin-right: 10px;
	width: 20px;
	text-align: center;
}

h1 {
	margin-top: 0;
	font-size: 24px;
}

.section {
	margin-bottom: 30px;
	background-color: #ffffff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toggle-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.toggle-label {
	font-size: 16px;
}

.toggle {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 20px;
}

.toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	border-radius: 20px;
	transition: 0.2s;
}

.toggle-slider:before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 2px;
	bottom: 2px;
	background-color: white;
	border-radius: 50%;
	transition: 0.2s;
}

input:checked+.toggle-slider {
	background-color: var(--accent);
}

input:checked+.toggle-slider:before {
	transform: translateX(20px);
}

.link {
	color: var(--accent);
	text-decoration: none;
	display: block;
	margin-bottom: 10px;
	font-size: 14px;
	cursor: pointer;
}

.link:hover {
	text-decoration: underline;
}

.content-page {
	display: none;
}

.content-page.active {
	display: block;
}

#baueros-settings-systeminfo-logo-container img {
	width: 50px;
	height: 50px;
	margin-right: 10px;
}

#baueros-settings-systeminfo-logo-container {
	display: flex;
	align-items: center;
	border: 2px solid color-mix(in srgb, var(--accent) 90%, black);
	background: color-mix(in srgb, var(--accent) 10%, white);
	width: fit-content;
	padding: 5px;
	border-radius: 10px;
}

.settings-accent-btn {
	padding: 10px 20px;
	background-color: var(--accent);
	color: #fff;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

.sidebar-profile {
	display: flex;
	align-items: center;
	margin: 0 auto 20px auto;
	border: 2px solid color-mix(in srgb, var(--accent) 90%, black);
	background: color-mix(in srgb, var(--accent) 10%, white);
	width: 85%;
	padding: 5px 10px 5px 5px;
	border-radius: 10px;
}

.sidebar-profile h1 {
	font-size: 2.7em;
	margin: 0;
	width: 1.4em;
}

.sidebar-profile h3 {
	font-size: 1em;
	margin: 0;
}

#resetSettingsButton {
	background-color: #eeeeee;
	padding: 3px;
	border: 1px solid black;
	border-radius: 5px;
	cursor: pointer;
	opacity: 0.35;
	transition: 0.2s all;
}

#resetSettingsButton:hover {
	opacity: 0.5;
}

/*##################[LÖSCHEN NACH TREFFEN:]########################*/
#welcomeOverlay {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 300px;
	height: 150px;
	background: linear-gradient(45deg, #ff1493, #00ffff, #ffff00, #ff4500);
	/* Pink, Cyan, Gelb, Orange für einen Disco-Look */
	z-index: 99998;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	color: black;
	text-align: center;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 0 20px rgba(255, 0, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.6);

	/* Animation hinzufügen */
	animation: partyPulse 3s infinite;
}

/* Keyframes für die Animation */
@keyframes partyPulse {
	0% {
		transform: translate(-50%, -50%) scale(1);
	}

	50% {
		transform: translate(-50%, -50%) scale(1.05);
	}

	100% {
		transform: translate(-50%, -50%) scale(1);
	}
}


#welcomeOverlay h2 {
	margin: 0 0 10px 0;
	font-size: 18px;
}

#welcomeOverlay p {
	margin: 0 0 20px 0;
	font-size: 14px;
}

#welcomeOverlay button {
	padding: 8px 16px;
	font-size: 14px;
	background-color: var(--accent);
	color: white;
	border: none;
	cursor: pointer;
	border-radius: 5px;
}

#welcomeOverlay button:hover {
	background-color: var(--accent-dark);
}

/*###################################################################*/

#startMenuContainer {
	position: relative;
}

.start-menu-panel {
	display: none;
	position: absolute;
	bottom: 26px;
	left: -83px;
	background: var(--panel);
	border-radius: 10px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
	/*og: min-width: 210px;*/
	/*og: height=automatic - did not define any value*/
	z-index: 10001;
	padding: 18px;
	height: 450px;
	width: 350px;
	opacity: 0.95;
}

.start-menu-panel .profile-section {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
}

.recommendedIcons {
	display: flex;
	gap: 10px;
	overflow-x: auto;
}

.recommendedIcon {
	width: 100px;
	height: 80px;
	border-radius: 12px;
	background: var(--bg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
	transition: all 0.2s;
	box-sizing: border-box;
}

.recommendedIcon:hover {
	background: color-mix(in srgb, var(--panel) 95%, black 5%);
}

body:not(.light-theme) .recommendedIcon:hover {
	background: color-mix(in srgb, var(--panel) 95%, white 5%);
}