
/*------------------CSUK Advent Coder--------------------*/

/*------------------CSUK Advent Coder CHRISTMAS--------------------*/

/* Christmas Theme Colors */
:root {
    --christmas-red: #C0392B;
    --christmas-green: #27AE60;
    --snow-white: #f9f9f9;
    --frosty-blue: #3498DB;
    --gold: #F1C40F;
}

.pythonIDE {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 20px;
    background: var(--snow-white);
    border: 2px solid var(--christmas-red);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.codeContainer {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 20px;
}

.pythonCode, .pythonOutput {
    width: 50%;
    min-height: 400px;
    padding: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    border-radius: 5px;
    resize: vertical;
    background-color: var(--snow-white);
    color: var(--christmas-green);
}

.CodeMirror {
	width: 50%!important;
	min-height: 400px!important;
    padding: 10px!important;
	box-sizing: border-box!important;
	font-size: 14px!important;
	resize: vertical!important;
}

.pythonCode {
    border: 1px solid var(--christmas-red);
}

.pythonOutput {
    border: 1px solid var(--frosty-blue);
    background-color: #1e1e1e;
    color: #dcdcdc;
    overflow-y: auto;
}

.comparisonsMessage {
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    border: 1px solid var(--gold);
    background-color: var(--snow-white);
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.comparisonsMessage p {
    margin: 5px 0;
    font-size: 16px;
    color: var(--christmas-green);
}

.runPythonButton, .runTestsButton {
    padding: 10px 20px;
    background-color: var(--christmas-red);
    color: var(--snow-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.runPythonButton:hover, .runTestsButton:hover {
    background-color: #A93226;
}

/* Optional Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap');

/* ---------TESTING TABLE CSS------------- */

.dynamic-results-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
    table-layout: fixed; /* Keep table layout fixed */
}

.dynamic-results-table th, .dynamic-results-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dynamic-results-table th {
    background-color: #f2f2f2;
}

.dynamic-results-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.dynamic-results-table tr:hover {
    background-color: #ddd;
}

.dynamic-results-table img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.dynamic-results-table th:first-child, .dynamic-results-table td:first-child {
    white-space: nowrap;
    width: 100px; /* Adjust width to content */
}

.dynamic-results-table th:not(:first-child), .dynamic-results-table td:not(:first-child) {
    /* Distribute remaining space among other columns */
    width: calc((100% - 75px) / 3);
}

/* -----------SUCCESS MESSAGE CSS -------------- */

.instruction-text {
    font-weight: bold;
    text-align: center;
}

.success-code {
    font-size: 2em; /* Large text */
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

/* Sparkle animation effect */
@keyframes sparkle {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.sparkle-animation {
    animation: sparkle 1s ease-in-out 0s 1;
    opacity: 1; /* Ensure it stays visible after the animation */
}


/* -----------ADVENT INTERFACE -------------- */

.csuk_challenge_boxes_container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.csuk_challenge_box, .csuk_easter_24_challenge_box {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px;
    cursor: pointer;
	position: relative;
}

.csuk_challenge_box.locked, .csuk_easter_24_challenge_box.locked {
    cursor: default;
}

#csuk_challenge_content {
    min-height: 200px;
    border: 1px solid #000;
    padding: 20px;
}

/* Style for locked images */
.csuk_challenge_box .locked, .csuk_easter_24_challenge_box .locked {
    filter: grayscale(100%); 
}

/* Style for unlocked images */
.csuk_challenge_box .unlocked, .csuk_easter_24_challenge_box .unlocked {
    filter: grayscale(0); 
    transition: transform 0.3s ease; 
}

/* Hover effect for unlocked images */
.csuk_challenge_box .unlocked:hover, .csuk_easter_24_challenge_box .unlocked:hover {
    transform: scale(1.1);
}

.box-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
	font-size: 40px;
    color: #fff;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.3);
}

/* -----------------LIGHT CHRISTMAS TREE CANVAS --------------*/

#openCanvasButton {
    position: fixed;
    right: 10px;
    top: 50%;
    z-index: 9999;
}

#slidingCanvas {
    position: fixed;
    right: -80%;
    top: 10%;
    width: 80%;
    height: 80%;
    background-color: white;
    transition: right 0.5s ease;
    z-index: 10000000;
	border-radius: 10px;
	border: solid 1px black;
}

.canvas-open {
    right: 10%!important; /* Slide in */
}

.canvas-content {
    display: flex;
    flex-direction: column;
    height: 100%;
	overflow-y: auto;
}

.canvas-instructions {
    flex-basis: 10%;
    text-align: center;
    width: 100%;
}

#instructionBox {
	resize: none;
}
   
