@charset "UTF-8";
body {
  background-color: #0d1117;
  padding: 0;
  margin: 0;
  color: #c9d1d9;
  font-family: "Source Sans Pro", sans-serif;
}

.content {
  margin: 10px auto;
  width: 80%;
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 20px;
}

a {
  color: #1cb09a;
}
a a:hover {
  color: #0e584d;
}

.hidden {
  display: none !important;
}

*:not(html):not(body) {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

button {
  padding: 12px 24px;
  background: linear-gradient(125deg, #2dd4bf, #1cb09a);
  color: #0d1117;
  font-weight: 600;
  border-radius: 9999px;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  background-color: #1cb09a;
  outline: none;
  margin-right: 4px;
}
button:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 14px #1cb09a;
}

label {
  display: block;
  clear: both;
  font-weight: 500;
  margin-bottom: 4px;
  opacity: 0.9;
}

textarea,
input {
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.05);
  color: #c9d1d9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px;
  transition: all 0.2s ease;
}
textarea:focus,
input:focus {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.25);
  outline: none;
}

textarea {
  width: 100%;
  resize: vertical;
}

.formElement {
  margin-bottom: 10px;
}

.formElement:last-child {
  margin-bottom: unset;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 5px;
}
.row .formElement {
  margin-right: 10px;
}
.row input {
  width: 100%;
}

input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(255, 255, 255, 0.05);
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
input[type=checkbox]:hover {
  border-color: #1cb09a;
}
input[type=checkbox]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.35);
}
input[type=checkbox] {
  /* Checked state */
}
input[type=checkbox]:checked {
  background: linear-gradient(125deg, #2dd4bf, #1cb09a);
  border-color: transparent;
}
input[type=checkbox]:checked::after {
  content: "✔";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-size: 16px;
  color: #0d1117;
  font-weight: bold;
}

header {
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding: 20px 0;
  width: 100%;
  text-align: center;
}
header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
}
header a {
  text-decoration: none;
  color: #c9d1d9;
  font-size: 0.9rem;
  opacity: 0.7;
}

#saveMessageProgress h2 {
  margin-bottom: 0;
}
#saveMessageProgress h3 {
  margin-top: 0;
}

.saved-url {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-family: monospace;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
  padding: 8px 12px;
  line-height: 1.2;
  margin: 0;
  width: 100%;
}

.qr-button {
  /* Override icon color if needed */
  font-size: 18px;
  background: rgba(255, 255, 255, 0.05);
}
.qr-button:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 12px rgba(28, 176, 154, 0.25);
}
.qr-button svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  flex-shrink: 0 !important;
  fill: currentColor;
  display: block;
  pointer-events: none;
}

.copy-button, .qr-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.25s ease;
  color: #c9d1d9;
  font-size: 18px;
  user-select: none;
  overflow: hidden;
  /* Hover glow */
}
.copy-button:hover, .qr-button:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 12px rgba(28, 176, 154, 0.25);
}
.copy-button, .qr-button {
  /* Ripple effect */
}
.copy-button::after, .qr-button::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transition: width 0.4s ease, height 0.4s ease, opacity 0.45s ease;
}
.copy-button:active::after, .qr-button:active::after {
  width: 120px;
  height: 120px;
  opacity: 0;
  transition: none;
}
.copy-button, .qr-button {
  /* Copied animation */
}
.copy-button.copied, .copied.qr-button {
  background: #1cb09a;
  color: #0d1117;
  border-color: #0e584d;
  box-shadow: 0 0 12px rgba(28, 176, 154, 0.45);
  animation: copy-pop 0.25s ease;
}

@keyframes copy-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}
/* Alignment wrapper */
.copy-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 700px) {
  .copy-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  .copy-wrapper .copy-button, .copy-wrapper .qr-button {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0;
  }
}
.messageReadButtons {
  width: 100%;
  text-align: center;
  display: flex;
}
.messageReadButtons a {
  width: 45%;
}
.messageReadButtons button.confirm {
  background: linear-gradient(125deg, #22c55e, #15803d);
  color: #c9d1d9;
  width: 45%;
  margin-right: 10%;
}
.messageReadButtons button.confirm:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}
.messageReadButtons button.cancel {
  color: #c9d1d9;
  width: 100%;
  background: linear-gradient(125deg, #ef4444, #b91c1c);
}
.messageReadButtons button.cancel:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

#messageContent {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
#messageContent code {
  overflow-wrap: anywhere;
  width: 100%;
  white-space: pre-wrap;
  font-family: "JetBrains Mono", monospace;
}

