:root {
  --color-main-bg-base: #003859e3;
  --color-primary: #c34704;
  --color-primary-opacity: rgba(86, 131, 209, 0.5);
  --color-primary-foreground: #dddddd;
  --color-primary-transition-color: #4468f7;
  --color-primary-gradient: linear-gradient(90deg, var(--color-primary), var(--color-primary-transition-color));
  --color-secondary: #9e46aa;
  --color-secondary-opacity: rgba(73, 185, 149, 0.5);
  --color-secondary-foreground: #ffffff;
  --color-secondary-transition-color: #7f95c0;
  --color-secondary-gradient: linear-gradient(90deg, var(--color-secondary), var(--color-secondary-transition-color));
  --color-accent: #fbacac;
  --color-accent-pop: #89f9e8;
  --color-accent-opacity: rgba(224, 140, 56, 0.5);
  --color-accent-foreground: #ffffff;
  --color-accent-transition-color: #368f95;
  --color-feature-gradient: linear-gradient(135deg, var(--color-main-bg-base), transparent);
  --color-feature-border: var(--color-accent);
  --color-accent-gradient: linear-gradient(90deg, var(--color-accent), var(--color-accent-transition-color));
  --color-neutral-opacity: rgba(255, 255, 255, 0.2);
  --color-neutral-opacity-gradient: linear-gradient(90deg, var(--color-neutral-opacity), transparent);
  --system-prompt-bg: rgb(94, 94, 94, 0.7);
  --assistant-prompt-bg: rgba(236, 172, 70, 0.6);
  --user-prompt-bg: rgba(114, 248, 165, 0.3);
  --bg: #ffffff;
  --text: #111111;
  --surface: #f5f7fb;
  --radius: 8px;
  --wrapper-radius: 9px;
  --color-button-border-gradient: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  --color-button-border-gradient-foreground: var(--color-primary-foreground);
  --color-button-border-gradient-hover: linear-gradient(90deg, var(--color-primary-opacity), var(--color-accent-opacity));
  --color-button: var(--color-primary-gradient);
  --color-button-foreground: var(--color-primary-foreground);
  --color-button-hover: var(--color-accent-opacity);
  --color-button-hover-foreground: var(--color-accent-foreground);
  --color-button-selected: var(--color-accent-gradient);
  --color-button-selected-foreground: var(--color-accent-foreground);
}

#root {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
  width: 100%;
}

html {
  height: 100vh;
  width: 100vw;
  scroll-behavior: smooth;
  /* Reduce harsh motion blur and tearing during scroll */
  -webkit-overflow-scrolling: touch;
}

body {
  height: 100%;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;

  /* Slightly reduce contrast to make text easier on the eyes */
  background: var(--bg);
  color: var(--text);

  /* Improve font rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Optional: softer text edges on some browsers */
  text-rendering: optimizeLegibility;

  /* Reduce flicker while scrolling on some setups */
  backface-visibility: hidden;
  transform: translateZ(0);
  margin: 0;
}

/* Optional: Dim scrollbar (Chrome/Edge/WebKit only) */
/* ::-webkit-scrollbar {
  width: 8px;
} */
::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb, rgba(255, 255, 255, 0.15));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover, rgba(255, 255, 255, 0.3));
}

body, main {
  transform: translateZ(0);
  will-change: transform;
}

.glassy-bg {
  background: var(--glassy-bg-gradient);
  border-radius: 0.5rem;
}

/* simple components */
.container {
  display: flex;
  flex: 1;
  flex-direction: row;
  padding: 12px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  max-width: 100vw;
  overflow: hidden;
}
/* <div className="modal-overlay" style={{position: "fixed", top: 0, left: 0, width: "100vw", height: "100vh", zIndex: 999, backgroundColor: "rgba(0,0,0,0.5)"}}>
<div className="modal" style={{position: "absolute", top: "10%", left: "10%", right: "10%", bottom: "10%", transform: "translate(-50%, -50%)", backgroundColor: "var(--color-main-bg-base)", padding: "1rem", borderRadius: "0.5rem", boxShadow: "0 4px 8px 0 rgba(0,0,0,0.2)"}}> */
.modal {
  position: fixed;
  top: 10%;
  left: 10%;
  right: 10%;
  bottom: 10%;
  background: var(--color-main-bg-base);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: auto;
  -webkit-backdrop-filter: blur(0.5rem);
  backdrop-filter: blur(0.5rem);
}

