:root {
	--primary-color: #4a90e2;
	--secondary-color: #50c878;
	--danger-color: #e74c3c;
	--warning-color: #f39c12;
	--dark-color: #2c3e50;
	--light-color: #ecf0f1;
	--text-color: #333;
	--border-color: #ddd;
}

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

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	line-height: 1.6;
	color: var(--text-color);
	background-color: #f5f7fa;
}

/* Globalne style dla linków */
a {
	color: var(--primary-color);
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
	color: #3a7bc8;
	text-decoration: underline;
}

a:visited {
	color: var(--primary-color);
}

a:active {
	color: #2d6aa8;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.header {
	background-color: var(--dark-color);
	color: white;
	padding: 1rem 0;
	margin-bottom: 2rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

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

.nav {
	display: flex;
	gap: 1rem;
	align-items: center;
}

.nav a {
	color: white;
	text-decoration: none;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	transition: background-color 0.3s;
}

.nav a:visited {
	color: white;
}

.nav a:hover {
	background-color: rgba(255, 255, 255, 0.1);
	text-decoration: none;
}

.btn {
	display: inline-block;
	padding: 0.6rem 1.2rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	font-size: 1rem;
	transition: all 0.3s;
	text-align: center;
}

.btn:visited {
	color: inherit;
	text-decoration: none;
}

.btn:hover {
	text-decoration: none;
}

.btn-primary {
	background-color: var(--primary-color);
	color: white;
}

.btn-primary:visited {
	color: white;
}

.btn-primary:hover {
	background-color: #3a7bc8;
	color: white;
}

.btn-success {
	background-color: var(--secondary-color);
	color: white;
}

.btn-success:visited {
	color: white;
}

.btn-success:hover {
	background-color: #40a060;
	color: white;
}

.btn-danger {
	background-color: var(--danger-color);
	color: white;
}

.btn-danger:visited {
	color: white;
}

.btn-danger:hover {
	background-color: #c0392b;
	color: white;
}

.btn-secondary {
	background-color: #95a5a6;
	color: white;
}

.btn-secondary:visited {
	color: white;
}

.btn-secondary:hover {
	background-color: #7f8c8d;
	color: white;
}

.btn-sm {
	padding: 0.4rem 0.8rem;
	font-size: 0.9rem;
}

.card {
	background: white;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
	font-size: 1.4rem;
	font-weight: bold;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--border-color);
}

.help-text {
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 1rem;
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 0.6rem;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: var(--primary-color);
}

.alert {
	padding: 1rem;
	border-radius: 4px;
	margin-bottom: 1.5rem;
}

