:root {
	/* Light Theme Palette */
	--bg-page: #f8fafc;
	--bg-surface: #ffffff;
	--bg-surface-subtle: #f1f5f9;
	--bg-surface-elevated: #f8fafc;

	--text-heading: #0f172a;
	--text-body: #1e293b;
	--text-muted: #64748b;
	--text-word_form: #ff6347;
	--text-subtle: #475569;

	--border-color: #e2e8f0;
	--border-subtle: #f1f5f9;

	/* Brand & Functional Colors */
	--primary-brand: #2563eb;
	--primary-brand-hover: #1d4ed8;
	--primary-brand-light: #eff6ff;

	--accent-bn: #15803d;
	--accent-bn-bg: #f0fdf4;

	--badge-pos-bg: #e0e7ff;
	--badge-pos-text: #3730a3;

	--badge-pos-lg-bg: #0f172a;
	--badge-pos-lg-text: #ffffff;

	--phrase-bg: #fffefa;
	--phrase-border: #fde68a;
	--phrase-title: #92400e;
	--phrase-text: #78350f;

	--grammar-bg: #eff6ff;
	--grammar-border: #bfdbfe;
	--grammar-text: #1e40af;

	--mistake-bg: #fef2f2;
	--mistake-border: #fecaca;
	--mistake-text: #991b1b;

	/* Shadows & Border Radii */
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--radius-full: 9999px;

	--shadow-card: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
	--text-heading: #acff2a;
	--primary-brand: #acff2a;
	--bg-surface-elevated: transparent;
	--text-body: #ffaa00;
	--bg-surface-subtle: transparent;
	--border-color: #acff2a;
	--grammar-bg: #212226;
	--grammar-text: #ede746;
	--grammar-border: #ede746;
	--phrase-bg: #2f2929;
	--phrase-border: #fde68a;
	--phrase-title: #ffc9a8;
	--phrase-text: #ffc9a8;
	--primary-brand-light: #acff2a;
	--border-subtle: #acff2a;
	--bg-surface: #000;
	--text-muted: #ffe000;
	--badge-pos-lg-text: #000;
	--badge-pos-lg-bg: #fff;
	--accent-bn: #5afe97;
	--accent-bn-bg: #3a3a3a;
	--text-subtle: #ffe000;
}

[data-theme="dark"] .sidebar-word-link:hover {
	color: #000;
}

[data-theme="dark"] .note-box.etymology {
	border-color: #ffaa00;
}

[data-theme="dark"] .pos-badge {
	border: 2px solid var(--accent);
	color: var(--accent);
	background: transparent;
}

[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
	border: 1px solid #acff2a;
	outline: 1px solid #acff2a;
}

/* --- Layout & Structure --- */
.page-layout.single_layout {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 32px;
	max-width: 1240px;
	font-family: var(--font-primary);
}

.word-card-main {
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 36px;
	box-shadow: var(--shadow-card);
}

.word-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 5px;
}

