:root {
  --primary-color: #00e5ff;
  --primary-dark: #00b8d4;
  --primary-light: #18ffff;
  --secondary-color: #6200ea;
  --secondary-light: #7c4dff;
  --accent-color: #ff3d00;
  --background-dark: #0a0e17;
  --panel-bg: rgba(16, 23, 41, 0.8);
  --panel-border: rgba(0, 229, 255, 0.2);
  --text-color: #e0e0e0;
  --text-secondary: #a0a0a0;
  --success-color: #00e676;
  --warning-color: #ffab00;
  --danger-color: #ff1744;
  --border-radius: 4px;
  --transition-speed: 0.3s;
  --panel-width: 350px;
  --font-mono: "Roboto Mono", monospace;
  --font-display: "Rajdhani", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-mono);
}

body {
  background-color: var(--background-dark);
  color: var(--text-color);
  background-image: radial-gradient(circle at 10% 20%, rgba(0, 229, 255, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(98, 0, 234, 0.03) 0%, transparent 20%),
    linear-gradient(rgba(10, 14, 23, 0.97), rgba(10, 14, 23, 0.97)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23113255' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}

.container {
  display: flex;
  height: 100vh;
  width: 100%;
  position: relative;
}

/* Status Panel (Left) */
.status-panel {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--panel-width);
  height: 100vh;
  background-color: var(--panel-bg);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--panel-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  z-index: 10;
  overflow-y: auto;
}

/* Center Panel (Logo and Controls) */
.center-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 0 var(--panel-width);
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Chat Panel (Right) */
.chat-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: var(--panel-width);
  height: 100vh;
  background-color: var(--panel-bg);
  backdrop-filter: blur(10px);
  border-left: 1px solid var(--panel-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* Panel Headers */
.panel-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  position: relative;
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 1px;
  margin-left: 15px;
  text-transform: uppercase;
}

.header-icon {
  position: relative;
  width: 24px;
  height: 24px;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  opacity: 0;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.icon-core {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--primary-color);
}

/* Status Items */
.status-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius);
  border-left: 2px solid var(--primary-color);
  transition: all var(--transition-speed);
}

.status-item:hover {
  background-color: rgba(0, 229, 255, 0.05);
}

.status-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.status-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.status-text {
  color: var(--text-color);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.online {
  background-color: var(--success-color);
  box-shadow: 0 0 10px var(--success-color);
}

.status-indicator.warning {
  background-color: var(--warning-color);
  box-shadow: 0 0 10px var(--warning-color);
}

.status-indicator.offline {
  background-color: var(--danger-color);
  box-shadow: 0 0 10px var(--danger-color);
}

/* Divider */
.divider {
  position: relative;
  text-align: center;
  margin: 25px 0;
  height: 20px;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 229, 255, 0.3), transparent);
}

.divider-text {
  position: relative;
  display: inline-block;
  padding: 0 10px;
  background-color: var(--panel-bg);
  color: var(--primary-color);
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Services */
.services-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.service-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius);
  transition: all var(--transition-speed);
}

.service-item:hover {
  background-color: rgba(0, 229, 255, 0.05);
}

.service-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 229, 255, 0.1);
  border-radius: 50%;
  margin-right: 12px;
}

.service-icon svg {
  width: 18px;
  height: 18px;
  color: var(--primary-color);
}

.service-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-name {
  font-size: 0.9rem;
  color: var(--text-color);
}

.service-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-button {
  background: none;
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
}

.service-button:hover {
  background-color: rgba(0, 229, 255, 0.1);
}

.service-button.disconnect {
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.service-button.disconnect:hover {
  background-color: rgba(255, 23, 68, 0.1);
}

/* System Metrics */
.system-metrics {
  margin-top: auto;
  padding-top: 20px;
}

.metric {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.metric-label {
  width: 40px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.metric-bar {
  flex: 1;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 10px;
}

.metric-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--primary-light));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.metric-value {
  width: 40px;
  font-size: 0.8rem;
  color: var(--text-color);
  text-align: right;
  font-family: var(--font-mono);
}

/* Hexagon Background */
.hexagon-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  opacity: 0.3;
}

.hexagon {
  position: absolute;
  width: 100px;
  height: 115px;
  background-color: transparent;
  border: 1px solid rgba(0, 229, 255, 0.2);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: float 10s infinite ease-in-out;
}

.hex1 {
  top: 10%;
  left: 20%;
  width: 150px;
  height: 173px;
  animation-delay: 0s;
}

.hex2 {
  top: 60%;
  left: 10%;
  width: 100px;
  height: 115px;
  animation-delay: 2s;
}

.hex3 {
  top: 30%;
  right: 15%;
  width: 120px;
  height: 138px;
  animation-delay: 4s;
}

.hex4 {
  top: 70%;
  right: 20%;
  width: 80px;
  height: 92px;
  animation-delay: 6s;
}

.hex5 {
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 230px;
  animation-delay: 8s;
}

