.chat-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #0f172a; /* mørk blå/grå */
}


.chat-header {
  padding: 12px;
  background: #075e54;
  color: white;
  text-align: center;
  font-weight: bold;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.msg {
  background: #dbeeff;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
  max-width: 85%;
  align-self: flex-start;
}


.msg.me {
  align-self: flex-end;
  background: #dcf8c6;
}

.msg.me + .time {
  text-align: right;
}


.chat-input {
  display: flex;
  padding: 10px;
  gap: 8px;
  background: #e5ddd5; /* samme som chat-baggrund */
}



.chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: none;
  font-size: 14px;
  background: #dcf8c6;
}



.chat-input button {
  padding: 10px 16px;
  border-radius: 20px;
  border: none;
  background: #25d366;
  color: white;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}



.chat-header button {
  background: #25d366;
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.chat-header button:hover {
  opacity: 0.9;
}



.chat-wrapper {
  width: 100%;
  max-width: 420px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  background: #e5ddd5;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  overflow: hidden;
}


.chat-input input {
  color: #222;
}

.chat-input input::placeholder {
  color: #555;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg {
  animation: messageIn 0.15s ease-out;
}

.chat-input button:active {
  transform: scale(0.95);
}

.msg:hover {
  filter: brightness(0.97);
}

.msg .time {
  font-size: 8px;
  opacity: 0.6;
  margin-top: 2px;
}


.msg .name {
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 2px;
  color: #333;
}
.msg.system {
  background: transparent;
  color: #666;
  font-style: italic;
  align-self: center;
}

.message-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 6px;
}

.message-wrapper.me {
  align-items: flex-end;
}

.message-wrapper .name {
  font-size: 11px;
  color: #555;
  margin-bottom: 2px;

  /* NØGLEN */
  max-width: 85%;
  padding: 0 12px;
  box-sizing: border-box;
}

/* START PAGE */

.page-bg {
  min-height: 100vh;
  background: #0f1412;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-card {
  width: 100%;
  max-width: 420px;
  background: #e5ddd5;
  border-radius: 22px;
  padding: 32px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  position: relative;
}

.welcome {
  text-align: center;
  margin-bottom: 30px;
}

.lock {
  font-size: 26px;
  margin-bottom: 8px;
}

.welcome h1 {
  margin: 0;
  font-size: 26px;
}

.welcome p {
  margin-top: 8px;
  font-size: 16px;
  opacity: 0.75;
}


.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  padding: 14px;
  font-size: 15px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
}

.btn.create {
  background: #4caf50;
  color: white;
}

.btn.join {
  background: #fbc02d;
}

.help {
  position: absolute;
  bottom: 14px;
  right: 18px;
  opacity: 0.6;
  cursor: pointer;
}

/* MODAL */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  background: #e5ddd5;
  width: 90%;
  max-width: 360px;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-card h2 {
  margin: 0 0 6px;
  text-align: center;
}

.modal-card input {
  padding: 12px;
  border-radius: 10px;
  border: none;
}

.btn.primary {
  background: #4caf50;
  color: white;
}

.btn.cancel {
  background: transparent;
  opacity: 0.6;
}

.hidden {
  display: none;
}

#appTitle {
  letter-spacing: 0.5px;
}

#helpText {
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.8;
  text-align: center;
}

.modal-card select {
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  background: white;
}

.msg .text {
  font-size: 16px;
  line-height: 1.4;
}

.disclaimer {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 10px;
}

#helpText hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.1);
  margin: 12px 0;
}

.admin-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #0f172a, #020617);
  font-family: system-ui, sans-serif;
}

.admin-card {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  width: 300px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-card h2 {
  text-align: center;
  margin-bottom: 8px;
}

.admin-card input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.admin-card button {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #0f766e;
  color: white;
  font-size: 15px;
  cursor: pointer;
}

.admin-card button:hover {
  background: #115e59;
}

.admin-panel {
  background: white;
  padding: 24px;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}

.admin-panel table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.admin-panel th,
.admin-panel td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.admin-panel button {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: #b91c1c;
  color: white;
  cursor: pointer;
}

.admin-panel button:hover {
  background: #991b1b;
}

.logout-btn {
  background: transparent;
  border: none;
  color: #555;
  cursor: pointer;
  margin-bottom: 10px;
}

.logout-btn:hover {
  text-decoration: underline;
}

