/* 报名身份选择弹窗 */
.signup-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.signup-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.signup-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 42, 11, 0.72);
  backdrop-filter: blur(6px);
}

.signup-modal__panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  padding: 36px 32px 40px;
  box-sizing: border-box;
  background: linear-gradient(165deg, #0f2e28 0%, #082a0b 55%, #051a08 100%);
  border: 1px solid rgba(59, 226, 216, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 70, 85, 0.15),
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(59, 226, 216, 0.12);
  clip-path: polygon(0 12px, 12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.signup-modal__panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff4655, #3be2d8, #ff4655);
}

.signup-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.signup-modal__close:hover {
  color: #ff4655;
  transform: scale(1.1);
}

.signup-modal__title {
  margin: 0 0 28px;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.08em;
  color: #e7f7df;
  text-shadow: 0 0 20px rgba(59, 226, 216, 0.4);
}

.signup-modal__roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.signup-role {
  flex: 1 1 180px;
  max-width: 200px;
  min-width: 140px;
  padding: 20px 16px 18px;
  border: 1px solid rgba(59, 226, 216, 0.25);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.signup-role:hover {
  border-color: #ff4655;
  background: rgba(255, 70, 85, 0.08);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(255, 70, 85, 0.2);
}

.signup-role:active {
  transform: translateY(-1px);
}

.signup-role__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(59, 226, 216, 0.2), rgba(13, 133, 108, 0.15));
}

.signup-role__avatar svg {
  width: 72px;
  height: 72px;
}

.signup-role__label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #3be2d8;
  letter-spacing: 0.06em;
  text-align: center;
}

.signup-role:hover .signup-role__label {
  color: #fff;
}

/* 筹备提示 */
.signup-toast {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.signup-toast.is-open {
  opacity: 1;
  visibility: visible;
}

.signup-toast__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.signup-toast__box {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 24px;
  text-align: center;
  background: #0d856c;
  border: 2px solid #3be2d8;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.signup-toast__text {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  color: #e7f7df;
}

.signup-toast__actions {
  display: flex;
  justify-content: center;
}

.signup-toast__actions-dual {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.signup-toast__btn {
  min-width: 120px;
  padding: 10px 28px;
  border: none;
  background: #ff4655;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.signup-toast__btn--ghost {
  background: transparent;
  border: 1px solid #3be2d8;
  color: #e7f7df;
}

.signup-toast__btn--ghost:hover {
  background: rgba(59, 226, 216, 0.15);
  transform: scale(1.03);
}

.signup-toast__btn:hover {
  background: #ff6b7a;
  transform: scale(1.03);
}

.signup-toast__actions-dual .signup-toast__btn {
  min-width: 140px;
}

body.signup-modal-open {
  overflow: hidden;
}

/* 赛制公告弹窗 */
.rules-modal__panel {
  max-width: 640px;
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
}

.rules-modal__title {
  font-size: 20px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.rules-modal__body {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}

.rules-modal__body::-webkit-scrollbar {
  width: 6px;
}

.rules-modal__body::-webkit-scrollbar-thumb {
  background: rgba(59, 226, 216, 0.45);
  border-radius: 3px;
}

.rules-section {
  margin-bottom: 18px;
}

.rules-section:last-child {
  margin-bottom: 0;
}

.rules-section h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  color: #3be2d8;
  letter-spacing: 0.06em;
}

.rules-section ol {
  margin: 0;
  padding-left: 1.35em;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(231, 247, 223, 0.92);
}

.rules-section li {
  margin-bottom: 6px;
}

.rules-section li:last-child {
  margin-bottom: 0;
}

/* 选手二级弹窗 */
.player-modal .signup-modal__panel {
  max-width: 560px;
  padding: 36px 24px 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.player-modal .signup-modal__title {
  margin-bottom: 20px;
  flex-shrink: 0;
}

.player-modal__options {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.player-modal__options .signup-role {
  flex: none;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  text-align: left;
  text-decoration: none;
  clip-path: none;
  border-radius: 4px;
}

.player-modal__options .signup-role:hover {
  transform: none;
  box-shadow: none;
}

.player-modal__options .signup-role__avatar {
  margin: 0;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}

.player-modal__options .signup-role__avatar svg {
  width: 60px;
  height: 60px;
}

.player-modal__options .signup-role__label {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 16px;
  line-height: 1.4;
}

.signup-channel--link {
  color: inherit;
}

.player-modal__back {
  font-size: 22px;
  font-weight: 700;
}

@media (max-width: 1024px) {
  .signup-modal__panel {
    max-width: 100%;
    padding: 28px 20px 32px;
  }

  .signup-modal__title {
    font-size: 22px;
    margin-bottom: 22px;
  }

  .signup-modal__roles {
    gap: 16px;
    justify-content: center;
  }

  #signupModal .signup-role {
    flex: 1 1 30%;
    min-width: 108px;
    max-width: 200px;
    padding: 20px 12px 18px;
  }

  #signupModal .signup-role__avatar {
    width: 96px;
    height: 96px;
    margin-bottom: 12px;
  }

  #signupModal .signup-role__avatar svg {
    width: 80px;
    height: 80px;
  }

  #signupModal .signup-role__label {
    font-size: 17px;
  }

  .rules-modal__panel {
    max-height: 85vh;
    padding: 24px 18px 20px;
  }

  .rules-modal__title {
    font-size: 17px;
    line-height: 1.45;
  }

  .rules-section h3 {
    font-size: 16px;
  }

  .rules-section ol {
    font-size: 14px;
  }

  .player-modal .signup-modal__panel {
    padding: 32px 18px 28px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .player-modal__options .signup-role {
    padding: 14px 16px;
    gap: 14px;
  }

  .player-modal__options .signup-role__avatar {
    width: 64px;
    height: 64px;
  }

  .player-modal__options .signup-role__avatar svg {
    width: 54px;
    height: 54px;
  }

  .player-modal__options .signup-role__label {
    font-size: 15px;
  }

  .signup-toast__text {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  #signupModal .signup-modal__roles {
    flex-direction: column;
    align-items: stretch;
  }

  #signupModal .signup-role {
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
  }

  #signupModal .signup-role__avatar {
    width: 88px;
    height: 88px;
    margin: 0;
  }

  #signupModal .signup-role__avatar svg {
    width: 76px;
    height: 76px;
  }

  #signupModal .signup-role__label {
    text-align: left;
    font-size: 18px;
  }
}