.canvas-main-content {
    display: flex;
    flex: 1; /* Take up remaining space */
}

.canvas-image {
    flex: 1;
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    position: relative;
}

.tree-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%; /* Add this to ensure images don't overflow the container */
    height: auto; /* Adjust height automatically */
}

.colored-tree {
    clip-path: inset(0 0 100% 0); /* Initially hide the colored tree */
    transition: clip-path 0.5s ease; /* Smooth transition for revealing the tree */
}

.grey-tree {
	filter: grayscale(100%); 
}

.hidden-tree {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.canvas-inputs {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
    overflow-y: auto;
}

.inputs-container {
    flex-grow: 1; /* Allow this container to grow */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Spacing between input fields */
}

.input-field {
    width: calc(50% - 10px); /* Adjust width for two columns, considering the gap */
    color: black!important;
	text-align: center!important;
}

#submitInputsButton {
    /* Styles for the submit button */
    align-self: center; /* Center the button in the container */
    margin-top: 10px; /* Add some space above the button */
}

@keyframes wiggleBounce {
    0%, 100% { transform: translate(-50%, -50%) translateX(0); }
    10%, 30%, 50%, 70% { transform: translate(-50%, -50%) translateX(-10px) rotate(-3deg); }
    20%, 40%, 60%, 80% { transform: translate(-50%, -50%) translateX(10px) rotate(3deg); }
    90% { transform: translate(-50%, -50%) translateX(-10px) rotate(-3deg); }
}

.bouncing-tree {
    animation: wiggleBounce 1s ease infinite;
}

.christmas-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 44px; /* Adjust size as needed */
    color: #ce2029; /* Text color */
	font-family: 'Arial', serif;
	font-weight: bold;
	text-align: center;
    opacity: 0; /* Initially hidden */
    transition: opacity 1s ease-in-out;
    z-index: 2; /* Ensure it's above the tree images */
    pointer-events: none; /* Allows clicks to pass through the text */
}

.csuk_festive_interface {
	--festive-accent: #c0392b;
	--festive-accent-strong: #8e2d22;
	--festive-accent-soft: rgba(192, 57, 43, 0.14);
	--festive-highlight: #f1c40f;
	--festive-surface: rgba(255, 255, 255, 0.92);
	--festive-surface-strong: #ffffff;
	--festive-border: rgba(15, 23, 42, 0.08);
	--festive-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
	--festive-text: #102033;
	--festive-muted: #5a6b80;
	position: relative;
	/*max-width: 1320px;*/
	margin: auto;
	/*padding: clamp(18px, 2vw, 30px);*/
	border-radius: 32px;
	background:
		radial-gradient(circle at top left, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.7) 38%, rgba(255, 255, 255, 0.9) 100%),
		linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
	box-shadow: var(--festive-shadow);
	overflow: visible;
	color: var(--festive-text);
}

.csuk_festive_interface::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 10% 15%, var(--festive-accent-soft), transparent 32%),
		radial-gradient(circle at 85% 10%, rgba(241, 196, 15, 0.18), transparent 20%),
		radial-gradient(circle at 75% 90%, rgba(52, 152, 219, 0.12), transparent 25%);
	pointer-events: none;
}

.csuk_festive_interface[data-theme="easter"] {
	--festive-accent: #8e44ad;
	--festive-accent-strong: #6c2d88;
	--festive-accent-soft: rgba(142, 68, 173, 0.14);
	--festive-highlight: #f39c12;
	--festive-surface: rgba(255, 255, 255, 0.94);
	--festive-shadow: 0 30px 70px rgba(91, 33, 182, 0.14);
}

.csuk_festive_shell {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 24px;
	overflow: visible;
}

.csuk_festive_intro_banner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: clamp(24px, 3vw, 34px);
	border-radius: 28px;
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
	border: 1px solid var(--festive-border);
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
	backdrop-filter: blur(12px);
}

.csuk_festive_intro_copy {
	max-width: 760px;
}

