:root {
  --primary: #d13980;
  --secondary: #ffffff;
  --white-color: #ffffff;
  --body-bg: #1e1e3e;
  --text-color: #2e2e54;
  --btn-text: #ffffff;

  --mobile: 360px;
  --mobile-max: 1439.98px;
  --desktop: 1440px;

  --transition-time: 250ms;
  --transition-effect: cubic-bezier(0.4, 0, 0.2, 1);

  --background-color: rgba(0, 0, 0, 0.6);

  --header-height-small: 80px;
  --header-height-medium: 90px;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: currentColor;
  text-decoration: none;
  cursor: pointer;
}

button {
  cursor: pointer;
  padding: 0;
}

body {
  color: var(--text-color);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 2%;
  line-height: 1.25;
  background-color: var(--body-bg);
  overflow-x: hidden;
  font-synthesis: none;
  margin: 0 auto;
}

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

body {
  font-family: Arial, sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.section {
  overflow: hidden;
  padding: 80px 0 0;
}
.container {
  margin: 0 auto;
  width: 100%;
  padding: 0 16px;
}

.section-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--secondary);
}

/* Header section */

header {
  background-color: #ffffff;

  width: 100%;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.header-nav > div {
  display: flex;
  align-items: center;
  gap: 19px;
}

.header-nav div {
  display: flex;
  align-items: center;
  gap: 23px;
}

.header-menu {
  max-width: 32px;
  max-height: 32px;
  fill: var(--text-color);
}
.menu-button {
  border: 1px transparent;
  background: transparent;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.create-btn {
  color: var(--btn-text);
  background-color: var(--primary);
  font-size: 14px;
  padding: 9px 12px;
  border: none;
  border-radius: 6px;
}

.sorted-btn .icon-plus {
  fill: var(--primary);
}

.icon-plus {
  fill: var(--btn-text);
  margin-right: 3px;
}

.logo {
  color: var(--primary);
  font-size: 30px;
  font-weight: 700;
  height: 34px;
  margin: 0;
}

.menu-nav-header {
  display: none;
}

.avatar {
  width: 32px;
  height: 32px;
}

.page {
  flex: 1;
  display: flex;
  min-height: 0;
}

.sidebar {
  width: 240px;
  background: var(--text-color);
  padding: 24px 16px 16px 0;
}

.sidebar .menu ul {
  list-style: none;
}

.sidebar .menu li {
  padding: 8px 16px;
  margin-bottom: 8px;
  border-left: 4px solid transparent;
}

.sidebar .menu li:last-child {
  border-top: 1px solid #69748c;
  padding-top: 26px;
  padding-bottom: 26px;
}

.sidebar .menu a {
  color: #d2d4d8;
  font-size: 14px;
  text-align: center;
}
.menu-icon {
  fill: #dadada;
}

.sidebar .menu li:active,
.sidebar .menu li:hover,
.sidebar .menu li:focus {
  background-color: #d139801a;
  border-left: 4px solid var(--primary);
  border-radius: 0 6px 6px 0;
}

.sidebar .menu li:hover .menu-icon,
.sidebar .menu li:focus-within .menu-icon,
.sidebar .menu li:active .menu-icon {
  fill: var(--primary); /* рожевий */
}

.content {
  flex: 1;
  overflow-y: auto;
}

.section-sorted {
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin: 0 16px;
}

.sorted-btn {
  color: var(--primary);
  background-color: transparent;
  font-size: 14px;
  line-height: 1.2;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid var(--primary);
}

.sorted-list {
  display: none;
}

.quiz-name {
  display: flex;
  gap: 8px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
}

.sort-panel {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.sort-panel button {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #f8f8f8;
  cursor: pointer;
  transition: background 0.3s;
}

.sort-panel button:hover {
  background: #ddd;
}

.gallery {
  display: grid;
}

.gallery.grid-view {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
  padding: 0 16px;
}

.gallery.grid-view .card {
  background-color: var(--secondary);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.gallery.grid-view .card img {
  object-fit: cover;
}

.gallery.list-view {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 24px;
}

.gallery.list-view .card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid #d2d4d8;
  background-color: var(--secondary);
  padding: 8px 4px;
}
.gallery.list-view .card,
.gallery.list-view .card *:not(.moderator):not(.moderator *) {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.gallery.list-view .card img {
  width: 40px;
  height: 24px;
}
.gallery.list-view .card .card-title {
  width: 324px;
  height: 24px;
  font-size: 14px;
}

.gallery.list-view .card .created-info,
.gallery.list-view .info-moderator,
.gallery.list-view .started-moderate {
  gap: 24px;
  margin: 0;
}

.gallery.list-view .start-btn {
  padding: 9px 12px;
}
.gallery.list-view .category-text {
  width: 152px;
}

.gallery.list-view .moderator img {
  width: 24px;
}
.gallery.list-view .card-btns {
  margin-top: 0;
}
.gallery.list-view .start-btn {
  white-space: nowrap;
}

.view-controls {
  display: none;
}

.created-info {
  display: flex;
  justify-content: space-between;
}

.created-data {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 9px;
}

.created-icon {
  fill: var(--primary);
}

.results-rating {
  display: flex;
  gap: 24px;
  align-items: center;
}

.results {
  display: flex;
  font-size: 14px;
  gap: 8px;
}
.results-icon {
  fill: #69748c;
}

.card-stars {
  display: flex;
  gap: 3px;
}
.card-star {
  fill: #d2d4d8;
}

.moderate {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  color: #d08939;
  background-color: #d0893940;
  border-radius: 50px;
  padding: 4px 12px;
  margin-bottom: 3px;
}

.started-data {
  color: #69748c;
}
.started-data span {
  color: #2e2e54;
  margin-left: 8px;
}

.info-moderator {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
}

.moderator {
  display: flex;
  align-items: center;
  gap: 5px;
}
.moderator p {
  width: 107px;
}
.moderator img {
  width: 24px;
  height: 24px;
}

.moderator-name {
  font-size: 14px;
}
.moderator-position {
  color: #69748c;
}

.card-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.card-btn {
  padding: 14px;
  height: 44px;
  background-color: transparent;
  border: 1px solid #d2d4d8;
  border-radius: 6px;
}

.comments-text {
  display: none;
}

.start-btn {
  color: var(--btn-text);
  background-color: var(--primary);
  text-align: center;
  font-size: 14px;
  letter-spacing: 2%;
  line-height: 1.25;
  padding: 15px 40px;
  border-radius: 6px;
  border: none;
}

.gallery.list-view .quiz-name img {
  order: 1;
}
.gallery.list-view .card-title {
  order: 2;
}
.gallery.list-view .card-stars {
  order: 3;
}
.gallery.list-view .created-data {
  order: 4;
}

.sorted-section {
  transition: all 0.3s ease;
}

.pagination {
  display: none;
}

.pagination.list-style {
  display: flex;
  background: #fff;
  padding: 24px 16px;
  border-radius: 0 0 6px 6px;
  margin: 0 24px;
}
.items-per-page label {
  font-size: 12px;
  color: #69748c;
  width: 45px;
  height: 32px;
}
.items-per-page select {
  font-size: 14px;
  color: var(--text-color);
  border-radius: 6px;
  width: 80px;
  height: 32px;
}

.items-per-page option {
  color: #d2d4d8;
}
