@import url('https://fonts.googleapis.com/css2?family=Funnel+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

:root{
	--title-font-style: 'Kalam';
	--primary-font-style: 'Funnel Sans';
	--handwriting-font: 'Caveat';
	
	--button-color: #4C00FF;
	--font-color: #999;

	--header-font-size: 20px;
	--body-font-size: 16px;

}

body{
	font-family: var(--primary-font-style);
	margin: 0;
	padding: 0;
	height: 100vh;
}

header{
	font-size: 2.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 18px;
	color: white;
}

h1{
	font-family: var(--title-font-style);
	font-weight: bold;
	position: relative;
	z-index: 4000;
}

header button{
	font-size: 1.7rem;
}

#break {
	background-color: rgba(255, 255, 255, 0.8);
	border: none;
	border-radius: 50%;
	padding: 5px 10px;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	transition: background-color 0.3s, transform 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

#break:hover {
	background-color: rgba(255, 255, 255, 1);
	transform: scale(1.05);
}

#break-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 2000;
}

#break-content {
	background: linear-gradient(to bottom, rgb(255, 214, 149), rgb(186, 226, 254));
	padding: 20px;
	border-radius: 10px;
	max-width: 300px;
	line-height: 30px;
}

#break-content select {
	color: var(--font-color);
	font-weight: 200;
	border: solid 1px #999;
	border-radius: 5px;
	width: 100%;
	padding: 8px;
	margin-top: 4px;
	appearance: auto;
	background-color: white;
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 12px;
	padding-right: 30px;
	font-size: 1rem;
	cursor: pointer;
}

.break-buttons {
	margin-top: 15px;
}

#break-modal.hidden {
	display: none;
}

#close-break{
	background-color: var(--button-color);
	color: white;
	padding: 7px 15px;
	border-radius: 5px;
}

#break-countdown{
	background-color: rgba(0,0,0,0.5);
	border-radius: 30px;
	padding: 20px;
	margin-inline: 35px;
}

/* timer style */
#timerbox {
	text-align: center;
	color: white;
	margin-top: 10px;
	z-index: 10;
	position: relative;
}

#timer-controls button {
	font-size: 1rem;
	font-weight: 500;
	padding: 12px 24px;
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: background-color 0.3s, transform 0.2s;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	margin: 10px;
}

#break-timer{
	font-size: 1.25rem;
	color: white;
	margin-bottom: 10px;
}

#start-timer {
	background-color: var(--button-color);
	color: white;
}

#start-timer:hover {
	background-color: #3a00cc;
	transform: scale(1.05);
  }

#reset-timer {
	background-color: #999;
	color: white;
}

 #reset-timer:hover {
	background-color: #777;
	transform: scale(1.05);
}

/* background image style */
.background-image {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -2;
	overflow: hidden;
}

.background-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}


/*background style based on mood*/
body.cozyjazz{
	background-image: url('assets/images/cozyjazz.jpg');
}

body.rainyday{
	background-image: url('assets/images/rainyday.jpg');
}

body.lofi{
	background-image: url('assets/images/lofi.jpg');
}

body.stressfree{
	background-image: url('assets/images/stressfree.jpg');
}

body.whitenoise{
	background-image: url('assets/images/whitenoise.jpg');
}

.background-image{
	position:fixed;
	top:0;
	left:0;
	width: 100%;
	height: 100%;
	z-index:-2;
	overflow:hidden;
}

.background-image img{
	width: 100%;
	height: 100%;
	object-fit: cover;
}


section{
	padding: 20px;
}

#taskarea{
	display: flex;
	flex-direction: column;
	align-items: center;
}

#tasklist{
	display: flex;
	flex-direction: column;
	gap: 10px;
	list-style: none;
	justify-content: center;
}

#tasklist li{
	background-color: white;
	color: var(--button-color);
	border-radius: 30px;
	padding: 16px 22px;
	min-width: 300px;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	transition: background-color 0.3s, transform 0.2s;
}

/*task list buttons styling*/
.task-item {
	background-color: white;
	color: var(--button-color);
	border-radius: 100px;
	padding: 12px 16px;
	position: relative;
	font-family: var(--primary-font-style);
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);

	transition: all 0.3s ease;
}

.task-item.active {
	background-color: #dfd1ff !important;
	color: white;
	border: 2px solid var(--button-color);
	box-shadow: 0 0 20px var(--button-color);
	animation: pulseGlow 1.5s ease-in-out infinite;
	transform: scale(1.10);
	margin-bottom: 5px;
}

.task-item.active .task-duration{
	font-size: 2rem;
	font-weight: bold;
}

.task-item.active .task-mood{
	font-size: 1rem;
}

@keyframes pulseGlow {
	0% {
		box-shadow: 0 0 8px var(--button-color);
	}
	50% {
		box-shadow: 0 0 20px var(--button-color);
	}
	100% {
		box-shadow: 0 0 8px var(--button-color);
	}
}

.task-duration {
	font-size: 1.5rem;
	font-weight: bold;
	margin-bottom: 2px;
}

.task-mood {
	font-size: 0.95rem;
	color: #444;
}

.task-actions {
	position: absolute;
	top: 26.5px;
	right: 22px;
	display: flex;
	gap: 6px;
}

.delete-btn {
	/* background: var(--button-color); */
	border: 1.5px solid var(--button-color);
	color:white;
	cursor: pointer;
	font-size: 1rem;
	padding: 4px 12px;
	border-radius: 30px;
}

.delete-btn:hover {
	background-color: var(--button-color);
}

