/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[11].oneOf[12].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
@tailwind base;
@tailwind components;
@tailwind utilities;

/* J.A.R.V.I.S. HUD STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Courier New', monospace;
  background: #0a0e27;
  color: #00d9ff;
  overflow: hidden;
  height: 100vh;
}

.jarvis-container {
  display: flex;
  height: 100vh;
  position: relative;
}

/* Grid Background */
.grid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 0;
  animation: gridScroll 20s linear infinite;
}

@keyframes gridScroll {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Left Panel */
.left-panel {
  width: 30%;
  min-width: 300px;
  background: rgba(10, 14, 39, 0.85);
  border-right: 2px solid #00d9ff;
  padding: 20px;
  overflow-y: auto;
  position: relative;
  z-index: 10;
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.2);
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
}

.left-panel .collapse-button {
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid #00d9ff;
  background: rgba(0, 217, 255, 0.05);
  color: #00d9ff;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 2px;
}

.left-panel .collapse-button:hover {
  background: #00d9ff;
  color: #0a0e27;
}

.sidebar-content.collapsed {
  display: none;
}

.collapsed-status {
  display: flex;
  justify-content: center;
  padding: 10px 0 0;
}

.left-panel.collapsed {
  width: 70px;
  min-width: 70px;
  padding: 10px;
}

.left-panel::-webkit-scrollbar, .chat-messages::-webkit-scrollbar {
  width: 8px;
}
.left-panel::-webkit-scrollbar-track, .chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 217, 255, 0.1);
}
.left-panel::-webkit-scrollbar-thumb, .chat-messages::-webkit-scrollbar-thumb {
  background: #00d9ff;
  border-radius: 4px;
}

/* Typography & Sections */
.system-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 217, 255, 0.3);
}

.system-title {
  font-size: 28px;
  letter-spacing: 4px;
  text-shadow: 0 0 10px #00d9ff;
  margin-bottom: 10px;
  font-weight: 800;
}

.system-subtitle {
  font-size: 10px;
  color: #0099cc;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section {
  margin-bottom: 25px;
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 4px;
  padding: 15px;
  background: rgba(0, 217, 255, 0.02);
  transition: all 0.3s ease;
}

.section:hover {
  border-color: #00d9ff;
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.15);
}

.section-title {
  font-size: 12px;
  margin-bottom: 15px;
  color: #00d9ff;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.section-title.section-toggle {
  justify-content: space-between;
}

.section-toggle-button {
  padding: 4px 8px;
  border: 1px solid #00d9ff;
  background: rgba(0, 217, 255, 0.05);
  color: #00d9ff;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 2px;
}

.section-toggle-button:hover {
  background: #00d9ff;
  color: #0a0e27;
}

.section-body.collapsed {
  display: none;
}

.section-title::before {
  content: '▸';
  color: #00d9ff;
}

/* Agents & Stats */
.agent-item {
  background: rgba(0, 217, 255, 0.05);
  padding: 12px;
  margin-bottom: 10px;
  border-left: 3px solid #00d9ff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.agent-name {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 13px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-model {
  font-size: 10px;
  color: #0099cc;
}

.agent-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.agent-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.agent-input,
.agent-select {
  width: 100%;
  background: rgba(0, 217, 255, 0.05);
  border: 1px solid #00d9ff;
  color: #00d9ff;
  padding: 8px 10px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  border-radius: 2px;
  outline: none;
}

.agent-textarea {
  width: 100%;
  background: rgba(0, 217, 255, 0.05);
  border: 1px solid #00d9ff;
  color: #00d9ff;
  padding: 10px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  border-radius: 2px;
  outline: none;
  resize: vertical;
}

.agent-input:disabled,
.agent-select:disabled {
  opacity: 0.5;
  cursor: wait;
}

.agent-error {
  color: #ff4444;
  font-size: 11px;
  margin-bottom: 8px;
}

.agent-key {
  font-size: 9px;
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
}