.csuk_festive_kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	margin-bottom: 16px;
	border-radius: 999px;
	background: var(--festive-accent-soft);
	color: var(--festive-accent-strong);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.csuk_festive_heading {
	margin: 0 0 10px;
	font-size: clamp(28px, 3vw, 42px);
	line-height: 1.08;
	color: var(--festive-text);
}

.csuk_festive_summary {
	font-size: 17px;
	line-height: 1.7;
	color: var(--festive-muted);
}

.csuk_festive_interface .csuk-festive-open-canvas,
.csuk_festive_interface #openCanvasButton {
	position: relative;
	right: auto;
	top: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 14px 18px;
	min-width: 220px;
	border: 0;
	border-radius: 22px;
	background: linear-gradient(135deg, var(--festive-accent), var(--festive-accent-strong));
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
	z-index: 10;
}

.csuk_festive_interface .csuk-festive-open-canvas:hover,
.csuk_festive_interface #openCanvasButton:hover {
	transform: translateY(-3px);
	box-shadow: 0 24px 45px rgba(0, 0, 0, 0.2);
	filter: saturate(1.05);
}

.csuk-festive-open-canvas-label {
	white-space: nowrap;
}

.csuk_festive_interface .csuk-festive-open-canvas img,
.csuk_festive_interface #openCanvasButton img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 16px;
	padding: 8px;
}

.csuk_challenge_boxes_container {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
	gap: 16px;
	margin-bottom: 0;
}

.csuk_festive_challenge_box,
.csuk_challenge_box,
.csuk_easter_24_challenge_box {
	width: 100%;
	min-height: 128px;
	height: auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 16px 10px 14px;
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
	box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
	backdrop-filter: blur(12px);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
	position: relative;
	overflow: hidden;
}

.csuk_festive_challenge_box::after,
.csuk_challenge_box::after,
.csuk_easter_24_challenge_box::after {
	content: "";
	position: absolute;
	inset: auto -20% -35% auto;
	width: 90px;
	height: 90px;
	background: radial-gradient(circle, var(--festive-accent-soft), transparent 70%);
	pointer-events: none;
}

.csuk_festive_challenge_box.unlocked,
.csuk_challenge_box.unlocked,
.csuk_easter_24_challenge_box.unlocked {
	border-color: rgba(255, 255, 255, 0.75);
}

.csuk_festive_challenge_box.unlocked:hover,
.csuk_challenge_box.unlocked:hover,
.csuk_easter_24_challenge_box.unlocked:hover {
	transform: translateY(-6px) scale(1.02);
	box-shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
}

.csuk_festive_challenge_box.locked,
.csuk_challenge_box.locked,
.csuk_easter_24_challenge_box.locked {
	opacity: 0.72;
	background: linear-gradient(180deg, rgba(241, 245, 249, 0.96), rgba(226, 232, 240, 0.9));
	border-color: rgba(148, 163, 184, 0.2);
}

.csuk_festive_challenge_box.is-selected,
.csuk_festive_challenge_box.unlocked.is-selected {
	transform: translateY(-4px);
	border-color: rgba(255, 255, 255, 0.95);
	box-shadow: 0 0 0 3px var(--festive-accent-soft), 0 26px 46px rgba(15, 23, 42, 0.16);
	background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 250, 245, 0.95));
}

.csuk_festive_interface[data-theme="easter"] .csuk_festive_challenge_box.is-selected,
.csuk_festive_interface[data-theme="easter"] .csuk_festive_challenge_box.unlocked.is-selected {
	background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 245, 255, 0.96));
}

.csuk_festive_challenge_box img,
.csuk_challenge_box img,
.csuk_easter_24_challenge_box img {
	width: clamp(58px, 6vw, 76px);
	height: auto;
	object-fit: contain;
	transition: transform 0.25s ease, filter 0.25s ease;
}

.csuk_festive_challenge_box:hover img.unlocked,
.csuk_challenge_box:hover img.unlocked,
.csuk_easter_24_challenge_box:hover img.unlocked {
	transform: scale(1.08);
}

.box-number {
	position: absolute;
	top: 10px;
	left: 10px;
	transform: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #ffffff;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(51, 65, 85, 0.88));
	backdrop-filter: blur(10px);
	box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
	z-index: 2;
}

.csuk-box-status {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--festive-muted);
}