.alert-success {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.alert-error {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

.alert-info {
	background-color: #d1ecf1;
	border: 1px solid #bee5eb;
	color: #0c5460;
}

.training-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

.training-card {
	background: white;
	border-radius: 8px;
	padding: 1.5rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s, box-shadow 0.3s;
}

.training-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.training-card h3 {
	margin-bottom: 0.5rem;
	color: var(--dark-color);
}

.training-card p {
	color: #666;
	margin-bottom: 1rem;
}

.training-description {
	color: #666;
	margin-bottom: 1rem;
	max-height: 300px;
	overflow-y: auto;
	font-size: 0.95rem;
	line-height: 1.5;
}

.training-description h2 {
	font-size: 1.1rem;
	margin: 1rem 0 0.5rem 0;
	color: var(--dark-color);
}

.training-description h3 {
	font-size: 1rem;
	margin: 0.8rem 0 0.4rem 0;
	color: var(--dark-color);
}

.training-description p {
	margin-bottom: 0.8rem;
}

.training-description ul,
.training-description ol {
	margin: 0.5rem 0 0.8rem 1.5rem;
}

.training-description li {
	margin-bottom: 0.3rem;
}

.training-description strong {
	color: var(--dark-color);
	font-weight: 600;
}

.module-description {
	color: #666;
	padding: 1rem;
	background-color: #f9f9f9;
	border-radius: 4px;
	margin: 0.5rem 0 1rem 0;
	font-size: 0.95rem;
}

.module-description h2,
.module-description h3 {
	font-size: 1rem;
	margin: 0.8rem 0 0.4rem 0;
	color: var(--dark-color);
}

.module-description p {
	margin-bottom: 0.6rem;
}

.module-description ul,
.module-description ol {
	margin: 0.5rem 0 0.6rem 1.5rem;
}

.module-description li {
	margin-bottom: 0.2rem;
}

.progress-bar {
	width: 100%;
	height: 24px;
	background-color: var(--light-color);
	border-radius: 12px;
	overflow: visible;
	margin: 1rem 0;
	position: relative;
}

.progress-bar-fill {
	height: 100%;
	background-color: var(--secondary-color);
	transition: width 0.3s;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 8px;
	color: white;
	font-size: 0.85rem;
	font-weight: bold;
	border-radius: 12px;
	min-width: 50px;
	white-space: nowrap;
}

.lesson-list {
	list-style: none;
	counter-reset: lesson-counter;
	padding: 0;
}

.lesson-item {
	padding: 1rem;
	padding-left: 3.5rem;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	margin-bottom: 0.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: all 0.3s;
	position: relative;
	counter-increment: lesson-counter;
}

.lesson-item::before {
	content: counter(lesson-counter);
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--primary-color) 0%, #3a7bc8 100%);
	color: white;
	font-weight: 700;
	font-size: 1.1rem;
	border-radius: 4px 0 0 4px;
}

.lesson-item:hover {
	background-color: #f8f9fa;
	transform: translateX(3px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lesson-item.completed {
	background-color: #e8f5e9;
	border-color: var(--secondary-color);
}

.lesson-item.completed::before {
	background: linear-gradient(135deg, var(--secondary-color) 0%, #40a060 100%);
	content: "✓";
	font-size: 1.3rem;
}

.lesson-item a {
	text-decoration: none;
	color: var(--dark-color);
	flex: 1;
	font-weight: 500;
}

.lesson-content {
	max-width: 960px;
	margin: 0 auto;
	background: white;
	line-height: 1.8;
	font-size: 16px;
	color: #333;
}

/* Nagłówki - hierarchia wizualna */
.lesson-content h1 {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--dark-color);
	margin-bottom: 1.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 3px solid var(--primary-color);
	line-height: 1.3;
}

.lesson-content h2 {
	font-size: 2rem;
	font-weight: 600;
	color: var(--dark-color);
	margin-top: 3rem;
	margin-bottom: 1.2rem;
	padding-left: 0.8rem;
	border-left: 4px solid var(--primary-color);
	line-height: 1.4;
}

.lesson-content h3 {
	font-size: 1.5rem;
	font-weight: 600;
	color: #444;
	margin-top: 2rem;
	margin-bottom: 1rem;
	line-height: 1.4;
}

.lesson-content h4 {
	font-size: 1.2rem;
	font-weight: 600;
	color: #555;
	margin-top: 1.5rem;
	margin-bottom: 0.8rem;
}

/* Akapity */
.lesson-content p {
	margin-bottom: 1.5rem;
	text-align: justify;
	color: #444;
}

/* Listy - poprawione wcięcia i styling */
.lesson-content ul,
.lesson-content ol {
	margin-left: 2rem;
	margin-bottom: 1.5rem;
	padding-left: 1rem;
}

.lesson-content ul {
	list-style-type: disc;
}

.lesson-content ol {
	list-style-type: decimal;
}

.lesson-content li {
	margin-bottom: 0.6rem;
	line-height: 1.7;
	padding-left: 0.5rem;
}

.lesson-content li:last-child {
	margin-bottom: 0;
}

/* Napraw zagnieżdżone <p> w <li> - to błąd parsera */
.lesson-content ul p,
.lesson-content ol p,
.lesson-content li p {
	display: inline;
	margin: 0;
	padding: 0;
}

.lesson-content ul li::marker {
	color: var(--primary-color);
	font-size: 1.1em;
}

.lesson-content ol li::marker {
	color: var(--primary-color);
	font-weight: 600;
}

/* Zagnieżdżone listy */
.lesson-content ul ul,
.lesson-content ol ul,
.lesson-content ul ol,
.lesson-content ol ol {
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
	margin-left: 1.5rem;
}

/* Usunięcie niepotrzebnych br */
.lesson-content br {
	display: none;
}

/* Pogrubienie i kursywa */
.lesson-content strong {
	font-weight: 700;
	color: var(--dark-color);
}

.lesson-content em {
	font-style: italic;
	color: #555;
}

/* Cytaty */
.lesson-content blockquote {
	background-color: #f9f9f9;
	border-left: 4px solid var(--primary-color);
	margin: 1.5rem 0;
	padding: 1rem 1.5rem;
	font-style: italic;
	color: #666;
}

/* Kod inline */
.lesson-content code {
	background-color: #f0f0f0;
	color: #c7254e;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	font-family: 'Courier New', 'Monaco', monospace;
	font-size: 0.9em;
}

/* Bloki kodu */
.lesson-content pre {
	background-color: #2d2d2d;
	color: #f8f8f2;
	padding: 1.5rem;
	border-radius: 6px;
	overflow-x: auto;
	margin: 1.5rem 0;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lesson-content pre code {
	background-color: transparent;
	color: inherit;
	padding: 0;
	border-radius: 0;
	font-size: 0.95em;
	line-height: 1.5;
}

/* Linki */
.lesson-content a {
	color: var(--primary-color);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s;
}

.lesson-content a:hover {
	border-bottom-color: var(--primary-color);
}

/* Obrazy */
.lesson-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 2rem auto;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	display: block;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Obrazy w linkach (GLightbox) */
.lesson-content a.glightbox {
	display: block;
	margin: 2rem 0;
	text-align: center;
	border-bottom: none !important;
	line-height: 0;
}

.lesson-content a.glightbox img {
	margin: 0 auto;
	cursor: zoom-in;
}

.lesson-content a.glightbox:hover img {
	transform: scale(1.02);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Tabele */
.lesson-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 2rem 0;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lesson-content table th,
.lesson-content table td {
	padding: 1rem;
	text-align: left;
	border-bottom: 1px solid #e0e0e0;
}

.lesson-content table th {
	background-color: var(--dark-color);
	color: white;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.9em;
	letter-spacing: 0.5px;
}

.lesson-content table tr:hover {
	background-color: #f8f9fa;
}

.lesson-content table tr:last-child td {
	border-bottom: none;
}

/* Responsive video wrapper */
.lesson-content .video-wrapper {
	position: relative;
	padding-bottom: 56.25%;
	/* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
	margin: 2.5rem 0;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lesson-content .video-wrapper iframe,
.lesson-content .video-wrapper video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 8px;
}

.lesson-content .video-wrapper video {
	background-color: #000;
}

/* Linia pozioma */
.lesson-content hr {
	border: none;
	border-top: 2px solid #e0e0e0;
	margin: 3rem 0;
}

/* Kontrola odstępów między elementami */
.lesson-content>*:first-child {
	margin-top: 0 !important;
}

.lesson-content>*:last-child {
	margin-bottom: 0 !important;
}

.lesson-content h2+p,
.lesson-content h3+p {
	margin-top: 0;
}

.lesson-content p+ul,
.lesson-content p+ol {
	margin-top: -0.5rem;
}

.lesson-navigation {
	display: flex;
	justify-content: space-between;
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 2px solid var(--border-color);
}

.table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

.table th,
.table td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid var(--border-color);
}

.table th {
	background-color: var(--dark-color);
	color: white;
	font-weight: 600;
}

.table tr:hover {
	background-color: #f8f9fa;
}

.badge {
	display: inline-block;
	padding: 0.25rem 0.6rem;
	border-radius: 12px;
	font-size: 0.85rem;
	font-weight: 500;
}

.badge-success {
	background-color: var(--secondary-color);
	color: white;
}

.badge-warning {
	background-color: var(--warning-color);
	color: white;
}

.badge-info {
	background-color: var(--primary-color);
	color: white;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.stat-card {
	background: white;
	padding: 1.5rem;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	text-align: center;
}

.stat-card h3 {
	font-size: 2rem;
	color: var(--primary-color);
	margin-bottom: 0.5rem;
}

.stat-card p {
	color: #666;
	font-size: 0.9rem;
}

.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
	background-color: white;
	margin: 10% auto;
	padding: 2rem;
	border-radius: 8px;
	max-width: 500px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#modalTitle {
	margin-bottom: 1rem;
	font-size: 1.5rem;
	color: var(--dark-color);
}

.close {
	color: #aaa;
	float: right;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
}

.close:hover {
	color: #000;
}


@media (max-width: 768px) {
	.training-grid {
		grid-template-columns: 1fr;
	}

	.header .container {
		flex-direction: column;
		gap: 1rem;
	}

	.stats-grid {
		grid-template-columns: 1fr;
	}


	.lesson-content {
		padding: 1.5rem;
		font-size: 15px;
	}
}

/* ========== ZADANIA W LEKCJACH ========== */

.task-item {
	padding: 0.8rem 1rem;
	margin: 0.5rem 0;
	background-color: #f8f9fa;
	border-left: 3px solid var(--primary-color);
	border-radius: 4px;
	transition: all 0.3s ease;
}

.task-item:hover {
	background-color: #e9ecef;
}

.task-item.completed {
	background-color: #d4edda;
	border-left-color: var(--secondary-color);
}

.task-item label {
	display: flex;
	align-items: center;
	cursor: pointer;
	margin: 0;
	font-weight: 400;
}

.task-checkbox {
	width: 20px;
	height: 20px;
	margin-right: 12px;
	cursor: pointer;
	flex-shrink: 0;
	accent-color: var(--secondary-color);
}

.task-item.completed label {
	color: #155724;
}

.task-item.completed .task-checkbox:checked+span {
	text-decoration: line-through;
	opacity: 0.7;
}

/* Podpunkty zadań (subtasks) */
.task-subtasks {
	margin: 0.5rem 0 0 2rem;
	padding: 0;
	list-style-type: disc;
	color: #495057;
	font-size: 0.9em;
}

.task-subtasks li {
	margin: 0.3rem 0;
	line-height: 1.5;
}

/* Separacja zadań od innych elementów */
.lesson-content .task-item+p,
.lesson-content .task-item+h1,
.lesson-content .task-item+h2,
.lesson-content .task-item+h3 {
	margin-top: 2rem;
}

/* ========================================
   MODUŁY - Style dla modułów w szkoleniach
   ======================================== */

.modules-container {
	margin-top: 1rem;
}

.module-section {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	overflow: hidden;
	transition: all 0.3s ease;
}

.module-section:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.module-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 1.2rem 1.5rem;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: all 0.3s ease;
	user-select: none;
}

.module-header:hover {
	background: linear-gradient(135deg, #5568d3 0%, #653a91 100%);
}

.module-title-area {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 1;
}

.module-toggle-icon {
	font-size: 1.2rem;
	transition: transform 0.3s ease;
	width: 24px;
	text-align: center;
}

.module-toggle-icon.collapsed {
	transform: rotate(-90deg);
}

.module-title {
	margin: 0;
	font-size: 1.3rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.8rem;
}

.module-progress-info {
	font-size: 0.95rem;
	opacity: 0.9;
	white-space: nowrap;
}

.module-description {
	background: white;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid #dee2e6;
	color: #555;
	font-size: 0.95rem;
	line-height: 1.6;
}

.module-progress-bar {
	width: 100%;
	height: 8px;
	background-color: rgba(255, 255, 255, 0.3);
	overflow: visible;
	transition: max-height 0.3s ease, opacity 0.3s ease;
	max-height: 8px;
	opacity: 1;
	position: relative;
}

.module-progress-bar.collapsed {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
}

.module-progress-bar .progress-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--secondary-color) 0%, #40a060 100%);
	transition: width 0.5s ease;
	font-size: 0;
	min-width: 2px;
	/* Minimalna szerokość aby było widać że istnieje */
}

.module-lessons {
	background: white;
	padding: 0.5rem;
	transition: max-height 0.3s ease, opacity 0.3s ease;
	max-height: 2000px;
	opacity: 1;
}

.module-lessons.collapsed {
	max-height: 0;
	opacity: 0;
	padding: 0;
	overflow: hidden;
}

.module-lessons .lesson-item {
	margin: 0.5rem;
}

.module-section.completed .module-header {
	background: linear-gradient(135deg, var(--secondary-color) 0%, #40a060 100%);
}

/* Breadcrumb navigation */
.breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0.8rem 0;
	font-size: 0.95rem;
	color: #666;
	border-bottom: 1px solid #eee;
}

.breadcrumb a {
	color: var(--primary-color);
	text-decoration: none;
	transition: color 0.2s ease;
}

.breadcrumb a:hover {
	color: #3a7bc8;
	text-decoration: underline;
}

.breadcrumb-separator {
	color: #aaa;
	font-weight: 300;
}

.breadcrumb-current {
	color: var(--dark-color);
	font-weight: 500;
}

/* Badge dla ukończonych modułów */
.badge {
	display: inline-block;
	padding: 0.3rem 0.7rem;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.badge-success {
	background-color: var(--secondary-color);
	color: white;
}

.badge-info {
	background-color: var(--primary-color);
	color: white;
}

.badge-warning {
	background-color: var(--warning-color);
	color: white;
}

/* Responsywność dla modułów */
@media (max-width: 768px) {
	.module-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.8rem;
	}

	.module-progress-info {
		width: 100%;
		text-align: left;
	}

	.module-title {
		font-size: 1.1rem;
	}

	.breadcrumb {
		font-size: 0.85rem;
	}
}

/* ============================================
   Highlight.js - Syntax Highlighting (GitHub Theme)
   ============================================ */

.hljs {
	display: block;
	overflow-x: auto;
	padding: 0;
	background: transparent;
	color: #24292e;
}

/* Komentarze - podświetlone fragmenty tekstu */
.text-comment-highlight {
	background: linear-gradient(180deg, transparent 60%, #ffd54f 60%);
	border-bottom: 2px solid #ffc107;
	padding: 2px 4px;
	margin: 0 2px;
	border-radius: 2px;
	transition: all 0.3s ease;
	position: relative;
	display: inline;
}

.text-comment-highlight:hover {
	background: linear-gradient(180deg, transparent 50%, #ffeb3b 50%);
	border-bottom-color: #ff9800;
	box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.text-comment-highlight .comment-count-badge {
	display: inline-block;
	background: #ff5722;
	color: white;
	font-size: 10px;
	font-weight: bold;
	padding: 2px 5px;
	border-radius: 10px;
	margin-left: 4px;
	vertical-align: super;
	line-height: 1;
	min-width: 16px;
	text-align: center;
}

/* Modal wątku komentarzy */
#commentThreadModal .thread-selected-text {
	background: #f5f5f5;
	border-left: 4px solid var(--primary-color);
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 4px;
}

#commentThreadModal .thread-selected-text p {
	margin: 10px 0 0 0;
	font-style: italic;
	color: #555;
}

#commentThreadModal .thread-comments {
	margin-bottom: 20px;
	max-height: 400px;
	overflow-y: auto;
	padding-right: 10px;
}

#commentThreadModal .thread-reply-section {
	border-top: 2px solid #e0e0e0;
	padding-top: 20px;
}

#commentThreadModal .thread-reply-section h4 {
	margin: 0 0 15px 0;
	color: #333;
	font-size: 16px;
}

#commentThreadModal .thread-reply-section textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: inherit;
	font-size: 14px;
	margin-bottom: 10px;
	resize: vertical;
	min-height: 100px;
}

