.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 1rem;
  width: 100%;
  max-width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 0.5rem;
  max-width: 800px;
  width: 100%;
  padding: 2rem;
}

.char {
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 1.125rem;
  font-weight: 400;
  color: #f5f5f7;
  text-align: center;
  animation: flicker 0.1s infinite;
  user-select: none;
  letter-spacing: 0.02em;
}

@keyframes flicker {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.statusText {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #f5f5f7;
  letter-spacing: -0.01em;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Dark mode support */
:global([data-theme='dark']) .overlay {
  background-color: rgba(0, 0, 0, 0.95);
}

:global([data-theme='dark']) .char {
  color: #f5f5f7;
}

:global([data-theme='dark']) .statusText {
  color: #f5f5f7;
}

/* Thinking process display */
.thinkingContent {
  max-width: 800px;
  width: 100%;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.thinkingLabel {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #f5f5f7;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.thinkingText {
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #f5f5f7;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  opacity: 0.8;
}

/* Dark mode for thinking content */
:global([data-theme='dark']) .thinkingContent {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

:global([data-theme='dark']) .thinkingLabel {
  color: #f5f5f7;
}

:global([data-theme='dark']) .thinkingText {
  color: #f5f5f7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .container {
    gap: 1.5rem;
    padding: 0.75rem;
  }

  .grid {
    grid-template-columns: repeat(15, 1fr);
    gap: 0.375rem;
    padding: 1.5rem 1rem;
    max-width: 100%;
  }

  .char {
    font-size: 0.875rem;
  }

  .statusText {
    font-size: 0.875rem;
    text-align: center;
    padding: 0 1rem;
  }

  .thinkingContent {
    max-width: 100%;
    max-height: 300px;
    padding: 1rem;
    margin-top: 1rem;
  }

  .thinkingLabel {
    font-size: 0.75rem;
  }

  .thinkingText {
    font-size: 0.75rem;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .container {
    gap: 1rem;
    padding: 0.5rem;
  }

  .grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 0.25rem;
    padding: 1rem 0.5rem;
  }

  .char {
    font-size: 0.75rem;
  }

  .statusText {
    font-size: 0.8125rem;
  }

  .thinkingContent {
    max-height: 250px;
    padding: 0.875rem;
  }

  .thinkingLabel {
    font-size: 0.6875rem;
  }

  .thinkingText {
    font-size: 0.6875rem;
  }
}
