/* Dopracowanie wersji produkcyjnej */
.skipLink {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #16090d;
  font-weight: 800;
  text-decoration: none;
}

.skipLink:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid #ff7187;
  outline-offset: 3px;
}

.online strong {
  color: #d8ffe8;
  font-size: 12px;
}

.cardAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 12px 17px;
  border: 1px solid #ff5c74;
  border-radius: 8px;
  background: #df1839;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.cardAction.muted {
  cursor: not-allowed;
  border-color: #2f2722;
  background: #211b17;
  color: #665d57;
}

.applicationGrid article[hidden] {
  display: none;
}

.filterbar button[aria-pressed="true"] {
  border-color: #c82745;
  background: #260d14;
  color: #fff;
}

.filterbar {
  position: relative;
  gap: 9px;
  margin-bottom: 25px;
  padding: 8px;
  width: max-content;
  max-width: 100%;
  border: 1px solid #34131c;
  border-radius: 13px;
  background: rgba(18, 8, 11, .72);
}

.filterbar button {
  border-color: transparent;
  border-radius: 9px;
  padding: 10px 15px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.applicationGrid {
  gap: 18px;
}

.applicationGrid .applicationCard {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 385px;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border-color: #3e1721;
  background:
    radial-gradient(circle at 100% 0, rgba(239, 51, 79, .13), transparent 36%),
    linear-gradient(155deg, #190c11, #0e080a 72%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .2);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.applicationGrid .applicationCard::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -75px;
  bottom: -90px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(239, 51, 79, .1);
  filter: blur(32px);
  pointer-events: none;
}

.applicationGrid .applicationCard--biznesy::after {
  background: rgba(255, 160, 72, .11);
}

.applicationGrid .applicationCard--administracja::after {
  background: rgba(106, 116, 255, .13);
}

.applicationGrid .applicationCard--crime::after {
  background: rgba(202, 34, 73, .18);
}

.applicationGrid .applicationCard:hover {
  transform: translateY(-5px);
  border-color: #8d2c43;
  box-shadow: 0 27px 65px rgba(0, 0, 0, .38), 0 0 28px rgba(239, 51, 79, .08);
}

.applicationGrid .applicationCardTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.applicationGrid .applicationMark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #79243a;
  border-radius: 15px;
  background: linear-gradient(145deg, #641429, #260b14);
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 12px 25px rgba(0, 0, 0, .3);
  color: #ffced6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.applicationGrid .applicationStatus {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(62, 227, 141, .18);
  border-radius: 999px;
  background: rgba(62, 227, 141, .07);
  color: #56e99c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.applicationStatus i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ee38d;
  box-shadow: 0 0 10px rgba(62, 227, 141, .8);
}

.applicationGrid .applicationCard > small {
  color: #ef536b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}

.applicationGrid .applicationCard h3 {
  min-height: 52px;
  margin: 9px 0 9px;
  font-size: 21px;
  line-height: 1.25;
}

.applicationGrid .applicationCard p {
  margin: 0 0 24px;
  color: #ad9097;
  line-height: 1.7;
}

.applicationGrid .applicationAction {
  justify-content: space-between;
  margin-top: auto;
  border-color: #f04461;
  background: linear-gradient(135deg, #ed1f43, #b80f2d);
  box-shadow: 0 12px 28px rgba(213, 19, 52, .2);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.applicationGrid .applicationAction span {
  color: inherit;
  font-size: 18px;
  transition: transform 160ms ease;
}

.applicationGrid .applicationAction:hover {
  filter: brightness(1.08);
  box-shadow: 0 16px 35px rgba(213, 19, 52, .32);
}

.applicationGrid .applicationAction:hover span {
  transform: translateX(4px);
}

.rulesEmpty {
  padding: 18px;
  border: 1px dashed #5a2634;
  border-radius: 10px;
  color: #a98b92;
  text-align: center;
}

.teamGrid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  perspective: 1200px;
}

.teamGrid .teamCard {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --shine-x: 50%;
  --shine-y: 50%;
  position: relative;
  isolation: isolate;
  min-height: 320px;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  border-color: #4a1b28;
  background:
    linear-gradient(145deg, rgba(39, 13, 21, .96), rgba(12, 7, 9, .98)),
    #12090c;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .25);
  will-change: transform;
}

.teamGrid .teamCard::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2px;
  background:
    radial-gradient(circle at var(--shine-x) var(--shine-y), rgba(255, 103, 127, .25), transparent 32%),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .08) 47%, transparent 63%);
  opacity: .4;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.teamGrid .teamCard::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 1px solid rgba(255, 117, 139, .15);
  border-radius: inherit;
  pointer-events: none;
}

.teamGrid .teamCard.is-tilting {
  border-color: #9b3048;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .48), 0 0 34px rgba(239, 51, 79, .13);
}

.teamGrid .teamCard.is-tilting::before {
  opacity: 1;
}

.teamCard > * {
  position: relative;
  z-index: 1;
  transform: translateZ(24px);
}

.teamCard .teamCardGlow {
  position: absolute;
  z-index: 0;
  right: -70px;
  bottom: -95px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(239, 51, 79, .16);
  filter: blur(38px);
  transform: translateZ(0);
  pointer-events: none;
}

.teamCard .teamIndex {
  position: absolute;
  top: 18px;
  right: 18px;
  color: rgba(255, 113, 135, .16);
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
}

.teamCard .teamAvatar {
  position: relative;
  width: 78px;
  height: 78px;
  border: 1px solid #8f2b43;
  border-radius: 22px;
  background: linear-gradient(145deg, #7a1730, #220a12);
  box-shadow: 0 13px 30px rgba(0, 0, 0, .38), inset 0 1px rgba(255, 255, 255, .13);
  color: #ffdce2;
  letter-spacing: .08em;
}

.teamCard .teamAvatar i {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 17px;
  height: 17px;
  border: 4px solid #16090d;
  border-radius: 50%;
  background: #3ee38d;
}

.teamCard h3 {
  margin: 8px 0 5px;
  font-size: 22px;
}

.teamCard .teamDiscord {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 28px;
  color: #bda1a8;
}

.teamCard .teamDiscord i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ef334f;
  box-shadow: 0 0 10px rgba(239, 51, 79, .75);
}

.teamCard .teamCardFooter {
  position: absolute;
  right: 25px;
  bottom: 23px;
  left: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.teamCardFooter b,
.teamCardFooter span {
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.teamCardFooter b {
  color: #cab0b6;
}

.teamCardFooter span {
  color: #ef536b;
  font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (hover: none), (pointer: coarse) {
  .teamGrid .teamCard {
    transform: none;
  }
}

@media (max-width: 1200px) {
  .teamGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .teamGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .filterbar {
    width: 100%;
  }

  .applicationGrid .applicationCard {
    min-height: 350px;
  }

  .teamGrid {
    grid-template-columns: 1fr;
  }
}

/* Logowanie Discord, formularze podań i panel gracza */
.discordLogin.is-connected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 210px;
  color: #fff;
}

.discordLogin.is-connected img {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
}

.discordLogin.is-connected span {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modalOpen {
  overflow: hidden;
}

.applicationOverlay {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(4, 2, 3, .82);
  opacity: 0;
  backdrop-filter: blur(13px);
  transition: opacity 180ms ease;
}

.applicationOverlay.is-visible {
  opacity: 1;
}

.applicationModal {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100vh - 52px);
  overflow: auto;
  padding: 30px;
  border: 1px solid #5e2030;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(239, 51, 79, .15), transparent 34%),
    linear-gradient(155deg, #1a0b10, #090608 72%);
  box-shadow: 0 35px 110px rgba(0, 0, 0, .7), 0 0 40px rgba(222, 31, 65, .08);
  transform: translateY(12px) scale(.985);
  transition: transform 180ms ease;
}

.applicationOverlay.is-visible .applicationModal {
  transform: none;
}

.applicationModalClose {
  position: absolute;
  z-index: 3;
  top: 17px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #54202d;
  border-radius: 10px;
  background: #180b0f;
  color: #d7bdc3;
  font-size: 24px;
}

.applicationModalHeader {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-right: 45px;
  padding-bottom: 24px;
  border-bottom: 1px solid #3a151f;
}

.applicationModalHeader > span {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border: 1px solid #8d2b43;
  border-radius: 17px;
  background: linear-gradient(145deg, #78162f, #260a13);
  color: #ffdbe2;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.applicationModalHeader small,
.applicationIdentity small,
.portalPanelActions small,
.portalProfile small {
  color: #ef536b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}

.applicationModalHeader h2 {
  margin: 4px 0 6px;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -.04em;
}

.applicationModalHeader p {
  margin: 0;
  color: #ad9097;
  font-size: 12px;
  line-height: 1.6;
}

.applicationIdentity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  padding: 13px;
  border: 1px solid #32141c;
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

.applicationIdentity img {
  width: 46px;
  height: 46px;
  border-radius: 13px;
}

.applicationIdentity b,
.applicationIdentity span,
.applicationIdentity small {
  display: block;
}

.applicationIdentity span {
  margin-top: 2px;
  color: #927b81;
  font-size: 11px;
}

.applicationFields {
  display: grid;
  gap: 16px;
}

.applicationField > span {
  display: block;
  margin-bottom: 8px;
  color: #d8c6ca;
  font-size: 12px;
  font-weight: 700;
}

.applicationField > span b {
  color: #ff5570;
}

.applicationField input,
.applicationField textarea {
  width: 100%;
  border: 1px solid #3f1b24;
  border-radius: 10px;
  background: #0b0708;
  color: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.applicationField input {
  height: 46px;
  padding: 0 13px;
}

.applicationField textarea {
  min-height: 120px;
  padding: 12px 13px;
  resize: vertical;
}

.applicationField input:focus,
.applicationField textarea:focus {
  border-color: #b93754;
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 51, 79, .1);
}

.applicationField > small {
  display: block;
  min-height: 16px;
  margin-top: 5px;
  color: #ff667e;
  font-size: 10px;
}

.applicationField.has-error input,
.applicationField.has-error textarea {
  border-color: #e34961;
}

.applicationConsent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
  padding: 14px;
  border: 1px solid #3c1922;
  border-radius: 10px;
  color: #bda6ac;
  font-size: 11px;
  line-height: 1.6;
}

.applicationConsent input {
  width: 17px;
  height: 17px;
  accent-color: #e51e40;
}

.applicationHoneypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.applicationSubmit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 17px;
  border: 1px solid #f1526c;
  border-radius: 10px;
  background: linear-gradient(135deg, #ed1f43, #b80f2d);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 35px rgba(213, 19, 52, .22);
}

.applicationSubmit:disabled {
  cursor: wait;
  opacity: .6;
}

.applicationFormStatus {
  min-height: 22px;
  color: #a68c92;
  font-size: 11px;
}

.applicationFormStatus.is-error {
  color: #ff6b82;
}

.applicationModalLoader,
.panelLoading {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #aa9096;
}

.applicationModalLoader span,
.panelLoading span {
  width: 32px;
  height: 32px;
  border: 3px solid #4a1b27;
  border-top-color: #ef334f;
  border-radius: 50%;
  animation: portalSpin .75s linear infinite;
}

@keyframes portalSpin {
  to { transform: rotate(360deg); }
}

.applicationResult {
  display: grid;
  min-height: 370px;
  place-items: center;
  align-content: center;
  padding: 35px;
  text-align: center;
}

.applicationResult > span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: rgba(62, 227, 141, .1);
  color: #56e99c;
  font-size: 34px;
  font-weight: 900;
}

.applicationResult--error > span {
  background: rgba(239, 51, 79, .1);
  color: #ff667e;
}

.applicationResult small {
  color: #56e99c;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
}

.applicationResult h2 {
  margin: 8px 0;
  font-size: 32px;
}

.applicationResult p {
  max-width: 520px;
  color: #b59ca2;
  line-height: 1.7;
}

.applicationResult b {
  margin: 9px 0 22px;
  color: #806970;
  font-size: 10px;
}

.applicationResult button,
.portalEmpty button {
  padding: 11px 16px;
  border: 1px solid #eb4661;
  border-radius: 9px;
  background: #d91c3d;
  color: #fff;
  font-weight: 800;
}

.portalLoginCard {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  border: 1px solid #401a24;
  border-radius: 16px;
  background: linear-gradient(145deg, #180c10, #0e090a);
}

.portalLoginCard > div:nth-child(2) {
  flex: 1;
}

.portalLoginCard h3,
.portalLoginCard p {
  margin: 4px 0;
}

.portalLoginCard p {
  color: #9d858b;
  font-size: 12px;
  line-height: 1.6;
}

.portalProfile {
  flex-wrap: wrap;
}

.portalAvatar {
  width: 64px;
  height: 64px;
  border: 1px solid #7b293d;
  border-radius: 17px;
}

.portalProfile .portalLogout {
  margin-left: 0;
}

.portalPanelActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 34px 0 15px;
}

.portalPanelActions h2 {
  margin: 4px 0 0;
}

.portalApplications {
  display: grid;
  gap: 10px;
}

.portalApplicationRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid #361821;
  border-radius: 12px;
  background: #11090c;
}

.portalApplicationRow small {
  color: #6f5960;
  font-size: 9px;
}

.portalApplicationRow h3,
.portalApplicationRow p {
  margin: 4px 0;
}

.portalApplicationRow p {
  color: #8f777e;
  font-size: 11px;
}

.portalStatus {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.portalStatus--pending {
  border-color: #725423;
  background: rgba(255, 183, 5, .07);
  color: #ffc65d;
}

.portalStatus--accepted {
  border-color: #24653f;
  background: rgba(62, 227, 141, .07);
  color: #56e99c;
}

.portalStatus--rejected,
.portalStatus--cancelled {
  border-color: #6f2636;
  background: rgba(239, 51, 79, .08);
  color: #ff7187;
}

.portalEmpty {
  padding: 45px 20px;
  border: 1px dashed #4a202b;
  border-radius: 13px;
  color: #aa9197;
  text-align: center;
}

.portalEmpty b {
  display: block;
  color: #fff;
  font-size: 18px;
}

.portalEmpty p {
  margin: 8px auto 18px;
  max-width: 500px;
}

.portalToast {
  position: fixed;
  z-index: 300;
  right: 20px;
  bottom: 20px;
  max-width: min(390px, calc(100vw - 40px));
  padding: 14px 17px;
  border: 1px solid #5b2633;
  border-radius: 11px;
  background: #180c10;
  color: #fff;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .55);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.portalToast.is-visible {
  opacity: 1;
  transform: none;
}

.portalToast--success {
  border-color: #286344;
}

.portalToast--error {
  border-color: #7f293c;
}

@media (prefers-reduced-motion: reduce) {
  .applicationOverlay,
  .applicationModal,
  .portalToast {
    transition: none;
  }

  .applicationModalLoader span,
  .panelLoading span {
    animation: none;
  }
}

@media (max-width: 620px) {
  .applicationOverlay {
    align-items: end;
    padding: 0;
  }

  .applicationModal {
    width: 100%;
    max-height: 94vh;
    padding: 22px 16px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }

  .applicationModalHeader {
    align-items: flex-start;
    padding-right: 38px;
  }

  .applicationModalHeader > span {
    width: 50px;
    height: 50px;
  }

  .portalLoginCard,
  .portalApplicationRow,
  .portalPanelActions {
    align-items: flex-start;
    flex-direction: column;
  }

  .portalLoginCard .primary,
  .portalPanelActions .outline {
    width: 100%;
    text-align: center;
  }

  .portalApplicationRow {
    gap: 10px;
  }
}
