/* Grundlayout und Schrift */
@font-face {
	font-family: 'Inter';
	src: url('/webfonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
	font-weight: 100 900; 
	font-display: swap;
}

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	width: 100%;
	background-color: #fdfdfd;
	font-family: "Inter", sans-serif;
	font-optical-sizing: auto;
	font-size: 22px;
	font-weight: 400;
	font-style: normal;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	text-align: center;
	overflow: hidden;
	position: relative;
	z-index: 0;
	overflow-wrap: break-word;
	word-wrap: break-word;
	white-space: normal;
}

a, a:visited, a:link, a:active{
	color: #000;
}

#background-fade {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -100;
	pointer-events: none;
	background: linear-gradient(to bottom, #fdfdfd, #fcd5ce);
	opacity: .2;
	transition: background 0.8s ease, opacity 0.8s ease;
}


/* Überschrift */
h1 {
	position: fixed;
	top: 2rem;
	width: 100%;
	font-size: 24px;
	line-height: 24px;
	font-weight: 600;
	margin: 0;
}

h1 span {
	margin-left: 8px;
	cursor: pointer;
	transition: opacity 0.2s ease;
	vertical-align: bottom;
}

h1 span:hover {
	opacity: .5;
}

/* Satzbereich */
#satz {
	font-size: 40px;
	padding: 0 25px;
	width: 100%;
	opacity: 0;
	transform: translateY(2px);
	transition: opacity 0.4s ease, transform 0.4s ease;
	box-sizing: border-box;
}

/* Info & Timer */
#info-container {
	position: fixed;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
}

#info, #start-timer {
	padding: 10px 15px;
	background-color: rgba(255,255,255,.1);
	box-shadow: 0 10px 25px rgba(0,0,0,.1);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
}

#info {
	cursor: default;
	line-height: 35px;
}

#start-timer {
	border: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
	height: 55px;
	background-color: rgba(255,255,255,.75);
}

#start-timer:hover {
	opacity: 0.6;
}

#start-timer svg {
	width: 30px;
	height: 30px;
	stroke: rgba(0, 0, 0, 0.4);
}

/* Overlay */
#overlay {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: rgba(218, 238, 243, 0.2);
	backdrop-filter: blur(30px);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

#overlay.visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

#overlay-content {
	background: #fff;
	color: #222;
	max-width: 600px;
	margin: 25px;
	padding: 50px 40px;
	border-radius: 10px;
	box-shadow: 0 2px 50px rgba(0,0,0,0.1);
}

#overlay-content h2 {
	margin-top: 0 !important;
	font-size: 1.3rem;
	font-weight: 600;
}

#overlay-content p {
	line-height: 1.6;
	padding: 5px 0 15px 0;
	hyphens: auto;
}

#overlay-content a {
	padding: 15px 22px;
	font-size: 1rem;
	font-weight: 400;
	border: none;
	border-radius: 10px;
	background-color: #fcd5ce;
	color: #000;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

#overlay-content a:hover {
	opacity: .6;
}

#close-overlay-x {
	position: absolute;
	top: 10px;
	right: 15px;
	background: rgba(0,0,0,0);
	border: none;
	font-size: 32px;
	line-height: 1;
	color: rgba(0,0,0,.6);
	cursor: pointer;
	z-index: 10000000001;
}

#close-overlay-x:hover {
	color: rgba(0,0,0,.8);
}


#impressum-link {
	font-size: 14px;
	text-align: center;
	cursor: pointer;
	color: rgba(0,0,0,.4);
	text-decoration: none;
}

#impressum-overlay {
	position: fixed;
	inset: 0;
	background: rgba(255,255,255,.1);
	backdrop-filter: blur(30px);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 2000;
}

#impressum-content {
	width: 100%;
	max-width: 600px;
	padding: 25px;
	font-weight: 400;
	border: none;
	border-radius: 10px;
	position: relative;
	background: #fff;
	box-shadow: 0 2px 50px rgba(0,0,0,0.1);
}

#close-impressum {
	position: absolute;
	top: 15px;
	right: 20px;
	font-size: 24px;
	cursor: pointer;
}



/* Timer Overlay */
#timer-overlay {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.4s ease;
	position: fixed;
	inset: 0;
	justify-content: center;
	align-items: center;
	background: rgba(252, 213, 206, 0.1);
	backdrop-filter: blur(25px);
	z-index: 2000;
	display: flex;
}

#timer-overlay.visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.timer-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 20px;
}

.timer-svg {
	width: 300px;
	height: 300px;
}

.timer-bg {
	fill: none;
	stroke: rgba(255,255,255,.1);
	stroke-width: 6;
}

.timer-progress {
	fill: none;
	stroke: #121212;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 283;
	stroke-dashoffset: 0;
	transform: rotate(-90deg);
	transform-origin: 50% 50%;
	transition: stroke-dashoffset 1s linear;
}

.timer-time {
	fill: #121212;
	font-size: 18px;
	font-weight: 500;
	vertical-align: middle;
}

.timer-check {
	stroke: #579b5a;
	width: 48px;
	height: 48px;
	display: block;
	margin: 0 auto;
	transition: opacity 0.3s ease;
}

.timer-sentence-text {
	color: #121212;
	font-size: 24px;
	line-height: 1.5;
	padding: 0 25px;
}

.timer-checkmark {
	margin-top: -20px;
}

/* Responsive */
@media (max-width: 600px) {
	html, body {
		font-size: 18px;
	}
}

@media (max-width: 400px) {
	html, body {
		font-size: 16px;
	}
}



@media (prefers-color-scheme: dark) {
	html, body {
		background-color: #111;
		color: #eee;
	}
	
	a, a:visited, a:link, a:active{
		color: #eee;
	}

	#background-fade {
		background: linear-gradient(to bottom, #121212, #fcd5ce);
	}

	h1 {
		color: #ddd;
	}

	#satz {
		color: #eee;
	}

	#info{
		color: rgba(255,255,255,.8);
		background-color: rgba(0,0,0,.1);
	}
	
	#start-timer {
		background-color: rgba(0,0,0,.4);
	}

	#start-timer svg {
		stroke: rgba(255,255,255,.8);
	}

	#overlay-content {
		background: #222;
		color: #f2f2f2;
	}

	#overlay-content a {
		background-color: rgba(255,255,255,.8);
	}

	#overlay-content a:hover {
		background-color: rgba(255,255,255,.25);
	}

	#timer-overlay {
		background: rgba(0,0,0,.6) !important;
	}

	.timer-bg {
		stroke: rgba(255,255,255,.1);
	}

	.timer-progress {
		stroke: white;
	}

	.timer-time,
	.timer-sentence-text {
		color: white;
		fill: white;
	}

	#close-overlay-x {
		color: rgba(255,255,255,.6);
	}

	#close-overlay-x:hover {
		color: rgba(255,255,255,.8);
	}
	
	#impressum-content {
		background: #1e1e1e;
		color: #f0f0f0;
	}
	
	#impressum-link {
		color: #ccc;
	}
}