.csuk_challenge_content_panel,
#csuk_challenge_content {
	position: relative;
	z-index: 1;
	min-height: 320px;
	padding: clamp(22px, 3vw, 30px);
	border: 1px solid var(--festive-border);
	border-radius: 28px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.csuk_challenge_intro_state {
	display: grid;
	grid-template-columns: minmax(110px, 180px) 1fr;
	gap: 24px;
	align-items: center;
	min-height: 260px;
}

.csuk_challenge_intro_icon {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 24px;
	border-radius: 24px;
	background: radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.9));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.csuk_challenge_intro_icon img {
	max-width: 100%;
	max-height: 150px;
	object-fit: contain;
}

.csuk_challenge_intro_title {
	margin: 0 0 14px;
	font-size: clamp(26px, 2.6vw, 34px);
	line-height: 1.15;
	font-weight: 800;
	color: var(--festive-text);
}

.csuk_challenge_intro_body,
.csuk_challenge_intro_body p {
	margin: 0;
	font-size: 16px;
	line-height: 1.8;
	color: var(--festive-muted);
}

.pythonIDE {
	width: 100%;
	align-items: stretch;
	gap: 22px;
	margin: 0;
	padding: clamp(18px, 2vw, 28px);
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 24px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.95));
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.pythonChallengeHeader {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	padding: 0 0 8px;
}

.pythonChallengeMeta {
	flex: 1;
	min-width: 0;
}

.pythonChallengeEyebrow {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	margin-bottom: 14px;
	border-radius: 999px;
	background: var(--festive-accent-soft);
	color: var(--festive-accent-strong);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.pythonChallengeQuestion {
	font-size: clamp(18px, 2vw, 24px);
	line-height: 1.6;
	font-weight: 700;
	color: var(--festive-text);
}

.pythonActionRow {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
}

.runPythonButton,
.runTestsButton,
.csuk-festive-submit-button,
#submitInputsButton,
#submitEaster24InputsButton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 18px;
	background: linear-gradient(135deg, var(--festive-accent), var(--festive-accent-strong));
	color: #ffffff;
	border: 0;
	border-radius: 16px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.01em;
	box-shadow: 0 16px 28px rgba(0, 0, 0, 0.14);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.runPythonButton:hover,
.runTestsButton:hover,
.csuk-festive-submit-button:hover,
#submitInputsButton:hover,
#submitEaster24InputsButton:hover {
	transform: translateY(-2px);
	box-shadow: 0 20px 32px rgba(0, 0, 0, 0.18);
	filter: brightness(1.02);
}

.csuk-festive-submit-button.is-loading,
#submitInputsButton.is-loading,
#submitEaster24InputsButton.is-loading {
	opacity: 0.8;
	cursor: wait;
}

.codeContainer {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
	gap: 20px;
	width: 100%;
	align-items: stretch;
}

.codePane {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 16px;
	border-radius: 22px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
	border: 1px solid rgba(148, 163, 184, 0.16);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.codePaneTitle {
	margin-bottom: 12px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--festive-muted);
}

.pythonIDE .pythonCode,
.pythonIDE .pythonOutput {
	width: 100%;
	min-height: 460px;
	margin: 0;
	padding: 10px;
	border-radius: 18px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	overflow: hidden;
}

.pythonIDE .pythonCode {
	border-color: rgba(15, 23, 42, 0.08);
	background: #0f172a;
	color: #e2e8f0;
}

