:root {
  --clr-red-back: rgba(248, 113, 113, 0.16);
  --clr-red-text: rgba(248, 113, 113, 1);
  --clr-green-back: rgba(34, 197, 94, 0.16);
  --clr-green-text: rgba(74, 222, 128, 1);
  --clr-blue-back: rgba(33, 150, 243, 0.16);
  --clr-blue-text: rgba(33, 150, 243, 1);
  --clr-gray-back: rgba(107, 114, 128, 0.16);
  --clr-gray-text: rgba(107, 114, 128, 1);
}

body {
  margin: 0;
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(10px);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  display: flex;
  width: 100vw;
  height: 100vh;
  background-image: url('./static/background.jpg');
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  background-size: cover;
  background-repeat: no-repeat;
}

.list {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 20px;
  overflow-y: auto;
  transition: transform 0.3s ease;
  align-self: center;
  z-index: 15;
  overflow: hidden;
}

.list-item {
  display: flex;
  align-items: center;
  width: 90%;
  max-width: 800px;
  padding: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.list-item:hover {
  transform: scale(1.05);
}

.map-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.map-name {
  margin-top: 10px;
  font-size: 18px;
  color: rgba(255, 255, 255, 1);
}

.server-name {
  flex: 2;
  font-size: 16px;
  font-weight: bold;
  color: rgba(255, 255, 255, 1);
  width: 100%;
}

.details-content .server-name {
  margin-bottom: 5px;
}

.server-players {
  display: flex;
  flex: 2;
  justify-content: center;
}

.server-players span {
  color: white;
  text-decoration: none;
}

.actions {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.actions button {
  padding: 8px 12px;
  border: none;
  border-radius: 15px;
  background: rgba(76, 175, 80, 1);
  color: rgba(255, 255, 255, 1);
  cursor: pointer;
  width: 41px;
  height: 41px;
}

.actions button.copy {
  background: rgba(33, 150, 243, 1);
}

.actions button.copy:after {
  position: absolute;
  content: 'Успешно скопировано!';
  right: -40px;
  top: -15px;
  margin: auto;
  display: flex;
  width: fit-content;
  height: fit-content;
  background: rgba(100, 100, 100, 0.5);
  padding: 10px;
  border-radius: 15px;
}

.actions button.copy.hidden:after {
  display: none;
}

.details-panel {
  width: 25%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  transition: right 0.3s ease;
  position: fixed;
  top: 0;
  right: -25%;
  height: 100vh;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.details-panel.open {
  right: 0;
}

.details-content {
  padding: 20px;
  color: rgba(255, 255, 255, 1);
}

.full {
  width: 100%!important;
}

.row {
  display: flex;
  flex-direction: row;
  width: 50%;
}

.column {
  display: flex;
  flex-direction: column;
  width: 50%;
}

.badge {
  width: fit-content;
  height: fit-content;
  padding: 5px;
  margin: 10px 10px 0 10px;
  border-radius: 10px;
  border-width: 1px;
  border-style: solid;
  white-space: nowrap;
}

.badge:first-of-type {
  margin: 10px 10px 0 0;
}

.badge-ndt {
  background-color: var(--clr-green-back);
  color: var(--clr-green-text);
  border-color: var(--clr-green-text);
}

.badge-dt {
  background-color: var(--clr-red-back);
  color: var(--clr-red-text);
  border-color: var(--clr-red-text);
}

.badge-s {
  background-color: var(--clr-green-back);
  color: var(--clr-green-text);
  border-color: var(--clr-green-text);
}

.badge-ns {
  background-color: var(--clr-red-back);
  color: var(--clr-red-text);
  border-color: var(--clr-red-text);
}

.status {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin: 10px;
}
.status.online, .status.online:before {
  background: rgba(114, 255, 125, 1);
}
.status.offline, .status.offline:before {
  background: rgba(255, 66, 66, 1);
}
.status.invisible, .status.invisible:before {
  background: rgba(66, 229, 255, 1);
}
.status.idle, .status.idle:before {
  background: rgba(255, 218, 114, 1);
}
.status:before {
  content: '';
  display: block;
  position: absolute;
  left: -5px;
  top: -5px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  animation: pulse 1.5s infinite ease-in;
}
@keyframes pulse {
  from {
    transform: scale(0.5);
    opacity: 1;
 }
  to {
    transform: scale(1.5);
    opacity: 0;
 }
}


.status-online {
  border-left: 5px solid var(--clr-green-text);
  padding-left: 15px;
}

.status-offline {
  border-left: 5px solid var(--clr-red-text);
  padding-left: 15px;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 1);
  cursor: pointer;
  font-size: 20px;
}


@media (max-width: 768px) {
  .container {
      flex-direction: column;
      justify-content: center;
      align-items: center;
      height: 100vh;
  }

  .list {
      width: 100%;
      max-width: 800px;
      padding: 10px;
      overflow-y: auto;
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
  }

  .list-item {
      flex-direction: column;
      align-items: flex-start;
      padding: 10px;
  }

  .server-name {
      font-size: 14px;
  }

  .map-name {
      font-size: 14px;
  }

  .server-players,
  .map-container {
    text-align: start;
    align-items: start;
    padding-left: 15px;
    margin-top: auto;
  }

  .map-name,
  .server-players span {
    font-size: 18px;
  }

  .actions {
      width: 100%;
      justify-content: space-between;
      margin: 10px 10px 0 0;
  }

  .actions button {
      width: 48%;
      font-size: 14px;
  }

  .details-panel.open {
      width: 100%;
      right: 0;
      backdrop-filter: blur(30px);
  }

  .details-content {
      padding: 10px;
  }

  .close-btn {
      top: 5px;
      right: 5px;
  }

  .row,
  .column {
    width: 100%;
  }

  .row .column.full {
    flex-direction: row;
  }
}

.details-panel {
  width: 25%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  transition: right 0.3s ease;
  position: fixed;
  top: 0;
  right: -25%;
  height: 100vh;
  z-index: 1000;
}

.details-panel.open {
  right: 0;
}

.details-content {
  padding: 20px;
  color: rgba(255, 255, 255, 1);
}

.map-image {
  width: 100%;
  display: block;
  margin-top: 10px;
  border-radius: 5px;
}

.server-info {
  padding-top: 5px;
}

.server-name {
  font-size: 18px;
  font-weight: bold;
}

.map-info {
  float: left;
}

.players-info {
  float: right;
}

.online-players {
  clear: both;
  padding-top: 5px;
}

.players-list {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}

.players-list span {
  background-color: rgba(44, 62, 80, 1); 
  border-radius: 8px; 
  padding: 8px 12px; 
  color: rgba(236, 240, 241, 1); 
  font-size: 14px; 
  font-weight: 500; 
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
  transition: background-color 0.3s ease, transform 0.2s ease; 
}

.players-list span:hover {
  background-color: rgba(52, 73, 94, 1); 
  transform: translateY(-2px); 
  cursor: pointer; 
}

@media (max-width: 768px) {
  .details-panel.open {
      width: 100%;
      right: 0;
      backdrop-filter: blur(30px);
  }

  .details-content {
      padding: 10px;
  }
}

.discord-button {
  left: 20px;
}

.telegram-button {
  left: 95px;
}

.discord-button,
.telegram-button {
  position: fixed;
  bottom: 20px;
  border: none;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.discord-button:hover,
.telegram-button:hover {
  transform: scale(1.2);
}

.discord-button img, .telegram-button img {
  width: 40px;
  height: 40px;
}