/**
 * Grade Calculator – Scoped Styles
 *
 * All selectors are prefixed with .gc- to avoid conflicts with
 * the active WordPress theme.
 *
 * @package GradeCalculator
 * @version 1.0.0
 */

/* ===== Wrapper ===== */
.gc-wrap {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	color: #333;
	line-height: 1.6;
	padding: 20px 0;
}

.gc-container {
	max-width: 900px;
	margin: 0 auto;
	background: rgba(255, 255, 255, 0.97);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	padding: 40px;
	border-radius: 20px;
	box-shadow:
		0 20px 60px rgba(0, 0, 0, 0.15),
		0 0 0 1px rgba(255, 255, 255, 0.5) inset;
	animation: gc-slideUp 0.6s ease-out;
}

@keyframes gc-slideUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ===== Title ===== */
.gc-title {
	font-size: 2.4em;
	margin-bottom: 10px;
	text-align: center;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-weight: 800;
	letter-spacing: -1px;
}

.gc-subtitle {
	text-align: center;
	color: #555;
	margin-bottom: 28px;
	font-size: 1em;
	font-weight: 500;
}

/* ===== Navigation Buttons ===== */
.gc-nav-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 32px;
	justify-content: center;
}

.gc-nav-btn {
	flex: 1 1 120px;
	min-width: 0;
	padding: 13px 10px;
	background: linear-gradient(160deg, #7b8ff5 0%, #7c5cbf 100%);
	color: #fff;
	border: none;
	border-radius: 14px;
	cursor: pointer;
	font-size: 0.88em;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.3;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow:
		0 4px 18px rgba(102, 126, 234, 0.35),
		0 1px 4px rgba(0, 0, 0, 0.18),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	position: relative;
	overflow: hidden;
	text-align: center;
	word-break: normal;
	white-space: normal;
}

.gc-nav-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	transition: left 0.45s;
}

.gc-nav-btn:hover::before {
	left: 100%;
}

