:root {
	--accent-1: 55, 134, 149;
	--accent-2: 255, 205, 113;
	--accent-3: 156, 186, 180;
    --ring: rgb(var(--accent-2));
	--text-color: #fff;
	--text-color-on-background: #000;
	--mouse-x: 50%;
	--mouse-y: 50%;
	--shadow-1: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);
	--shadow-2: 0 4px 5px 0 rgba(0,0,0,0.14),0 1px 10px 0 rgba(0,0,0,0.12),0 2px 4px -1px rgba(0,0,0,0.3);
	--shadow-3: 0 8px 17px 2px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12),0 5px 5px -3px rgba(0,0,0,0.2);
}

*,
*:before,
*:after {
	box-sizing: border-box;
}

body {
	background-position: top left;
	background-size: cover;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    letter-spacing: -0.011rem;
    line-height: 1.6;
    margin: 0 auto;
    min-height: 100dvh;
}

p {
	font-size: 16px;
	line-height: 1.2;
	margin-bottom: 1em;
}

h1 {
	font-size: 86px;
	line-height: .9;
	margin-bottom: 0.5em;
	font-weight: bold;
}

h2 {
	font-size: 28px;
	font-weight: bold;
	line-height: 1.25;
	margin-bottom: 0.5em;
}

h3 {
	font-size: 20px;
	line-height: 1.3;
	margin-bottom: 0.5em;
	font-weight: bold;
}

h4 {
	font-size: 18px;
	line-height: 1.35;
	margin-bottom: 0.5em;
	font-weight: bold;
}

h5 {
	font-size: 16px;
	line-height: 1.4;
	margin-bottom: 0.5em;
	font-weight: bold;
}

h6 {
	font-size: 14px;
	line-height: 1.45;
	margin-bottom: 0.5em;
	font-weight: bold;
}

ul, ol {
	font-size: 16px;
	line-height: 1.5;
	margin-bottom: 1em;
}

ul {
	list-style: disc;
	margin-left: 1.5em;
}

ol {
	list-style: decimal;
	margin-left: 1.5em;
}

li {
	line-height: 1.2;
	margin-bottom: 0;
}

button {
	border-radius: 8px;
	border: 3px solid transparent;
	box-shadow: var(--shadow-2);
	color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
	overflow: hidden;
    padding: 10px 18px;
	position: relative;
    transition: all 0.2s;
	transform-origin: 50% 50%;

	&:before {
		background: radial-gradient(circle, rgba(var(--accent-3), 0.2) 0%, rgba(var(--accent-3), 0) 60%);
		content: "";
		left: 0;
		height: 150px;
		opacity: 0;
		pointer-events: none;
		position: absolute;
		top: 0;
		transform: translate(calc(var(--mouse-x) - 75px), calc(var(--mouse-y) - 75px));
		transform-origin: 50% 50%;
		transition: opacity .3s ease-in-out, transform .2s linear;
		width: 150px;
	}

	&:disabled {
		cursor: default;
		opacity: .1;
	}

	&:focus {
		outline: 2px solid rgb(var(--accent-2));
	}

	&.primary {
		background-color: rgb(var(--accent-1));
	}

	&.secondary {
		background-color: transparent;
		border-color: rgb(var(--accent-1));
	}

	&.tertiary {
		background-color: rgb(var(--accent-2));
		color: #000;

		&:before {
			background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 60%);
		}
	}

	&:not(:disabled):hover {
		box-shadow: var(--shadow-3); 
		transform: scale(1.02);

		&:before {
			opacity: 1;
		}
	}
}

nav {
	bottom: 30px;
	height: 42px;
	position: absolute;
	right: 30px;

	button {
		position: absolute;
		right: 0;
		top: 0;
		white-space: nowrap;
	}
}

textarea {
	background-color: rgba(255, 255, 255, .7);
	border-radius: 8px;
	border: 2px dashed rgb(var(--accent-1));
	box-shadow: var(--shadow-1); 
    font-family: inherit;
    font-size: 16px;
    height: 120px;
    margin-bottom: 1em;
	overflow: hidden;
    padding: 1em;
	position: relative;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s;
	vertical-align: top;
    width: 100%;

	&:disabled {
		background-color: #fff;
		border-radius: 8px 0 8px 8px;
		border: none;
		color: #000;
		opacity: 1;
		pointer-events: none;
	}
}

textarea:focus {
    outline: 2px solid rgb(var(--accent-2));
}

/* Content Styles */
.box {
	background-color: rgb(var(--accent-3), 80%);
	border-radius: 20px;
	color: var(--text-color-on-background);
	padding: 1em;
	width: 100%;

	&.coach {
		background-color: rgb(var(--accent-2));
		border-radius: 8px; 
		box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);
		color: #000;

		& > p:last-child {
			margin-bottom: 0;
		}
	}
}

.card {
	align-items: flex-start;
	color: var(--text-color);
	display: flex;
	flex-direction: column;
	transition: all .3s ease;
	width: 100%;
	max-width: 480px;
}

.content {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin: 10vh auto auto;
	max-width: 1200px;
	padding: 0 30px 80px;
	position: relative;
	width: 100%;
}