.modal input,
.modal textarea,
.modal label,
.modal div {
  color: inherit;
}

.modal-overlay {
  position: fixed;
  height: 100vh;
  width: 100vw;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

#settings-modal-content {
  min-width: 75%;
  box-sizing: border-box;
}

.settings-modal-menu-option {
  display: flex;
  flex-direction: row;
  width: 100%;
  align-items: center;
  padding: 0.5rem;
  margin: 0.25rem;
  border-radius: var(--wrapper-radius);
  background: transparent;
  transition: all 0.3s ease-in-out;
}

.settings-modal-menu-option:hover {
  background: var(--color-neutral-opacity-gradient);
}

.button-border-wrapper {
  border-radius: var(--wrapper-radius);
  background: var(--color-button-border-gradient);
  padding: 1px;
  margin: 0.25rem;
  transition: all 0.3s ease-in-out;
}

.button {
  background: var(--color-button);
  box-shadow: 1px 0px 10px -6px white inset;
  color: var(--color-button-foreground);
  width: 100%;
  height: 100%;
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  opacity: 1;
  transition: all 0.3s ease-in-out;
}

.category-button {
  background: var(--color-button);
  box-shadow: 1px 0px 10px -6px white inset;
  color: var(--color-button-foreground);
  border: none;
  padding: 0.25rem;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  opacity: 1;
  transition: all 0.3s ease-in-out;
  font-weight: 500;
  font-family: system-ui;
  font-stretch: condensed;
  opacity: 1;
  transition: all 0.3s ease-in-out;
}

.category-button:hover {
  background: var(--color-button-hover);
  color: var(--color-button-hover-foreground);
  opacity: 0.7;
}

.category-button.selected {
  background: var(--color-button-selected);
  color: var(--color-button-selected-foreground);
  transition: all 0.3s ease-in-out;
}

.button.radio-selection {
  background: var(--color-button-selected);
  color: var(--color-button-selected-foreground);
  opacity: 1;
}

.button:hover  {
  background: var(--color-button-hover);
  color: var(--color-button-hover-foreground);
  opacity: 0.7;
}

.button-border-wrapper:hover{
  transform: scale(1.1);
  background: var(--color-button-border-gradient-hover);
  color: var(--color-button-border-gradient-foreground);
  opacity: 0.7;
}

.selected {
  transition: all 0.3s ease-in-out;
}
.button.selected {
  background: var(--color-button-selected);
  color: var(--color-button-selected-foreground);
  transition: all 0.3s ease-in-out;
}

.button.selected > div {
  transform: scale(1.1);
}

.settings-input {
  width: 100%;
  box-sizing: border-box;
  height: auto;
  padding: 0.5rem;
  overflow-x: auto;
}

.mp-text-input {
  width: 100%;
  box-sizing: border-box;
  height: auto;
  min-height: 100%;
  max-height: 40vh;
  align-self: start;
  padding: 1rem;
  height: 75px;
  field-sizing: content;
  resize: vertical;
  overflow-y: auto;
}

.sf-text-input {
  width: 100%;
  box-sizing: border-box;
  height: auto;
  padding: 0.5rem;
  min-height: 1rem;
  height: 2rem;
  max-height: 40vh;
  field-sizing: content;
  resize: vertical;
  overflow-y: auto;
}


