*{
	box-sizing:border-box;
}

body{
	margin:0;
	font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
	background:#f4f6fb;
	color:#111;
}
#header{
    width:100%;
    display: flex;
    justify-content: center;
	align-items: center;
}
.logo_container{
    display: flex;
    flex-direction: row;
    font-weight: 700;
    font-size: 1.6rem;
    justify-content: center;
	align-items: center;
    padding: 25px 0px 0px;
    text-decoration:none;
    user-select: none;
    color:#111;
    max-width:500px;
}
.container{
	max-width:900px;
	margin:30px auto;
	background:#fff;
	padding:24px;
	border-radius:14px;
	box-shadow:0 10px 40px rgba(0,0,0,0.08);
}

h1{
	margin:0 0 8px;
	font-size:26px;
}

.subtitle{
	margin:0 0 20px;
	color:#555;
}

#dropzone{
	border:2px dashed #bbb;
	border-radius:12px;
	padding:30px;
	text-align:center;
	cursor:pointer;
	background:#fafbff;
}

#dropzone.dragover{
	border-color:#4a7cff;
	background:#eef3ff;
}

#dropzone p{
	margin:0;
	font-size:16px;
}

#dropzone span{
	display:block;
	margin:8px 0;
	color:#777;
}

#dropzone button{
	padding:10px 16px;
	border-radius:8px;
	border:none;
	background:#111;
	color:#fff;
	cursor:pointer;
}

.controls{
	display:flex;
	flex-wrap:wrap;
	gap:16px;
	margin:20px 0;
	align-items:center;
}

.controls label{
	font-size:14px;
	color:#333;
}

.controls select,
.controls input[type="range"]{
	display:block;
	margin-top:4px;
}

#processBtn{
	padding:10px 18px;
	border-radius:8px;
	border:none;
	background:#4a7cff;
	color:#fff;
	cursor:pointer;
}

#preview{
	display:grid;
	grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
	gap:12px;
	margin-top:20px;
}

.preview-item{
	background:#fafafa;
	border-radius:8px;
	padding:8px;
	text-align:center;
	font-size:12px;
}

.preview-item img{
	max-width:100%;
	border-radius:6px;
}

#downloadArea{
	margin-top:20px;
	text-align:center;
}

#downloadArea a{
	display:inline-block;
	margin-top:10px;
	padding:10px 18px;
	background:#111;
	color:#fff;
	border-radius:8px;
	text-decoration:none;
}

/*footer{
	margin-top:30px;
	font-size:13px;
	color:#666;
	text-align:center;
}*/
#footer{
    display:flex;
    flex-direction:column;
    justify-content: center;
    align-items: center;
    gap: 14px;
}
.footer_links{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.footer_links a{
    text-decoration:none;
    color: #111;
}
#progressWrapper{
	margin-top:20px;
}

#progressText{
	font-size:13px;
	color:#555;
	margin-bottom:6px;
}

#progressBar{
	width:100%;
	height:10px;
	background:#e5e7ef;
	border-radius:8px;
	overflow:hidden;
}

#progressFill{
	width:0%;
	height:100%;
	background:#4a7cff;
	transition:width 0.15s linear;
}
/* Preview collapse behavior */
#preview{
	display:grid;
	grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
	gap:12px;
	margin-top:20px;

	/* collapsed by default */
	max-height:180px; /* ~1 row */
	overflow:hidden;
	transition:max-height 0.25s ease;
}

#preview.expanded{
	max-height: 800px;
    overflow: auto;
}

/* Expand button */
#previewToggle{
	margin-top:10px;
	display:none;
	text-align:center;
}

#previewToggle button{
	padding:8px 14px;
	border-radius:8px;
	border:none;
	background:#e5e7eb;
	color:#111;
	cursor:pointer;
	font-size:13px;
}
#previewCount{
	margin-top:14px;
	font-size:13px;
	color:#555;
}
