/* Личный кабинет участника */

.pf-wrap {
  font-family: "Jost", sans-serif;
}

.pf-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 0 85px 0 #e9eefc;
  padding: 30px 32px;
  margin-bottom: 30px;
}

.pf-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.pf-card-title i {
  color: var(--light-purple-color);
}

/* ---------- Карточка пользователя ---------- */

.pf-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #7b45ff 0%, #6f34fe 45%, #4b1cbd 100%);
  border-radius: 28px;
  color: #fff;
  text-align: center;
  padding: 40px 28px 30px;
  margin-bottom: 30px;
  box-shadow: 0 20px 60px -20px rgba(111, 52, 254, 0.55);
}

.pf-hero::before,
.pf-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.pf-hero::before {
  width: 220px;
  height: 220px;
  top: -90px;
  right: -70px;
  background: rgba(252, 166, 31, 0.35);
}

.pf-hero::after {
  width: 160px;
  height: 160px;
  bottom: -70px;
  left: -60px;
  background: rgba(255, 255, 255, 0.08);
}

.pf-hero > * {
  position: relative;
  z-index: 1;
}

.pf-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 6px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 18px;
}

.pf-name {
  color: #fff;
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  margin-bottom: 10px;
}

.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 15px;
}

.pf-school {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 21px;
  color: rgba(255, 255, 255, 0.85);
}

.pf-code {
  margin: 24px 0 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  padding: 14px 16px;
}

.pf-code-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
}

.pf-code-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pf-copy {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.pf-copy:hover {
  background: var(--accent);
}

.pf-hero-actions {
  display: grid;
  gap: 10px;
}

/* ---------- Кнопки ---------- */

.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  padding: 15px 34px;
  background: var(--accent);
  color: #fff !important;
  font-size: 18px;
  line-height: 22px;
  border-radius: 36px;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.3s ease-out, background 0.3s, border-color 0.3s;
}

.pf-btn:hover:not(:disabled) {
  background: var(--light-purple-color);
  transform: translateY(-4px);
}

.pf-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.pf-btn.block {
  width: 100%;
}

.pf-btn.light {
  background: #fff;
  color: var(--light-purple-color) !important;
}

.pf-btn.light:hover {
  background: var(--accent);
  color: #fff !important;
}

.pf-btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
}

.pf-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.pf-btn.outline {
  background: #fff;
  color: var(--light-purple-color) !important;
  border-color: #d9cdff;
}

.pf-btn.outline:hover {
  background: var(--light-purple-color);
  color: #fff !important;
}

.pf-btn.small {
  padding: 10px 22px;
  font-size: 16px;
}

/* ---------- Этапы ---------- */

.pf-steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pf-step {
  flex: 1;
  position: relative;
  text-align: center;
  padding: 0 6px;
}

.pf-step + .pf-step::before {
  content: "";
  position: absolute;
  top: 26px;
  left: calc(-50% + 30px);
  width: calc(100% - 60px);
  height: 3px;
  border-radius: 3px;
  background: #e6e2fb;
}

.pf-step.done + .pf-step::before {
  background: var(--light-purple-color);
}

.pf-step-dot {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #f2f2ff;
  color: #b3acd6;
  transition: transform 0.3s;
}

.pf-step.done .pf-step-dot {
  background: var(--light-purple-color);
  color: #fff;
}

.pf-step.current .pf-step-dot {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(252, 166, 31, 0.18);
}

.pf-step.error .pf-step-dot {
  background: #fe3434;
  color: #fff;
  box-shadow: 0 0 0 8px rgba(254, 52, 52, 0.14);
}

.pf-step-title {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
}

.pf-step-sub {
  color: var(--text-color);
  font-size: 13px;
  line-height: 18px;
  margin-top: 3px;
}

/* ---------- Главное действие ---------- */

.pf-action {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.pf-action-icon {
  flex: 0 0 72px;
  height: 72px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: #f3eeff;
  color: var(--light-purple-color);
}

.pf-action-icon.orange {
  background: #fff4e3;
  color: var(--accent);
}

.pf-action-icon.red {
  background: #ffecec;
  color: #fe3434;
}

.pf-action-icon.green {
  background: #e8f8ee;
  color: #24a35a;
}

.pf-action-body {
  flex: 1;
  min-width: 0;
}

.pf-action-body h4 {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 8px;
}

.pf-action-body p {
  color: var(--text-color);
  font-size: 17px;
  line-height: 26px;
  margin-bottom: 18px;
}

.pf-alert {
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 16px;
  line-height: 22px;
  margin-bottom: 18px;
  background: #ffecec;
  color: #c62828;
}

.pf-alert.info {
  background: #f3eeff;
  color: var(--light-purple-color);
}

.pf-howto {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 12px;
}

.pf-howto li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--primary-color);
  font-size: 17px;
}

