/* Charity: water Brand Colors */

:root {
	/* Primary Colors: */
	--Yellow:     #FFC907;
	--Blue:       #2E9DF7;

	/* Secondary Colors: */
	--Light-Blue: #8BD1CB;
	--Green:      #4FCB53;
	--Orange:     #FF902A;
	--Red:        #F5402C;
	--Dark-Green: #159A48;
	--Pink:       #F16061;

	/* Neutral and utility colors for layout */
	--Ink: #153147;
	--Paper: #ffffff;
	--Paper-Soft: #f6fbff;
	--Border: #d5e6f5;
	--Shadow: 0 12px 30px rgba(21, 49, 71, 0.14);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	padding: 28px 16px 36px;
	color: var(--Ink);
	font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
	background:
		radial-gradient(circle at 12% 12%, rgba(139, 209, 203, 0.45), transparent 35%),
		radial-gradient(circle at 88% 20%, rgba(255, 201, 7, 0.35), transparent 35%),
		linear-gradient(160deg, #eef8ff 0%, #f7fcff 45%, #edf9f4 100%);
}

body > * {
	margin-left: auto;
	margin-right: auto;
}

h1 {
	margin: 0 auto 20px;
	padding: 22px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	border: 2px solid var(--Border);
	border-radius: 18px;
	background: linear-gradient(90deg, var(--Blue), #67b9ff 58%, var(--Light-Blue));
	color: #08253b;
	text-align: center;
	letter-spacing: 0.3px;
	box-shadow: var(--Shadow);
}

.title-logo {
	max-width: min(320px, 88vw);
	width: 100%;
	height: auto;
	display: block;
}

p {
	margin: 12px 0 7px;
	line-height: 1.35;
	font-size: 1rem;
}

p span {
	font-weight: 700;
}

/* Custom Progress Bar Styles */
.custom-progress-bar {
	width: 100%;
	height: 16px;
	border-radius: 999px;
	overflow: hidden;
	background: #eaf3fb;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
	margin-bottom: 12px;
}

.progress-fill {
	height: 100%;
	width: 0%;
	border-radius: 999px;
	transition: width 220ms ease;
	display: block;
}

#distance-progress.progress-fill {
	background: var(--Blue) !important;
}

#water-progress.progress-fill {
	background: var(--Green) !important;
}

#heat-progress.progress-fill {
	background: var(--Orange) !important;
}

#heat-progress.progress-fill.winter-bar {
	background: #7fd8ff !important;
}

button {
	margin: 16px 8px 10px 0;
	padding: 12px 18px;
	border: 0;
	border-radius: 12px;
	color: #083350;
	font-size: 0.97rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
	box-shadow: 0 6px 16px rgba(8, 51, 80, 0.2);
}

label[for="season-select"] {
	display: inline-block;
	margin: 14px 8px 8px 0;
	padding: 6px 10px;
	border-radius: 10px;
	background: rgba(139, 209, 203, 0.28);
	color: #0d4668;
	font-weight: 700;
	font-size: 0.95rem;
}

#season-select {
	min-width: 220px;
	margin: 6px 10px 12px 0;
	padding: 11px 44px 11px 14px;
	border: 2px solid var(--Border);
	border-radius: 12px;
	background-color: var(--Paper);
	background-image:
		linear-gradient(135deg, transparent 50%, #0f4b70 50%),
		linear-gradient(45deg, #0f4b70 50%, transparent 50%),
		linear-gradient(135deg, #f3faff, #e9f5ff);
	background-position:
		calc(100% - 20px) calc(50% - 2px),
		calc(100% - 14px) calc(50% - 2px),
		0 0;
	background-size: 7px 7px, 7px 7px, 100% 100%;
	background-repeat: no-repeat;
	color: #0d4668;
	font-size: 0.97rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 5px 14px rgba(21, 49, 71, 0.12);
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	transition: border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

#season-select:hover {
	border-color: #9ac7eb;
	transform: translateY(-1px);
}

#season-select:focus {
	outline: none;
	border-color: var(--Blue);
	box-shadow: 0 0 0 3px rgba(46, 157, 247, 0.22), 0 6px 18px rgba(21, 49, 71, 0.16);
}

#season-select option {
	color: #0d4668;
	font-weight: 600;
}

button:hover {
	transform: translateY(-1px);
	filter: brightness(1.02);
}

button:active {
	transform: translateY(0);
}

button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

#walk-button {
	background: linear-gradient(135deg, var(--Yellow), #ffd84a);
}

#run-button {
	background: linear-gradient(135deg, var(--Orange), var(--Pink));
	color: #3f1205;
}

#reset-button {
	background: linear-gradient(135deg, var(--Light-Blue), var(--Blue));
}

#restart-button {
	background: linear-gradient(135deg, var(--Light-Blue), var(--Blue));
}

div {
	margin-top: 14px;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid var(--Border);
	background: var(--Paper);
	box-shadow: 0 6px 18px rgba(21, 49, 71, 0.08);
}

/* Exclude progress bars and overlay effects from generic div styling */
.custom-progress-bar,
.progress-fill,
.rain-layer,
.snow-overlay {
	margin-top: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	box-shadow: none !important;
}

/* Exclude heat, frost, and water loss overlays from margin/padding/border but keep their background colors */
.heat-overlay,
.frost-overlay,
.water-loss-overlay {
	margin-top: 0 !important;
	padding: 0 !important;
	border: none !important;
	box-shadow: none !important;
}

h3 {
	margin: 0 0 6px;
	color: #0e3f5e;
}

#message {
	color: #104665;
}

#result {
	font-weight: 700;
	color: #0f3855;
}

#leaderboard-list {
	margin: 0;
	padding-left: 22px;
}

