.main-nickname {
	min-height: calc(100vh - 56px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.nickname-card {
	min-width: 320px;
	max-width: 480px;
	width: 100%;
}


.card-soft {
	background: #f8f9fa;
	border: 0;
	border-radius: .35rem;
	box-shadow: 0 1px 2px rgba(0,0,0,.1);
	min-height: 120px;
}

.section-title {
	text-align: center;
	font-weight: 500;
	margin: 1.25rem 0 .75rem;
}

.stats-title {
	text-align: center;
	font-weight: 500;
	margin-bottom: .75rem;
}

.stat-single,
.stat-grid {
	text-align: center;
}

.stat-grid {
	display: flex;
	justify-content: center;
	gap: 2rem;
}

.label {
	font-size: .9rem;
	color: #444;
}

.value {
	font-size: 1.5rem;
	font-weight: 600;
}

.navbar-logo {
	height: 64px;
	width: auto;
}

.index-logo,
.navbar-logo-index {
  position: static;
}

.index-logo {
  height: 150px;
  width: auto;
}

.title-with-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title-logo-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.title-main {
  margin: 0;
}

.navbar {
  background-color: rgb(168, 180, 247);
}
.mistake-block {
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.mistake-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}
.mistake-code {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 4px;
  border-left: 4px solid #dc3545;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}
.mistake-code code {
  background-color: transparent;
  padding: 0;
  color: #212529;
  white-space: pre;
}

/* Task List Selector Styles */
.task-list-selector-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.task-lists-column {
  flex: 1;
  order: 1;
}

.add-button-column {
  width: 300px;
  flex-shrink: 0;
  order: 2;
}

.task-list-item {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #dee2e6;
  margin-bottom: 1rem;
  padding: 1.25rem;
  background-color: #fff;
  border-radius: 0.35rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.task-list-item:hover {
  border-color: #007bff;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
  transform: translateY(-2px);
}

.task-list-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.task-list-code {
  font-family: 'Courier New', monospace;
  background-color: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  display: inline-block;
  border: 1px solid #dee2e6;
}

.task-list-meta {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

.task-list-description {
  font-size: 0.95rem;
  color: #555;
  margin: 1rem 0 0 0;
  line-height: 1.5;
  padding: 1rem;
  background: #f9f9f9;
  border-left: 4px solid #007bff;
  border-radius: 4px;
  font-style: italic;
}

.create-new-card {
  border: 2px dashed #28a745;
  background-color: #f8f9fa;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0.35rem;
  text-align: center;
  padding: 2rem;
  color: #28a745;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.create-new-card:hover {
  border-color: #28a745;
  border-style: solid;
  background-color: #e9f7ef;
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
  transform: translateY(-2px);
}

.create-new-card i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.loading-spinner {
  text-align: center;
  padding: 3rem;
}

/* Task List Statistics - Two Column Layout */
.statistics-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.tasks-column {
  flex: 1;
  order: 1;
}

.students-column {
  width: 400px;
  flex-shrink: 0;
  order: 2;
}

/* Task List Statistics - Students Section */
.students-section {
  position: sticky;
  top: 1rem;
}

.students-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.student-item {
  border: 2px solid #dee2e6;
  padding: 1rem 1.25rem;
  background-color: #fff;
  border-radius: 0.35rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: all 0.2s ease;
}

.student-item:hover {
  border-color: #6c757d;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.student-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.student-meta {
  font-size: 0.875rem;
  color: #6c757d;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.student-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.student-meta-item i {
  color: #007bff;
}

/* Student Attempts Page */
.student-item {
  cursor: pointer;
}

.student-item:hover {
  border-color: #007bff;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
  transform: translateY(-2px);
}

/* Student Task Statistics Page */
.attempts-column {
  flex: 1;
  order: 1;
}

.statistics-column {
  width: 400px;
  flex-shrink: 0;
  order: 2;
}

.statistics-sticky {
  position: sticky;
  top: 1rem;
}

.attempts-header {
  cursor: pointer;
  padding: 1rem 1.25rem;
  background-color: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 0.35rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.attempts-header:hover {
  background-color: #e9ecef;
  border-color: #007bff;
}

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

.attempts-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.expand-icon {
  transition: transform 0.2s ease;
}

.expand-icon.expanded {
  transform: rotate(180deg);
}

.attempts-list {
  display: none;
  margin-top: 0.5rem;
}

.attempts-list.expanded {
  display: block;
}

.attempt-item {
  border: 2px solid #dee2e6;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background-color: #fff;
  border-radius: 0.35rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.attempt-item.success {
  border-left: 4px solid #28a745;
}

.attempt-item.failure {
  border-left: 4px solid #dc3545;
}

.attempt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.attempt-number {
  font-weight: 600;
  font-size: 1rem;
}

.attempt-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.attempt-badge.success {
  background-color: #d4edda;
  color: #155724;
}

.attempt-badge.failure {
  background-color: #f8d7da;
  color: #721c24;
}

.attempt-meta {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.attempt-code {
  background-color: #f8f9fa;
  padding: 0.75rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid #dee2e6;
  max-height: 200px;
  overflow-y: auto;
}

.model-answer-code {
  background-color: #eaf8ee;
  border: 1px solid #9ed6ac;
  border-left: 4px solid #28a745;
}

.model-answer-code code {
  color: #155724;
}

@media (min-width: 992px) {
  .model-answer-sticky {
    position: sticky;
    top: 1rem;
  }

  .model-answer-sticky .model-answer-code {
    max-height: 70vh;
    overflow-y: auto;
  }
}

.stat-box {
  background-color: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 0.35rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.stat-box h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #333;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #dee2e6;
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 0.875rem;
  color: #6c757d;
}

.stat-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

.create-task-list-container {
  max-width: 1000px;
  margin: 2rem auto;
}

.task-list-form {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h5 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
}

.task-selector {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.task-item:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.task-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.task-item.selected {
  background: #e7f3ff;
  border-color: #007bff;
}

.task-item-content {
  flex: 1;
}

.task-item-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.task-item-type {
  font-size: 0.875rem;
  color: #6c757d;
}

.task-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.preview-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
}

.preview-btn:hover {
  color: #0056b3;
  text-decoration: underline;
}

.selected-tasks-list {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1rem;
  min-height: 100px;
}

.selected-task-item {
  background: #e7f3ff;
  border-left: 4px solid #007bff;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}

.selected-task-item:last-child {
  margin-bottom: 0;
}

.selected-task-item.dragging {
  opacity: 0.5;
  background: #d0e8ff;
}

.selected-task-item.drag-over {
  border-top: 3px solid #28a745;
  padding-top: calc(0.75rem - 3px);
}

.selected-task-item-content {
  flex: 1;
}

.selected-task-item-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.selected-task-item-type {
  font-size: 0.875rem;
  color: #6c757d;
}

.selected-task-item-controls {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.drag-handle {
  cursor: grab;
  color: #6c757d;
  padding: 0 0.5rem;
}

.drag-handle:active {
  cursor: grabbing;
}

.remove-task-btn {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
}

.remove-task-btn:hover {
  color: #c82333;
}

.empty-selected {
  color: #6c757d;
  font-style: italic;
  padding: 2rem 1rem;
  text-align: center;
}

.form-group label {
  font-weight: 500;
  color: #333;
}

.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-submit {
  background: #28a745;
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 500;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-submit:hover {
  background: #218838;
  color: white;
}

.btn-cancel {
  background: #6c757d;
  color: white;
  padding: 0.75rem 2rem;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-cancel:hover {
  background: #5a6268;
  color: white;
  text-decoration: none;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.search-box {
  margin-bottom: 1rem;
}

.search-box input {
  border-radius: 6px;
}

.error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.success-message {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.checkbox-custom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.task-type-badge {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
