:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 2.2em;
  line-height: 1.1;
  margin-bottom: 2rem;
}

#app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #3178c6aa);
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

.buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}

button:hover {
  border-color: #646cff;
}

button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

#messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.message input[type="checkbox"] {
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.3em;
}

.message-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.message-text {
  font-size: 1.1em;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: #000;
}

.message-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9em;
  color: #666;
}

.sender {
  font-weight: 500;
}

.timestamp {
  color: #888;
}

.message-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.delete-button {
  padding: 0.25rem 0.5rem;
  font-size: 0.9em;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.delete-button:hover {
  background-color: #c82333;
}

.delete-button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

.principal-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.principal-display {
  font-family: monospace;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
  border-radius: 4px;
  color: #a8a6a6;
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 600px;
}

#logoutButton {
  padding: 0.5rem 1rem;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#logoutButton:hover {
  background-color: #c82333;
}

.login-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

#loginButton {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.no-messages {
  text-align: center;
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  color: #666;
  font-size: 1.1em;
  margin: 1rem 0;
}

.message.deleted {
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
}

.message.deleted .message-text {
  color: #dc3545;
}

.message.deleted .deleted-label {
  display: inline-block;
  background-color: #dc3545;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8em;
  margin-bottom: 0.5rem;
}

.message.new {
  border-color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.1);
}

.message.new .message-text {
  color: #0d6efd;
}

.message.new .deleted-label {
  background-color: #0d6efd;
}

.message.deleted-new {
  border-color: #dc3545;
  background-color: rgba(13, 110, 253, 0.1);
}

.message.deleted-new .message-text {
  color: #0d6efd;
}

.message.deleted-new .deleted-label {
  background-color: #0d6efd;
}

/* Initial state classes for auth elements */
#loginButton {
  display: block;
}

#messageButtons {
  display: flex;
}

#principalDisplay {
  display: block;
}

#logoutButton {
  display: block;
}

/* Auth state classes */
.hidden {
  display: none !important;
}