.pythonIDE .CodeMirror {
	width: 100% !important;
	min-height: 460px !important;
	height: 100% !important;
	padding: 0 !important;
	border-radius: 18px;
	font-size: 15px !important;
	line-height: 1.6;
	box-sizing: border-box !important;
	resize: none !important;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.pythonIDE .CodeMirror-gutters {
	padding-top: 14px;
	padding-bottom: 14px;
}

.pythonIDE .CodeMirror-lines {
	padding-top: 14px;
	padding-bottom: 14px;
}

.pythonIDE .CodeMirror pre.CodeMirror-line,
.pythonIDE .CodeMirror pre.CodeMirror-line-like {
	padding-left: 18px;
	padding-right: 18px;
}

.pythonIDE .CodeMirror-scroll {
	min-height: 460px;
}

.pythonOutput {
	padding: 20px 22px;
	background: radial-gradient(circle at top, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 1));
	color: #dbeafe;
	font-family: 'Fira Code', monospace;
	font-size: 14px;
	line-height: 1.65;
	box-sizing: border-box;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.comparisonsMessage {
	width: 100%;
	margin-top: 0;
	padding: 18px;
	border: 1px solid rgba(148, 163, 184, 0.16);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
	border-radius: 22px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.comparisonsMessage:empty {
	display: none;
}

.dynamic-results-table {
	overflow: hidden;
	border-radius: 16px;
	border-collapse: separate;
	border-spacing: 0;
	box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.dynamic-results-table th,
.dynamic-results-table td {
	border: 0;
	padding: 14px 12px;
	vertical-align: top;
}

.dynamic-results-table th {
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.dynamic-results-table tr:nth-child(even) {
	background-color: rgba(248, 250, 252, 0.92);
}

.dynamic-results-table tr:nth-child(odd) {
	background-color: rgba(255, 255, 255, 0.96);
}

.dynamic-results-table tr:hover {
	background-color: rgba(254, 249, 195, 0.32);
}

.dynamic-results-table td {
	color: var(--festive-text);
	font-size: 14px;
	line-height: 1.6;
}

.notice-message {
	width: 100%;
	padding: 16px 18px !important;
	margin-bottom: 18px;
	border-radius: 18px !important;
	background: linear-gradient(135deg, #fff9db, #fef3c7) !important;
	color: #1f2937 !important;
	box-shadow: 0 14px 28px rgba(234, 179, 8, 0.12);
	border: 1px solid rgba(234, 179, 8, 0.18);
}

.notice-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	line-height: 1.6;
}

.notice-details {
	margin-top: 10px;
	line-height: 1.75;
}

.instruction-text {
	margin: 18px 0 10px;
	padding: 16px 18px;
	border-radius: 18px;
	background: rgba(236, 253, 245, 0.9);
	color: #065f46;
	box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.12);
}

.success-code {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	margin-top: 16px;
	padding: 18px;
	border-radius: 20px;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
	color: #fef08a;
	font-size: clamp(30px, 4vw, 54px);
	letter-spacing: 0.16em;
	box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.csuk-loading-state,
.csuk-empty-state {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 240px;
	border-radius: 22px;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
	color: var(--festive-muted);
	font-size: 16px;
	font-weight: 600;
}

.csuk-empty-state {
	padding: 30px;
	text-align: center;
}

.csuk-loading-spinner {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 3px solid rgba(148, 163, 184, 0.25);
	border-top-color: var(--festive-accent);
	animation: csukSpin 0.8s linear infinite;
}

@keyframes csukSpin {
	to {
		transform: rotate(360deg);
	}
}

.csuk-festive-canvas,
#slidingCanvas {
	position: fixed;
	right: 24px;
	top: 24px;
	left: auto;
	width: min(1080px, calc(100vw - 48px));
	height: auto;
	max-height: calc(100vh - 48px);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(16px);
	transform: translateX(calc(100% + 48px));
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
	z-index: 10000000;
	border-radius: 28px;
	border: 1px solid rgba(255, 255, 255, 0.65);
	box-shadow: 0 35px 80px rgba(15, 23, 42, 0.25);
	overflow: auto;
	will-change: transform, opacity;
}

.csuk-festive-close-canvas {
	position: sticky;
	top: 14px;
	margin: 14px 14px 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.92);
	color: #ffffff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
	z-index: 3;
}

.canvas-open,
.csuk_festive_interface.is-canvas-open #slidingCanvas {
	right: 24px !important;
	transform: translateX(0) !important;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.canvas-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow-y: auto;
	padding-bottom: 18px;
	background:
		radial-gradient(circle at top right, var(--festive-accent-soft), transparent 24%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
}

.canvas-instructions {
	flex-basis: auto;
	width: 100%;
	padding: 12px 20px 8px;
	text-align: left;
}

#instructionBox {
	padding: 16px 18px;
	border-radius: 24px;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
	color: #e5eef8;
	font-size: 14px;
	line-height: 1.6;
	box-shadow: 0 20px 35px rgba(15, 23, 42, 0.18);
	white-space: normal;
}

.canvas-main-content {
	display: grid;
	grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px);
	gap: 18px;
	padding: 8px 20px 20px;
	align-items: stretch;
	flex: 1;
}

