body {
	font-family: 'Comic Sans MS', 'Comic Neue', Arial, sans-serif;
	text-align: center;
	background: linear-gradient(180deg, #fff 0%, #fff7e6 50%, #ffe2c9 100%);
	color: #2d1b12;
	margin: 0;
	padding: 0 10px 30px;
}

[hidden] {
	display: none !important;
}

h1 {
		margin: 40px auto 20px;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    font-family: "Arial", Sans-serif;
    font-size: 4.9rem;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    color: #FF0017;
    line-height: 1;
    margin: 0;
    padding: 0;
		box-sizing: border-box;
    word-wrap: break-word;
}

body p {
	font-size: 1.05rem;
	margin: 0.4rem auto 1rem;
	max-width: 760px;
}

.gallery {
	margin: 0 auto 25px;
	max-width: 760px;
	height: 520px;
	padding: 10px;
	border: 2px dashed #d18b68;
	background: rgba(255, 255, 255, 0.8);
	display: grid;
	place-items: center;
	overflow: hidden;
	touch-action: pan-y;
	user-select: none;
}

.gallery img {
	height: 100%;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	border-radius: 10px;
}

#poll-container {
	margin: 0 auto 30px;
	padding: 24px 22px;
	max-width: 760px;
	background: #fff6f0;
	border: 2px solid #d8a78c;
	border-radius: 16px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

#poll-container p {
	font-size: 1.05rem;
	margin: 0;
}

#poll-container h2 {
	font-size: 1.7rem;
	margin: 0 0 14px;
	color: #9d2e2e;
}

#poll-container img.ahoj-image {
	border: 2px solid #d18b68;
	height: 100px;
	width: 100px;
	border-radius: 50%;
	margin-bottom: 10px;
}

#ahoj-image {
	width: 56px;
	height: auto;
	cursor: pointer;
	transition: transform 0.2s ease;
}

#ahoj-image.animate {
	animation: ahoj-spin-shake 1.6s linear;
}

@keyframes ahoj-spin-shake {
	0% {
		transform: rotate(0deg) translateX(0);
	}
	8% {
		transform: rotate(28deg) translateX(-8px);
	}
	16% {
		transform: rotate(58deg) translateX(8px);
	}
	24% {
		transform: rotate(88deg) translateX(-10px);
	}
	32% {
		transform: rotate(118deg) translateX(10px);
	}
	40% {
		transform: rotate(148deg) translateX(-10px);
	}
	48% {
		transform: rotate(178deg) translateX(10px);
	}
	56% {
		transform: rotate(208deg) translateX(-10px);
	}
	64% {
		transform: rotate(238deg) translateX(10px);
	}
	72% {
		transform: rotate(268deg) translateX(-8px);
	}
	80% {
		transform: rotate(298deg) translateX(8px);
	}
	88% {
		transform: rotate(328deg) translateX(-6px);
	}
	100% {
		transform: rotate(360deg) translateX(0);
	}
}

#poll-idle p,
#poll-voting p,
#poll-result p,
#poll-loading p {
	font-size: 1rem;
	margin: 0 0 12px;
}

#start-form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

#start-form input {
	flex: 1 1 180px;
	min-width: 160px;
	padding: 12px 10px;
	border: 2px solid #d8a78c;
	border-radius: 12px;
	font-size: 1rem;
	outline: none;
}

#start-form input:focus {
	border-color: #c92a2a;
	box-shadow: 0 0 0 4px rgba(201, 42, 42, 0.12);
}

#start-form button,
#voting-names button {
	padding: 12px 20px;
	border: none;
	border-radius: 14px;
	background: #f15b4e;
	color: white;
	font-size: 1rem;
	font-weight: bold;
	cursor: pointer;
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.12);
}

#start-form button:hover,
#voting-names button:hover {
	background: #d83f35;
}

#voting-names {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

#poll-error {
	color: #b12727;
	font-weight: bold;
	margin-bottom: 12px;
}

#share-container {
	margin-top: 16px;
}

#share-link {
	display: inline-block;
	padding: 12px 18px;
	background: #25d366;
	color: white;
	border-radius: 14px;
	text-decoration: none;
	font-weight: bold;
}

#share-link:hover {
	background: #1ebe5e;
}

#poll-result {
	margin-top: 16px;
}

#new-poll-button {
	margin-top: 16px;
	padding: 12px 20px;
	border: none;
	border-radius: 14px;
	background: #f15b4e;
	color: white;
	font-weight: bold;
	cursor: pointer;
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.12);
}

#new-poll-button:hover {
	background: #d83f35;
}

#result-text {
	color: #9d2e2e;
	margin-bottom: 8px;
}

.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.45);
	display: grid;
	place-items: center;
	padding: 20px;
	z-index: 50;
}

.modal-content {
	max-width: 420px;
	width: 70%;
	margin: 0 auto;
	background: #fffdf5;
	border: 3px solid #f5c6b4;
	border-radius: 18px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
	padding: 26px 24px;
	text-align: center;
}

.modal-content h2 {
	margin: 0 0 10px;
	font-size: 1.7rem;
	color: #d44343;
}

.modal-content p {
	margin: 0 0 18px;
	font-size: 1rem;
}

#first-poll-ok {
	padding: 12px 20px;
	border: none;
	border-radius: 14px;
	background: #f15b4e;
	color: white;
	font-weight: bold;
	cursor: pointer;
}

#first-poll-ok:hover {
	background: #d83f35;
}

hr {
	width: 90%;
	max-width: 760px;
	border: none;
	border-top: 2px dashed #d8a78c;
	margin: 30px auto;
}

.modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	display: grid;
	place-items: center;
	padding: 20px;
	z-index: 999;
}

.modal-content {
	max-width: 420px;
	width: 100%;
	background: #fff9f2;
	border: 2px solid #d18b68;
	border-radius: 18px;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
	padding: 24px 22px;
	text-align: center;
}

.modal-content h3 {
	margin: 0 0 12px;
	font-size: 1.8rem;
	color: #c92a2e;
}

.modal-content p {
	margin: 0 0 18px;
	font-size: 1rem;
	color: #3c2320;
}

.modal-content button {
	padding: 12px 24px;
	border: none;
	border-radius: 14px;
	background: #f15b4e;
	color: white;
	font-size: 1rem;
	font-weight: bold;
	cursor: pointer;
}

.modal-content button:hover {
	background: #d83f35;
}

a {
	color: inherit;
}

#footer {
	margin: 0 auto 20px;
	width: min(80vw, 760px);
}

#footer a {
	display: block;
	width: 100%;
}

#footer img {
	width: 100%;
	height: auto;
	max-width: 100%;
	border: 3px solid #fff;
	border-radius: 16px;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

a img {
	border: 3px solid #fff;
	border-radius: 16px;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

@media (max-width: 520px) {
	h1 {
		font-size: 4.2rem;
	}

	#poll-container {
		padding: 18px;
	}

	.gallery {
		height: calc(70vw);
		max-height: calc(70vw);
	}

	#start-form input,
	#start-form button {
		flex: 1 1 100%;
	}
}