#commentThreadModal .thread-reply-section textarea:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

#commentThreadModal .thread-reply-section .btn {
	float: right;
}

/* Stary system wskaźników - ukryty */
.comment-indicator {
	display: none;
}

/* Komentarze - stara sekcja */
.hljs-comment,
.hljs-quote {
	color: #6a737d;
	font-style: italic;
}

/* Stringi, wartości */
.hljs-string,
.hljs-template-variable,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
	color: #032f62;
}

/* Liczby */
.hljs-number,
.hljs-literal {
	color: #005cc5;
}

/* Słowa kluczowe, tagi */
.hljs-keyword,
.hljs-selector-tag,
.hljs-deletion,
.hljs-name,
.hljs-section,
.hljs-built_in,
.hljs-selector-class {
	color: #d73a49;
}

/* Funkcje, metody */
.hljs-title,
.hljs-function .hljs-title,
.hljs-class .hljs-title {
	color: #6f42c1;
}

/* Atrybuty, zmienne */
.hljs-attr,
.hljs-variable,
.hljs-template-tag,
.hljs-type,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-link {
	color: #005cc5;
}

/* Parametry */
.hljs-params {
	color: #24292e;
}

/* Symbole, operatory */
.hljs-symbol,
.hljs-bullet,
.hljs-subst,
.hljs-meta,
.hljs-meta-keyword,
.hljs-selector-id,
.hljs-title.class_,
.hljs-class .hljs-title.class_ {
	color: #22863a;
}

