.notifications-root {
  position: fixed;
  z-index: 19000;
  top: var(--header-height);
  right: 12px;
  width: min(420px, calc(100vw - 24px));
}

.player-notifications {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(229, 229, 224, 0.72);
  background: rgba(18, 20, 19, 0.34);
  cursor: pointer;
  transition: border-color 100ms ease, background-color 100ms ease, color 100ms ease;
}

.player-notifications:hover,
.player-notifications:focus-visible,
.player-notifications.has-notifications {
  border-color: rgba(179, 207, 215, 0.26);
  color: rgba(244, 245, 240, 0.94);
  background: rgba(31, 34, 32, 0.58);
}

.player-notifications img {
  width: 16px;
  height: 16px;
  opacity: 0.9;
  filter: brightness(0) invert(1);
}

.player-notification-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 1px 3px 0;
  border: 1px solid rgba(20, 21, 20, 0.9);
  border-radius: 8px;
  color: #171814;
  background: #d7b358;
  font: 700 8px/11px Arial, sans-serif;
  text-align: center;
}

.player-notification-badge[hidden] { display: none; }

.notification-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 0;
  background: rgba(24, 25, 23, 0.99);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.notification-header {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(11, 12, 11, 0.3);
}

.notification-header h2 {
  margin: 0;
  color: rgba(241, 240, 233, 0.82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.075em;
}

.notification-close {
  padding: 5px 2px;
  border: 0;
  color: rgba(235, 234, 227, 0.42);
  background: transparent;
  font-size: 8px;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.notification-close:hover,
.notification-close:focus-visible { color: rgba(245, 244, 238, 0.88); }

.notification-body {
  max-height: min(520px, calc(100vh - var(--header-height) - 24px));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.notification-section-title {
  padding: 9px 13px 6px;
  color: rgba(230, 229, 221, 0.36);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.notification-row,
.notification-friend-request {
  position: relative;
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 10px 13px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  color: #e9e8e2;
  background: rgba(255, 255, 255, 0.012);
  text-align: left;
}

button.notification-row { cursor: pointer; }
button.notification-row:hover,
button.notification-row:focus-visible { background: rgba(255, 255, 255, 0.035); }

.notification-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.notification-message {
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgba(240, 239, 232, 0.78);
  font-size: 10px;
  line-height: 15px;
}

.notification-message strong {
  color: rgba(247, 246, 239, 0.9);
  font-size: inherit;
  font-weight: 700;
  letter-spacing: 0;
}

.notification-copy small {
  color: rgba(238, 237, 230, 0.3);
  font-size: 8px;
  letter-spacing: 0.035em;
}

.notification-friend-request { padding-bottom: 11px; }

.notification-friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notification-accept,
.notification-decline {
  min-width: 70px;
  height: 27px;
  padding: 2px 9px 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(246, 245, 239, 0.82);
  background: rgba(255, 255, 255, 0.035);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.055em;
  cursor: pointer;
}

.notification-accept { background: rgba(82, 109, 57, 0.78); }
.notification-accept:hover,
.notification-decline:hover { filter: brightness(1.12); }
.notification-accept:disabled,
.notification-decline:disabled { cursor: default; opacity: 0.55; }

.notification-empty {
  padding: 25px 14px;
  color: rgba(235, 234, 227, 0.36);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: center;
}

@media (max-width: 980px) {
  .player-notifications {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
}

@media (max-width: 620px) {
  .notifications-root {
    right: 8px;
    width: calc(100vw - 16px);
  }
}