.flex-wrap-container {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

/* Prompt List */
.pl-row {
  display: flex;
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0.25rem 0 0.25rem 0;
}

.pl-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.pl-row-content {
  font-size: 13px;
  line-height: 1.4;
  height: 1.4em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

.pl-row-content.open {
  white-space: normal;
  overflow: visible;
  height: auto;
  text-overflow: unset;
}

.pl-row-buttons-container {
  display: flex;
  align-items: center;
  align-self: flex-start;
  justify-content: flex-end;
  margin: 0.25rem;
}

/* Prompt Builder */
.pb-row {
  display: flex;
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pb-row-buttons-container {
  display: flex;
  align-items: center;
  align-self: flex-end;
  justify-content: flex-end;
  margin: 0.25rem;
}

.pb-row-button {
  display: flex;
  margin: 0.2rem;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  border-radius: 0.3rem;
  padding: 0.1rem;
  background: var(--color-button);
  color: var(--color-button-foreground);
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0px 0px 0px white;
  transition: all 0.2s ease-in-out;}

.pb-row-button:hover {
  box-shadow: 0px 0px 8px white;
  transform: scale(1.1);
  background: var(--color-button-hover);
  color: var(--color-button-hover-foreground);
  margin: 0.2rem;
}

.pb-row-content-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: var(--color-secondary-opacity);
  border-block: 1px dashed rgba(255, 255, 255, 0.3);
  font-size: large;
  width: 100%;
  gap: 8px;
}

.pb-row-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

/*   system: "⚙️", // gear icon
  assistant: "🤖",
  user: "👤" */
.pb-row-content.⚙️, .pb-row-content-container.⚙️ {
  background: var(--system-prompt-bg);
  color: var(--text);
}
.pb-row-content.🤖, .pb-row-content-container.🤖 {
  background: var(--assistant-prompt-bg);
  color: var(--text);
}
.pb-row-content.👤, .pb-row-content-container.👤 {
  background: var(--user-prompt-bg);
  color: var(--text);
}

.pb-text-input {
  width: 100%;
  resize: vertical;
}

.pb-label {
  padding: 0rem;
  font-size: 13px;
  font-weight: 600;
}

.pt-label {
  padding: 0rem;
  font-size: 13px;
  font-weight: 600;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12;
}

.column {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0.5rem;
}

.container > .column {
  width: auto;
  flex: 1;
  min-width: 0;
}

.label {
  font-size: 13px;
  width: max-content;
  padding: 0.5rem;
}
.app-window {
  width: 320px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.14);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
}
.header {
  display:flex;
  flex-direction: row;
  justify-content: space-between;
  align-items:center;
  gap:8px;
  padding:8px;
  margin: 0.4rem; /* slightly less margin than feature-container for perceived alignment */
  background: var(--color-primary-gradient);
  color: var(--color-primary-foreground);
  border-radius: 1rem;
  cursor: move;
  user-select: none;
  opacity: 0.95;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.header-title {
  padding-left: 0.5rem;
  font-size: 2rem;
  letter-spacing: 0.3rem;
  font-weight: 200;
  font-variant: petite-caps;
  font-family: Georgia, 'Times New Roman', serif;
}

.content {
  padding: 12px;
}

.feature-container {
  background: var(--color-feature-gradient);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-feature-border);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 0.5rem 0.5rem 0.5rem 0.5rem;
  box-shadow: 0 0 6px 0px var(--color-accent-opacity) inset, 
              0 6px 16px rgba(0, 0, 0, 0.12), 
              0 3px 6px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px) brightness(1.05);
  box-sizing: border-box;
  opacity: 0.92;
}

.feature-label {
  padding: 0rem;
  margin-bottom: 0.5rem;
  font-size: 13px;
  font-weight: 600;
}

.feature-display {
  border-radius: 0.25rem;
  box-sizing: border-box;
  padding: 1rem;
  background-color: var(--color-secondary-opacity);
}

.feature-container.prompt-testing{
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  box-sizing: border-box;
}
.prompt-testing-display {
}
.feature-container.prompt-builder {
  overflow-x: hidden;
}
.builder-display {
  margin-top:  1rem;
}
.feature-container.prompt-library {
  height: 100%;
}

.library-display {
  height: 100%;
  padding-left: 0rem;
}
.prompt-title-row {
  justify-content: space-between;
}

.feature-container.prompt-search {
}
.search-display {
}
.prompt-list-container {
}
.prompt-list-display {
}