/* Doctrinki, dekoratory */
.hljs-doctag,
.hljs-strong {
	font-weight: bold;
}

/* Podkreślenie */
.hljs-emphasis {
	font-style: italic;
}

/* Dodatkowe style dla lepszej czytelności */
.lesson-content .hljs {
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	font-size: 0.9em;
	line-height: 1.6;
}

/* Override dla pre - zapewnia dark mode background */
.lesson-content pre {
	background: #f6f8fa;
	border: 1px solid #e1e4e8;
	border-radius: 6px;
	padding: 16px;
}

.lesson-content pre code.hljs {
	background: transparent;
	color: #24292e;
}

/* ========================================
   SYSTEM KOMENTARZY
   ======================================== */

/* Przycisk "Dodaj komentarz" po zaznaczeniu tekstu */
#addCommentBtn {
	display: none;
	position: absolute;
	z-index: 1000;
	background: var(--primary-color);
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: all 0.2s ease;
}

#addCommentBtn:hover {
	background: #3a7bc8;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Wskaźnik komentarza przy akapicie */
.comment-indicator {
	display: inline-block;
	margin-right: 8px;
	cursor: pointer;
	font-size: 16px;
	opacity: 0.7;
	transition: all 0.2s ease;
}

.comment-indicator:hover {
	opacity: 1;
	transform: scale(1.2);
}

