/* Main brand colors */
:root {
  --cyber-primary: #0ea5e9;
  --cyber-primary-hover: #0284c7;
  --cyber-secondary: #1e40af;
  --cyber-bg: #0f172a;
  --cyber-border: #1e293b;
  --cyber-text: #e2e8f0;
  --cyber-text-muted: #94a3b8;
}

/* Toggle button */
#cyber-widget-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--cyber-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  z-index: 10000;
  font-size: 14px;
}

#cyber-widget-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

/* Widget container */
#cyber-widget {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 380px;
  max-height: 550px;
  background: var(--cyber-bg);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  display: none;
  flex-direction: column;
  border: 1px solid var(--cyber-border);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
#cyber-widget-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--cyber-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 16px 16px 0 0;
}

#cyber-widget-header h3 {
  color: var(--cyber-text);
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

#cyber-widget-header button {
  background: none;
  border: none;
  color: var(--cyber-text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

#cyber-widget-header button:hover {
  color: var(--cyber-text);
}

/* Messages */
#cyber-widget-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

#cyber-widget-messages::-webkit-scrollbar {
  width: 6px;
}

#cyber-widget-messages::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 3px;
}

#cyber-widget-messages::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

#cyber-widget-messages::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

#cyber-widget-messages .message {
  padding: 12px 14px;
  border-radius: 12px;
  max-width: 85%;
  line-height: 1.5;
  font-size: 14px;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease-in;
}

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

#cyber-widget-messages .message.user {
  background: var(--cyber-primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

#cyber-widget-messages .message.assistant {
  background: var(--cyber-border);
  color: var(--cyber-text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* Assessment button */
.assessment-button {
  background: var(--cyber-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
  font-size: 14px;
  margin-top: 8px;
  width: 100%;
}

.assessment-button:hover {
  background: var(--cyber-primary-hover);
  transform: scale(1.02);
}

.assessment-button:active {
  transform: scale(0.98);
}

/* Input */
#cyber-widget-input {
  padding: 16px 18px;
  border-top: 1px solid var(--cyber-border);
  display: flex;
  gap: 10px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 0 0 16px 16px;
}

#cyber-widget-input input {
  flex: 1;
  background: var(--cyber-bg);
  border: 1px solid var(--cyber-border);
  color: var(--cyber-text);
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#cyber-widget-input input:focus {
  border-color: var(--cyber-primary);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

#cyber-widget-input input::placeholder {
  color: #64748b;
}

#cyber-widget-input button {
  background: var(--cyber-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
  font-size: 14px;
  white-space: nowrap;
}

#cyber-widget-input button:hover {
  background: var(--cyber-primary-hover);
  transform: scale(1.02);
}

#cyber-widget-input button:active {
  transform: scale(0.98);
}

/* Mobile responsive */
@media (max-width: 640px) {
  #cyber-widget {
    width: calc(100% - 40px);
    right: 20px;
    max-height: 60vh;
  }

  #cyber-widget-toggle {
    bottom: 16px;
    right: 20px;
    padding: 10px 20px;
  }
}