#confirmDialog input {
  margin-bottom: 10px;
  width: 100%;
}

.alert {
  background: rgba(22, 27, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 5px solid #ef4444;
  color: #c9d1d9;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: alert-slide-in 0.35s ease forwards;
  position: fixed;
  top: 10px;
  right: 10px;
  transform: translateX(-50%);
  width: 90%;
  max-width: 450px;
  z-index: 9999;
  pointer-events: none; /* Alerts don’t block UI except for the alert itself */
}
@media (max-width: 700px) {
  .alert {
    top: 8px;
    width: calc(100% - 20px);
  }
}
.alert .alert {
  pointer-events: auto;
}
.alert {
  /* icon */
}
.alert .alert-icon {
  font-size: 20px;
  color: #ef4444;
  margin-top: 2px;
}
.alert {
  /* text area */
}
.alert .alert-content {
  flex: 1;
}
.alert .alert-content .alert-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: #ef4444;
}
.alert .alert-content .alert-message {
  font-size: 0.95rem;
  line-height: 1.3;
}
.alert {
  /* close button */
}
.alert .alert-close {
  font-size: 18px;
  color: #c9d1d9;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.2s ease;
}
.alert .alert-close:hover {
  opacity: 1;
  color: #ef4444;
}

@keyframes alert-slide-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* Dismiss animation */
@keyframes alert-slide-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.qr-modal.hidden {
  display: none;
}

.qr-modal-content {
  background: rgba(22, 27, 34, 0.85);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 350px;
  text-align: center;
}
.qr-modal-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
}
.qr-modal-content canvas {
  margin: 10px 0;
}

.qr-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
  opacity: 0.6;
  color: #c9d1d9;
}
.qr-close:hover {
  opacity: 1;
  color: #1cb09a;
}

#qrText {
  font-size: 0.85rem;
  opacity: 0.8;
  overflow-wrap: anywhere;
}

footer {
  margin: 0 auto 10px;
  width: 80%;
  text-align: center;
  font-size: 0.8em;
  opacity: 0.6;
  word-break: break-all;
}

@media only screen and (max-width: 700px) {
  body {
    font-size: 16px;
    padding: 0;
    margin: 0;
  }
  header {
    padding: 15px 0;
  }
  header h1 {
    font-size: 1.6rem;
  }
  header small {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
  }
  .content {
    width: 95%;
    margin: 5px auto;
    padding: 10px;
  }
  footer {
    width: 95%;
  }
  textarea {
    width: 100%;
    font-size: 1rem;
    height: auto;
  }
  input {
    font-size: 1rem;
  }
  button {
    width: 100%;
    padding: 12px 0;
    margin-bottom: 10px;
    font-size: 1rem;
  }
  .row {
    display: block;
    margin: 0;
  }
  .row .formElement {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
  .row .checkbox {
    display: flex;
    align-items: center;
  }
  .row .checkbox label {
    margin: 0;
    margin-right: 10px;
  }
  .row .checkbox input {
    width: auto;
  }
  .row input {
    width: 100%;
  }
  #messageSaved p.saved-url,
  .saved-url {
    font-size: 0.9rem;
    padding: 10px;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }
  .messageReadButtons {
    flex-direction: column;
    width: 100%;
  }
  .messageReadButtons a,
  .messageReadButtons button {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }
  .messageReadButtons button.confirm {
    width: 100%;
    margin-right: 0;
  }
  .messageReadButtons button.cancel {
    width: 100%;
  }
  #messageContent {
    padding: 10px;
  }
  #messageContent code {
    font-size: 0.95rem;
    white-space: pre-wrap;
  }
  #confirmDialog input {
    width: 100%;
    font-size: 1rem;
  }
  #saveMessageProgress h2,
  #messageSaved h2 {
    font-size: 1.4rem;
    text-align: center;
  }
  #saveMessageProgress h3,
  #messageSaved h3 {
    font-size: 1rem;
    text-align: center;
  }
}