.gc-nav-btn:hover {
	transform: translateY(-2px);
	box-shadow:
		0 8px 24px rgba(102, 126, 234, 0.5),
		0 3px 8px rgba(0, 0, 0, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.gc-nav-btn:active {
	transform: translateY(0);
	box-shadow:
		0 2px 8px rgba(102, 126, 234, 0.4),
		inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.gc-nav-btn.gc-active {
	background: linear-gradient(160deg, #5a4a9e 0%, #6b52c0 60%, #7c6bd4 100%);
	box-shadow:
		0 6px 20px rgba(90, 74, 158, 0.55),
		inset 0 2px 8px rgba(0, 0, 0, 0.25),
		inset 0 -1px 0 rgba(255, 255, 255, 0.1);
	transform: translateY(1px);
}

/* ===== Calculator Sections ===== */
.gc-section {
	animation: gc-fadeIn 0.5s ease-in;
}

@keyframes gc-fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ===== General Tabs ===== */
.gc-tabs {
	display: flex;
	gap: 5px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.gc-tab {
	padding: 12px 24px;
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
	border: none;
	border-radius: 12px 12px 0 0;
	cursor: pointer;
	font-size: 0.95em;
	font-weight: 600;
	transition: all 0.3s ease;
	color: #4a5568;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gc-tab:hover {
	background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
	transform: translateY(-2px);
}

.gc-tab.gc-active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.2);
}

.gc-tab-content {
	display: none;
}

.gc-tab-content.gc-active {
	display: block;
}

/* ===== Input Groups ===== */
.gc-input-group {
	margin-bottom: 20px;
}

.gc-input-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #2d3748;
}

.gc-input-group input,
.gc-input-group select {
	width: 100%;
	padding: 14px 16px;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	font-size: 1em;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
	color: #2d3748;
}

.gc-input-group input:focus,
.gc-input-group select:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 15px rgba(102, 126, 234, 0.2);
	transform: translateY(-1px);
}

.gc-input-inline {
	display: flex;
	align-items: center;
	gap: 10px;
}

.gc-input-inline input {
	width: 150px;
}

.gc-input-inline span {
	font-size: 1.3em;
	color: #667eea;
	font-weight: 600;
}

/* ===== Easy Grader ===== */
.gc-easy-input-row {
	display: flex;
	gap: 24px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.gc-easy-input-group {
	flex: 1;
	min-width: 180px;
}

.gc-easy-input-group label {
	display: block;
	font-weight: 700;
	color: #2d3748;
	margin-bottom: 8px;
	font-size: 0.95em;
}

.gc-easy-input-group input {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 1em;
	background: #fff;
	transition: all 0.3s ease;
	color: #2d3748;
}

.gc-easy-input-group input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== Grade Table ===== */
.gc-grade-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.gc-grade-table th,
.gc-grade-table td {
	padding: 12px;
	text-align: left;
	border: 1px solid #e2e8f0;
}

.gc-grade-table th {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	font-weight: 700;
	text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.gc-grade-table td input,
.gc-grade-table td select {
	width: 100%;
	padding: 10px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.9);
	font-size: 1em;
	font-family: inherit;
	color: #2d3748;
	cursor: pointer;
}

.gc-grade-table td input:focus,
.gc-grade-table td select:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gc-grade-table tr:nth-child(even) {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.gc-grade-table tr:hover {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	transition: all 0.2s ease;
}

/* ===== Buttons ===== */
.gc-btn {
	padding: 14px 28px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	font-size: 1em;
	font-weight: 600;
	margin-right: 10px;
	margin-bottom: 10px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 2px 5px rgba(0, 0, 0, 0.2);
	position: relative;
	overflow: hidden;
}

.gc-btn::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
}

.gc-btn:hover::before {
	width: 300px;
	height: 300px;
}

.gc-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.gc-btn:active {
	transform: translateY(-1px);
}

.gc-btn-secondary {
	background: linear-gradient(135deg, #64748b 0%, #475569 100%);
	box-shadow: 0 4px 15px rgba(100, 116, 139, 0.5), 0 2px 5px rgba(0, 0, 0, 0.2);
}

.gc-btn-secondary:hover {
	background: linear-gradient(135deg, #475569 0%, #334155 100%);
	box-shadow: 0 8px 25px rgba(71, 85, 105, 0.55), 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Reset button in Final section keeps the primary color */
.gc-btn-reset-final {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

/* ===== Result Section ===== */
.gc-result-section {
	margin-top: 30px;
	padding: 25px;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	border-radius: 16px;
	border: 2px solid rgba(102, 126, 234, 0.2);
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.gc-result-section h3 {
	margin-bottom: 15px;
	color: #667eea;
	font-weight: 700;
	font-size: 1.3em;
}

.gc-result-box {
	padding: 25px;
	border: 2px solid rgba(102, 126, 234, 0.3);
	border-radius: 16px;
	font-size: 1.8em;
	font-weight: 800;
	text-align: center;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 15px;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2), inset 0 2px 5px rgba(255, 255, 255, 0.1);
	position: relative;
	overflow: hidden;
}

.gc-result-box::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.92);
	z-index: -1;
	border-radius: 16px;
}

/* ===== Checkbox Group ===== */
.gc-checkbox-group {
	margin: 20px 0;
}

.gc-checkbox-group label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	margin-bottom: 10px;
	color: #2d3748;
}

.gc-checkbox-group input[type="checkbox"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
	accent-color: #667eea;
}

/* ===== Grading Chart ===== */
.gc-grading-chart {
	margin-top: 20px;
}

.gc-grading-chart h3 {
	margin-bottom: 15px;
	color: #c53030;
	font-weight: 700;
	font-size: 1.3em;
}

.gc-chart-table {
	width: 100%;
	border-collapse: collapse;
}

.gc-chart-table th {
	background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
	color: #fff;
	padding: 14px;
	text-align: center;
	font-weight: 700;
}

.gc-chart-table td {
	padding: 14px;
	text-align: center;
	border: 1px solid rgba(197, 48, 48, 0.2);
	font-weight: 600;
}

.gc-chart-table tr:nth-child(even) {
	background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
}

.gc-chart-table tr:nth-child(odd) {
	background: linear-gradient(135deg, #feb2b2 0%, #fc8181 100%);
}

/* ===== Additional Grade ===== */
.gc-additional-grade {
	margin-top: 20px;
	padding: 20px;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	border-radius: 12px;
	border: 2px solid rgba(102, 126, 234, 0.2);
	color: #2d3748;
}

.gc-additional-grade input {
	width: 100px;
	margin: 0 6px;
	padding: 8px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	transition: all 0.3s ease;
	color: #2d3748;
}

.gc-additional-grade input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== Drudo Theme (Grade Calculator Section) ===== */
.gc-drudo-theme .gc-drudo-card {
	background: #fff;
	border-radius: 12px;
	padding: 30px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	border: 1px solid #f3f4f6;
	color: #1f2937;
}

.gc-drudo-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.gc-drudo-reset-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff !important;
	border: none;
	border-radius: 8px;
	font-size: 0.9em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.gc-drudo-reset-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
	opacity: 0.9;
}


.gc-drudo-tabs {
	display: flex;
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
	border-radius: 12px;
	padding: 4px;
	gap: 4px;
}

.gc-drudo-tab {
	flex: 1;
	text-align: center;
	padding: 10px 16px;
	border-radius: 10px;
	border: none;
	background: transparent;
	font-size: 0.95em;
	font-weight: 600;
	color: #4a5568;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.gc-drudo-tab:hover {
	color: #fff;
}

.gc-drudo-tab.gc-active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	box-shadow: 0 2px 5px rgba(102, 126, 234, 0.4);
}

.gc-drudo-table-container {
	width: 100%;
	overflow-x: auto;
}

.gc-drudo-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 10px;
}

.gc-drudo-table th {
	text-align: left;
	font-weight: 500;
	color: #374151;
	font-size: 0.95em;
	padding: 0 12px 6px;
	border: none;
	background: transparent;
	box-shadow: none;
	text-shadow: none;
}

.gc-drudo-table td {
	padding: 0 8px;
	border: none;
}

.gc-drudo-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 0.95em;
	color: #6b7280;
	transition: border-color 0.2s;
	background: #fff;
}

