/* ==========================================================================
   itzblaze AI Hub — Maximalist Claymorphism Chat & Geometric Figures
   ========================================================================== */

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 108px);
  position: relative;
  overflow: hidden;
}

/* Messages Scrollable Area */
.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  scroll-behavior: smooth;
  position: relative;
}

/* ==========================================================================
   MAXIMALIST GEOMETRIC FIGURES & WELCOME STATE
   ========================================================================== */

.welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 16px;
  color: var(--text-secondary);
  padding: 30px 20px;
  position: relative;
  overflow: hidden;
}

/* Geometric Backdrop Ornament Container */
.geo-backdrop-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 900px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Concentric Radar Orbit Ring */
.geo-radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  animation: radar-sweep 60s infinite linear;
}

.geo-radar-ring::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 15%;
  right: 15%;
  bottom: 15%;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.08);
}

/* Floating Wireframe Polygons */
.geo-poly {
  position: absolute;
  color: rgba(255, 255, 255, 0.12);
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.2));
}

.geo-poly-left {
  top: 22%;
  left: 6%;
  width: 54px;
  height: 54px;
  animation: float-poly-1 14s infinite ease-in-out;
}

.geo-poly-right {
  top: 26%;
  right: 6%;
  width: 58px;
  height: 58px;
  animation: float-poly-2 16s infinite ease-in-out;
}

.geo-poly-bottom {
  bottom: 8%;
  left: 10%;
  width: 44px;
  height: 44px;
  animation: float-poly-1 18s infinite ease-in-out reverse;
}

