/* CSS files add styling rules to your content */

html,
body {
  margin: 0;
  padding: 0;
  vertical-align: middle;
  /* margin: 10px;
  padding: 40px; */
  text-align: center;
}
canvas {
  display: block;
  margin: 0 auto;
  /* margin-right: auto;
  margin-left: auto; */
  /* width: 1024px;
  height: 1024px;
  background-image: "url('./resources/lofi_bg.png')"; */
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Inter", "Google Sans", sans-serif;
  background-color: #111;
  color: #fff;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

/* (HTML menu removed; in-canvas menu is drawn by p5) */

main {
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  display: block;
}

body.dragging,
body.dragging * {
  cursor: grabbing !important;
}

/* Prompt Inputs */
.prompt-input {
  position: absolute;
  width: 140px;
  font-family: inherit;
  border: 1px solid;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 20px;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s, background-color 0.2s,
    color 0.2s;
  z-index: 5;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
}

.prompt-input:focus {
  border-color: var(--focus-color, #fff) !important;
  box-shadow: 0 0 8px var(--focus-color, #fff);
}

/* Reset Button */
.control-button {
  position: absolute;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  user-select: none;
  padding: 8px 15px;
  transition: background-color 0.2s, color 0.2s, transform 0.1s;
  -webkit-font-smoothing: antialiased;
  z-index: 10;
}

.control-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.control-button:active {
  transform: scale(0.95);
}

.control-button:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
  transform: none;
  border-color: rgba(255, 255, 255, 0.1);
}

.api-key-input {
  position: absolute;
  /* width: 320px; */
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s, background-color 0.2s,
    color 0.2s;
  z-index: 10;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.api-key-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.api-key-input:focus {
  border-color: #fff !important;
  box-shadow: 0 0 8px #fff;
}

.initialize-button {
  position: absolute;
  z-index: 10;
}

/* Toast Message */
#toast {
  line-height: 1.6;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -200%);
  background-color: #000;
  color: white;
  padding: 15px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-width: 200px;
  max-width: 80vw;
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
}

#toast.showing {
  transform: translateX(-50%);
  opacity: 1;
  visibility: visible;
}

#toast-close-button {
  border-radius: 100px;
  width: 24px;
  height: 24px;
  border: none;
  color: #000;
  background-color: #fff;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 24px;
}