.gc-drudo-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gc-drudo-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
}

.gc-drudo-btn-icon {
	background: transparent;
	border: none;
	color: #a0aec0;
	cursor: pointer;
	padding: 6px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.gc-drudo-btn-icon:hover {
	background: #f1f5f9;
	color: #4a5568;
}

.gc-drudo-summary {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	color: #2d3748;
	padding: 18px 20px;
	border-radius: 8px;
	border: 1px solid rgba(102, 126, 234, 0.2);
	text-align: center;
	font-size: 1.05em;
	margin-top: 25px;
}

.gc-drudo-highlight {
	color: #667eea;
	font-weight: 700;
	font-size: 1.15em;
}

/* ===== Semester Calculator ===== */
.gc-semester-calc {
	background: #fff;
}

.gc-semester-block {
	margin-bottom: 32px;
}

.gc-semester-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.gc-semester-heading {
	margin: 0;
	color: #2d3748;
	font-size: 1.35em;
	font-weight: 700;
}

.gc-semester-header-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.gc-weighted-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.95em;
	color: #4a5568;
	cursor: pointer;
}

.gc-weighted-toggle {
	display: none;
}

.gc-toggle-slider {
	width: 44px;
	height: 24px;
	background: #cbd5e0;
	border-radius: 24px;
	position: relative;
	transition: background 0.3s;
}

.gc-toggle-slider::after {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	top: 3px;
	left: 3px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: transform 0.3s;
}

.gc-weighted-toggle:checked+.gc-toggle-slider {
	background: #667eea;
}

.gc-weighted-toggle:checked+.gc-toggle-slider::after {
	transform: translateX(20px);
}

.gc-btn-toggle-close {
	background: none;
	border: none;
	color: #718096;
	font-size: 1.2em;
	cursor: pointer;
	padding: 4px 8px;
}

