@import url('https://cdn.msar.me/fonts/ekushey-lohit/font.css');
@import url('https://fonts.maateen.me/kalpurush/font.css');
@import url('https://fonts.maateen.me/noto-serif-bengali/font.css');
@import url('https://fonts.maateen.me/siyam-rupali/font.css');
@import url('https://banglawebfonts.pages.dev/css/ekushey-azad.css');
@import url('https://fonts.maateen.me/tiro-bangla/font.css');

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
}

body {
	background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
	min-height: 100vh;
	padding: 20px;
	color: #f0f0f0;
	display: flex;
	justify-content: center;
	align-items: center;
}

.container {
	max-width: 1400px;
	width: 100%;
	background: rgba(30, 35, 40, 0.95);
	border-radius: 20px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.header {
	background: linear-gradient(135deg, #3498db, #1a5276);
	color: white;
	text-align: center;
	padding: 30px 20px;
	position: relative;
	border-bottom: 4px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
	font-size: 2.8rem;
	margin-bottom: 10px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
}

.header p {
	opacity: 0.9;
	font-size: 1.2rem;
	max-width: 700px;
	margin: 0 auto;
	line-height: 1.6;
}

.main-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	padding: 30px;
}

.form-section {
	background: rgba(40, 45, 55, 0.7);
	border-radius: 15px;
	padding: 25px;
	position: relative;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.4rem;
	margin-bottom: 25px;
	color: #3498db;
	padding-bottom: 10px;
	border-bottom: 2px solid rgba(52, 152, 219, 0.3);
}

.form-group {
	margin-bottom: 25px;
}

.form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 10px;
	color: #ecf0f1;
	font-size: 1.05rem;
	display: flex;
	align-items: center;
	gap: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 14px;
	border: 2px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	font-size: 16px;
	transition: all 0.3s;
	background: rgba(30, 35, 40, 0.6);
	color: #ecf0f1;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: #3498db;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.upload-area {
	border: 2px dashed rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	padding: 30px;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s;
	background: rgba(30, 35, 40, 0.4);
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 120px;
}

.upload-area i {
	font-size: 32px;
	margin-bottom: 10px;
	color: #3498db;
}

.upload-area:hover {
	border-color: #3498db;
	background: rgba(52, 152, 219, 0.1);
}

.upload-area.dragover {
	border-color: #3498db;
	background: rgba(52, 152, 219, 0.15);
}

.style-selector {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 15px;
	margin-top: 10px;
}

.style-option {
	border: 3px solid transparent;
	border-radius: 10px;
	padding: 15px;
	cursor: pointer;
	text-align: center;
	transition: all 0.3s;
	font-size: 13px;
	font-weight: 500;
	background: rgba(30, 35, 40, 0.6);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.style-option.active {
	border-color: #3498db;
	transform: scale(1.05);
	box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.style-red-border {
	border: 2px solid #e74c3c;
	color: #e74c3c;
}

.style-red-bg {
	background: #e74c3c;
	color: white;
}

.style-minimal {
	background: #f8f9fa;
	color: #2c3e50;
}

.style-quote {
	background: linear-gradient(45deg, #1abc9c, #16a085);
	color: white;
}

.style-official {
	background: #34495e;
	color: white;
}

.style-news-paper {
	background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
	color: #2c3e50;
	position: relative;
	overflow: hidden;
}

.style-news-paper::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.05"><rect fill="none" stroke="black" stroke-width="1" x="10" y="10" width="80" height="80" rx="5"/></svg>');
	pointer-events: none;
}

.preview-section {
	background: rgba(40, 45, 55, 0.7);
	border-radius: 15px;
	padding: 25px;
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.preview-container {
	position: relative;
	margin-bottom: 20px;
	border-radius: 0;
	overflow: hidden;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
	min-height: 500px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.2);
}

#cardPreview {
	width: 100%;
	max-width: 100%;
	background: white;
	color: #333;
	border-radius: 0;
	overflow: hidden;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
	transition: all 0.3s;
	min-height: 450px;
}

.card-image-container {
	height: 250px;
	position: relative;
	overflow: hidden;
	background: #f0f0f0;
}

.card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.image-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: linear-gradient(45deg, #f5f5f5, #e0e0e0);
	color: #7f8c8d;
	font-size: 18px;
	font-weight: 500;
}

.card-content {
	padding: 25px;
}

.card-title {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 12px;
	line-height: 1.3;
	color: #2c3e50;
}

.card-date {
	font-size: 14px;
	color: #7f8c8d;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.card-description {
	font-size: 16px;
	line-height: 1.6;
	color: #34495e;
	margin-bottom: 20px;
}

.card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 25px;
	border-top: 1px solid #eee;
	background: #f8f9fa;
}

