:root {
  --body-bg: rgb(27,27,27);
  --card: rgb(27,27,27);
  --text: #e6eef8;
  --border-default: rgb(90,90,90);
  --border-hover: rgb(120,120,120);
  --btn-hover-bg: rgb(150,150,150);
  --glow-color: #ffffff;
  --accent1:#7f7fd5;
  --accent2:#91eae4;
}

body.dark {
  background: var(--body-bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img, a {
  -webkit-user-drag: none;
  user-drag: none;
}

button, .join-btn, .submit-btn, .closeBtn {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

header {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
}

.logo {
  height: 50px;
  width: auto;
  display: inline-block;
  filter: drop-shadow(0 0 12px var(--glow-color));
}

footer {
  width: 100%;
  text-align: center;
  padding: 1rem 0;
  color: #888;
  font-size: 0.85rem;
}

.join-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  padding: 1rem 2.5rem;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border-default);
  cursor: pointer;
  transition: all 0.3s ease, box-shadow 0.3s ease;
}

.join-btn:hover {
  background: var(--btn-hover-bg);
  border-color: var(--border-hover);
  box-shadow: 0 0 12px var(--glow-color);
}

#modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center;
  z-index: 50;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}

#modal.active {
  opacity: 1; pointer-events: auto;
}

.modal-bg {
  position: absolute;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
}

.modal-content {
  position: relative;
  background: var(--card);
  padding: 2rem;
  border-radius: 16px;
  min-width: 300px;
  max-width: 380px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text);
  border: 3px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              linear-gradient(90deg, var(--accent1), var(--accent2)) border-box;
  transition: all 0.5s ease;
  animation: borderShift 6s linear infinite;
}

@keyframes borderShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.separator {
  border: none;
  border-top: 1px solid rgb(90,90,90);
  margin: 0.5rem 0;
}

.modal-content input {
  padding: 0.8em;
  border-radius: 12px;
  border: 2px solid var(--border-default);
  background: #1B1B1B;
  color: var(--text);
  outline: none;
  margin-bottom: 0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.4s ease;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.modal-content input:focus {
  border: 2px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              linear-gradient(90deg, var(--accent1), var(--accent2)) border-box;
  border-radius: 12px;
}

.submit-btn {
  background: transparent;
  color: var(--text);
  padding: 0.8rem;
  width: 100%;
  border-radius: 12px;
  border: 2px solid var(--border-default);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: var(--btn-hover-bg);
  border-color: var(--border-hover);
}

.closeBtn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.info-text {
  font-size: 0.85rem;
  color: #888;
  text-align: center;
}

body, div, p, h1, h2, h3, h4, h5, h6, span, section, header, footer, main {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}