#container{
  max-width:600px;
  margin:0 auto;
  min-height:50vh;
  padding-left:16px;
  padding-right:16px;
  box-sizing:border-box;
}

.ready #container{
  transition: padding-top 0.3s ease-out;
}

#caretWrap {
  position: relative;
  display: inline-block;
  width: 100%;
}

#query {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  font-size: 48px;
  color: #f0f0f0;
  position: relative; /* Make sure div is positioned */
  z-index: 2; /* Keep div on top for typing */
  white-space: pre; /* Preserve whitespace */
  caret-color: #f0f0f0; /* Ensure visible cursor */
}

.ready #query {
  transition: font-size 0.2s ease; /* Smooth font size transitions */
}

#autocomplete {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 48px;
  pointer-events: none;
  z-index: 1;
  white-space: pre;
  width: 100%;
  color: #555;
  padding: 0;
  margin: 0;
  font-family: inherit;
}

.ready #autocomplete {
  transition: font-size 0.2s ease; /* Smooth font size transitions */
}
#chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px;}
.chip{display:flex;align-items:center;gap:6px;background:#333;border-radius:16px;padding:4px 12px;border:none;color:#ddd;font-size:14px;cursor:pointer;opacity:0;}
.ready .chip{transition:background .15s ease, opacity 0.3s ease;animation:fadeInChip 0.3s ease forwards;}
.chip:hover{background:#444;}
.chip.active{background:#5757ff;color:#fff;}
.chip-icon{font-size:18px;line-height:1;}

@keyframes fadeInChip {
  from { opacity: 0; }
  to { opacity: 1; }
}

#pluginContainer {
    margin-top: 24px;
    margin-bottom: 24px;
}

#resultWrapper{
  margin-top:24px;
  display:flex;
  flex-direction:column;
  gap:12px;
  position: relative;
}

.result-indicator {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(to right, rgba(87, 87, 255, 0.08), transparent 70%);
  border-left: 4px solid #5757ff;
  border-radius: 0 8px 8px 0;
  pointer-events: none;
}

.ready .result-indicator {
  transition: top 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}

.result{
  display:block;text-decoration:none;color:inherit;
  padding: 12px 16px;
  margin-left: -16px;
  margin-right: -16px;
  opacity: 0;
  user-select: text;
  border-radius: 8px;
  position: relative;
}

.ready .result{
  transition: padding 0.2s ease, background-color 0.15s ease, opacity 0.15s ease;
  animation: fadeInResult 0.15s ease forwards;
}

@keyframes fadeInResult {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.result:hover .domain-pill {
  background: #3a3a3e;
}

.result:hover .title {
  color: #fff;
}

.result.active {
  padding-left: 30px;
  padding-right: 2px;
}

.result.active .title {
  color: #fff;
}

.result.active .domain-pill {
  background: #3a3a3e;
}
.fav{width:16px;height:16px;border-radius:3px;object-fit: contain;filter:grayscale(40%);vertical-align: middle;}
.primary .title{font-size:20px;font-weight:500;}
.primary .description{font-size:15px;}
.title{font-size:17px;font-weight:400;color:#ddd;text-decoration:none;display:inline;}
.ready .title{transition:color .15s ease;}
.title:hover{color:#fff;}

#loadingIndicator{font-size: 16px;color: #888;margin-top: 16px;}
#loadingIndicator.visible {display: block;}
#searchingIndicator{font-size: 16px;color: #888;margin-top: 16px;}

.error-message { color: red; font-size: 16px; margin-top: 16px; }

.query-warning {
  color: #ff9500;
  font-size: 14px;
  margin-top: 8px;
  opacity: 0;
}

.ready .query-warning {
  transition: opacity 0.2s ease;
}

.query-warning.visible {
  opacity: 1;
}

.plugin-block {
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 16px;
    background: #2a2a2e;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 18px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.plugin-block .block {
    display: flex;
    width: 100%;
    align-items: center;
    flex-wrap: wrap;
}

.clock-container {
  width: 60px;       /* adjust diameter */
  height: 60px;
  display: inline-block;
  position: relative;
}

.clock-canvas {
  width: 100%;
  height: 100%;
}

.text-block {
  display: flex;
  flex-direction: column;
  margin-left: 12px;
}

.plugin-block input[type="number"] {
    width: 100px;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #505050;
    background-color: #1e1e20;
    color: #f0f0f0;
    font-size: 1.05em;
    text-align: right;
    box-sizing: border-box;
}
.plugin-block input[type="number"]::-webkit-inner-spin-button,
.plugin-block input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.plugin-block input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.plugin-block strong,
.plugin-block .frc-output-value {
    color: #fff;
    font-weight: bold;
}

.plugin-block .frc-unit-name {
    color: #b0b0b0;
}
.plugin-block .frc-equals-text {
    color: #909090;
}
.plugin-block .answer-text {
    font-size: 20px;
    color: #e0e0e0;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}
.result .title {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: inline;
  margin-bottom: 4px;
}
.result .title:hover {
  text-decoration: underline;
}

/* Debug Panel Styles */
#debugPanel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2a2a2e;
  border-top: 1px solid #444;
  z-index: 1000;
}

.debug-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.debug-label {
  color: #888;
  font-size: 14px;
  font-weight: 500;
}

.debug-btn {
  background: #5757ff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

.ready .debug-btn {
  transition: background 0.2s ease, opacity 0.2s ease;
}

.debug-btn:hover:not(:disabled) {
  background: #4646dd;
}

.debug-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.thinking-content {
  padding: 16px;
  background: #1e1e20;
  border-top: 1px solid #444;
  max-height: 300px;
  overflow-y: auto;
}

.thinking-content pre {
  margin: 0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #ccc;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.category-label {
  position: absolute;
  left: -120px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100px;
  text-align: right;
  opacity: 0;
}

.ready .category-label {
  animation: fadeInResult 0.15s ease forwards;
}

.category-name {
  margin-bottom: 2px;
}

.category-clickable {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.ready .category-clickable {
  transition: color 0.2s ease;
}

.category-clickable:hover {
  color: #ddd;
  text-decoration: underline;
}

.result-content {
  width: 100%;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2a2a2e;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  color: #aaa;
  flex-shrink: 0;
}

.ready .domain-pill {
  transition: background 0.15s ease;
}

.description {
  font-size: 14px;
  color: #888;
  line-height: 1.35;
  margin-top: 4px;
}