.card-sponsor {
	font-size: 14px;
	color: #7f8c8d;
	font-style: italic;
}

.card-logo {
	max-height: 40px;
	max-width: 120px;
	object-fit: contain;
}

.watermark-logo {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	opacity: 0.1;
	max-width: 70%;
	max-height: 70%;
	pointer-events: none;
}

.action-buttons {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
	justify-content: center;
}

.btn {
	padding: 14px 25px;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.3s;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 16px;
}

.btn-primary {
	background: linear-gradient(135deg, #3498db, #2980b9);
	color: white;
}

.btn-secondary {
	background: linear-gradient(135deg, #7f8c8d, #95a5a6);
	color: white;
}

.btn-success {
	background: linear-gradient(135deg, #2ecc71, #27ae60);
	color: white;
}

.btn-danger {
	background: linear-gradient(135deg, #e74c3c, #c0392b);
	color: white;
}

.btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 7px 15px rgba(0, 0, 0, 0.3);
}

.btn:active {
	transform: translateY(-1px);
}

.hidden {
	display: none;
}

/* Modal styles */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 1000;
	justify-content: center;
	align-items: center;
}

.modal-content {
	background: rgba(40, 45, 55, 0.95);
	padding: 25px;
	border-radius: 15px;
	max-width: 900px;
	width: 95%;
	max-height: 90vh;
	overflow: auto;
	position: relative;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
	font-size: 1.8rem;
	font-weight: bold;
	color: #3498db;
}

.close-modal {
	background: none;
	border: none;
	font-size: 1.8rem;
	cursor: pointer;
	color: #ecf0f1;
	transition: all 0.3s;
}

.close-modal:hover {
	color: #3498db;
}

.cropper-container {
	width: 100%;
	height: 450px;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	overflow: hidden;
}

.cropper-toolbar {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.cropper-toolbar button {
	padding: 10px 20px;
	background: rgba(30, 35, 40, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s;
	color: #ecf0f1;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cropper-toolbar button:hover {
	background: rgba(52, 152, 219, 0.2);
	border-color: rgba(52, 152, 219, 0.4);
}

.cropper-actions {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-top: 25px;
}

.cropper-actions button {
	min-width: 150px;
	padding: 12px 25px;
	font-size: 16px;
	font-weight: 600;
}

.loading-spinner {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 100;
}

.spinner {
	width: 60px;
	height: 60px;
	border: 6px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	border-top: 6px solid #3498db;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.watermark-option {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 15px;
	background: rgba(30, 35, 40, 0.4);
	padding: 12px;
	border-radius: 8px;
}

.watermark-option input {
	width: auto;
}

.history-panel {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.history-title {
	font-weight: bold;
	margin-bottom: 15px;
	color: #ecf0f1;
	font-size: 1.1rem;
	display: flex;
	align-items: center;
	gap: 10px;
}

.history-items {
	display: flex;
	gap: 15px;
	overflow-x: auto;
	padding-bottom: 10px;
}

.history-item {
	width: 100px;
	height: 100px;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all 0.3s;
	position: relative;
	flex-shrink: 0;
	background: rgba(0, 0, 0, 0.2);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.history-item:hover {
	transform: scale(1.05);
	border-color: #3498db;
}

.history-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.notification {
	position: fixed;
	bottom: 25px;
	right: 25px;
	padding: 18px 30px;
	background: #27ae60;
	color: white;
	border-radius: 10px;
	box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
	transform: translateY(100px);
	opacity: 0;
	transition: all 0.4s;
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 17px;
	font-weight: 500;
}

.notification.show {
	transform: translateY(0);
	opacity: 1;
}

.notification.error {
	background: #e74c3c;
}

.style-indicator {
	position: absolute;
	top: 15px;
	right: 15px;
	background: rgba(52, 152, 219, 0.9);
	color: white;
	padding: 5px 10px;
	border-radius: 5px;
	font-size: 12px;
	font-weight: 600;
	display: none;
}

/* Card Styles */
#cardPreview>div[data-style] {
	display: none;
}

#cardPreview>div[data-style].active {
	display: block;
}

/* Dhakapost Style */
[data-style="dhakapost"].active {
	background: linear-gradient(180deg, rgba(17, 79, 116, 1) 26%, rgba(0, 3, 8, 1) 100%) !important;
	position: relative;

	.card-image-container {
		padding: 60px 25px 0;
		height: 380px;
		background: transparent;

		.image-placeholder,
		img {
			border-radius: 10px;
			overflow: hidden;
		}
	}

	.card-content {
		.card-date {
			position: absolute;
			top: 22px;
			color: #E18F5F;
			font-family: 'EkusheyLohit', sans-serif;

			>i {
				display: none;
			}
		}

		.card-name {
			text-align: center;
			font-size: 32px;
			color: #E18F5F;
			font-family: 'EkusheyLohit', serif;
		}

		.card-title {
			color: #fff;
			font-size: 35px;
			text-align: center;
			margin: 13px 0 23px;
			font-family: 'Noto Serif Bengali', serif;
		}

		.card-bis {
			display: flex;
			align-items: center;

			span {
				width: 100%;
				height: 1px;
				background: #fff;
			}

			.card-description {
				text-align: center;
				display: inline-block;
				background: #fff;
				padding: 3px 10px;
				border-radius: 30px;
				height: 30px;
				max-width: 155px;
				width: 100%;
				margin: 0;
				font-family: 'Tiro Bangla', sans-serif;
			}
		}
	}

	.card-logo {
		position: absolute;
		top: 16px;
		right: 25px;
	}
}

/* ===== Red Border Style ===== */
[data-style="red-border"].active {
	border: 5px solid crimson;
	border-radius: 20px;
	background: #fff5f5;
	box-shadow: 0 0 15px rgba(220, 20, 60, 0.3);
	overflow: hidden;

	.card-image-container {
		height: 350px;
		overflow: hidden;

		img,
		.image-placeholder {
			width: 100%;
			height: 100%;
			object-fit: cover;
			border-bottom: 3px solid crimson;
		}
	}

	.card-content {
		padding: 15px;

		.card-name {
			font-size: 28px;
			color: crimson;
			font-weight: bold;
			text-align: center;
		}

		.card-title {
			font-size: 22px;
			font-weight: 600;
			text-align: center;
			color: #222;
		}

		.card-date {
			text-align: center;
			font-size: 14px;
			color: #999;
		}

		.card-description {
			margin-top: 10px;
			font-size: 16px;
			color: #333;
			font-family: 'Tiro Bangla', serif;
		}
	}

	.card-footer {
		border-top: 2px solid #eee;
		padding: 10px;
		text-align: center;
		font-size: 12px;
		font-style: italic;
		color: #777;
	}
}

/* ===== Quote Style ===== */
[data-style="quote"].active {
	background: #fffaf0;
	border-left: 8px solid #f39c12;
	padding: 20px;
	border-radius: 10px;
	font-style: italic;
	font-family: 'Noto Serif Bengali', serif;

	.card-image-container {
		height: 250px;
		background: #ffeaa7;
		border-radius: 10px;
		overflow: hidden;
	}

	.card-title {
		font-size: 22px;
		text-align: center;
		color: #c0392b;
	}

	.card-description {
		background: #fef5e7;
		padding: 10px;
		border-radius: 5px;
		color: #7f8c8d;
		margin-top: 10px;
	}
}

/* ===== Newspaper Style ===== */
[data-style="news-paper"].active {
	background: #fdfdfd;
	border: 1px solid #ccc;
	padding: 25px;
	font-family: 'Times New Roman', serif;
	color: #222;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

	.card-image-container {
		height: 300px;
		overflow: hidden;
		margin-bottom: 15px;
	}

	.card-name {
		font-size: 18px;
		font-weight: bold;
		text-transform: uppercase;
	}

	.card-title {
		font-size: 26px;
		font-weight: bold;
		margin: 10px 0;
	}

	.card-description {
		font-size: 16px;
		line-height: 1.6;
	}
}

/* Responsive styles */
@media (max-width: 1200px) {
	.main-content {
		grid-template-columns: 1fr;
	}

	.preview-section {
		order: -1;
	}
}

@media (max-width: 992px) {
	.header h1 {
		font-size: 2.2rem;
	}

	.style-selector {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.container {
		border-radius: 0;
	}

	.header {
		padding: 20px 15px;
	}

	.header h1 {
		font-size: 1.8rem;
	}

	.header p {
		font-size: 1rem;
	}

	.main-content {
		padding: 20px;
	}

	.form-section,
	.preview-section {
		padding: 20px;
	}

	.action-buttons {
		grid-template-columns: 1fr;
	}

	.btn {
		padding: 12px 20px;
	}

	.dhakapost .card-content .card-title {
		font-size: 28px;
	}

	.dhakapost .card-content .card-name {
		font-size: 24px;
	}
}

@media (max-width: 576px) {
	body {
		padding: 10px;
	}

	.header h1 {
		font-size: 1.5rem;
	}

	.section-title {
		font-size: 1.2rem;
	}

	.form-group input,
	.form-group textarea,
	.form-group select {
		padding: 12px;
	}

	.upload-area {
		padding: 20px;
	}

	.style-selector {
		grid-template-columns: repeat(2, 1fr);
	}

	.dhakapost .card-image-container {
		height: 300px;
		padding: 50px 15px 0;
	}

	.dhakapost .card-content .card-title {
		font-size: 22px;
	}

	.dhakapost .card-content .card-name {
		font-size: 20px;
	}
}

@media (max-width: 400px) {
	.header h1 {
		font-size: 1.3rem;
	}

	.header p {
		font-size: 0.9rem;
	}

	.main-content {
		padding: 15px;
	}

	.form-section,
	.preview-section {
		padding: 15px;
	}

	.style-selector {
		grid-template-columns: 1fr;
	}
}


.theme-toggle {
	position: fixed;
	bottom: 20px;
	right: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	background-color: var(--card-bg);
	padding: 10px 15px;
	border-radius: 30px;
	box-shadow: 0 4px 10px var(--shadow-color);
	z-index: 100;
}

.toggle-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 24px;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: .4s;
	border-radius: 24px;
}

.toggle-slider:before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 4px;
	bottom: 4px;
	background-color: white;
	transition: .4s;
	border-radius: 50%;
}

input:checked+.toggle-slider {
	background-color: var(--primary-color);
}

input:checked+.toggle-slider:before {
	transform: translateX(26px);
}

.toggle-icon {
	font-size: 1rem;
	color: var(--text-color);
}


.previewDescription {
	font-size: inherit;
	line-height: 1.6;
	text-align: justify;
}

.previewDescription p {
	margin: 0.5em 0;
}

.previewDescription strong {
	font-weight: bold;
}

.previewDescription em {
	font-style: italic;
}

.previewDescription u {
	text-decoration: underline;
}

