.quiz-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 4px solid #1e1e3f;
  box-shadow: 0 0 0 3px #8d86c9;
  object-fit: cover;
  flex-shrink: 0;
}

.quiz-author-btn {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #a9a2e0;
  background-color: rgba(30, 30, 63, 0.6);
  border: 1px solid rgba(141, 134, 201, 0.3);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.quiz-author-btn:hover {
  background-color: rgba(141, 134, 201, 0.15);
  border-color: rgba(141, 134, 201, 0.6);
  color: rgba(251, 246, 233, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.quiz-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fbf6e9;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.quiz-difficulty-badge {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid currentColor;
  display: inline-block;
}

.quiz-builder-display .quiz-description {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  border-radius: 12px;
  border: 2px solid #8d86c9;
  background-color: #1e1e3f;
  color: #fbf6e9;
  min-width: 12ch;
  max-width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  resize: none;
  line-height: 1.5;
  transition:
    height 0.5s ease,
    width 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease,
    background-color 0.5s ease;
  height: auto !important;
  min-height: 48px !important;
  padding: 12px 16px !important;
  box-sizing: border-box;
}

.diff-1,
.filter-diff-1 {
  color: #2ecc71 !important;
}

.diff-2,
.filter-diff-2 {
  color: #a2d149 !important;
}

.diff-3,
.filter-diff-3 {
  color: #f1c40f !important;
}

.diff-4,
.filter-diff-4 {
  color: #e67e22 !important;
}

.diff-5,
.filter-diff-5 {
  color: #e74c3c !important;
}

.list-item-row {
  height: calc(100% / var(--page-size, 5)) !important;
  flex: 0 0 calc(100% / var(--page-size, 5)) !important;
  padding: 0 clamp(0.5rem, 3vw, 1.5rem);
  background-color: transparent;
  border-bottom: 1px solid rgba(141, 134, 201, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
}

.list-item-row:hover {
  background-color: rgba(141, 134, 201, 0.05);
}

.list-item-content {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.2rem);
  height: 100%;
  flex: 1;
  min-width: 0;
}

.list-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  height: 100%;
  width: 180px !important;
  min-width: 180px !important;
  flex-shrink: 0;
}

.list-item-img {
  width: clamp(42px, 6vw, 52px);
  height: clamp(42px, 6vw, 52px);
  border-radius: 50%;
  background-color: #252548;
  border: 2px solid #8d86c9;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.list-item-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: #fbf6e9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.list-item-divider {
  width: 1px;
  height: 40%;
  background-color: rgba(141, 134, 201, 0.4);
  margin: 0 20px;
  opacity: 0.3;
  flex-shrink: 0;
}

.data-list-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  overflow-y: hidden;
  overflow-x: hidden;
}

.quiz-stats-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 65px;
  flex-shrink: 0;
}

.score-display {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quiz-date-text {
  font-size: 0.75rem;
  color: #8d86c9;
  opacity: 0.6;
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-top: 0;
}

.status-high {
  color: #4ade80;
}
.status-med {
  color: #facc15;
}
.status-low {
  color: #f87171;
}

.quiz-date-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.outdated-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffb703;
  background: rgba(255, 183, 3, 0.1);
  border: 1px solid rgba(255, 183, 3, 0.4);
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: help;
  flex-shrink: 0;
  margin-right: auto;
  position: relative;
}

.outdated-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0);
  background: #252548;
  color: #fbf6e9;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #ffb703;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  white-space: normal;
  width: 180px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    all 0.2s ease,
    visibility 0s linear 0.2s;
  z-index: 100;
}

.outdated-badge::before {
  content: "";
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0);
  border: 6px solid transparent;
  border-top-color: #ffb703;
  opacity: 0;
  visibility: hidden;
  transition:
    all 0.2s ease,
    visibility 0s linear 0.2s;
  z-index: 101;
  pointer-events: none;
}

.outdated-badge:hover::after,
.outdated-badge:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  transition:
    all 0.2s ease,
    visibility 0s linear 0s;
}

.warning-icon {
  font-style: normal;
  background: #ffb703;
  color: #13132b;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.list-item-row.is-outdated {
  border-left: 3px solid rgba(255, 183, 3, 0.5);
}

.list-item-row:nth-child(-n + 3) .outdated-badge::after {
  bottom: auto;
  top: 130%;
  transform: translateX(-50%) translateY(-10px) scale(0);
}