.agent-create {
  margin-top: 12px;
  border-top: 1px solid rgba(0, 217, 255, 0.2);
  padding-top: 12px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal {
  width: min(520px, 92vw);
  background: #0b1220;
  border: 1px solid #00d9ff;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.modal-title {
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.modal-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #0099cc;
  margin-bottom: 6px;
}

.modal-help {
  font-size: 11px;
  color: #0099cc;
  margin-bottom: 10px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  gap: 10px;
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s infinite;
}
.status-online { background: #00ff88; box-shadow: 0 0 10px #00ff88; }
.status-offline { background: #ff4444; box-shadow: 0 0 10px #ff4444; }

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

.server-stat {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 217, 255, 0.1);
  font-size: 11px;
}
.server-stat:last-child { border-bottom: none; }

.stat-label { color: #0099cc; }
.stat-value { color: #00d9ff; font-weight: bold; }

/* Controls */
.control-button {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(0, 217, 255, 0.05);
  border: 1px solid #00d9ff;
  color: #00d9ff;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.control-button:hover {
  background: #00d9ff;
  color: #0a0e27;
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

.control-button.danger { border-color: #ff4444; color: #ff4444; }
.control-button.danger:hover {
  background: #ff4444;
  color: #0a0e27;
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

/* Right Panel */
.right-panel {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.chat-header {
  padding: 20px 30px;
  border-bottom: 2px solid rgba(0, 217, 255, 0.3);
  background: rgba(10, 14, 39, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-title {
  font-size: 18px;
  letter-spacing: 4px;
  text-shadow: 0 0 10px #00d9ff;
  font-weight: bold;
}

.chat-messages {
  flex: 1 1;
  overflow-y: auto;
  padding: 30px;
}

.message {
  margin-bottom: 20px;
  animation: messageSlide 0.4s ease;
  max-width: 85%;
}

.message.user { margin-left: auto; }
.message.assistant { margin-right: auto; }

@keyframes messageSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-header {
  font-size: 10px;
  color: #0099cc;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
}

.message-content {
  background: rgba(0, 217, 255, 0.05);
  padding: 15px 20px;
  border-left: 3px solid #00d9ff;
  border-radius: 2px;
  line-height: 1.5;
  font-size: 14px;
  position: relative;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d9ff;
  animation: typingPulse 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.message.user .message-content {
  background: rgba(0, 217, 255, 0.1);
  border-left: none;
  border-right: 3px solid #00ff88;
}

.message.user .message-header {
  text-align: right;
}

.chat-input-container {
  padding: 20px 30px;
  border-top: 2px solid rgba(0, 217, 255, 0.3);
  background: rgba(10, 14, 39, 0.8);
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
}

.chat-input-wrapper {
  display: flex;
  gap: 15px;
}

.chat-input {
  flex: 1 1;
  background: rgba(0, 217, 255, 0.05);
  border: 1px solid #00d9ff;
  color: #00d9ff;
  padding: 15px 20px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  border-radius: 2px;
  outline: none;
  transition: all 0.3s ease;
}

.chat-input:focus {
  background: rgba(0, 217, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.chat-input:disabled {
  opacity: 0.5;
  cursor: wait;
}

.send-button {
  padding: 15px 30px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid #00d9ff;
  color: #00d9ff;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
}

.send-button:hover:not(:disabled) {
  background: #00d9ff;
  color: #0a0e27;
  box-shadow: 0 0 25px rgba(0, 217, 255, 0.6);
}

/* Accents */
.corner-accent {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid #00d9ff;
  z-index: 20;
  pointer-events: none;
}
.corner-accent.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.corner-accent.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.corner-accent.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.corner-accent.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 217, 255, 0.1);
  border-radius: 2px;
  margin-top: 5px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d9ff, #00ff88);
  border-radius: 2px;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
  color: #9be3ff;
}

.toggle-label {
  font-size: 12px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(155, 227, 255, 0.2);
  transition: 0.2s;
  border-radius: 12px;
}

.slider:before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #9be3ff;
  transition: 0.2s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: rgba(0, 255, 157, 0.3);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