#addtask-button{
	display: flex;
	justify-content: center;
	gap: 10px;
	align-items: center;
	margin: 10px auto;
}

#addtask img{
	width: 20px;
	height: 20px;
}

#addtask{
	font-size: 1.2rem;
	font-weight: 600;
	color: white;
	background-color: rgba(0, 0, 0, 0.4);
	padding: 12px 50px;
	min-width: 300px;
	border-radius: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	transition: background-color 0.3s, transform 0.2s;
}

#addtask:hover {
	background-color: rgba(76, 0, 255, 0.7);
	transform: scale(1.05);
}

#inputtask{
	position: fixed;
	top: 0;
	left:0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;

	display:none;
}

#taskform{
	background: linear-gradient(to bottom, rgb(255, 214, 149), rgb(186, 226, 254));
	padding: 20px;
	border-radius: 10px;
	max-width: 300px;
	display: grid;
	gap: 1.5em;
}

#taskform input, #taskform select {
	color: var(--font-color);
	font-weight: 200;
	border: solid 1px #999;
	border-radius: 5px;
	width: 100%;
	padding: 8px;
	margin-top: 4px;
}

#taskform select{
	appearance: auto;
	background-color: white;
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 12px;
	padding-right: 30px;
	border: 1px solid #999;
	border-radius: 5px;
	font-size: 1rem;
	cursor: pointer;
}

.submit-buttons{
	display: flex;
	gap: 10px;
}

#cancel{
	background-color: white;
	color: black;
	padding: 12px 15px;
	border-radius: 5px;
}

#submit{
	background-color: var(--button-color);
	color: white;
	padding: 12px 15px;
	border-radius: 5px;
}

.hidden{
	display:none;
}

/*about page-introducing about the website & buttons*/
#about-page{
	position: fixed;
	top:0;
	left:0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.35);
	color: white;
	z-index: 3000;
	gap: 5px;

	align-items: center;
	padding: 16px;

	color: white;
}

.about-message {
	font-family: var(--primary-font-style);
	font-size: 1rem;
	grid-column: 1/2;
	grid-row: 1;
	position: relative;
	margin-top: 55px;
	text-align: left;
	max-width: 210px;
	padding: 5px;
}

.button-guide{
	display: flex;	
	align-items: flex-start;
}

.guide-box{
	flex: 1;
	font-family: var(--handwriting-font);
	font-size: 1.5rem;
}

#straight-arrow{
	/* height: 200px; */
	height: 20vh;
	margin: 60px 15px 10px 30px;
}

#addtask-guide {
	display: flex;
	flex-direction: column;
	justify-content: center;
	top: 0px;
	left:0;
	/* margin-top: 30px; */
	margin-top: 4vh;
	max-width: 160px;
	text-align: center;
}

#big-arrow{
	/* width: 80px;
	height: 150px;
	margin-left: 110px; */
	rotate: calc(15deg);
	width: 20vw;
	height:20vh;
	margin-left: 30vw;
}

#breaktimer-guide{
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-width: 210px;
	/* margin-top: -35px; */
	margin-top: -6vh;
	/* margin-left:-10px; */
	margin-left: -5vw;
	text-align: center;
}

#start-app{
	position: fixed;
	/* bottom: 80px; */
	bottom: 12vh;
	left: 50%;
	min-width: 230px;
	text-align: center;
	transform: translateX(-50%);
	padding: 14px 28px;
	font-size: 1.2rem;
	font-weight: bold;
	border: none;
	border-radius: 50px;
	background-color: white;
	color: var(--button-color);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	z-index: 5000;
	transition: background-color 0.3s ease, transform 0.2s ease;
}

#start-app:hover{
	background-color: var(--button-color);
	color: white;
	transform: translateX(-50%) scale(1.05);
}



@media (min-width: 768px) {

	/* intro overlay */
	.about-message {
		/* padding-left: 40px; */
		padding-left:5vw;
		font-size: 1.25rem;
		/* max-width: 500px; */
		max-width: 60vw;
	}

	.guide-box{
		font-size: 1.75rem;
	}

	.button-guide{
		min-width: 60vw;
		margin-left: 35vw;
		margin-right: 5vw;
		gap: 15vw;
	}

	#big-arrow{
		width: 20vw;
		height:20vh;
		margin-left: 5vw;
	}
	
	#addtask-guide {
		/* margin-top: 50px; */
		margin-top: 8vh;
	}
	
	#breaktimer-guide{
		/* margin-top: -10px;
		margin-left:-50px; */
		margin-top: -1vh;
		margin-left: -3vw;
	}
	
	header{
		padding: 20px 54px;
	}

	#break-countdown{
		margin-inline: 568px;
	}

	/* background images */
	body.cozyjazz{
		background-image: url('assets/images/cozyjazz-bg.jpg');
	}
	
	body.rainyday{
		background-image: url('assets/images/rainyday-bg.jpg');
	}
	
	body.lofi{
		background-image: url('assets/images/lofi-bg.jpg');
	}
	
	body.stressfree{
		background-image: url('assets/images/stressfree-bg.jpg');
	}
	
	body.whitenoise{
		background-image: url('assets/images/whitenoise-bg.jpg');
	}
}

@media (min-width: 1300px){

	.about-message {
		/* padding-left: 40px; */
		padding-left:2.5vw;
		font-size: 1.25rem;
		/* max-width: 500px; */
		max-width: 40vw;
	}

	.button-guide{
		min-width: 50vw;
		margin-left: 43vw;
		margin-right: 10vw;
		gap: 24vw;
	}
}