.canvas-image,
.canvas-inputs {
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.78);
	border: 1px solid rgba(255, 255, 255, 0.7);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 18px 40px rgba(15, 23, 42, 0.08);
}

.canvas-image {
	min-height: 420px;
	padding: 14px;
}

.tree-image {
	max-width: min(100%, 420px);
	max-height: 80%;
	object-fit: contain;
}

.canvas-inputs {
	padding: 14px;
	gap: 14px;
}

.inputs-container {
	flex-grow: 1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	justify-content: stretch;
	align-items: stretch;
}

.input-field {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border-radius: 16px;
	border: 1px solid rgba(148, 163, 184, 0.24);
	background: rgba(255, 255, 255, 0.96);
	color: #0f172a !important;
	text-align: center !important;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.03em;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.input-field:focus {
	outline: none;
	border-color: rgba(59, 130, 246, 0.4);
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
	transform: translateY(-1px);
}

.canvas-inputs .csuk-festive-submit-button,
.canvas-inputs #submitInputsButton,
.canvas-inputs #submitEaster24InputsButton {
	width: 100%;
	margin-top: 4px;
	padding: 13px 16px;
	font-size: 14px;
}

.christmas-message {
	width: min(90%, 420px);
	padding: 14px 16px;
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.78);
	backdrop-filter: blur(10px);
	box-shadow: 0 18px 30px rgba(15, 23, 42, 0.1);
	font-size: clamp(20px, 2.4vw, 32px);
	line-height: 1.2;
	letter-spacing: 0.04em;
	color: var(--festive-accent-strong);
}

.csuk_festive_interface.is-complete .csuk-festive-open-canvas {
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 25px 45px rgba(0, 0, 0, 0.22);
	animation: csukPulse 1.8s ease-in-out infinite;
}

@keyframes csukPulse {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-2px) scale(1.01);
	}
}

@media (max-width: 1024px) {
	.pythonChallengeHeader {
		flex-direction: column;
	}

	.pythonActionRow {
		justify-content: flex-start;
	}

	.codeContainer,
	.canvas-main-content,
	.csuk_challenge_intro_state {
		grid-template-columns: 1fr;
	}

	.canvas-image {
		min-height: 360px;
	}
}

@media (max-width: 768px) {
	.csuk_festive_interface {
		padding: 14px;
		border-radius: 24px;
	}

	.csuk_festive_intro_banner {
		flex-direction: column;
		align-items: stretch;
		padding: 22px;
	}

	.csuk_festive_interface .csuk-festive-open-canvas,
	.csuk_festive_interface #openCanvasButton {
		width: 100%;
	}

	.csuk_challenge_boxes_container {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.codePane,
	.csuk_challenge_content_panel,
	#csuk_challenge_content,
	.pythonIDE {
		padding: 16px;
	}

	.load-state,
	.csuk-empty-state {
		min-height: 200px;
	}

	#slidingCanvas,
	.csuk-festive-canvas {
		top: 12px;
		right: 12px;
		width: calc(100vw - 24px);
		max-height: calc(100vh - 24px);
		border-radius: 22px;
	}

	.csuk-festive-close-canvas {
		top: 10px;
		margin: 10px 10px 0 auto;
	}

	.canvas-open {
		right: 12px !important;
	}

	.canvas-instructions,
	.canvas-main-content {
		padding-left: 16px;
		padding-right: 16px;
	}

	.inputs-container {
		grid-template-columns: 1fr;
	}

	.csuk_festive_challenge_box,
	.csuk_challenge_box,
	.csuk_easter_24_challenge_box {
		min-height: 112px;
	}

	.box-number {
		min-width: 30px;
		height: 30px;
		font-size: 12px;
	}

	.dynamic-results-table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}

@media (max-width: 560px) {
	.csuk_challenge_boxes_container {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.runPythonButton,
	.runTestsButton,
	.csuk-festive-submit-button,
	#submitInputsButton,
	#submitEaster24InputsButton {
		width: 100%;
	}

	.pythonActionRow {
		width: 100%;
	}

	.pythonIDE .pythonCode,
	.pythonIDE .pythonOutput,
	.pythonIDE .CodeMirror,
	.pythonIDE .CodeMirror-scroll {
		min-height: 320px !important;
	}
}