.pf-howto-num {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-howto a {
  color: var(--light-purple-color);
  font-weight: 600;
}

.pf-drop {
  display: block;
  border: 2px dashed #cfc3ff;
  border-radius: 20px;
  background: #faf8ff;
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 18px;
}

.pf-drop:hover,
.pf-drop.over {
  border-color: var(--light-purple-color);
  background: #f3eeff;
}

.pf-drop.has-file {
  border-style: solid;
  border-color: var(--light-purple-color);
}

.pf-drop input {
  display: none;
}

.pf-drop i {
  font-size: 34px;
  color: var(--light-purple-color);
  margin-bottom: 8px;
}

.pf-drop-title {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 17px;
  word-break: break-all;
}

.pf-drop-hint {
  color: var(--text-color);
  font-size: 14px;
}

.pf-replace {
  margin-top: 16px;
}

.pf-replace summary {
  cursor: pointer;
  color: var(--light-purple-color);
  font-weight: 600;
  list-style: none;
}

.pf-replace summary::-webkit-details-marker {
  display: none;
}

.pf-replace[open] summary {
  margin-bottom: 16px;
}

/* ---------- Результат ---------- */

.pf-result {
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
}

.pf-ring {
  --p: 0;
  flex: 0 0 150px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #f2f2ff 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-ring-inner {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pf-ring-value {
  color: var(--primary-color);
  font-size: 38px;
  font-weight: 700;
}

.pf-ring-total {
  color: var(--text-color);
  font-size: 15px;
  margin-top: 6px;
}

.pf-stats {
  flex: 1;
  min-width: 220px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.pf-stat {
  background: #f8f7ff;
  border-radius: 18px;
  padding: 14px 18px;
}

.pf-stat-label {
  color: var(--text-color);
  font-size: 14px;
}

.pf-stat-value {
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 700;
}

/* ---------- Данные ---------- */

.pf-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin: 0;
}

.pf-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pf-info-item i {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 14px;
  background: #f3eeff;
  color: var(--light-purple-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.pf-info-item dt {
  color: var(--text-color);
  font-size: 14px;
  font-weight: 400;
}

.pf-info-item dd {
  color: var(--primary-color);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  overflow-wrap: anywhere;
}

.pf-email-bind {
  border: 2px solid rgba(252, 166, 31, 0.45);
  box-shadow: 0 0 0 4px rgba(252, 166, 31, 0.12), 0 0 85px 0 #e9eefc;
}

.pf-email-form .pf-input {
  margin-bottom: 12px;
}

.pf-email-form .pf-btn {
  margin-top: 4px;
}

.pf-password summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 600;
}

.pf-password summary::-webkit-details-marker {
  display: none;
}

.pf-password summary .fa-chevron-down {
  color: var(--light-purple-color);
  transition: transform 0.2s;
}

.pf-password[open] summary .fa-chevron-down {
  transform: rotate(180deg);
}

.pf-password form {
  margin-top: 20px;
}

.pf-input {
  background: #fefeff;
  border: 1px solid #ece8fb;
  box-shadow: 0 0 85px 0 #e9eefc;
  font-size: 16px;
  color: var(--primary-color);
  padding: 14px 24px;
  border-radius: 30px;
  width: 100%;
  font-family: "Jost", sans-serif;
  margin-bottom: 14px;
  outline: none;
}

.pf-input:focus {
  border-color: var(--light-purple-color);
}

.pf-msg {
  font-size: 15px;
  margin: 4px 0 12px;
}

.pf-msg.ok {
  color: #24a35a;
}

.pf-msg.err {
  color: #e53935;
}

/* ---------- Лидерборд ---------- */

.pf-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.pf-tab {
  border: none;
  background: #fff;
  color: var(--primary-color);
  box-shadow: 0 0 85px 0 #e9eefc;
  padding: 13px 30px;
  font-size: 17px;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.pf-tab span {
  opacity: 0.6;
  margin-left: 6px;
}

.pf-tab:hover {
  color: var(--light-purple-color);
}

.pf-tab.active {
  background: var(--light-purple-color);
  color: #fff;
}

.pf-board {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pf-board li {
  display: grid;
  grid-template-columns: 90px 1fr 90px 100px 130px;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 16px;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: 0 0 40px 0 #e9eefc;
  color: var(--primary-color);
  font-size: 17px;
}

.pf-board li.head {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pf-board li.me {
  background: #f6f1ff;
  outline: 2px solid var(--light-purple-color);
}

.pf-board li.gap {
  background: none;
  box-shadow: none;
  justify-content: center;
  display: flex;
  padding: 0;
  color: var(--text-color);
}

.pf-place {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #f2f2ff;
}

.pf-place.p1 {
  background: #ffd76a;
  color: #7a5200;
}

.pf-place.p2 {
  background: #dfe3ea;
  color: #4b5563;
}

.pf-place.p3 {
  background: #f3c19b;
  color: #7c3d12;
}

.pf-me-badge {
  display: inline-block;
  margin-left: 8px;
  background: var(--light-purple-color);
  color: #fff;
  font-size: 12px;
  border-radius: 10px;
  padding: 2px 8px;
  vertical-align: middle;
}

.pf-board .num {
  font-weight: 700;
}

.pf-board .muted {
  color: var(--text-color);
  font-size: 15px;
}

.pf-board-more {
  text-align: center;
  margin-top: 10px;
}

.pf-empty {
  text-align: center;
  color: var(--text-color);
  font-size: 18px;
  padding: 30px 10px;
}

.pf-empty i {
  display: block;
  font-size: 40px;
  color: #cfc3ff;
  margin-bottom: 12px;
}

/* ---------- Адаптив ---------- */

@media (max-width: 991px) {
  .pf-hero {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .pf-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .pf-action {
    flex-direction: column;
    gap: 16px;
  }

  .pf-info {
    grid-template-columns: 1fr;
  }

  .pf-board li {
    grid-template-columns: 54px 1fr 70px;
    padding: 14px 16px;
    font-size: 16px;
  }

  .pf-board .col-class,
  .pf-board .col-time {
    display: none;
  }

  .pf-result {
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .pf-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 8px;
  }

  .pf-step + .pf-step::before {
    display: none;
  }

  .pf-btn {
    padding: 14px 24px;
    font-size: 17px;
  }
}