.gc-btn-toggle-close:hover {
	color: #2d3748;
}

.gc-semester-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 12px;
}

.gc-semester-table th {
	text-align: left;
	padding: 12px 10px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gc-semester-table td {
	padding: 10px;
	border-bottom: 1px solid #e2e8f0;
}

.gc-semester-table tr:nth-child(even) {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.gc-course-name,
.gc-course-credits {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	font-size: 0.95em;
	color: #2d3748;
}

.gc-course-grade,
.gc-course-weight {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	font-size: 0.95em;
	color: #4a5568;
}

.gc-course-name:focus,
.gc-course-credits:focus,
.gc-course-grade:focus,
.gc-course-weight:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gc-link-add-course {
	background: none;
	border: none;
	color: #667eea;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	padding: 8px 0;
	margin-bottom: 16px;
	display: inline-block;
}

.gc-link-add-course:hover {
	color: #764ba2;
	text-decoration: underline;
}

.gc-btn-remove-course {
	background: transparent;
	border: none;
	color: #718096;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 1.25em;
	line-height: 1;
}

.gc-btn-remove-course:hover {
	background: #f1f5f9;
	color: #2d3748;
}

.gc-semester-gpa-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	margin-bottom: 16px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 12px;
	color: #fff;
}

.gc-semester-gpa-title {
	margin: 0;
	font-size: 1.15em;
	font-weight: 700;
	color: #fff;
}

.gc-semester-gpa-value {
	font-size: 1.4em;
	font-weight: 800;
}

.gc-semester-bottom-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: nowrap;
	margin-top: 24px;
	padding: 28px 32px;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.07) 0%, rgba(118, 75, 162, 0.07) 100%);
	border-radius: 16px;
	border: 1px solid rgba(102, 126, 234, 0.1);
}

.gc-btn-add-semester {
	padding: 14px 28px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	border-radius: 12px;
	font-size: 1em;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 2px 5px rgba(0, 0, 0, 0.15);
	white-space: nowrap;
	flex-shrink: 0;
}

.gc-btn-add-semester:hover {
	background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.gc-btn-reset-semester {
	padding: 14px 28px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 12px !important;
	font-size: 1em !important;
	font-weight: 700 !important;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4), 0 2px 5px rgba(0, 0, 0, 0.15) !important;
	white-space: nowrap;
	flex-shrink: 0;
	cursor: pointer !important;
}

.gc-btn-reset-semester:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5), 0 4px 10px rgba(0, 0, 0, 0.25) !important;
}

.gc-cumulative-gpa-circle {
	width: 160px;
	height: 160px;
	border: 3px solid #d1d5db;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	flex-shrink: 0;
}

.gc-cumulative-value {
	font-size: 2.2em;
	font-weight: 800;
	color: #1a202c;
	line-height: 1;
}

.gc-cumulative-label {
	font-size: 0.82em;
	color: #6b7280;
	margin-top: 6px;
	font-weight: 500;
}

.gc-gpa-range {
	font-size: 0.72em;
	color: #9ca3af;
	margin-top: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
	.gc-container {
		padding: 24px;
		border-radius: 16px;
	}

	.gc-title {
		font-size: 2em;
	}

	.gc-nav-btn {
		flex: 1 1 calc(33% - 10px);
		padding: 14px 8px;
		font-size: 0.82em;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 54px;
	}
}

