.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;
}

.screenshots {
  display: block;
  height: 500px;
  width: auto;
  margin: auto;
  border: 3px solid black;
}

.title-main {
  margin: 0;
}

.navbar {
  background-color: rgb(168, 180, 247);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.register-row {
	margin-top: 1rem;
}

.register-title {
	text-align: center;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.3),
    0 8px 20px rgba(100, 120, 255, 0.25);
}
.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;
}

.test-details-line-pass {
  color: #218838;
  font-weight: 600;
}

.test-details-line-fail {
  color: #c82333;
  font-weight: 600;
}

/* 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;
}

/* Admin Token Management Styles */
.admin-section {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.admin-section h3 {
  color: #333;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-card {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease;
}

.admin-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.admin-card .card-body {
  padding: 1.5rem;
}

.admin-card .card-title {
  color: #333;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.admin-card .card-text {
  margin-bottom: 1rem;
}

#token-display {
  background: #cfe2ff;
  border: 1px solid #b6d4fe;
  border-radius: 6px;
  padding: 1.25rem;
  color: #084298;
}

#token-display strong {
  color: #084298;
}

#token-value {
  background: white !important;
  border: 1px solid #dee2e6 !important;
  padding: 0.75rem !important;
  border-radius: 4px !important;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  word-break: break-all;
  user-select: all;
  margin-bottom: 0.75rem;
}

.token-items {
  max-height: 350px;
  overflow-y: auto;
}

.token-item {
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.token-item:hover {
  background-color: #f1f3f5;
}

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

.token-item small {
  display: block;
  line-height: 1.4;
}

.token-item small.text-dark {
  color: #212529 !important;
}

.token-item small.text-muted {
  color: #6c757d !important;
}

.tokens-list {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
}

#create-token-btn,
#copy-token-btn {
  transition: all 0.2s ease;
}

#create-token-btn:hover:not(:disabled),
#copy-token-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#create-token-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-outline-danger:hover {
  background-color: #dc3545;
  border-color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .admin-section {
    padding: 1.5rem;
  }

  .admin-section h3 {
    font-size: 1.25rem;
  }

  .admin-card .card-body {
    padding: 1rem;
  }

  .token-items {
    max-height: 250px;
  }
}

/* Problemset (student task list) page */
.problemset-layout {
  display: flex;
  min-height: calc(100vh - 56px);
}

.problemset-sidebar {
  width: 480px;
  flex-shrink: 0;
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
  padding: 2rem 1.5rem;
}

.problemset-sidebar-sticky {
  position: sticky;
  top: 2rem;
}

.problemset-sidebar-heading {
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #495057;
}

.progress-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.progress-count-row {
  margin-bottom: 1.25rem;
}

.progress-count-label {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.progress-count-value {
  font-size: 2.75rem;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.progress-count-done {
  color: #007bff;
}

.progress-count-sep {
  color: #adb5bd;
  font-weight: 400;
}

.problemset-progress-bar-wrap {
  height: 1.25rem;
  margin-bottom: 1rem;
  background-color: #e9ecef;
  border-radius: 1rem;
  overflow: hidden;
}

.problemset-progress-bar {
  width: 0%;
  transition: width 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: 1rem;
}

.progress-percentage-row {
  font-size: 0.8rem;
  color: #6c757d;
  text-align: center;
  font-weight: 500;
}

.problemset-divider {
  margin: 1.75rem 0;
  border: none;
  border-top: 1px solid #dee2e6;
}

#info-section {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.info-heading {
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1rem;
  margin-top: 0;
}

.info-description {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.task-completed {
  color: #28a745;
  font-weight: 600;
}

.task-completed i {
  color: #28a745;
  margin-right: 0.5rem;
}

.task-in-progress {
  color: #ff9800;
}

.task-in-progress i {
  color: #ff9800;
  margin-right: 0.5rem;
}

#info-section::-webkit-scrollbar {
  width: 6px;
}

#info-section::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 3px;
}

#info-section::-webkit-scrollbar-thumb {
  background: #adb5bd;
  border-radius: 3px;
}

#info-section::-webkit-scrollbar-thumb:hover {
  background: #6c757d;
}

.problemset-info-heading {
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #495057;
  margin-top: 0;
}

.problemset-info-text {
  font-size: 1rem;
  color: #6c757d;
  line-height: 1.65;
  margin: 0;
}

.problemset-content {
  flex: 1;
  padding: 3rem 2.5rem 2rem 2.5rem;
  min-width: 0;
}

.problemset-title {
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
}

/* Numbered task card layout (problemset page only) */
.problemset-content .task-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-width: 1px;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.problemset-content .task-list-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.task-list-item-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.problemset-content .task-list-item:hover .task-list-item-number {
  background: #007bff;
  color: white;
}

.task-list-item-number.completed {
  background: #28a745;
  color: white;
}

.task-list-item-body {
  flex: 1;
  min-width: 0;
}

.task-list-item-chevron {
  flex-shrink: 0;
  color: #ced4da;
  font-size: 0.9rem;
  transition: color 0.2s, transform 0.2s;
}

.problemset-content .task-list-item:hover .task-list-item-chevron {
  color: #007bff;
  transform: translateX(3px);
}

/* Replay viewer */
.replay-board {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.replay-column {
  flex: 1;
  min-height: 60px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 8px;
}

.replay-column-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.replay-block {
  background: white;
  border: 1px solid #ced4da;
  border-radius: 3px;
  padding: 3px 8px;
  margin: 3px 0;
  font-family: monospace;
  font-size: 0.82rem;
  white-space: pre;
}

.replay-block.highlight {
  background: #fff3cd;
  border-color: #ffc107;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.replay-block.given {
  opacity: 0.55;
}

.replay-blank {
  display: inline-block;
  background: #e9f5ff;
  border-bottom: 1px solid #74b9ff;
  min-width: 2ch;
  padding: 0 2px;
  color: #0984e3;
}

.replay-block.debug {
  opacity: 0.35;
  font-style: italic;
}
