
    :root {
      --bg: #05070c;
      --hud: #00eaff;
      --hud-soft: rgba(0, 234, 255, 0.35);
      --hud-tint: rgba(0, 234, 255, 0.08);
      --white: #eafcff;
      --error: #ff4d4d;
      --success: #4dff88;
    }
    
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    html, body {
      height: 100%;
    }
    
    body {
      background: radial-gradient(1200px 800px at 50% 45%, #0b1220 0%, #060a14 40%, var(--bg) 100%);
      font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
      color: var(--white);
      overflow: hidden;
      user-select: none;
    }

    /* --- PARTICLE BACKGROUND --- */
    #particle-canvas {
      position: fixed;
      inset: 0;
      z-index: 0;
    }

    /* --- HUD LAYOUT --- */
    .stage {
      position: relative;
      z-index: 1;
      width: 100%;
      height: 100%;
      display: grid;
      place-items: center;
    }

    /* --- CORE --- */
    .core {
      position: relative;
      width: min(58vmin, 380px);
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      filter: drop-shadow(0 0 16px rgba(0, 234, 255, 0.35)) drop-shadow(0 0 40px rgba(0, 234, 255, 0.18));
    }

    /* outer faint ring */
    .ring-outer {
      position: absolute;
      inset: 0;
      border-radius: 50%;
      border: 2px solid var(--hud-soft);
      box-shadow: 0 0 60px rgba(0, 234, 255, 0.25) inset;
    }

    /* vibrating rectangles */
    .vibrating-rectangles {
      position: absolute;
      inset: -5%;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    
    .vibrating-rectangle {
      position: absolute;
      width: 4px;
      height: 16px;
      background: var(--hud);
      border-radius: 2px;
      opacity: 0.7;
      transform-origin: bottom center;
    }

    /* tick marks ring */
    .ticks {
      position: absolute;
      inset: 6%;
      border-radius: 50%;
      -webkit-mask: conic-gradient(from 0deg, #0000 0 358deg, #000 358deg 360deg),
                   radial-gradient(circle at center, #000 64%, #0000 64%);
      mask: conic-gradient(from 0deg, #0000 0 358deg, #000 358deg 360deg),
            radial-gradient(circle at center, #000 64%, #0000 64%);
      background: repeating-conic-gradient(from 0deg, var(--hud-soft) 0 2deg, #0000 2deg 6deg);
    }

    /* rotating segmented ring */
    .segments {
      position: absolute;
      inset: 14%;
      border-radius: 50%;
      background:
        radial-gradient(circle at 50% 50%, #001c21 62%, #001c2100 63%),
        conic-gradient(from 0deg, rgba(0, 234, 255, 0.9) 0 6deg, #0000 6deg 12deg,
                               rgba(0, 234, 255, 0.6) 12deg 18deg, #0000 18deg 24deg,
                               rgba(0, 234, 255, 0.85) 24deg 30deg, #0000 30deg 36deg);
      -webkit-mask: radial-gradient(circle at 50% 50%, #0000 57%, #000 58%, #000 100%);
      mask: radial-gradient(circle at 50% 50%, #0000 57%, #000 58%, #000 100%);
      animation: spin 14s linear infinite;
      filter: blur(0.2px) saturate(1.2);
    }

    /* scanning sweep */
    .sweep {
      position: absolute;
      inset: 22%;
      border-radius: 50%;
      background: conic-gradient(from 0deg, #00eaff00 0deg, rgba(0, 234, 255, 0.55) 20deg, #00eaff00 50deg);
      -webkit-mask: radial-gradient(circle at 50% 50%, #0000 0 46%, #000 46% 52%, #0000 52% 100%);
      mask: radial-gradient(circle at 50% 50%, #0000 0 46%, #000 46% 52%, #0000 52% 100%);
      filter: blur(1px) drop-shadow(0 0 6px rgba(0, 234, 255, 0.45));
      animation: spin 6s linear infinite;
    }

    /* inner pulse ring */
    .ring-inner {
      position: absolute;
      inset: 33%;
      border-radius: 50%;
      border: 2px dashed rgba(0, 234, 255, 0.55);
      animation: spin 18s linear infinite reverse;
    }

    /* nucleus */
    .nucleus {
      position: absolute;
      inset: 41%;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: radial-gradient(circle at 50% 50%, #02242b 0 55%, #02242b00 60%);
      box-shadow: 0 0 18px rgba(0, 234, 255, 0.7) inset, 0 0 24px rgba(0, 234, 255, 0.45);
    }
    
    .nucleus::before {
      content: '';
      width: 70%;
      aspect-ratio: 1;
      border-radius: 50%;
      background: radial-gradient(circle, #9ff7ff 0%, #00eaff 35%, #007a82 60%, transparent 61%);
      filter: blur(0.5px) contrast(1.1);
      animation: breathe 3s ease-in-out infinite;
    }

    .brand {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      pointer-events: none;
    }
    
    .brand h1 {
      font-family: 'Orbitron', monospace;
      letter-spacing: 0.45rem;
      font-weight: 700;
      font-size: min(5.2vmin, 48px);
      margin: 0;
      color: var(--white);
      text-shadow: 0 0 24px rgba(0, 234, 255, 0.5), 0 0 6px rgba(0, 234, 255, 0.35);
    }

    /* Nova text animation */
    .nova-text {
      display: inline-block;
      opacity: 0;
      transform: translateY(10px);
    }

    @keyframes nova-appear {
      0% {
        opacity: 0;
        transform: translateY(10px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }
    
    @keyframes breathe {
      0%, 100% {
        transform: scale(0.98);
        filter: brightness(1);
      }
      50% {
        transform: scale(1.02);
        filter: brightness(1.2);
      }
    }

    @keyframes rectangle-pulse {
      0%, 100% {
        height: 16px;
        opacity: 0.7;
        box-shadow: 0 0 4px rgba(0, 234, 255, 0.5);
      }
      50% {
        height: 22px;
        opacity: 1;
        box-shadow: 0 0 10px rgba(0, 234, 255, 0.8);
      }
    }

    /* --- BOTTOM CHROME (chat input collapsed) --- */
    .dock {
      position: fixed;
      left: 50%;
      bottom: 28px;
      transform: translateX(-50%);
      width: min(520px, 92vw);
      border-radius: 18px;
      padding: 10px;
      background: linear-gradient(180deg, rgba(8, 15, 28, 0.5), rgba(5, 10, 20, 0.6));
      border: 1px solid rgba(0, 234, 255, 0.2);
      box-shadow: 0 0 40px rgba(0, 234, 255, 0.18);
      backdrop-filter: blur(14px);
      z-index: 2;
      transition: all 0.35s ease;
      opacity: 0.92;
    }
    
    .dock.expanded {
      width: min(860px, 92vw);
      padding: 12px;
      opacity: 1;
    }

    .chat {
      display: grid;
      grid-template-columns: 1fr auto auto auto auto auto;
      gap: 10px;
      align-items: center;
    }
    
    .input {
      width: 100%;
      padding: 12px 14px;
      font-size: 15px;
      color: var(--white);
      background: rgba(0, 234, 255, 0.06);
      border: 1px solid rgba(0, 234, 255, 0.25);
      border-radius: 12px;
      outline: none;
      caret-color: var(--hud);
      transition: 0.25s ease;
    }
    
    .input::placeholder {
      color: rgba(234, 252, 255, 0.55);
    }
    
    .input:focus {
      background: rgba(0, 234, 255, 0.12);
      box-shadow: 0 0 0 4px rgba(0, 234, 255, 0.12), 0 0 16px rgba(0, 234, 255, 0.35) inset;
    }

    .btn {
      padding: 10px 14px;
      border-radius: 12px;
      border: 1px solid rgba(0, 234, 255, 0.35);
      background: rgba(0, 234, 255, 0.12);
      color: var(--white);
      font-weight: 600;
      cursor: pointer;
      transition: 0.2s;
      backdrop-filter: blur(6px);
    }
    
    .btn:hover {
      box-shadow: 0 0 18px rgba(0, 234, 255, 0.45);
      transform: translateY(-1px);
    }

    .btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }

    .btn.active {
      background: rgba(0, 234, 255, 0.3);
      box-shadow: 0 0 12px rgba(0, 234, 255, 0.5);
    }

    /* chat log panel (hidden until focus) */
    .panel {
      height: 0;
      overflow: hidden;
      transition: height 0.35s ease;
    }
    
    .panel.show {
      height: 36vh;
    }
    
    .log {
      height: 100%;
      overflow: auto;
      padding: 8px 6px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      background: linear-gradient(180deg, rgba(0, 234, 255, 0.03), rgba(0, 234, 255, 0.05));
      border: 1px solid rgba(0, 234, 255, 0.18);
      border-radius: 12px;
    }
    
    .msg {
      margin: 0.35rem 0;
      padding: 8px 12px;
      border-radius: 8px;
      word-break: break-word;
    }
    
    .user {
      color: #9ff7ff;
      text-align: right;
      background: rgba(0, 234, 255, 0.05);
      margin-left: 20%;
    }
    
    .ai {
      color: #c4f7ff;
      background: rgba(0, 234, 255, 0.03);
      margin-right: 20%;
    }

    .error {
      color: var(--error);
      background: rgba(255, 77, 77, 0.05);
      border: 1px solid rgba(255, 77, 77, 0.2);
      text-align: center;
      margin: 10px 0;
    }

    .typing-indicator {
      display: flex;
      align-items: center;
      gap: 4px;
      color: rgba(196, 247, 255, 0.7);
      font-style: italic;
      margin: 8px 0;
    }

    .typing-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--hud);
      animation: typing 1.4s infinite ease-in-out;
    }

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

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

    /* Image and Video Styles */
    .image-container, .video-container {
      max-width: 100%;
      margin: 10px 0;
      text-align: center;
    }

    .generated-image, .generated-video {
      max-width: 100%;
      max-height: 300px;
      border-radius: 8px;
      border: 1px solid rgba(0, 234, 255, 0.3);
      cursor: pointer;
    }

    .download-btn, .video-btn {
      background: rgba(0, 234, 255, 0.2);
      border: 1px solid var(--hud);
      color: var(--white);
      padding: 6px 12px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 12px;
      margin-top: 8px;
      margin-right: 8px;
      transition: 0.2s;
    }

    .download-btn:hover, .video-btn:hover {
      background: rgba(0, 234, 255, 0.4);
      transform: translateY(-1px);
    }

    .video-controls {
      margin-top: 10px;
      display: flex;
      gap: 10px;
      justify-content: center;
    }

    /* Full Screen Viewers */
    .image-viewer, .video-viewer {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.9);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1000;
      backdrop-filter: blur(10px);
    }

    .image-viewer.show, .video-viewer.show {
      display: flex;
    }

    .image-viewer-content, .video-viewer-content {
      position: relative;
      max-width: 90%;
      max-height: 90%;
      text-align: center;
    }

    .image-viewer img, .video-viewer video {
      max-width: 100%;
      max-height: 80vh;
      border-radius: 12px;
      border: 2px solid var(--hud);
      box-shadow: 0 0 40px rgba(0, 234, 255, 0.3);
    }

    .image-viewer-controls, .video-viewer-controls {
      position: absolute;
      bottom: -60px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 15px;
    }

    .image-viewer-close, .video-viewer-close {
      position: absolute;
      top: -40px;
      right: 0;
      background: rgba(0, 234, 255, 0.2);
      border: 1px solid var(--hud);
      color: var(--white);
      width: 30px;
      height: 30px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
    }

    .image-viewer-close:hover, .video-viewer-close:hover {
      background: rgba(0, 234, 255, 0.4);
    }

    /* Loading States */
    .loading-spinner {
      border: 2px solid rgba(0, 234, 255, 0.3);
      border-radius: 50%;
      border-top: 2px solid var(--hud);
      width: 20px;
      height: 20px;
      animation: spin 1s linear infinite;
      display: inline-block;
      margin-right: 8px;
    }

    .generating-text {
      color: rgba(196, 247, 255, 0.7);
      font-style: italic;
      display: flex;
      align-items: center;
    }

    @keyframes typing {
      0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
      }
      30% {
        transform: translateY(-5px);
        opacity: 1;
      }
    }

    /* TALKING STATE */
    .talking .nucleus::before {
      animation: breathe 1.2s ease-in-out infinite;
      filter: brightness(1.7) saturate(1.4);
    }
    
    .talking .sweep {
      animation-duration: 2.2s;
    }
    
    .talking .segments {
      filter: drop-shadow(0 0 10px rgba(0, 234, 255, 0.65));
    }
    
    .talking .vibrating-rectangle {
      animation: rectangle-pulse 0.6s ease-in-out infinite;
    }

    /* LISTENING STATE */
    .listening .nucleus::before {
      animation: breathe 0.8s ease-in-out infinite;
      filter: brightness(1.5) saturate(1.3);
    }
    
    .listening .sweep {
      animation-duration: 1.5s;
    }

    /* WAKE WORD STATE */
    .wake-word .nucleus::before {
      animation: breathe 0.6s ease-in-out infinite;
      filter: brightness(2) saturate(1.5);
    }
    
    .wake-word .sweep {
      animation-duration: 1s;
    }

    /* Settings Panel */
   /* Settings Panel */
.settings-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(5, 10, 20, 0.8);
  border: 1px solid rgba(0, 234, 255, 0.3);
  border-radius: 12px;
  padding: 15px;
  backdrop-filter: blur(10px);
  z-index: 10;
  width: 250px;
  display: none;
}

.settings-panel.show {
  display: block;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(0, 234, 255, 0.2);
  padding-bottom: 10px;
}

.settings-title {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  color: var(--hud);
}

.settings-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
}

.setting-group {
  margin-bottom: 15px;
}

.setting-label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: rgba(234, 252, 255, 0.8);
}

.setting-select, .setting-input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  background: rgba(0, 234, 255, 0.1); /* Keep original background when closed */
  border: 1px solid rgba(0, 234, 255, 0.3);
  color: var(--white); /* Keep white text when closed */
  font-size: 14px;
}

/* Style the dropdown options when opened */
.setting-select:focus, .setting-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 234, 255, 0.2);
}

/* Dropdown options styling - only applies when dropdown is open */
.setting-select option {
  background: #ffffff; /* White background for options */
  color: #000000; /* Black text for options */
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

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

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

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: var(--white);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--hud);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}
    /* Webcam Feed */
    .webcam-feed {
      position: fixed;
      top: 20px;
      left: 20px;
      width: 200px;
      height: 150px;
      border-radius: 8px;
      border: 1px solid rgba(0, 234, 255, 0.3);
      overflow: hidden;
      z-index: 5;
      display: none;
    }

    .webcam-feed.show {
      display: block;
    }

    .webcam-feed video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* File Upload */
    .file-input {
      display: none;
    }

    /* Code formatting */
    .code-block {
      background: rgba(0, 10, 20, 0.8);
      border: 1px solid rgba(0, 234, 255, 0.2);
      border-radius: 8px;
      padding: 12px;
      margin: 8px 0;
      overflow-x: auto;
      font-family: 'Courier New', monospace;
      font-size: 13px;
      line-height: 1.4;
    }

    .code-block pre {
      margin: 0;
      white-space: pre-wrap;
      color: #9ff7ff;
    }

    .code-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      padding-bottom: 4px;
      border-bottom: 1px solid rgba(0, 234, 255, 0.2);
    }

    .code-language {
      color: var(--hud);
      font-size: 12px;
      font-weight: bold;
    }

    .copy-btn {
      background: rgba(0, 234, 255, 0.2);
      border: 1px solid var(--hud);
      color: var(--white);
      padding: 4px 8px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 11px;
      transition: 0.2s;
    }

    .copy-btn:hover {
      background: rgba(0, 234, 255, 0.4);
    }

    /* Emotion Detection */
    .emotion-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
    }

    .emotion-display {
      position: absolute;
      top: 10px;
      left: 10px;
      background: rgba(0, 0, 0, 0.7);
      padding: 5px 10px;
      border-radius: 5px;
      font-size: 12px;
      border: 1px solid var(--hud);
    }

    /* Big emoji for webcam */
    .big-emoji {
      font-size: 40px;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 10;
      text-shadow: 0 0 10px rgba(0, 234, 255, 0.8);
    }

    /* helper badges */
    .hint {
      position: fixed;
      right: 18px;
      bottom: 18px;
      color: rgba(234, 252, 255, 0.65);
      font-size: 12px;
      letter-spacing: 0.12rem;
    }

    @media (max-width: 768px) {
      .brand h1 {
        letter-spacing: 0.3rem;
      }
      
      .dock {
        bottom: 16px;
      }

      .chat {
        grid-template-columns: 1fr auto auto;
      }

      .video-btn, .image-btn, .file-btn, .webcam-btn, .settings-btn {
        display: none;
      }

      .settings-panel {
        width: 90%;
        left: 5%;
        right: 5%;
        top: 10%;
      }
    }
  