/* Kontener komentarzy */
#commentsContainer {
	margin-top: 40px;
	padding: 20px 0;
	border-top: 2px solid var(--border-color);
}

.comments-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.no-comments {
	text-align: center;
	color: #999;
	padding: 40px 20px;
	font-style: italic;
}

/* Pojedynczy komentarz */
.comment {
	background: white;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 16px;
	transition: all 0.2s ease;
}

.comment-thread {
	border-left: 4px solid var(--primary-color);
}

.comment-reply {
	margin-left: 40px;
	border-left: 3px solid #e0e0e0;
	background: #f9f9f9;
}

.comment.highlight-comment {
	background: #fffbcc;
	border-color: var(--warning-color);
	animation: highlightPulse 2s ease;
}

@keyframes highlightPulse {

	0%,
	100% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.02);
	}
}

/* Header komentarza */
.comment-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #f0f0f0;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.comment-author strong {
	color: var(--dark-color);
}

.comment-date {
	font-size: 12px;
	color: #999;
}

/* Badge'e */
.badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: bold;
	text-transform: uppercase;
}

.badge-admin {
	background: #667eea;
	color: white;
}

.badge-success {
	background: var(--secondary-color);
	color: white;
}

.badge-warning {
	background: var(--warning-color);
	color: white;
}

