:root {
	--bg: #f4f7fa;
	--text: #1a1a1a;
	--card: #ffffff;
	--accent: #3b82f6;

	--pill-bg: rgba(0, 0, 0, 0.05);
	--pill-hover: rgba(0, 0, 0, 0.08);

	--input-bg: #ffffff;
	--input-text: #000;
}

body.dark-mode {
	--bg: #0f0f11;
	--text: #e8e8f0;
	--card: #1e1e1e;
	--accent: #6bb6ff;

	--pill-bg: rgba(255, 255, 255, 0.06);
	--pill-hover: rgba(255, 255, 255, 0.12);

	--input-bg: #2e2e2e;
	--input-text: #fff;
}

body {
	font-family: 'Segoe UI', sans-serif;
	background: var(--bg);
	color: var(--text);
	padding: 30px;
	margin: 0;
	transition: background 0.3s ease, color 0.3s ease;
}

h1,
h3 {
	text-align: center;
	color: var(--accent);
}

.container {
	max-width: 900px;
	margin: 0 auto;
}

.username-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.username-bar input {
	flex: 1;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 8px;
	background: var(--input-bg);
	color: var(--input-text);
}

.toggle-btn {
	position: fixed;
	top: 20px;
	right: 18px;
	background: #444;
	color: #fff;
	padding: 10px 16px;
	border-radius: 8px;
	cursor: pointer;
	z-index: 1000;
}

.guide {
	margin: 20px 0;
	background: var(--card);
	padding: 15px;
	border-radius: 10px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.guide summary {
	cursor: pointer;
	font-weight: bold;
}

.calculator {
	background: var(--card);
	padding: 20px;
	border-radius: 15px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
	margin-bottom: 30px;
}

.row,
.semester {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

input,
select {
	padding: 10px;
	border-radius: 8px;
	border: 1px solid #ccc;
	font-size: 14px;
	background: var(--input-bg);
	color: var(--input-text);
	flex: 1;
}

input.subject-name {
	flex: 2;
}

input.credit,
input.sgpa,
input.total-credit {
	flex: 1;
}

select.grade {
	flex: 1;
}

button {
	padding: 10px 16px;
	font-size: 14px;
	border-radius: 8px;
	border: none;
	background: var(--accent);
	color: white;
	cursor: pointer;
	transition: all 0.25s ease;
}

button:hover {
	filter: brightness(0.9);
}

.delete-btn {
	background: #e74c3c;
}

.delete-btn:hover {
	background: #c0392b;
}

#sgpaResult,
#cgpaResult {
	background: var(--card);
	padding: 15px;
	border-radius: 10px;
	font-size: 16px;
	margin-top: 10px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.credit-wrap {
	display: flex;
	justify-content: center;
	margin-top: 12px;
}

.credit {
	display: inline-flex;
	align-items: center;
	gap: 8px;

	padding: 8px 16px;
	border-radius: 999px;

	background: var(--pill-bg);
	color: var(--accent);

	font-weight: 500;
	text-decoration: none;

	transition: all 0.25s ease;
}

.credit:hover {
	background: var(--pill-hover);
	transform: translateY(-1px);
}

.gh-icon {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

@media (max-width: 768px) {

	.row,
	.semester {
		display: block;
	}

	.row>*,
	.semester>*,
	button {
		width: 100% !important;
		margin-bottom: 10px;
	}

	.toggle-btn {
		width: auto;
	}
}

.guide {
	margin: 20px 0;
	background: var(--card);
	border-radius: 12px;
	padding: 14px 16px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.guide summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	color: var(--accent);
}

.guide-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-top: 12px;
}

.guide-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(0, 0, 0, 0.03);
	padding: 10px;
	border-radius: 10px;
	font-size: 14px;
}

body.dark-mode .guide-item {
	background: rgba(255, 255, 255, 0.05);
}

.guide-item span {
	font-size: 18px;
}

@media (max-width: 600px) {
	.guide-grid {
		grid-template-columns: 1fr;
	}
}

.onboarding {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2000;
}

.onboard-box {
	background: var(--card);
	color: var(--text);
	padding: 24px;
	border-radius: 16px;
	width: 320px;
	text-align: center;
	animation: pop 0.4s ease;
}

@keyframes pop {
	from {
		transform: scale(0.8);
		opacity: 0;
	}

	to {
		transform: scale(1);
		opacity: 1;
	}
}

.onboard-step {
	display: none;
}

.onboard-step.active {
	display: block;
	animation: fade 0.4s ease;
}

@keyframes fade {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.onboard-step h3 {
	margin-bottom: 8px;
	color: var(--accent);
}

.onboard-controls {
	margin-top: 16px;
	display: flex;
	justify-content: space-between;
}

.onboard-controls button {
	padding: 8px 14px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	background: var(--accent);
	color: #fff;
}

.onboard-controls .skip {
	background: #888;
}
