@font-face {
  font-family: "PT Serif";
  src: url("./fonts/PTSerif-BoldItalic.woff2") format("woff2"),
    url("./fonts/PTSerif-BoldItalic.woff") format("woff");
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "PT Serif";
  src: url("./fonts/PTSerif-Bold.woff2") format("woff2"),
    url("./fonts/PTSerif-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PT Serif";
  src: url("./fonts/PTSerif-Italic.woff2") format("woff2"),
    url("./fonts/PTSerif-Italic.woff") format("woff");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "PT Serif";
  src: url("./fonts/PTSerif-Regular.woff2") format("woff2"),
    url("./fonts/PTSerif-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html {
  box-sizing: border-box;
}
body {
  background: black;
  color: #eee;
  font-family: "PT Serif";
  font-size: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 20px;
}
a {
  color: white;
  font-family: monospace;
  font-size: 1rem;
  padding: 0.25rem;
  transition: all 0.333s;
}
a:hover {
  background-color: white;
  color: black;
  text-decoration: none;
}
code {
  word-break: break-word !important;
  word-wrap: break-word;
  white-space: break-spaces;
}
details {
  margin-top: 10px;
  padding: 5px;
}
details div {
  padding: 15px;
  font-style: italic;
  font-size: 16px;
  color: #ccc;
}
summary {
  cursor: pointer;
  font-weight: bold;
  color: gold;
  font-family: monospace;
  font-size: 16px;
}

#chat {
  display: flex;
  flex-direction: column;
}
#chat div {
  max-width: 32em;
}
#chat:first-child {
  margin-top: 4rem;
}
#chat-container {
  width: 100%;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
}
#text-input {
  width: 100%;
  max-width: 32em;
  background: #000;
  color: #eee;
  border: 1px dotted transparent;
  padding: 10px;
  outline: none;
  resize: none;
  overflow-y: hidden;
  min-height: 40px;
  font-family: "PT Serif";
  font-size: 24px;
}
#submit-button {
  background: #000;
  color: #eee;
  border-width: 1px;
  padding: 10px 20px;
  font-family: "PT Serif";
  cursor: pointer;
  border-color: transparent;
  border-style: dotted;
  width: fit-content;
  margin-top: 2rem;
  font-size: 24px;
}
#submit-button:hover {
  border-style: ridge;
  border-color: #666666;
}
#submit-button:active {
  border-style: inset;
  border-color: #999999;
}
#user-input {
  display: flex;
  flex-direction: column;
  align-items: self-end;
  margin-top: 4rem;
}

.loading {
  font-style: italic;
  color: #aaa;
}
.hidden {
  display: none;
}
.user {
  margin-top: 2rem;
  align-self: end;
}
.user span:first-child {
  color: #9900FC;
}
.assistant span:first-child {
  color: #00FF00;
}
.bot-message {
  align-self: self-start;
}
.message {
  white-space: pre-wrap;
  margin: 10px 0;
  display: flex;
  align-items: baseline;
}

.message.assistant {
  flex-direction: column;
  align-items: flex-start;
}
.bot-message {
  padding: 25px;
  border-radius: 5px;
}
.loading-indicator {
  font-style: italic;
  margin: 1rem 0;
}
.mr1 {
  margin-right: 1rem;
}
.emoji-popup {
  position: absolute;
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  max-width: 300px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  white-space: normal;
  word-wrap: break-word;
}
.tool-emojis span {
  cursor: pointer;
  position: relative;
  margin-right: 5px;
}

/* Minimal responsive design */
@media (min-width: 768px) {
  #chat-container {
    max-width: 80vw;
  }
}
@media (min-width: 1440px) {
  #chat-container {
    max-width: 69vw;
  }
}
#session-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

#history-button,
#new-session-button {
    background: #000;
    color: #eee;
    border: 1px dotted transparent;
    padding: 8px 16px;
    font-family: "PT Serif";
    cursor: pointer;
    font-size: 18px;
}

#history-button:hover,
#new-session-button:hover {
    border-style: ridge;
    border-color: #666666;
}

#history-button:active,
#new-session-button:active {
    border-style: inset;
    border-color: #999999;
}
.thinking-summary {
    cursor: pointer;
    font-size: 14px;
    color: #bbb;
    font-family: "PT Serif";
    font-style: italic;
    padding: 4px 0;
    transition: color 0.2s ease;
    list-style: none; /* Remove default arrow */
    position: relative;
}

.thinking-summary:hover {
    color: #eee;
}

.thinking-summary::before {
    content: "▶";
    color: #666;
    margin-right: 6px;
    transition: transform 0.2s ease;
    font-size: 12px;
}

.thinking-details[open] .thinking-summary::before {
    transform: rotate(90deg);
}

.thinking-content {
    margin-top: 8px;
    padding: 12px;
    background: #1a1a1a;
    border-radius: 6px;
    font-size: 16px;
    color: #ccc;
    border-left: 3px solid #444;
    font-style: italic;
    line-height: 1.4;
}

.thinking-content p {
    margin: 0 0 8px 0;
}

.thinking-content p:last-child {
    margin-bottom: 0;
}

.thinking-content code {
    background: #2a2a2a;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 14px;
}

.thinking-content pre {
    background: #2a2a2a;
    padding: 8px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0;
}

.thinking-content ul, .thinking-content ol {
    margin: 8px 0;
    padding-left: 20px;
}