* {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span {
  font-weight: 600;
  color: #e5e7eb;
  margin: 0;
}

body {
  margin: 0;
  overflow: hidden;
  background-color: #000;
}

#game {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

#ui {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  animation: ui-fade-in 1.2s ease-out forwards;
  pointer-events: none;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+ */
  user-select: none; /* Standard */
}

@keyframes ui-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Components */
.box {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 2px solid #1e293b;
}

/* Header */
.header {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: flex-start;
}

.header-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Header - Players */
.players-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  height: 48px;
  padding-left: 12px;
  padding-right: 12px;
}

.players-status-online {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10b981;
  border: 2px solid #ffffff33;
}

.players-text {
  color: #e5e7eb;
  font-size: 16px;
  font-weight: bold;
  text-wrap: nowrap;
  user-select: none;
}

/* Header - Settings */
.settings-container {
}

.sound-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-left: auto;
  background-color: rgba(15, 23, 42, 0.6);
  pointer-events: auto;
}

.sound-container:hover {
  background-color: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.sound-icon {
  width: 36px;
  height: 36px;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.footer-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.footer-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Footer - Actions */
.actions-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.action-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  /* Don't let user press action on laptop mode */
  pointer-events: none;
}

.action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: rgba(15, 23, 42, 0.6);
  margin-top: 8px;
}

.action-pressed {
  background-color: rgba(15, 23, 42, 0.8);
  border: 2px solid #10b981;
}

.action img {
  width: 36px;
  height: 36px;
}

.action-shortcut {
  min-width: 30px;
  color: #e5e7eb;
  text-align: center;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 4px;
  border: 2px solid #1e293b;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 4px;
}

/* Footer - Chat */
.chat-container {
  max-height: 400px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: auto;
  overflow-y: auto;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 2px solid #1e293b;
}

.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  padding: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #374151 transparent;
}

.chat-message {
  color: #e5e7eb;
  font-size: 14px;
}

.chat-message-author {
  font-weight: 700;
  margin-right: 4px;
}

.chat-message-author-system {
  font-weight: 700;
  color: #f59e0b;
  margin-right: 4px;
}

.chat-input {
  height: 36px;
  min-height: 36px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 4px;
  border: 2px solid #1e293b;
  background-color: rgba(15, 23, 42, 0.6);
  color: #e5e7eb;
  font-size: 14px;
  margin-left: 8px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.chat-input:focus {
  outline: none;
  border-color: #10b981;
  background-color: rgba(15, 23, 42, 0.8);
}

/* Mobile */
@media (max-width: 600px) {
  .ui {
    /* Disables pinch zoom & double tap zoom */
    touch-action: manipulation;
    -ms-touch-action: manipulation; /* For older Edge */
  }

  .footer-left {
    display: none;
  }

  .footer-right {
    display: none;
  }

  .actions-container {
    gap: 8px;
  }

  .action-container {
    /* Let user press action on mobile mode */
    pointer-events: auto;
  }

  .action-shortcut {
    display: none;
  }
}