/* Welcome Center Emblem Housing */
.welcome-emblem {
  width: 82px;
  height: 82px;
  border-radius: var(--radius-clay);
  background: linear-gradient(145deg, #181b30 0%, #0d0f1e 100%);
  box-shadow: 10px 18px 36px rgba(0, 0, 0, 0.6), inset 3px 3px 6px rgba(255, 255, 255, 0.2), inset -4px -4px 8px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

.welcome-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(145deg, #ffffff 20%, #c4b5fd 60%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 2;
}

.welcome-subtitle {
  font-size: 0.98rem;
  max-width: 540px;
  color: var(--text-secondary);
  line-height: 1.65;
  z-index: 2;
}

.prompt-suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 820px;
  margin-top: 24px;
  z-index: 2;
}

/* 3D Clay Suggestion Card with Geometric Vector Brackets */
.suggestion-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #171a30 0%, #0e101f 100%);
  box-shadow: 6px 12px 24px rgba(0, 0, 0, 0.5), inset 2px 2px 4px rgba(255, 255, 255, 0.1), inset -3px -3px 6px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.suggestion-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: linear-gradient(145deg, #222646 0%, #131528 100%);
  box-shadow: 10px 20px 36px rgba(0, 0, 0, 0.65), 0 0 25px var(--accent-purple-glow), inset 3px 3px 6px rgba(255, 255, 255, 0.2), inset -4px -4px 8px rgba(0, 0, 0, 0.6);
  border-color: var(--accent-purple);
}

/* Technical Corner Vector Brackets */
.corner-bracket-tl {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.corner-bracket-tr {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  border-right: 2px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.corner-bracket-bl {
  position: absolute;
  bottom: 5px;
  left: 5px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.corner-bracket-br {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  border-right: 2px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.suggestion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.suggestion-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Technical Coordinate Stamp */
.geo-coord-badge {
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.08em;
}

/* Message Rows */
.message-row {
  display: flex;
  gap: 16px;
  max-width: 86%;
  animation: message-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.message-row.user-row {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-row.assistant-row {
  align-self: flex-start;
}

/* 3D Clay Avatars */
.avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 4px 8px 16px rgba(0, 0, 0, 0.4), inset 2px 2px 4px rgba(255, 255, 255, 0.25), inset -3px -3px 6px rgba(0, 0, 0, 0.4);
}

.user-row .avatar {
  background: var(--grad-fire);
  color: #fff;
}

.assistant-row .avatar {
  background: var(--grad-primary);
  color: #fff;
}

/* 3D Clay Message Bubbles */
.message-bubble {
  padding: 18px 22px;
  border-radius: var(--radius-clay);
  font-size: 0.96rem;
  line-height: 1.65;
  position: relative;
  overflow: hidden;
}

.user-row .message-bubble {
  background: var(--grad-user-clay);
  box-shadow: 8px 16px 32px rgba(0, 0, 0, 0.55), inset 3px 3px 6px rgba(255, 255, 255, 0.18), inset -4px -4px 8px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-top-right-radius: 6px;
  color: var(--text-primary);
}

.assistant-row .message-bubble {
  background: var(--grad-assistant-clay);
  box-shadow: 10px 20px 36px rgba(0, 0, 0, 0.6), inset 3px 3px 6px rgba(255, 255, 255, 0.12), inset -4px -4px 8px rgba(0, 0, 0, 0.55);
  border: 1px solid var(--glass-border);
  border-top-left-radius: 6px;
  color: var(--text-primary);
}

/* Message Meta Badge */
.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.provider-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--accent-purple-light);
  font-weight: 700;
  font-family: var(--font-heading);
  text-transform: uppercase;
}

.web-source-badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--accent-cyan-light);
  font-weight: 600;
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Markdown Formatting */
.message-bubble p {
  margin-bottom: 12px;
}
.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble ul, .message-bubble ol {
  margin-left: 22px;
  margin-bottom: 12px;
}

/* 3D Clay Code Blocks */
.code-block-wrapper {
  margin: 16px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #090a14;
  box-shadow: 8px 16px 32px rgba(0, 0, 0, 0.6), inset 2px 2px 4px rgba(255, 255, 255, 0.08), inset -3px -3px 6px rgba(0, 0, 0, 0.6);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-copy-code {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #1f2340 0%, #121424 100%);
  box-shadow: 2px 4px 8px rgba(0,0,0,0.4), inset 1px 1px 2px rgba(255,255,255,0.15);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-copy-code:hover {
  background: var(--accent-purple);
  color: #fff;
  border-color: var(--accent-purple);
  transform: translateY(-1px);
}

.code-block-wrapper pre {
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
}

/* Streaming Block Cursor */
.streaming-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent-cyan);
  margin-left: 4px;
  vertical-align: middle;
  border-radius: 2px;
  animation: cursor-blink 0.8s infinite;
  box-shadow: 0 0 12px var(--accent-cyan);
}

/* 3D Clay Input Trough & Actions Bar */
.input-container {
  padding: 12px 22px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--glass-border);
  border-radius: 0 0 var(--radius-clay) var(--radius-clay);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.input-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 3D Clay Live Web Access Toggle Button */
.btn-web-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, #171a30 0%, #0d0f1c 100%);
  box-shadow: 3px 6px 12px rgba(0, 0, 0, 0.4), inset 1px 1px 2px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.btn-web-toggle:hover {
  transform: translateY(-2px);
  color: var(--text-primary);
  border-color: rgba(6, 182, 212, 0.4);
}

.web-toggle-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
}

.btn-web-toggle.active {
  background: linear-gradient(145deg, #0d2938 0%, #061922 100%);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 4px 8px 18px rgba(6, 182, 212, 0.35), inset 2px 2px 4px rgba(255, 255, 255, 0.2);
}

.btn-web-toggle.active .web-toggle-indicator {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse-dot 2s infinite;
}

.input-box {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: #0b0d18;
  box-shadow: inset 4px 6px 14px rgba(0, 0, 0, 0.75), inset -2px -2px 6px rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.input-box:focus-within {
  border-color: var(--accent-purple);
  box-shadow: inset 4px 6px 14px rgba(0, 0, 0, 0.75), 0 0 24px var(--accent-purple-glow);
}

.chat-textarea {
  flex: 1;
  resize: none;
  max-height: 180px;
  min-height: 28px;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.chat-textarea::placeholder {
  color: var(--text-muted);
}

/* 3D Clay Send Button */
.btn-send {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--grad-button-clay);
  box-shadow: 4px 8px 18px rgba(139, 92, 246, 0.45), inset 2px 2px 4px rgba(255, 255, 255, 0.3), inset -3px -3px 6px rgba(0, 0, 0, 0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-send:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 6px 14px 26px rgba(139, 92, 246, 0.6), inset 2px 2px 4px rgba(255, 255, 255, 0.4);
  filter: brightness(1.1);
}

.btn-send:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
}

/* 3D Clay Stop Button */
.btn-send.stop-mode {
  background: var(--grad-button-stop);
  box-shadow: 4px 8px 20px rgba(239, 68, 68, 0.55), inset 2px 2px 4px rgba(255, 255, 255, 0.3);
  animation: pulse-glow-red 2s infinite ease-in-out;
}

.btn-send.stop-mode:hover {
  transform: scale(1.08);
  box-shadow: 6px 14px 28px rgba(239, 68, 68, 0.7);
}

/* ==========================================================================
   JARVIS HOLOGRAPHIC THINKING ANIMATION
   ========================================================================== */

.jarvis-thinking-box {
  width: 100%;
  min-height: 190px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #0a0b14 0%, #06070d 100%);
  box-shadow: inset 4px 6px 14px rgba(0, 0, 0, 0.7), inset -2px -2px 6px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Stage for HUD Rings */
.jarvis-hud-stage {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Core Reactor Pulse */
.jarvis-core {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #8b5cf6 60%, transparent 100%);
  box-shadow: 0 0 25px #ffffff, 0 0 45px #8b5cf6;
  z-index: 10;
}

/* Concentric Dashed HUD Rings */
.jarvis-ring {
  position: absolute;
  border-radius: 50%;
  border-style: dashed;
  pointer-events: none;
}

.jarvis-ring-1 {
  width: 60px;
  height: 60px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.75);
}

.jarvis-ring-2 {
  width: 90px;
  height: 90px;
  border-width: 2px;
  border-color: rgba(139, 92, 246, 0.6);
}

.jarvis-ring-3 {
  width: 124px;
  height: 124px;
  border-width: 1px;
  border-color: rgba(236, 72, 153, 0.45);
}

/* Orbiting Data Nodes */
.jarvis-node {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff;
}

/* Scan Line Sweep */
.jarvis-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
  box-shadow: 0 0 12px #ffffff;
  pointer-events: none;
}

/* Matrix Data Stream Output */
.jarvis-stream-box {
  margin-top: 14px;
  height: 38px;
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 320px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 75%, transparent 100%);
}

.jarvis-stream-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Status Phase Text */
.jarvis-status-text {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-purple-light);
  margin-top: 8px;
  text-transform: uppercase;
  text-shadow: 0 0 14px var(--accent-purple-glow);
}
