:root {
  --ta-bg: #01083C;
  --ta-bg-soft: #132B66;
  --ta-gold: #D4AF37;
  --ta-white: #FFFFFF;
  --ta-white-soft: #E6F0FF;
}

body {
  background-color: var(--ta-bg);
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#temple-assistant-root {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  box-sizing: border-box;
}

.ta-container {
  width: 100%;
  max-width: 720px;
  background: radial-gradient(circle at top, var(--ta-bg-soft) 0%, var(--ta-bg) 55%, #000015 100%);
  border-radius: 18px;
  padding: 24px 24px 18px;
  position: relative;
  box-sizing: border-box;
  color: var(--ta-white);
  overflow: hidden;
}

/* Crystal frame */
.ta-container::before,
.ta-container::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px solid rgba(230, 240, 255, 0.35);
  pointer-events: none;
}

.ta-container::after {
  inset: 16px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  mix-blend-mode: screen;
}

/* Gold nodes */
.ta-node {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ta-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

.ta-node.tl { top: 14px; left: 14px; }
.ta-node.tr { top: 14px; right: 14px; }
.ta-node.bl { bottom: 14px; left: 14px; }
.ta-node.br { bottom: 14px; right: 14px; }

/* Title */
.ta-title {
  text-align: center;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 16pt;
  color: var(--ta-white-soft);
  margin-bottom: 6px;
}

.ta-title span {
  color: var(--ta-gold);
}

/* Divider */
.ta-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(230, 240, 255, 0.7),
    rgba(212, 175, 55, 0.9),
    rgba(230, 240, 255, 0.7),
    transparent
  );
  margin: 8px 0 14px;
}

/* Log */
.ta-log {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 240, 255, 0.4) transparent;
}

.ta-log::-webkit-scrollbar {
  width: 6px;
}

.ta-log::-webkit-scrollbar-track {
  background: transparent;
}

.ta-log::-webkit-scrollbar-thumb {
  background: rgba(230, 240, 255, 0.4);
  border-radius: 3px;
}

/* Messages */
.ta-message {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 1;
}

.ta-message-user {
  text-align: right;
  color: var(--ta-white);
}

.ta-message-assistant {
  text-align: left;
  color: var(--ta-white-soft);
}

.ta-message-assistant span {
  color: var(--ta-gold);
}

/* Fade-in animation */
.ta-fade-in {
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Input row */
.ta-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.ta-input {
  flex: 1;
  background: rgba(1, 8, 60, 0.85);
  border-radius: 999px;
  border: 1px solid rgba(230, 240, 255, 0.4);
  padding: 10px 14px;
  color: var(--ta-white);
  font-size: 14px;
  outline: none;
  box-shadow: 0 0 0 1px rgba(19, 43, 102, 0.7);
}

.ta-input::placeholder {
  color: rgba(230, 240, 255, 0.55);
}

.ta-input:focus {
  border-color: var(--ta-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}

/* Button */
.ta-button {
  background: radial-gradient(circle at top, var(--ta-gold), #b48b24);
  border-radius: 999px;
  border: none;
  color: #010310;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ta-button:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

.ta-button span {
  font-size: 11px;
}

/* Status */
.ta-status {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(230, 240, 255, 0.6);
  text-align: right;
}

.ta-status span {
  color: var(--ta-gold);
}

@media (max-width: 600px) {
  .ta-container {
    padding: 18px 16px 14px;
  }
}