.list-item-row:nth-child(-n + 3) .outdated-badge::before {
  bottom: auto;
  top: 115%;
  border-top-color: transparent;
  border-bottom-color: #ffb703;
  transform: translateX(-50%) translateY(-10px) scale(0);
  z-index: 101;
}

.list-item-row:nth-child(-n + 3) .outdated-badge:hover::after,
.list-item-row:nth-child(-n + 3) .outdated-badge:hover::before {
  transform: translateX(-50%) translateY(0) scale(1);
}

.data-list-container .no-results-placeholder {
  flex: 1;
  min-height: 150px;
  color: #5c588b;
}

.data-list-container .error-state-placeholder {
  flex: 1;
  min-height: 200px;
  border: none;
  border-radius: 0;
}

.quiz-meta-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  margin: 8px 0;
  min-width: 0;
}

.quiz-date-hint {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #fbf6e9;
  opacity: 0.6;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

.quiz-date-hint::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  background-color: rgba(251, 246, 233, 0.3);
  margin: 0 12px;
  flex-shrink: 0;
}

.leaderboard-header-row {
  padding: 0.8rem clamp(0.5rem, 3vw, 1.5rem);
  background-color: #16162e;
  display: flex;
  justify-content: space-between;
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  text-transform: uppercase;
  color: #8d86c9;
  font-weight: 800;
  letter-spacing: 1px;
}

.rank-number {
  font-weight: 900;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #8d86c9;
  width: clamp(45px, 8vw, 60px);
  display: inline-block;
  flex-shrink: 0;
  font-style: italic;
  text-align: left;
}

.rank-top {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  font-size: clamp(1.1rem, 3vw, 1.3rem);
}

.rank-1 {
  color: #ffd700 !important;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.rank-2 {
  color: #c0c0c0 !important;
  text-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.rank-3 {
  color: #cd7f32 !important;
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

.user-item-row {
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.user-item-row:hover {
  border-left-color: #3a86ff !important;
  background-color: rgba(58, 134, 255, 0.08) !important;
}

.user-name-wrapper {
  display: flex;
  align-items: center;
  gap: clamp(5px, 1vw, 10px);
  flex: 1;
  min-width: 0;
  margin-right: 15px;
}

.current-user-row {
  background-color: rgba(58, 134, 255, 0.1);
  border: 1px solid rgba(58, 134, 255, 0.3);
  box-shadow: inset 0 0 15px rgba(58, 134, 255, 0.05);
}

.current-user-row:hover {
  background-color: rgba(58, 134, 255, 0.2);
  border-color: rgba(58, 134, 255, 0.5);
}

.you-badge {
  font-size: clamp(0.55rem, 1vw, 0.65rem);
  font-weight: 800;
  color: #fbf6e9;
  background-color: #3a86ff;
  padding: 3px clamp(5px, 1vw, 8px);
  border-radius: 12px;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(58, 134, 255, 0.4);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .user-item-row {
    height: 75px !important;
    flex: 0 0 75px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .list-item-row {
    /* На телефонах тоже делим идеально */
    height: calc(100% / var(--page-size, 6)) !important;
    flex: 0 0 calc(100% / var(--page-size, 6)) !important;
    padding: 0 10px !important;
    gap: 12px;
  }

  .list-item-img {
    width: 46px;
    height: 46px;
  }

  .list-item-title {
    font-size: 0.95rem;
  }

  .list-item-divider {
    display: none;
  }

  .list-item-actions {
    /*gap: 12px;*/
    width: auto !important;
    min-width: auto !important;
  }

  .info-icon-btn {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    margin-left: auto;
  }

  .action-btn {
    width: 28px;
    padding: 4px;
  }

  .action-btn img {
    width: 16px;
    height: 16px;
  }

  .quiz-stats-block {
    min-width: 50px;
  }

  .score-display {
    font-size: 0.95rem;
  }

  .quiz-date-text {
    font-size: 0.65rem;
  }

  .outdated-badge {
    font-size: 0.6rem;
    padding: 3px 6px;
    gap: 2px;
  }

  .warning-icon {
    width: 10px;
    height: 10px;
    font-size: 0.5rem;
  }

  .leaderboard-header-row {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .leaderboard-header-row {
    height: auto !important;
    min-height: auto !important;
    flex: 0 0 auto !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    font-size: 0.65rem;
    align-items: center;
  }
}