.title-row {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.word-title {
	font-size: 46px;
	font-weight: 800;
	color: var(--text-heading);
	margin: 0;
	line-height: 1.1;
	letter-spacing: -0.5px;
	margin-top: auto;
	margin-bottom: auto;
}

.pos-badge {
	margin-top: auto;
	margin-bottom: auto;
	background: var(--badge-pos-bg);
	color: var(--badge-pos-text);
	font-size: 13px;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: var(--radius-full);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.bn-pronunciation {
	font-size: 18px;
	color: var(--text-subtle);
	font-weight: 500;
}

.stress-info,
.syllables-info {
	font-size: 15px;
	color: var(--text-muted);
}

.card-divider {
	border: 0;
	height: 1px;
	background: var(--border-subtle);
	margin: 15px 0;
}

.btn-favorite {
	background: var(--bg-surface-subtle);
	border: 1px solid var(--border-color);
	color: var(--text-heading);
	padding: 10px 18px;
	border-radius: var(--radius-full);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s ease;
	font-family: var(--font-primary);
}

.btn-favorite:hover {
	background: var(--border-color);
	transform: translateY(-1px);
}

/* --- Word Image Illustration --- */
.word-image-container {
	margin: 28px 0;
	text-align: center;
	background: var(--bg-surface-elevated);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	overflow: hidden;
	padding: 16px;
}

.word-illustration {
	max-width: 100%;
	height: auto;
	max-height: 340px;
	border-radius: var(--radius-sm);
	object-fit: cover;
}

/* --- Audio Players --- */
.audio-players-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 30px;
}

.audio-box {
	background: var(--bg-surface-elevated);
	border: 1px solid var(--border-color);
	padding: 14px 18px;
	border-radius: var(--radius-md);
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: border-color 0.2s ease;
}

.audio-box:hover {
	border-color: var(--primary-brand);
}

.accent-info span {
	font-size: 12px;
	font-weight: 800;
	color: var(--text-muted);
	display: block;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.accent-info code {
	font-size: 17px;
	color: var(--text-heading);
	font-weight: 600;
	font-family: var(--font-primary);
}

.btn-audio {
	background: var(--primary-brand);
	color: #ffffff;
	border: none;
	padding: 10px 16px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	font-family: var(--font-primary);
	transition:
		background-color 0.2s ease,
		transform 0.1s ease;
}

.btn-audio:hover {
	background: var(--primary-brand-hover);
	transform: scale(1.02);
}

/* --- Entries & Typography --- */
.label-tag {
	font-size: 13px;
	font-weight: 800;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.8px;
	display: block;
	margin-bottom: 8px;
}

.pos-entry-block {
	margin-bottom: 36px;
}

.pos-entry-block + .pos-entry-block {
	margin-top: 40px;
	border-top: 2px dashed var(--border-color);
	padding-top: 32px;
}

.pos-header-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.pos-badge-lg {
	background: var(--badge-pos-lg-bg);
	color: var(--badge-pos-lg-text);
	font-size: 14px;
	font-weight: 800;
	padding: 6px 14px;
	border-radius: var(--radius-sm);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.word-forms-meta {
	font-size: 16px;
	color: var(--text-muted);
	font-weight: 500;
}

.meaning-section {
	margin-top: 14px;
}

.meaning-section.with-margin {
	margin-bottom: 22px;
	background: var(--accent-bn-bg);
	padding: 18px 20px;
	border-radius: var(--radius-md);
	border-left: 4px solid var(--accent-bn);
}

.bn-meanings-text {
	font-size: 24px;
	font-weight: 700;
	color: var(--accent-bn);
	line-height: 1.5;
}

.en-def-text {
	font-size: 20px;
	line-height: 1.6;
	color: var(--text-heading);
	margin: 0;
	font-weight: 600;
}

.en-def-bn {
	font-size: 17px;
	color: var(--text-subtle);
	margin-top: 8px;
	font-style: normal;
	font-weight: 500;
	line-height: 25px;
}

.examples-container {
	margin-top: 22px;
}

.example-card {
	background: var(--bg-surface-elevated);
	border-left: 4px solid var(--primary-brand);
	padding: 16px 20px;
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	margin-top: 12px;
}

.en-ex {
	font-size: 17px;
	font-weight: 600;
	color: var(--text-heading);
	margin: 0;
	line-height: 1.5;
}

.bn-ex {
	font-size: 16px;
	color: var(--text-subtle);
	margin: 6px 0 0 0;
	font-weight: 500;
	line-height: 24px;
}

.collocations-section {
	margin-top: 20px;
}

.chips-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

.colloc-chip {
	background: var(--primary-brand-light);
	color: var(--primary-brand-hover);
	padding: 6px 14px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 700;
}

/* --- Phrases & Idioms --- */
.phrases-section {
	background: var(--phrase-bg);
	border: 1px solid var(--phrase-border);
	border-radius: var(--radius-md);
	padding: 24px;
	margin-top: 20px;
}

.phrases-title {
	color: var(--phrase-title);
	margin-bottom: 16px;
	font-size: 19px;
	font-weight: 800;
	margin-top: 0;
}

.phrases-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.phrase-item {
	border-bottom: 1px solid rgba(253, 230, 138, 0.6);
	padding-bottom: 12px;
}

.phrase-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.phrase-header {
	font-weight: 800;
	color: var(--phrase-text);
	font-size: 16px;
	line-height: 22px;
}

.phrase-bn-meaning {
	font-weight: 600;
	color: var(--phrase-title);
	font-size: 15px;
}

.phrase-en-ex {
	font-style: italic;
	color: var(--phrase-text);
	font-size: 17px;
	margin-top: 4px;
	margin-bottom: 4px;
}

.phrase-bn-ex {
	color: var(--phrase-title);
	font-size: 15px;
	margin-top: 2px;
	font-weight: 500;
	line-height: 21px;
}

/* --- Educational Notes Grid --- */
.educational-notes-grid {
	margin-top: 30px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.note-box {
	padding: 20px;
	border-radius: var(--radius-md);
}

.note-box h4 {
	margin: 0 0 8px 0;
	font-size: 17px;
	font-weight: 800;
}

.note-box p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	font-weight: 500;
}

.note-box.grammar {
	background: var(--grammar-bg);
	border: 1px solid var(--grammar-border);
	color: var(--grammar-text);
}

.note-box.mistakes {
	background: var(--mistake-bg);
	border: 1px solid var(--mistake-border);
	color: var(--mistake-text);
}

.note-box.etymology {
	background: var(--bg-surface-elevated);
	border: 1px solid var(--border-color);
	color: var(--text-body);
}

/* --- Synonyms & Antonyms --- */
.rel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
	margin-top: 20px;
}

.rel-box h3 {
	font-size: 17px;
	font-weight: 800;
	color: var(--text-heading);
	margin-bottom: 12px;
}

.chip-static {
	background: var(--bg-surface-subtle);
	color: var(--text-heading);
	padding: 8px 16px;
	border-radius: var(--radius-full);
	font-size: 15px;
	font-weight: 600;
	display: inline-block;
	border: 1px solid var(--border-color);
}

/* --- Footer Action & Share --- */
.card-footer-action {
	margin-top: 36px;
	text-align: center;
}

.btn-secondary-custom {
	background: var(--bg-surface-subtle);
	border: 1px solid var(--border-color);
	color: var(--text-heading);
	padding: 12px 24px;
	border-radius: var(--radius-md);
	cursor: pointer;
	font-weight: 700;
	font-size: 15px;
	font-family: var(--font-primary);
	transition: all 0.2s ease;
}

.btn-secondary-custom:hover {
	background: var(--border-color);
}

.share-container {
	margin-top: 36px;
	border-top: 1px solid var(--border-subtle);
	padding-top: 24px;
}

.share-title-label {
	font-size: 14px;
	font-weight: 800;
	color: var(--text-muted);
	margin-bottom: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.share-buttons-group {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.share-btn-custom {
	padding: 10px 18px;
	color: #ffffff;
	border-radius: var(--radius-sm);
	text-decoration: none;
	font-size: 14px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: none;
	cursor: pointer;
	font-family: var(--font-primary);
	transition: opacity 0.2s ease;
}

.share-btn-custom:hover {
	opacity: 0.9;
}

.share-btn-custom.facebook {
	background: #1877f2;
}
.share-btn-custom.whatsapp {
	background: #25d366;
}
.share-btn-custom.twitter {
	background: #000000;
}
.share-btn-custom.telegram {
	background: #229ed9;
}
.share-btn-custom.copy-link {
	background: var(--badge-pos-lg-bg);
	color: var(--badge-pos-lg-text);
}

/* --- Sidebar --- */
.sidebar-card {
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 24px;
	box-shadow: var(--shadow-sm);
}

.sidebar-title {
	font-size: 18px;
	font-weight: 800;
	color: var(--text-heading);
	margin-top: 0;
	margin-bottom: 16px;
}

.sidebar-words-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sidebar-word-link {
	color: var(--primary-brand);
	font-weight: 700;
	text-decoration: none;
	font-size: 15px;
	padding: 6px 10px;
	border-radius: var(--radius-sm);
	transition: background-color 0.2s ease;
}

.sidebar-word-link:hover {
	background-color: var(--primary-brand-light);
}

/* My custom css start */
.word_pronunciation {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 10px;
}
.word_pronunciation > div {
	flex: 1 1 auto;
	margin-top: auto;
	margin-bottom: auto;
	min-width: max-content;
}

.word-card-image-container {
	background-color: #ffffff;
	padding: 15px; /* Adds clean breathing room around the original image */
	border-radius: 8px;
}

.word-illustration {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain; /* Keeps the original image fully intact and unclipped */
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
	.example-card {
		padding: 14px 10px;
	}
	.meaning-section.with-margin {
		padding: 14px 10px;
	}
	.phrases-section {
		padding: 14px 10px;
	}
}

@media (max-width: 900px) {
	.page-layout.single_layout {
		grid-template-columns: 1fr;
	}
	.word-card-main {
		padding: 24px;
	}
	.word-title {
		font-size: 36px;
	}
	.bn-meanings-text {
		font-size: 18px;
	}
	.en-def-text {
		font-size: 18px;
	}
}
