
#imagePreview {
    margin-top: 8px;
}

#imagePreview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* .time-adjust { */
	/* display: flex; */
	/* gap: 8px; */
	/* justify-content: center; */
	/* margin-top: 6px; */
/* } */

.quick-add{
    display:flex;
    gap:8px;
    justify-content:center;
    margin-top:6px;
    flex-wrap:wrap;
}

.quick-add button{
    padding:6px 12px;
    border-radius:6px;
    border:none;
    background:#117D38;
    color:white;
    font-weight:600;
    cursor:pointer;
}

.quick-add button:hover{
    background:#0D4D24;
}

.quick-add .colorplus {
    background:#16a34a;
}

.quick-add .colorplus:hover{
    background:#15803d;
}

.quick-add .colormin {
    background:#D13131;
}

.quick-add .colormin:hover{
    background:#91222B;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: radial-gradient(circle at top, #f0f4ff, #d9e2ff);
	color: #222;
	min-height: 100vh;
}

.page-wrapper {
	max-width: 1100px;
	margin: 0 auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.header {
	text-align: center;
	padding: 12px 8px;
}

.header h1 {
	font-size: 2rem;
	margin-bottom: 4px;
}

.header p {
	color: #555;
}

.controls {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: center;
	background: #ffffffcc;
	border-radius: 12px;
	padding: 12px 16px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.hidden {
    display: none;
	width: 0px;
}

.control-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 120px;
}

.control-group label {
	font-size: 0.85rem;
	color: #444;
}

.control-group input,
.control-group select {
	padding: 6px 8px;
	border-radius: 6px;
	border: 1px solid #ccc;
	font-size: 0.9rem;
}

.timeBtn,
#cancelBtn {
	padding: 6px 10px;
	border-radius: 6px;
	border: none;
	background: #374151;
	color: white;
	cursor: pointer;
}

.timeBtn:hover,
#cancelBtn:hover {
	background: #111827;
}

#pauseBtn{
	padding:6px 10px;
	border-radius:6px;
	border:none;
	background:#f59e0b;
	color:white;
	cursor:pointer;
}

#pauseBtn:hover{
	background:#d97706;
}

#startBtn {
	/* padding: 8px 16px; */
	/* border-radius: 999px; */
	padding:6px 10px;
	border-radius:6px;
	border: none;
	background: linear-gradient(135deg, #4f46e5, #6366f1);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
	transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.2s;
}

#startBtn:active {
	transform: translateY(1px) scale(0.98);
	box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

#startBtn:disabled {
	opacity: 0.5;
	cursor: default;
	box-shadow: none;
}

.timer-display {
	margin-top: 6px;
	font-size: 1.1rem;
	font-weight: 600;
	min-width: 120px;
	text-align: center;
	padding: 4px 8px;
	border-radius: 999px;
	background: #eef2ff;
	color: #312e81;
}

/* Layout voor puzzel */
.main-layout {
	display: flex;
	justify-content: center;
}

.puzzle-container {
	position: relative;
	width: min(90vw, 500px);
	height: min(90vw, 500px);
	max-width: max(90vw, 500px);
	max-height: max(90vw, 500px);
	border-radius: 16px;
	overflow: hidden;
	background: #111;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}
    /* resize: both; */


/* Puzzelstukjes */
.piece {
	position: absolute;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	cursor: default;
	transition: left 0.7s ease, top 0.7s ease, transform 0.7s ease, box-shadow 0.7s ease, opacity 0.4s ease;
	transform: scale(0.9) rotate(0deg);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
	border-radius: 4px;
    opacity: 0.5; /* half transparant */
}

.piece.placed {
    opacity: 1;
	/* transform: scale(1.02); */
	box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Animatie bij binnenkomen op juiste plek */
.piece.snapping {
	transform: scale(1.02);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Als puzzel klaar is: lichte “glow” */
.puzzle-complete {
	animation: puzzleGlow 1.5s ease-out forwards;
}

@keyframes puzzleGlow {
	0% {
		box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
		transform: scale(1);
	}

	50% {
		box-shadow: 0 0 40px rgba(96, 165, 250, 0.9);
		transform: scale(1.02);
	}

	100% {
		box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
		transform: scale(1);
	}
}

.footer {
	text-align: center;
	font-size: 0.85rem;
	color: #555;
	padding-bottom: 8px;
}

/* Kleinere schermen */
@media (max-width: 600px) {
	.header h1 {
		font-size: 1.6rem;
	}

	.controls {
		align-items: stretch;
	}

	#startBtn {
		/* width: 100%; */
	}
}

#progressBarWrapper {
	width: 100%;
	max-width: 500px;
	height: 14px;
	background: #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
	margin: 10px auto 0 auto;
	box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
}

#progressBar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #4f46e5, #6366f1);
	border-radius: 999px;
	transition: width 0.4s ease;
}