/* Zaznaczony tekst w komentarzu */
.comment-selected-text {
	background: #fef3c7;
	border-left: 4px solid #f59e0b;
	padding: 12px;
	margin: 12px 0;
	border-radius: 4px;
}

.comment-selected-text strong {
	display: block;
	margin-bottom: 6px;
	color: #92400e;
	font-size: 12px;
	text-transform: uppercase;
}

.comment-selected-text p {
	margin: 0;
	font-style: italic;
	color: #451a03;
}

/* Treść komentarza */
.comment-body {
	margin: 12px 0;
	line-height: 1.6;
	color: var(--text-color);
}

/* Akcje komentarza */
.comment-actions {
	display: flex;
	gap: 16px;
	margin-top: 12px;
	padding-top: 8px;
	border-top: 1px solid #f0f0f0;
}

.btn-link {
	background: none;
	border: none;
	color: var(--primary-color);
	cursor: pointer;
	font-size: 13px;
	padding: 4px 0;
	transition: all 0.2s ease;
}

.btn-link:hover {
	color: #3a7bc8;
	text-decoration: underline;
}

/* Odpowiedzi */
.comment-replies {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Modal komentarza */
#commentModal .modal-content {
	max-width: 600px;
}

.selected-text-display {
	background: #fef3c7;
	border-left: 4px solid #f59e0b;
	padding: 12px;
	margin-bottom: 20px;
	border-radius: 4px;
}

.selected-text-display strong {
	display: block;
	margin-bottom: 8px;
	color: #92400e;
	font-size: 13px;
}

.selected-text-display p {
	margin: 0;
	font-style: italic;
	color: #451a03;
	line-height: 1.5;
}

#commentTextarea {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
	min-height: 120px;
}

#commentTextarea:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Modal - podstawowe style jeśli jeszcze nie ma */
.modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	overflow-y: auto;
	padding: 20px;
}

.modal-content {
	background-color: white;
	margin: 50px auto;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	max-width: 500px;
	animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
	from {
		transform: translateY(-50px);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.modal-header {
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-title {
	margin: 0;
	font-size: 20px;
	color: var(--dark-color);
}

.modal-close {
	background: none;
	border: none;
	font-size: 28px;
	cursor: pointer;
	color: #999;
	line-height: 1;
	transition: color 0.2s ease;
}

.modal-close:hover {
	color: var(--dark-color);
}

.modal-body {
	padding: 24px;
}

.modal-footer {
	padding: 16px 24px;
	border-top: 1px solid #e5e7eb;
	display: flex;
	justify-content: flex-end;
	gap: 12px;
}

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

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: var(--dark-color);
	font-size: 14px;
}

/* Responsywność dla komentarzy */
@media (max-width: 768px) {
	.comment-reply {
		margin-left: 20px;
	}

	.comment-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.comment-actions {
		flex-wrap: wrap;
	}

	.modal-content {
		margin: 20px auto;
	}
}