Untitled

Anonymous
Plain Text
09/20/2025 12:20 AM
10.1 KB
23
Indexable
Never
:root {
  --font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont,
    'Helvetica Neue', sans-serif;

  /* Nord Theme Palette */
  --bg-main: #2e3440; /* nord0 */
  --bg-input: #3b4252; /* nord1 */
  --bg-card: #434c5e; /* nord3 */
  --accent: #5e81ab; /* nord9 */
  --text-main: #d8dee9; /* nord4 */
  --text-secondary: #eceff4; /* nord6 */
  --shadow-color: rgba(0, 0, 0, 0.25);
  --border-color: rgba(67, 76, 94, 0.5); /* nord3 with transparency */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--bg-main);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--bg-input);
  flex-shrink: 0;
}

.app-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
}

#chat-feed {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Scrollbar styling */
#chat-feed::-webkit-scrollbar {
  width: 8px;
}
#chat-feed::-webkit-scrollbar-track {
  background: transparent;
}
#chat-feed::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 10px;
  border: 3px solid var(--bg-main);
}

.message-container {
  display: flex;
  flex-direction: column;
  max-width: 90%;
}

.message {
  padding: 1rem;
  border-radius: 1.25rem;
  line-height: 1.5;
  width: fit-content;
  max-width: 65ch; /* Prevents bubbles from being too wide */
}

.user-turn {
  align-self: flex-end;
}
.user-turn .message {
  background-color: var(--accent);
  color: var(--text-secondary);
}

.model-turn {
  align-self: flex-start;
}
.model-turn .message {
  background-color: var(--bg-card);
  max-width: 100%;
}
.model-turn .message i {
  color: var(--accent);
}

.image-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0.5rem;
  border-radius: 0.75rem;
  margin-top: 0.5rem;
}
.image-carousel img {
  scroll-snap-align: center;
  max-width: 100%;
  max-height: 400px;
  border-radius: 0.75rem;
  object-fit: contain;
}

.input-area {
  padding: 0.5rem 1rem 1rem 1rem;
  background: linear-gradient(
    180deg,
    rgba(46, 52, 64, 0) 0%,
    var(--bg-main) 100%
  );
  flex-shrink: 0;
}

.input-bar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 1.5rem; /* Pill shape */
  background: rgba(59, 66, 82, 0.7); /* nord1 with transparency */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.input-controls-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

#thumbnails-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  width: 100%;
  padding: 0.25rem;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
#thumbnails-container:not(:empty) {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.25rem;
}
#thumbnails-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.thumbnail-item {
  position: relative;
  flex-shrink: 0;
}
.thumbnail-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.thumbnail-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background-color: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 50%;
  border: 1px solid var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  line-height: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
}
.thumbnail-remove-btn:hover {
  transform: scale(1.1);
  background-color: var(--accent);
}

#prompt-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 1rem;
  resize: none;
  /* Set a standard line-height for readability when text wraps. */
  line-height: 1.5;
  max-height: 150px;
  overflow-y: auto;
  /*
    Vertically center the text to match the 44px icon buttons.
    Calculation:
    Button Height: 44px
    Line Height (1rem * 1.5): 24px
    Remaining vertical space: 44px - 24px = 20px
    Padding top/bottom: 20px / 2 = 10px (0.625rem)
  */
  padding: 0.625rem 0.75rem;
}
#prompt-input::placeholder {
  color: var(--text-main);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.icon-btn:hover,
.icon-btn:focus {
  color: var(--accent);
}

#send-btn {
  background-color: var(--accent);
  color: var(--text-secondary);
}
#send-btn:hover {
  filter: brightness(1.1);
}
#send-btn:disabled {
  background-color: var(--bg-card);
  cursor: not-allowed;
  color: var(--text-main);
}

/* --- New Tools Pill Styles --- */
.tools-container {
  display: flex;
  padding-top: 0.75rem;
  height: 44px; /* Match icon button height to prevent layout shift */
}

.tools-pill {
  display: flex;
  align-items: center;
  /* width: 100%; <- Removed */
  height: 44px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 22px; /* Pill shape */
  box-shadow: 0 2px 8px var(--shadow-color);
  overflow: hidden; /* Important for the animation */
  transition: width 0.6s ease-in-out; /* Animate the width */
}

.tools-pill.open {
  width: 100%; /* Expand to full width when open */
}

.tools-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-main);
  padding: 0 1rem; /* Symmetrical padding */
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  height: 100%;
  transition: color 0.2s ease;
  white-space: nowrap; /* Prevent "Tools" from wrapping */
}
.tools-toggle-btn:hover,
.tools-toggle-btn.active {
  color: var(--text-secondary);
}
.tools-toggle-btn i {
  font-size: 0.9em;
}

.tools-options {
  display: flex;
  align-items: center;
  justify-content: center; /* Center the options horizontally */
  flex-grow: 1; /* Allow it to fill the expanded space */
  gap: 1.25rem;
  height: 100%;
  background-color: #424a5d;
  border-top-right-radius: 22px;
  border-bottom-right-radius: 22px;
  border-left: 1px solid var(--border-color);
  /* Animation Properties */
  max-width: 0;
  padding-right: 0;
  padding-left: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.6s ease-in-out, padding 0.6s ease-in-out;
}

/* New styles for the individual tool option buttons */
.tool-option-wrapper {
  position: relative;
  display: inline-block;
  height: 32px; /* Set a fixed height for the buttons */
}

.tool-option-label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  border-radius: 16px;
  padding: 0 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.tool-option-label:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.tool-option-select {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* Make it completely invisible but clickable */
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border: none;
}

/* --- Custom Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3); /* Darken the background slightly */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay:not(.hidden) {
  opacity: 1;
}

.modal-content {
  background-color: rgba(67, 76, 94, 0.6); /* Semi-transparent glass */
  backdrop-filter: blur(20px); /* Layered blur for depth */
  -webkit-backdrop-filter: blur(20px);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(216, 222, 233, 0.2); /* Lighter border for glass edge */
  box-shadow: 0 8px 32px var(--shadow-color);
  width: 90%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.modal-overlay:not(.hidden) .modal-content {
  transform: scale(1);
}

.modal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

#modal-input {
  width: 100%;
  padding: 0.75rem;
  background-color: rgba(59, 66, 82, 0.5); /* Semi-transparent input */
  border: 1px solid rgba(216, 222, 233, 0.2); /* Glass border */
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.2s ease;
}
#modal-input::placeholder {
  color: var(--text-main);
}
#modal-input:focus {
  border-color: var(--accent);
}

#modal-done-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--accent);
  border: none;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease;
}
#modal-done-btn:hover {
  filter: brightness(1.1);
}

.loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 0;
}
.loading-dots div {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}
.loading-dots .dot1 {
  animation-delay: -0.32s;
}
.loading-dots .dot2 {
  animation-delay: -0.16s;
}
@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.hidden {
  display: none !important;
}
Editor is loading...
Leave a Comment