#leaderboard-list li {
	margin: 4px 0;
}

.site-footer {
	margin-top: 20px;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid var(--Border);
	background: linear-gradient(145deg, #f8fcff, #eef8ff);
	box-shadow: 0 6px 18px rgba(21, 49, 71, 0.08);
}

.site-footer p {
	margin: 0 0 8px;
	font-weight: 700;
	color: #0f3855;
}

.site-footer .footer-copy {
	margin-top: 10px;
	margin-bottom: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: #2d5a78;
}

.social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 999px;
	border: 1px solid #cfe2f2;
	background: #ffffff;
	color: #0d5a87;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 3px 10px rgba(21, 49, 71, 0.09);
	transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1;
	color: #ffffff;
}

.social-link:hover,
.social-link:focus {
	transform: translateY(-1px);
	box-shadow: 0 5px 14px rgba(21, 49, 71, 0.13);
	border-color: #a8cdeb;
}

.twitter-link .social-icon {
	background: #111111;
}

.facebook-link .social-icon {
	background: #1877f2;
}

.instagram-link .social-icon {
	background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.snapchat-link .social-icon {
	background: #ffcc00;
	color: #121212;
}

.youtube-link .social-icon {
	background: #ff0000;
}

.linkedin-link .social-icon {
	background: #0a66c2;
}

.donate-link {
	display: inline-block;
	margin-top: 12px;
	padding: 10px 16px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--Yellow), #ffd84a);
	color: #083350;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(8, 51, 80, 0.2);
	transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.donate-link:hover,
.donate-link:focus {
	transform: translateY(-1px);
	filter: brightness(1.02);
}

.confetti-layer {
	position: fixed;
	width: 100%;
	top: 0;
	left: 0;
	pointer-events: none;
	height: 100vh;
	z-index: 9999;
  overflow: hidden;
  background: transparent !important;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.confetti-piece {
	position: absolute;
	width: 10px;
	height: 14px;
	border-radius: 2px;
	opacity: 0.95;
	animation-name: confetti-fall;
	animation-timing-function: linear;
	animation-fill-mode: forwards;
}

@keyframes confetti-fall {
	0% {
		transform: translateY(0) rotate(0deg);
		opacity: 1;
	}
	100% {
		transform: translateY(100vh) rotate(720deg);
		opacity: 0;
	}
}

.heat-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(245, 64, 44, 0.35);
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
	pointer-events: none;
	z-index: 8;
	animation: heat-pulse 0.6s ease-in-out;
}

.water-loss-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.4);
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	pointer-events: none;
	z-index: 8;
	animation: heat-pulse 0.6s ease-in-out;
}

.frost-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(46, 157, 247, 0.35);
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
	pointer-events: none;
	z-index: 8;
	animation: heat-pulse 0.6s ease-in-out;
}

.rain-layer {
	position: fixed;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 7;
}

.rain-drop {
	position: absolute;
	top: -20px;
	width: 2px;
	height: 18px;
	border-radius: 999px;
	background: linear-gradient(to bottom, rgba(139, 209, 203, 0.2), rgba(46, 157, 247, 0.95));
	animation-name: rain-fall;
	animation-timing-function: linear;
	animation-fill-mode: forwards;
}

@keyframes rain-fall {
	0% {
		transform: translateY(-20px) translateX(0);
		opacity: 0;
	}
	15% {
		opacity: 0.95;
	}
	100% {
		transform: translateY(110vh) translateX(-14px);
		opacity: 0;
	}
}

@keyframes heat-pulse {
	0% {
		opacity: 0;
	}
	50% {
		opacity: 0.4;
	}
	100% {
		opacity: 0.35;
	}
}

.snow-overlay {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 7;
	overflow: hidden;
}

.snowflake {
	position: absolute;
	top: -40px;
	width: 30px;
	height: 30px;
	color: white;
	font-size: 20px;
	text-align: center;
	line-height: 1.5;
	opacity: 0.8;
	animation-name: snow-fall;
	animation-timing-function: linear;
	animation-fill-mode: forwards;
}

@keyframes snow-fall {
	0% {
		transform: translateY(0);
		opacity: 1;
	}
	100% {
		transform: translateY(100vh);
		opacity: 0;
	}
}

@media (max-width: 680px) {
	body {
		padding: 18px 12px 26px;
	}

	h1 {
		font-size: 1.6rem;
		padding: 18px 14px;
	}

	button {
		width: 100%;
		margin-right: 0;
	}

	label[for="season-select"] {
		display: block;
		width: fit-content;
	}

	#season-select {
		width: 100%;
		min-width: 0;
		margin-right: 0;
	}

	.site-footer {
		padding: 12px 14px;
	}

	.social-links {
		gap: 8px;
	}

	.social-link {
		width: 100%;
		justify-content: flex-start;
	}

	.donate-link {
		display: block;
		width: 100%;
		text-align: center;
	}
}

.item {
	position: absolute;
	font-size: 20px;
	cursor: pointer;
	z-index: 1000;
	transition: transform 0.2s;
}

.item:hover {
	transform: scale(1.2);
}

/* Seasonal colors */
.fall-item {
	color: var(--Blue);
}

.spring-item {
	color: var(--Light-Blue);
}

.winter-item {
	color: #7fd8ff;
}

.summer-item {
	color: var(--Yellow);
}

.donation-item {
	color: var(--Green);
}

.popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 2000;
}

.popup-box {
	background: white;
	padding: 20px;
	border-radius: 12px;
	width: 500px;
	text-align: left;
	box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.popup-box h2 {
	margin-top: 0;
}

.popup-content {
	margin: 10px 0;
}

.close-popup {
	margin-top: 10px;
	padding: 8px 12px;
	cursor: pointer;
}