@font-face {
  font-family: "nudicamono-regular";
  src:
    url("../../nudicamono-regular-webfont.woff2") format("woff2"),
    url("../../nudicamono-regular-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background-color: #000000;
  color: #f1f1f1;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
}

#app {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Version badge and footer */
#version-badge {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1001;
  font-size: 13px;
  color: #f1f1f1;
  pointer-events: none;
}

#site-footer {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 1001;
  font-size: 12px;
  color: rgba(241, 241, 241, 0.7);
  pointer-events: none;
}

#site-footer p {
  margin: 0;
}

/* UI toggle (shown in Clean UI mode) */
#ui-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1002;
  display: none;
  background: transparent;
  border: 1px solid rgba(241, 241, 241, 0.15);
  color: #f1f1f1;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
  font-size: 11px;
  padding: 6px 12px;
  cursor: pointer;
  text-transform: uppercase;
}

#ui-toggle:hover,
#ui-toggle:focus {
  background: rgba(241, 241, 241, 0.08);
  border-color: rgba(241, 241, 241, 0.35);
  outline: none;
}

body.ui-hidden .qide-ui-panel,
body.ui-hidden #version-badge,
body.ui-hidden #site-footer {
  display: none !important;
}

body.ui-hidden #ui-toggle {
  display: block;
}

/* Mobile notification styles */
#mobile-notification {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  background-color: #f1f1f1;
  color: #000000;
  text-align: center;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
  font-size: 12px;
  z-index: 1000;
}

@media screen and (max-width: 768px) {
  #mobile-notification {
    display: block;
  }
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Info Modal Styles */
#info-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#info-modal.visible {
  display: flex;
  opacity: 1;
}

.info-modal-content {
  background-color: #000000;
  color: #f1f1f1;
  padding: 40px;
  border: 1px solid #f1f1f1;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
  line-height: 1.6;
}

.info-modal-content h2 {
  margin: 0 0 10px 0;
  font-size: 24px;
  color: #f1f1f1;
  font-weight: normal;
}

.info-modal-content h3 {
  margin: 24px 0 12px 0;
  font-size: 13px;
  color: #f1f1f1;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: normal;
}

.info-modal-content p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #aaaaaa;
}

.info-modal-content ul {
  margin: 0 0 12px 0;
  padding-left: 20px;
}

.info-modal-content li {
  margin-bottom: 8px;
  font-size: 13px;
  color: #aaaaaa;
}

.info-modal-content strong {
  color: #f1f1f1;
  font-weight: normal;
}

.info-modal-content a {
  color: #aaaaaa;
  text-decoration: underline;
}

.info-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #f1f1f1;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
}

.info-close:hover,
.info-close:focus {
  color: #ffd700;
}

.info-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #333333;
  font-size: 12px;
  color: #666666;
  text-align: left;
}

/* Click-to-copy toast */
#copy-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f1f1f1;
  color: #000000;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
  font-size: 13px;
  padding: 10px 24px;
  border: 1px solid #f1f1f1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3000;
  white-space: nowrap;
}

#copy-toast.toast-show {
  opacity: 1;
}

#copy-toast.toast-hide {
  opacity: 0;
}

/* Edit Modal Styles */
#edit-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 2100;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#edit-modal.visible {
  display: flex;
  opacity: 1;
}

.edit-modal-content {
  background-color: #000000;
  color: #f1f1f1;
  border: 1px solid #f1f1f1;
  max-width: 480px;
  width: 90%;
  overflow: hidden;
  position: relative;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
}

.edit-preview {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
  text-align: center;
  word-break: break-all;
  padding: 20px;
  box-sizing: border-box;
}

.edit-form {
  padding: 24px;
}

.edit-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888888;
}

.edit-form input {
  width: 100%;
  padding: 12px;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
  font-size: 16px;
  background-color: #000000;
  color: #f1f1f1;
  border: 1px solid #f1f1f1;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.edit-form input:focus {
  outline: 1px solid #ffd700;
  outline-offset: 1px;
}

.edit-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.edit-buttons button {
  padding: 10px 24px;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
  font-size: 13px;
  border: 1px solid #f1f1f1;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.2s;
  background-color: #000000;
  color: #f1f1f1;
}

#edit-save {
  background-color: #f1f1f1;
  color: #000000;
}

#edit-save:hover,
#edit-save:focus {
  background-color: #ffd700;
  border-color: #ffd700;
}

#edit-cancel:hover,
#edit-cancel:focus {
  background-color: #f1f1f1;
  color: #000000;
}

.edit-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: #f1f1f1;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 10;
  font-family: "nudicamono-regular", "Courier New", Courier, monospace;
}

.edit-close:hover,
.edit-close:focus {
  color: #ffd700;
}