/* Small phones */
@media (max-width: 520px) {
	.gc-wrap {
		padding: 0;
	}

	.gc-container {
		padding: 16px 12px;
		border-radius: 0;
		margin: 0;
		box-shadow: none;
		max-width: 100%;
		width: 100%;
	}

	.gc-title {
		font-size: 1.6em;
		letter-spacing: -0.5px;
	}

	.gc-subtitle {
		font-size: 0.88em;
		padding: 0 4px;
		margin-bottom: 20px;
	}

	/* Navigation: 2-column grid */
	.gc-nav-buttons {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		margin-bottom: 20px;
	}

	.gc-nav-btn {
		flex: none;
		width: 100%;
		padding: 14px 6px;
		font-size: 0.78em;
		border-radius: 10px;
		min-height: 52px;
		line-height: 1.2;
	}

	/* Last button spans full width when 5 buttons (odd) */
	.gc-nav-btn:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	/* Drudo Card */
	.gc-drudo-card {
		padding: 14px 12px;
	}

	.gc-drudo-header {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.gc-drudo-reset-btn {
		width: 100%;
		justify-content: center;
	}

	.gc-drudo-tabs {
		display: grid;
		grid-template-columns: 1fr 1fr;
		width: 100%;
	}

	.gc-drudo-tab {
		padding: 12px 6px;
		font-size: 0.88em;
		text-align: center;
	}

	/* Tables → Cards */
	.gc-drudo-table-container {
		overflow: visible;
	}

	.gc-drudo-table,
	.gc-grade-table,
	.gc-semester-table {
		display: block;
		width: 100%;
		border: none;
	}

	.gc-drudo-table thead,
	.gc-grade-table thead,
	.gc-semester-table thead {
		display: none;
	}

	.gc-drudo-table tbody,
	.gc-grade-table tbody,
	.gc-semester-table tbody {
		display: block;
		width: 100%;
	}

	.gc-drudo-table tr,
	.gc-grade-table tr,
	.gc-semester-table tr {
		display: block;
		width: 100%;
		box-sizing: border-box;
		background: #fff;
		border: 1px solid rgba(102, 126, 234, 0.18);
		border-radius: 14px;
		padding: 14px 12px;
		margin-bottom: 14px;
		box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
	}

	.gc-drudo-table td,
	.gc-grade-table td,
	.gc-semester-table td {
		display: block;
		width: 100%;
		box-sizing: border-box;
		padding: 5px 0;
		border: none !important;
		text-align: left;
	}

	/* Inputs full width inside cards */
	.gc-drudo-input,
	.gc-grade-table input,
	.gc-grade-table select,
	.gc-course-name,
	.gc-course-credits,
	.gc-course-grade,
	.gc-course-weight {
		width: 100% !important;
		box-sizing: border-box;
		font-size: 16px !important;
		padding: 11px 12px;
	}

	/* Action icons row in drudo table */
	.gc-drudo-actions {
		display: flex;
		justify-content: flex-end;
		gap: 12px;
		padding-top: 10px;
		border-top: 1px solid #f3f4f6;
		margin-top: 8px;
	}

	/* Hide row NUMBER column only in the Average Grade section (first cell = "1,2,3" row numbering, not input) */
	#gc-average-section .gc-grade-table td:first-child {
		display: none;
	}

	/* Keep Average Grade inputs side-by-side to avoid taking up vertical lines */
	#gc-average-section .gc-grade-table tr {
		display: flex;
		flex-direction: row;
		gap: 8px;
		align-items: flex-end;
		padding: 10px 8px;
	}

	#gc-average-section .gc-grade-table td {
		display: flex;
		flex-direction: column;
		flex: 1;
		width: auto !important;
		padding: 0;
	}

	#gc-average-section .gc-grade-input,
	#gc-average-section .gc-weight-input,
	#gc-average-section .gc-max-grade-input {
		padding: 10px 6px !important;
		font-size: 14px !important;
	}

	/* Tabs */
	.gc-tabs {
		flex-wrap: wrap;
		gap: 6px;
	}

	.gc-tab {
		padding: 10px 14px;
		font-size: 0.85em;
	}

	/* Easy Grader */
	.gc-easy-input-row {
		flex-direction: column;
		gap: 12px;
	}

	.gc-easy-input-group {
		width: 100%;
	}

	/* Results */
	.gc-result-section {
		padding: 18px 12px;
	}

	.gc-result-box {
		font-size: 1.5em;
		padding: 15px;
	}

	.gc-drudo-summary {
		padding: 15px 12px;
		font-size: 0.92em;
	}

	/* Semester bottom */
	.gc-semester-bottom-row {
		flex-direction: column;
		align-items: center;
		padding: 20px 14px;
		gap: 18px;
	}

	.gc-btn-add-semester,
	.gc-btn-reset-semester {
		width: 100% !important;
		margin: 0 !important;
	}

	.gc-cumulative-gpa-circle {
		order: -1;
		width: 140px;
		height: 140px;
	}

	/* General buttons */
	.gc-btn {
		width: 100%;
		margin-right: 0;
		margin-bottom: 10px;
	}
}