.foreground {
	background-position: 35% 0;
	background-size: cover;
	min-height: 100dvh;
	position: relative;
	transition: all .5s ease;

	&:before {
		background: linear-gradient(to right, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
		content: '';
		height: 100%;
		left: 0;
		position: absolute;
		top: 0;
		transition: all .3s ease;
		width: 64%;
	}
}

.hidden {
	opacity: 0;
	pointer-events: none;
}

.popup-background.hidden .popup {
	transform: scale(0.8);
}

.popup-background {
	background-color: rgba(0, 0, 0, .6);
	backdrop-filter: blur(10px);
	align-items: center;
	display: flex;
	justify-content: center;
	height: 100%;
	left: 0;
	position: fixed;
	top: 0;
	transition: opacity .3s ease;
	width: 100%;
	z-index: 1;
}

.popup {
	color: #fff;
	display: flex;
	gap: 8px;
	flex-direction: column;
	padding: 1em;
	transform: scale(1);
	transform-origin: center;
	transition: transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity .3s ease;
}

.remove {
	display: none;
	height: 0;
	width: 0;
}

#resources-btn {
	position: fixed;
	right: 30px;
	top: 30px;
}

.response {
	background-color: #fff;
	border-radius: 0 8px 8px 8px;
	box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);
	color: #000;
    padding: 1em;
	transition: opacity .3s ease;
	transform: translateX(-40px);
    white-space: pre-wrap;
	width: 100%;
	margin-bottom: 1em;
	position: relative;

	&:before {
		border-color: transparent #fff transparent transparent;
		border-style: solid;
		border-width: 0 30px 20px 0;
		content: '';
		height: 0px;
        left: 0;
		position: absolute;
        top: 0;
        transform: translateX(-30px);
		width: 0px;
	}

	& > p:last-child {
		margin-bottom: 0;
	}
}

.tabs {
	display: flex;
	gap: 8px;
}

.tab-btn {
	color: #000;
	opacity: 1 !important;

	& > * {
		&:last-child {
			font-weight: normal;
		}
	}

	&:nth-child(1),
	&:nth-child(2) {
		background-color: #d9d9d9;
		color: rgba(0, 0, 0, .6);
	}

	&:nth-child(3) {
		background-color: rgb(var(--accent-3));
		border-radius: 8px 8px 0 0;
		overflow: visible;

		&:after {
			background-color: rgb(var(--accent-3));
			content: '';
			height: 16px;
			left: -3px;
			position: absolute;
			top: 100%;
			width: calc(100% + 6px);
		}
	}

	&:nth-child(4),
	&:nth-child(5) {
		background-color: rgb(var(--accent-1));
	}
}

.tab-column {
	background-color: rgb(var(--accent-1));
	border-radius: 8px;
	color: #fff;
	display: flex;
	flex-direction: column;
	padding: 1em;
	width: 100%;
}

.tab-columns {
	display: flex;
	gap: 16px;
}

.tab-content {
	background-color: rgb(var(--accent-3));
	border-radius: 8px;
	color: #000;
	padding: 1em;
}

.tab-tip {
	background-color: rgb(var(--accent-2));
	border-radius: 8px;
	color: rgba(0, 0, 0, .8);
	font-weight: bold;
	margin-top: auto;
	padding: 1em;
}

.textarea-wrapper {
	position: relative;
	width: 100%;

	&:has(*:disabled) {
		&:before {
			border-color: #fff transparent transparent transparent;
			border-style: solid;
			border-width: 20px 30px 0 0;
			content: '';
			height: 0px;
			position: absolute;
			right: 0;
			top: 0;
			transform: translateX(30px);
			width: 0px;
			z-index: 1;
		}
	}
}

body:not(.next) {
	.card:first-child {
		opacity: 1;
	}
	.card:nth-child(2) {
		opacity: 0;
	}
	nav button:first-child {
		opacity: 0;
		pointer-events: none;
	}
	nav button:last-child {
		opacity: 1;
	}
}

body.next {
	background-position: top right;

	.foreground {
		background-position: 80% 0;

		&:before {
			background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
			left: auto;
			right: 0;
		}
	}
	.card:first-child {
		opacity: 0;
	}
	.card:nth-child(2) {
		opacity: 1;
	}
	nav button:first-child {
		opacity: 1;
	}
	nav button:last-child {
		opacity: 0;
		pointer-events: none;
	}
}

/* Completion Debug Section */
#completion-debug {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
}

.debug-btn {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: normal;
    box-shadow: none;
}

.debug-btn:hover {
    background-color: #444;
    transform: none;
    box-shadow: none;
}

#complete-result {
    background-color: #222;
    color: #eee;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
    word-break: break-all;
}

/* Mobile styles */
@media (max-width: 767px) {
	h1 {
		font-size: 56px;
	}
	
	.content {
		flex-direction: column;
		gap: 3rem;
		margin-top: 5vh;
		padding: 0 15px 60px;
	}
	
	nav {
		display: none;
	}
	
	#resources-btn {
		right: 15px;
		top: 15px;
	}
	
	.foreground:before {
		width: 100%;
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
	}
	
	body.next .foreground:before {
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
	}
	
	/* Show both cards on mobile */
	body:not(.next) .card:nth-child(2),
	body.next .card:first-child {
		opacity: 1;
	}
	
	.card[inert] {
		display: block !important;
		inset: auto !important;
		opacity: 1 !important;
		pointer-events: auto !important;
	}
	
	.card {
		max-width: 100%;
	}

	.response {
		margin-left: 30px;
		transform: none;
		width: calc(100% - 30px);
	}

	.textarea-wrapper {
		&:has(*:disabled) {
			width: calc(100% - 30px);
		}
	}
}
