.discord-widget {
  box-sizing: border-box;
  width: 100%;
  background: rgba(10, 5, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  font-family: var(--font-main);
}

.discord-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  overflow: hidden;
}

.discord-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-25deg);
  animation: sweepLight 6s infinite;
}

.discord-logo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #fff;
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-logo svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.discord-online-count {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  color: #fff;
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.discord-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discord-server-name {
  color: #fff;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.discord-section-title {
  color: #5865f2;
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.discord-member-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #5865f2 transparent;
}

.discord-member-list::-webkit-scrollbar {
  width: 4px;
}

.discord-member-list::-webkit-scrollbar-thumb {
  background: #5865f2;
  border-radius: 999px;
}

.discord-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}

.discord-member:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(88, 101, 242, 0.28);
}

.discord-avatar-wrapper {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.discord-avatar {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.discord-name {
  min-width: 0;
  color: #fff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discord-footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.discord-footer-text {
  color: rgba(255, 255, 255, 0.46);
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.discord-btn-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 10px;
  background: #fff;
  color: #000;
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.discord-btn-connect:hover {
  background: #5865f2;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(88, 101, 242, 0.28);
}

.discord-btn-connect:focus-visible {
  outline: 2px solid rgba(88, 101, 242, 0.9);
  outline-offset: 2px;
}

@media (max-width: 1500px) {
  .discord-widget {
    max-width: 520px;
    margin: 0 auto;
  }

  .discord-member-list {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .discord-header,
  .discord-body,
  .discord-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .discord-footer {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .discord-btn-connect {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .discord-widget {
    border-radius: 16px;
  }

  .discord-header,
  .discord-body,
  .discord-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .discord-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .discord-online-count {
    font-size: 10px;
  }

  .discord-server-name {
    font-size: 16px;
  }

  .discord-member {
    padding: 9px;
    gap: 10px;
  }

  .discord-avatar-wrapper {
    width: 34px;
    height: 34px;
  }

  .discord-name {
    font-size: 13px;
  }
}