/* Ensure active tab content is always visible on mobile (JS sets inline style) */
@media (max-width: 520px) {
	/* Override any CSS that might hide active tab content */
	#gc-percentage-content,
	#gc-letters-content,
	#gc-points-content,
	#gc-final-percentage-content,
	#gc-final-letters-content {
		overflow: visible;
	}

	/* Scope row-number hiding only to the average grade section */
	#gc-average-section .gc-grade-table td:first-child {
		display: none;
	}

	/* ===== Field labels above inputs (replaces hidden thead) ===== */
	/* Common style for all labels */
	#gc-percentage-content .gc-grade-table td:not(:first-child)::before,
	#gc-letters-content .gc-grade-table td:not(:first-child)::before,
	#gc-points-content .gc-grade-table td:not(:first-child)::before {
		display: block;
		font-size: 0.73em;
		font-weight: 700;
		color: #667eea;
		text-transform: uppercase;
		letter-spacing: 0.06em;
		margin-bottom: 5px;
	}

	/* Percentage tab – td:nth-child(2)=Grade(%), td:nth-child(3)=Weight */
	#gc-percentage-content .gc-grade-table td:nth-child(2)::before { content: 'Grade (%)'; }
	#gc-percentage-content .gc-grade-table td:nth-child(3)::before { content: 'Weight'; }

	/* Letters tab – td:nth-child(2)=Letter, td:nth-child(3)=Weight */
	#gc-letters-content .gc-grade-table td:nth-child(2)::before { content: 'Grade (Letter)'; }
	#gc-letters-content .gc-grade-table td:nth-child(3)::before { content: 'Weight'; }

	/* Points tab – td:nth-child(2)=Points, td:nth-child(3)=Max, td:nth-child(4)=Weight */
	#gc-points-content .gc-grade-table td:nth-child(2)::before { content: 'Grade (Points)'; }
	#gc-points-content .gc-grade-table td:nth-child(3)::before { content: 'Max Points (optional)'; }
	#gc-points-content .gc-grade-table td:nth-child(4)::before { content: 'Weight'; }

	/* Grade Calculator (Drudo) labels */
	.gc-drudo-table td:nth-child(1)::before { content: 'Assignment'; display: block; font-size: 0.73em; font-weight: 700; color: #667eea; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }
	.gc-drudo-table td:nth-child(2)::before { content: 'Percentage / Grade'; display: block; font-size: 0.73em; font-weight: 700; color: #667eea; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }
	.gc-drudo-table td:nth-child(3)::before { content: 'Weight (out of 100)'; display: block; font-size: 0.73em; font-weight: 700; color: #667eea; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }

	/* Semester table labels */
	.gc-semester-table td:nth-child(1)::before { content: 'Course Name'; display: block; font-size: 0.73em; font-weight: 700; color: #667eea; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }
	.gc-semester-table td:nth-child(2)::before { content: 'Grade'; display: block; font-size: 0.73em; font-weight: 700; color: #667eea; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }
	.gc-semester-table td:nth-child(3)::before { content: 'Credits'; display: block; font-size: 0.73em; font-weight: 700; color: #667eea; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }
	.gc-semester-table td:nth-child(4)::before { content: 'Weight'; display: block; font-size: 0.73em; font-weight: 700; color: #667eea; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }

	/* Additional grade input */
	.gc-additional-grade {
		padding: 14px 12px;
	}

	.gc-additional-grade label {
		display: flex;
		flex-direction: column;
		gap: 8px;
	}

	.gc-additional-grade input {
		width: 100%;
		margin: 0;
		box-sizing: border-box;
	}

	/* Average actions row */
	.gc-average-actions {
		flex-direction: column;
		gap: 10px;
	}
}