/* Logo Container */
.logo-container {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.logo-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.logo-ring.outer {
  width: 100%;
  height: 100%;
  border-color: var(--primary-color);
  animation: rotate 20s linear infinite;
  box-shadow: 0 0 20px var(--primary-color);
}

.logo-ring.middle {
  width: 75%;
  height: 75%;
  border-color: var(--secondary-color);
  animation: rotate-reverse 15s linear infinite;
  box-shadow: 0 0 15px var(--secondary-color);
}

.logo-ring.inner {
  width: 50%;
  height: 50%;
  border-color: var(--primary-color);
  animation: rotate 10s linear infinite;
  box-shadow: 0 0 10px var(--primary-color);
}

.logo-core {
  width: 35%;
  height: 35%;
  background: radial-gradient(circle, var(--primary-light) 0%, var(--primary-color) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--primary-color);
  animation: pulse 2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.logo-core span {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: white;
}

.logo-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: var(--primary-light);
  border-radius: 50%;
  opacity: 0.7;
  box-shadow: 0 0 10px var(--primary-light);
  animation: particle-float 4s infinite ease-in-out;
}

.p1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.p2 {
  top: 70%;
  left: 15%;
  animation-delay: 1s;
}

.p3 {
  top: 30%;
  right: 10%;
  animation-delay: 2s;
}

.p4 {
  top: 80%;
  right: 15%;
  animation-delay: 3s;
}

.p5 {
  top: 50%;
  left: 50%;
  animation-delay: 2.5s;
}

/* Controls */
.controls-container {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.control-button {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-speed);
  border: 1px solid var(--primary-color);
  overflow: hidden;
}

.button-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, var(--primary-color) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.control-button:hover .button-glow {
  opacity: 0.2;
}

.control-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.button-icon {
  position: relative;
  z-index: 2;
}

.control-button svg {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
  transition: all var(--transition-speed);
}

.control-button.active {
  background-color: rgba(0, 229, 255, 0.15);
}

.control-button.active svg {
  color: white;
}

.control-button.active .button-glow {
  opacity: 0.3;
}

/* Voice Visualizer */
.voice-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
  margin-bottom: 20px;
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.voice-visualizer.active {
  opacity: 1;
}

.visualizer-bar {
  width: 4px;
  height: 5px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: height 0.2s ease;
}

/* Status Text */
.status-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  padding: 10px 20px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  border: 1px solid rgba(0, 229, 255, 0.1);
  animation: fadeInOut 4s ease-in-out infinite;
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 10px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background-color: rgba(0, 229, 255, 0.3);
  border-radius: 2px;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  padding: 12px 15px;
  border-radius: var(--border-radius);
  position: relative;
  animation: message-appear 0.3s ease-out;
}

.message.system {
  align-self: flex-start;
  background-color: rgba(0, 229, 255, 0.1);
  border-left: 3px solid var(--primary-color);
}

.message.user {
  align-self: flex-end;
  background-color: rgba(98, 0, 234, 0.1);
  border-right: 3px solid var(--secondary-color);
}

.message-content {
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  font-family: var(--font-mono);
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  align-self: flex-end;
  margin-top: 5px;
}

.chat-input {
  display: flex;
  gap: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 30px;
  padding: 5px;
  margin-top: auto;
  border: 1px solid rgba(0, 229, 255, 0.1);
}

.chat-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 15px;
  color: var(--text-color);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

.chat-input input::placeholder {
  color: var(--text-secondary);
}

.send-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.send-button:hover {
  background-color: var(--primary-light);
  transform: scale(1.05);
}

.send-button svg {
  width: 18px;
  height: 18px;
  color: var(--background-dark);
}

/* Animations */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate-reverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 20px var(--primary-color);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-color);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px var(--primary-color);
  }
}

@keyframes fadeInOut {
  0% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.7;
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.3;
  }
  50% {
    opacity: 0.1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes particle-float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-15px) translateX(5px);
    opacity: 1;
  }
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.7;
  }
}

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

/* Enhanced Responsive Design */
/* Extra large screens */
@media (min-width: 1600px) {
  :root {
    --panel-width: 400px;
  }

  .logo-container {
    width: 300px;
    height: 300px;
  }
}

/* Large screens */
@media (max-width: 1400px) {
  .logo-container {
    width: 220px;
    height: 220px;
  }
}

/* Medium screens */
@media (max-width: 1200px) {
  :root {
    --panel-width: 300px;
  }

  .logo-container {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
  }
}

/* Small screens and tablets */
@media (max-width: 1024px) {
  :root {
    --panel-width: 250px;
  }

  .center-panel {
    margin: 0 var(--panel-width);
  }

  .logo-container {
    width: 160px;
    height: 160px;
  }

  .controls-container {
    gap: 20px;
  }

  .control-button {
    width: 60px;
    height: 60px;
  }
}

/* Mobile layout transition */
@media (max-width: 900px) {
  html,
  body {
    overflow-y: auto;
    height: auto;
  }

  .container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    padding: 0;
  }

  /* Switch to mobile layout */
  .status-panel,
  .chat-panel {
    position: static;
    width: 100%;
    height: auto;
    max-height: 500px;
    margin: 0;
    border-radius: 0;
    border: none;
  }

  .center-panel {
    order: -1;
    margin: 0;
    padding: 20px;
    height: auto;
    min-height: 300px;
  }
}

/* Mobile phones */
@media (max-width: 600px) {
  .status-panel,
  .chat-panel {
    padding: 15px;
  }

  .panel-header h2 {
    font-size: 1.3rem;
  }

  .logo-container {
    width: 130px;
    height: 130px;
    margin-bottom: 15px;
  }

  .logo-core span {
    font-size: 1.5rem;
  }

  .controls-container {
    gap: 15px;
  }

  .control-button {
    width: 50px;
    height: 50px;
  }

  .control-button svg {
    width: 20px;
    height: 20px;
  }

  .message {
    max-width: 95%;
  }

  .message-content {
    font-size: 0.85rem;
  }

  .chat-input {
    padding: 3px;
  }

  .chat-input input {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .send-button {
    width: 36px;
    height: 36px;
  }

  .send-button svg {
    width: 16px;
    height: 16px;
  }
}
