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

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #142b50, #050b19 65%);
  color: #eaf3ff;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  bottom: -20px;
  width: 3px;
  height: 3px;
  background: #62baff;
  border-radius: 50%;
  box-shadow: 0 0 12px #299bff;
  animation: rise linear infinite;
}

@keyframes rise {
  from { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  to { transform: translateY(-110vh); opacity: 0; }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: auto;
  padding: 24px 18px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #29476a;
  padding: 12px 0 22px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
}

.logo span {
  color: #58baff;
}

.status {
  color: #64e6c1;
  font-size: 12px;
}

.status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #64e6c1;
  border-radius: 50%;
  margin-right: 5px;
}

.hero {
  text-align: center;
  padding: 40px 0 24px;
}

.orb {
  width: 155px;
  height: 155px;
  margin: 0 auto 25px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    #b2ecff, #359cf3 22%, #174a9b 48%,
    #091a40 72%);
  box-shadow: 0 0 30px #178dff88,
              0 0 75px #1466e755,
              inset -10px -12px 25px #02091f;
  animation: float 4s ease-in-out infinite,
             glow 3s ease-in-out infinite alternate;
}

.orb::before,
.orb::after {
  content: "";
  position: absolute;
  inset: -13px;
  border: 1px solid #48b8ff66;
  border-radius: 50%;
  animation: spin 8s linear infinite;
}

.orb::after {
  inset: -23px;
  border-color: #4d8dff55;
  animation-duration: 12s;
  animation-direction: reverse;
}

.orb-core {
  font-size: 47px;
  color: #fff;
  text-shadow: 0 0 20px #a6e8ff;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes glow {
  from { filter: brightness(.9); }
  to { filter: brightness(1.25); }
}

@keyframes spin {
  from { transform: rotate(0deg) scaleX(1); }
  to { transform: rotate(360deg) scaleX(1); }
}

@keyframes pulse {
  50% { transform: scale(1.12); }
}

.hero h1 {
  font-size: clamp(30px, 6vw, 45px);
  margin-bottom: 12px;
}

.hero h1 span {
  color: #62baff;
}

.hero p {
  color: #9eb7d7;
  line-height: 1.7;
}

.chat {
  flex: 1;
  min-height: 180px;
  max-height: 380px;
  overflow-y: auto;
  padding: 10px 4px;
}

.message {
  max-width: 85%;
  padding: 14px 16px;
  border-radius: 16px;
  margin: 12px 0;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: appear .3s ease;
}

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

.bot {
  background: #102443;
  border: 1px solid #244b76;
}

.user {
  margin-left: auto;
  background: linear-gradient(135deg, #176ac2, #174b96);
}

.reason {
  border-left: 2px solid #65baff;
  margin-top: 12px;
  padding: 8px 12px;
  color: #b8d7f6;
  font-size: 13px;
}

.composer {
  padding: 15px 0 10px;
}

.inputbox {
  display: flex;
  gap: 10px;
  background: #0d1b31;
  border: 1px solid #31567e;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 0 24px #1266bd12;
}

textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  height: 45px;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font: inherit;
  padding: 13px 8px;
}

textarea::placeholder {
  color: #7892b3;
}

button {
  border: none;
  cursor: pointer;
  color: white;
}

#send {
  background: linear-gradient(135deg, #329fff, #2359c9);
  padding: 0 19px;
  border-radius: 11px;
  font-weight: bold;
  transition: .2s;
}

#send:hover {
  box-shadow: 0 0 20px #288dff88;
  transform: scale(1.04);
}

#send:disabled {
  opacity: .5;
}

.options {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.chip {
  padding: 9px 13px;
  border-radius: 20px;
  border: 1px solid #2b4a70;
  background: #0d1b31;
  color: #b9d7fa;
  font-size: 12px;
}

.chip:hover {
  background: #17365e;
}

footer {
  text-align: center;
  padding-top: 15px;
  font-size: 11px;
  color: #607c9f;
}

@media (max-width: 500px) {
  .app { padding: 18px 14px; }
  .orb { width: 125px; height: 125px; }
  .orb-core { font-size: 38px; }
  .message { max-width: 94%; }
}

/* ===== MUZAMMIL AI STARTING ANIMATION ===== */

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, #102c55 0%, #07152d 48%, #020711 100%);
  animation: introExit 1s ease 4.5s forwards;
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  animation: introAppear 1.2s ease both;
}

.intro-orb {
  width: 125px;
  height: 125px;
  position: relative;
  margin: 0 auto 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 28%,
    #e0f7ff 0%,
    #62c7ff 12%,
    #1976d2 35%,
    #0b2457 67%,
    #020817 100%
  );
  box-shadow:
    0 0 25px #168bff,
    0 0 65px #167bff88,
    0 0 120px #0754cb55,
    inset -8px -10px 24px #020817;
  animation: introFloat 3s ease-in-out infinite,
             introGlow 2s ease-in-out infinite alternate;
}

.intro-orb::before,
.intro-orb::after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid #55c5ff88;
  border-radius: 50%;
  animation: introSpin 5s linear infinite;
}

.intro-orb::after {
  inset: -25px;
  border-color: #397dff66;
  border-style: dashed;
  animation-duration: 9s;
  animation-direction: reverse;
}

.intro-orb-ring {
  position: absolute;
  inset: -36px;
  border: 1px solid #3388ff33;
  border-radius: 50%;
  animation: introSpin 12s linear infinite;
}

.intro-orb-core {
  color: white;
  font-size: 52px;
  text-shadow: 0 0 20px #fff, 0 0 40px #5bc6ff;
  animation: introPulse 1.8s ease-in-out infinite;
}

.intro-title {
  font-size: clamp(38px, 8vw, 65px);
  font-weight: 800;
  letter-spacing: 2px;
  color: #f4faff;
  opacity: 0;
  animation: titleReveal 1s ease .5s forwards;
}

.intro-title span {
  display: inline-block;
  color: #63c5ff;
  text-shadow: 0 0 18px #168bff99;
  animation: nameGlow 2s ease-in-out infinite alternate;
}

.intro-subtitle {
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 4px;
  color: #8cb9e9;
  opacity: 0;
  animation: titleReveal 1s ease 1.2s forwards;
}

.intro-loader {
  width: 190px;
  height: 3px;
  margin: 35px auto 0;
  background: #193457;
  border-radius: 10px;
  overflow: hidden;
}

.intro-loader-bar {
  width: 0;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #2474ff, #72e1ff, #2474ff);
  box-shadow: 0 0 12px #42baff;
  animation: loadingProgress 3.3s ease .5s forwards;
}

.intro-loading-text {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #668bb8;
  animation: loadingBlink 1.2s ease-in-out infinite;
}

.intro-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.intro-particle {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #67caff;
  box-shadow: 0 0 12px #168bff;
  animation: introRise linear infinite;
}

@keyframes introAppear {
  from { opacity: 0; transform: scale(.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes introExit {
  0% {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
  75% {
    opacity: 0;
    visibility: visible;
    transform: scale(1.06);
  }
  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.06);
  }
}

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

@keyframes introFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes introGlow {
  from { filter: brightness(.85); }
  to { filter: brightness(1.3); }
}

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

@keyframes introPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

@keyframes nameGlow {
  from { text-shadow: 0 0 8px #168bff66; }
  to { text-shadow: 0 0 25px #168bff, 0 0 45px #168bff66; }
}

@keyframes loadingProgress {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes loadingBlink {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

@keyframes introRise {
  from { transform: translateY(0); opacity: 0; }
  15% { opacity: .9; }
  to { transform: translateY(-105vh); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-screen,
  .intro-content,
  .intro-orb,
  .intro-orb::before,
  .intro-orb::after,
  .intro-orb-core,
  .intro-title,
  .intro-title span,
  .intro-subtitle,
  .intro-loader-bar,
  .intro-loading-text,
  .intro-particle {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
  }

  .intro-screen {
    animation: introExit .01ms 1s forwards !important;
  }
}

/* FULL-SCREEN STARTUP INTRO */

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at center,
    #12376b 0%, #081a36 42%, #020611 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
}

.intro-screen.intro-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 20px;
  text-align: center;
  animation: introEntrance 1s ease both;
}

.intro-orb {
  position: relative;
  width: 125px;
  height: 125px;
  margin: 0 auto 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%,
    #e5faff, #56c5ff 15%, #176ac5 42%,
    #0a2455 70%, #020817 100%);
  box-shadow: 0 0 30px #168bff,
              0 0 80px #167bff88,
              inset -10px -12px 25px #020817;
  animation: orbFloat 3s ease-in-out infinite,
             orbGlow 2s ease-in-out infinite alternate;
}

.intro-orb::before,
.intro-orb::after {
  content: "";
  position: absolute;
  inset: -15px;
  border: 1px solid #62caff88;
  border-radius: 50%;
  animation: orbRotate 5s linear infinite;
}

.intro-orb::after {
  inset: -27px;
  border-color: #3d83ff66;
  border-style: dashed;
  animation-duration: 10s;
  animation-direction: reverse;
}

.intro-orb-core {
  color: white;
  font-size: 52px;
  text-shadow: 0 0 25px #a6e8ff;
  animation: corePulse 1.5s ease-in-out infinite;
}

.intro-heading {
  color: #f4f9ff;
  font-size: clamp(38px, 8vw, 64px);
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0;
  animation: introText 1s ease .35s forwards;
}

.intro-heading span {
  color: #62baff;
  text-shadow: 0 0 25px #168bff88;
}

.intro-subtitle {
  margin-top: 15px;
  color: #91bce8;
  font-size: 10px;
  letter-spacing: 4px;
  opacity: 0;
  animation: introText 1s ease .7s forwards;
}

.intro-progress {
  width: 190px;
  height: 3px;
  margin: 32px auto 0;
  background: #193457;
  border-radius: 10px;
  overflow: hidden;
}

.intro-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg,
    #2875ff, #8ceaff, #2875ff);
  box-shadow: 0 0 15px #42baff;
  animation: introLoading 4s ease forwards;
}

.intro-loading {
  margin-top: 14px;
  color: #7295bd;
  font-size: 11px;
  letter-spacing: 2px;
  animation: loadingPulse 1s ease-in-out infinite;
}

.intro-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-star {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  background: #70d3ff;
  border-radius: 50%;
  box-shadow: 0 0 12px #168bff;
  animation: starRise linear infinite;
}

@keyframes introEntrance {
  from { opacity: 0; transform: scale(.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

@keyframes orbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes orbGlow {
  from { filter: brightness(.85); }
  to { filter: brightness(1.3); }
}

@keyframes orbRotate {
  to { transform: rotate(360deg); }
}

@keyframes corePulse {
  50% { transform: scale(1.2); }
}

@keyframes introLoading {
  to { width: 100%; }
}

@keyframes loadingPulse {
  50% { opacity: .4; }
}

@keyframes starRise {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-110vh); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-content,
  .intro-orb,
  .intro-orb::before,
  .intro-orb::after,
  .intro-orb-core,
  .intro-heading,
  .intro-subtitle,
  .intro-progress-bar,
  .intro-loading,
  .intro-star {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
  }
}

/* Muzammil AI — Voice Button */

#voiceBtn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border: 1px solid rgba(98, 186, 255, 0.45);
  border-radius: 14px;

  background: linear-gradient(
    135deg,
    #102b50,
    #071629
  );

  color: #62baff;
  font-size: 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  flex-shrink: 0;

  box-shadow: 0 0 12px rgba(0, 153, 255, 0.15);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

/* Hover effect */
#voiceBtn:hover {
  background: linear-gradient(
    135deg,
    #164a7e,
    #0b2544
  );

  border-color: #62baff;
  box-shadow: 0 0 20px rgba(0, 153, 255, 0.4);
  transform: translateY(-2px);
}

/* Click effect */
#voiceBtn:active {
  transform: scale(0.92);
}

/* Keyboard accessibility */
#voiceBtn:focus-visible {
  outline: 2px solid #62baff;
  outline-offset: 3px;
}

/* Listening state */
#voiceBtn.listening {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  color: white;
  border-color: #f87171;
  animation: voicePulse 1.2s infinite;
}

@keyframes voicePulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.35);
  }

  50% {
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.8);
  }
}

/* Disabled state */
#voiceBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.inputbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #0d1b31;
  border: 1px solid #31567e;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 0 24px #1266bd12;
}

#voiceBtn {
  align-self: center;
  flex-shrink: 0;
}

/* VOICE ASSISTANT PANEL */
.voice-panel {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(350px, calc(100vw - 30px));
  padding: 22px;
  border: 1px solid #347fc4;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(160deg, #102b50, #040d1c);
  box-shadow: 0 0 45px #168bff44;
}

.voice-panel.open {
  display: block;
  animation: voicePanelIn .25s ease;
}

@keyframes voicePanelIn {
  from { opacity: 0; margin-top: 12px; }
  to { opacity: 1; margin-top: 0; }
}

.voice-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a9dcff;
  font-weight: bold;
}

.voice-panel button {
  border: 1px solid #315d8b;
  border-radius: 12px;
  padding: 10px 13px;
  background: #102c4e;
  color: #eaf6ff;
}

#closeVoice {
  padding: 5px 9px;
}

.voice-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 135px;
  height: 135px;
  margin: 30px auto 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 25%,
    #e4faff, #58c5ff 12%, #1677df 38%,
    #102f70 68%, #030b20);
  box-shadow: 0 0 25px #198cff88, inset -8px -10px 20px #020817;
}

.voice-orb-core {
  z-index: 2;
  font-size: 45px;
  color: white;
  text-shadow: 0 0 20px white;
}

.voice-wave {
  position: absolute;
  inset: -7px;
  border: 2px solid #54bdff;
  border-radius: 50%;
  opacity: 0;
}

.voice-panel.listening .voice-wave {
  animation: voiceWave 1.5s ease-out infinite;
}

.voice-panel.listening .wave-two {
  animation-delay: .5s;
}

.voice-panel.listening .wave-three {
  animation-delay: 1s;
}

.voice-panel.speaking .voice-orb {
  animation: speakingOrb .45s ease-in-out infinite alternate;
  box-shadow: 0 0 35px #28a9ff, 0 0 70px #167bff66;
}

.voice-panel.speaking .voice-orb-core {
  animation: speakingCore .3s ease-in-out infinite alternate;
}

@keyframes voiceWave {
  from { transform: scale(1); opacity: .8; }
  to { transform: scale(1.65); opacity: 0; }
}

@keyframes speakingOrb {
  from { transform: scale(.96); filter: brightness(.9); }
  to { transform: scale(1.07); filter: brightness(1.4); }
}

@keyframes speakingCore {
  to { transform: scale(1.22); }
}

#voiceStatus {
  min-height: 24px;
  margin-bottom: 20px;
  color: #a8d8ff;
}

.voice-panel label {
  display: block;
  margin: 12px 0 8px;
  color: #9ebce0;
  font-size: 13px;
  text-align: left;
}

#voiceSelect {
  width: 100%;
  padding: 11px;
  border: 1px solid #315d8b;
  border-radius: 10px;
  color: white;
  background: #09182c;
}

.voice-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

#listenAgain {
  background: linear-gradient(135deg, #168bff, #2454ca);
}

@media (prefers-reduced-motion: reduce) {
  .voice-panel *,
  .voice-panel.open {
    animation-duration: 1.5s;
  }
}

#muzammilOrbContainer {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-family: Arial, sans-serif;
  color: #d9efff;
}

#muzammilOrb {
  width: 100px;
  height: 100px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #b9f4ff,
    #318bff 35%,
    #142c91 68%,
    #050b24 100%
  );
  box-shadow:
    0 0 20px #168bff,
    0 0 45px #168bff88,
    inset 0 0 20px #ffffff55;
  animation: muzOrbBreathe 1.2s ease-in-out infinite;
}

.orb-core {
  width: 65%;
  height: 65%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #ffffff,
    #8ceaff 25%,
    #2584ff 60%,
    #101b68
  );
  box-shadow: 0 0 25px #8ceaff;
  animation: muzCoreMove 2s ease-in-out infinite alternate;
}

.orb-wave {
  position: absolute;
  inset: -5px;
  border: 2px solid #59c5ff;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.wave-one {
  animation: muzOrbWave 1.8s ease-out infinite;
}

.wave-two {
  animation: muzOrbWave 1.8s ease-out infinite;
  animation-delay: .9s;
}

#orbStatus {
  font-size: 14px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px #168bff;
  animation: muzTextGlow 1s ease-in-out infinite alternate;
}

@keyframes muzOrbBreathe {
  0%, 100% {
    transform: scale(.92);
    box-shadow: 0 0 18px #168bff;
  }
  50% {
    transform: scale(1.12);
    box-shadow:
      0 0 35px #168bff,
      0 0 65px #168bff88;
  }
}

@keyframes muzCoreMove {
  from {
    transform: scale(.85) rotate(0deg);
  }
  to {
    transform: scale(1.08) rotate(25deg);
  }
}

@keyframes muzOrbWave {
  0% {
    transform: scale(.9);
    opacity: .8;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

@keyframes muzTextGlow {
  from { opacity: .65; }
  to { opacity: 1; }
}

#muzammilSpeaking .speaking-orb {
  color: #62baff;
  font-size: 24px;
  animation: muzOrbPulse 0.6s ease-in-out infinite alternate;
  text-shadow: 0 0 15px #168bff;
}

#muzammilSpeaking .speaking-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

#muzammilSpeaking .speaking-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #62baff;
  animation: muzDot 0.5s ease-in-out infinite alternate;
}

#muzammilSpeaking .speaking-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

#muzammilSpeaking .speaking-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes muzOrbPulse {
  from {
    transform: scale(0.85);
    opacity: 0.65;
  }
  to {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes muzDot {
  from {
    transform: translateY(3px);
    opacity: 0.4;
  }
  to {
    transform: translateY(-3px);
    opacity: 1;
  }
}

/* ==================================
   MUZAMMIL AI — PREMIUM UI UPGRADE
   Add at the bottom of your CSS
================================== */

:root {
  --accent: #67d5ff;
  --accent-blue: #398bff;
  --glass: rgba(12, 29, 54, 0.78);
  --glass-border: rgba(103, 190, 255, 0.23);
  --text-muted: #9db9d9;
}

body {
  background:
    radial-gradient(
      ellipse at 50% -10%,
      rgba(34, 115, 220, 0.30),
      transparent 55%
    ),
    radial-gradient(
      circle at 100% 70%,
      rgba(52, 83, 190, 0.10),
      transparent 35%
    ),
    #030914;
  background-attachment: fixed;
}

.app {
  width: min(100%, 900px);
}

/* Premium glass header */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background: rgba(3, 12, 27, 0.78);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 17px 20px;
  margin-bottom: 12px;
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.18);
}

.logo {
  letter-spacing: -0.6px;
}

.logo span,
.hero h1 span {
  background: linear-gradient(
    110deg,
    #ffffff,
    #67d5ff 45%,
    #548bff
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Enhanced AI orb */
.orb {
  border: 1px solid rgba(139, 221, 255, 0.35);
  box-shadow:
    0 0 22px rgba(24, 141, 255, 0.45),
    0 0 70px rgba(20, 102, 231, 0.23),
    inset 0 0 28px rgba(255, 255, 255, 0.08);
  transition: filter 0.3s ease;
}

.orb:hover {
  filter: brightness(1.18);
}

.hero h1 {
  letter-spacing: -1.5px;
}

.hero p {
  color: var(--text-muted);
}

/* Premium conversation cards */
.chat {
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 16px;
  background: rgba(5, 16, 33, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.15);
  scrollbar-width: thin;
  scrollbar-color: #27598a transparent;
}

.message {
  padding: 16px 18px;
  border-radius: 18px;
  line-height: 1.75;
  transition: border-color 0.25s ease,
              transform 0.25s ease;
}

.bot {
  background: linear-gradient(
    135deg,
    rgba(20, 47, 81, 0.95),
    rgba(10, 25, 47, 0.94)
  );
  border: 1px solid rgba(79, 155, 230, 0.24);
  border-bottom-left-radius: 5px;
}

.bot strong {
  color: var(--accent);
}

.user {
  background: linear-gradient(
    135deg,
    #237fe1,
    #424dc6
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom-right-radius: 5px;
  box-shadow: 0 5px 22px rgba(35, 127, 225, 0.15);
}

/* Refined input */
.inputbox {
  border: 1px solid rgba(95, 178, 255, 0.35);
  background: rgba(8, 22, 42, 0.92);
  border-radius: 19px;
  box-shadow: 0 0 28px rgba(24, 117, 255, 0.07);
  transition: border-color 0.25s,
              box-shadow 0.25s;
}

.inputbox:focus-within {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(103, 213, 255, 0.08),
    0 0 28px rgba(24, 117, 255, 0.14);
}

textarea {
  line-height: 1.5;
}

#send {
  min-width: 48px;
  min-height: 45px;
  border-radius: 13px;
  box-shadow: 0 4px 15px rgba(41, 126, 255, 0.22);
}

/* Interactive quick-action chips */
.chip {
  border-color: rgba(103, 186, 255, 0.24);
  background: rgba(11, 30, 55, 0.86);
  transition: all 0.22s ease;
}

.chip:hover {
  color: #ffffff;
  border-color: var(--accent);
  background: rgba(28, 75, 123, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(40, 145, 255, 0.12);
}

/* Better voice controls */
#voiceBtn {
  margin: 12px auto 0;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #123b69, #07162c);
}

/* Accessible focus */
button:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Mobile polish */
@media (max-width: 500px) {
  header {
    padding: 14px;
    border-radius: 15px;
  }

  .chat {
    padding: 10px;
    border-radius: 17px;
  }

  .message {
    padding: 13px;
  }

  .options {
    gap: 7px;
  }

  .chip {
    padding: 9px 11px;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .orb,
  .orb::before,
  .orb::after,
  .orb-core,
  .particle,
  .message {
    animation: none !important;
    transition: none !important;
  }
}

/* ==============================
   MUZAMMIL AI — WHITE & DARK THEME
   ============================== */

/* Dark theme (default) */
body {
  --page-bg: #07111f;
  --panel-bg: #101e30;
  --text-color: #edf5ff;
  --border-color: #30455e;
  --input-bg: #0b1828;
  --message-bg: #14253a;
  --user-bg: #174f83;
  --button-bg: #1976d2;
  --button-text: #ffffff;

  background-color: var(--page-bg);
  color: var(--text-color);
  transition: background-color 0.25s, color 0.25s;
}

/* White theme */
body.light-theme {
  --page-bg: #f4f7fb;
  --panel-bg: #ffffff;
  --text-color: #172033;
  --border-color: #d5deea;
  --input-bg: #ffffff;
  --message-bg: #ffffff;
  --user-bg: #dceeff;
  --button-bg: #1769c2;
  --button-text: #ffffff;
}

/* Common containers */
body,
#chat,
.message,
input,
textarea,
button {
  transition:
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s;
}

/* Chat panel */
#chat {
  background-color: var(--panel-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

/* Chat messages */
.message {
  color: var(--text-color);
  border-color: var(--border-color);
}

.message.bot {
  background-color: var(--message-bg);
  color: var(--text-color);
}

.message.user {
  background-color: var(--user-bg);
  color: var(--text-color);
}

/* Input fields */
input,
textarea {
  background-color: var(--input-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-color);
  opacity: 0.65;
}

/* Buttons */
#send,
#voiceBtn,
#themeToggle {
  cursor: pointer;
  border-radius: 10px;
}

#send,
#voiceBtn {
  background-color: var(--button-bg);
  color: var(--button-text);
}

/* Theme toggle button */
#themeToggle {
  background-color: var(--panel-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}

#themeToggle:hover {
  opacity: 0.8;
}

/* General text */
h1, h2, h3, p, strong, label {
  color: inherit;
}

/* ===== MUZAMMIL AI THEME FIX ===== */

body {
  background: #07111f;
  color: #edf5ff;
}

/* WHITE THEME */
body.light-theme {
  background: #f4f7fb !important;
  color: #172033 !important;
}

body.light-theme #chat,
body.light-theme .chat-container,
body.light-theme .chat-box,
body.light-theme main,
body.light-theme header,
body.light-theme footer,
body.light-theme .container,
body.light-theme .message.bot {
  background-color: #ffffff !important;
  color: #172033 !important;
  border-color: #d5deea !important;
}

body.light-theme .message.user {
  background-color: #dceeff !important;
  color: #172033 !important;
}

body.light-theme p,
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme strong,
body.light-theme label,
body.light-theme span {
  color: #172033;
}

body.light-theme input,
body.light-theme textarea {
  background-color: #ffffff !important;
  color: #172033 !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
  color: #64748b !important;
}

#themeToggle {
  position: relative;
  z-index: 99999;
  padding: 10px 16px;
  margin: 10px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #64748b;
  background: #ffffff;
  color: #172033;
  font-weight: bold;
}

/* MUZAMMIL AI — STOP TALKING BUTTON */

#stopTalking {
  padding: 11px 15px;
  border: 1px solid rgba(255, 100, 120, 0.55);
  border-radius: 12px;
  background: linear-gradient(135deg, #a9233b, #651426);
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 55, 85, 0.15);
  transition: background 0.2s ease,
              transform 0.2s ease,
              box-shadow 0.2s ease;
}

#stopTalking:hover {
  background: linear-gradient(135deg, #e63950, #8b1830);
  box-shadow: 0 0 18px rgba(255, 55, 85, 0.4);
  transform: translateY(-2px);
}

#stopTalking:active {
  transform: scale(0.95);
}

#stopTalking:focus-visible {
  outline: 2px solid #ff8295;
  outline-offset: 3px;
}

.voice-cards-container {
  text-align: center;
  margin: 15px 0;
}

.voice-cards {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.voice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid #347fc4;
  background: #0d223a;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-card:hover, .voice-card.active {
  background: #168bff;
  border-color: #ffffff;
}

.card-icon {
  font-size: 24px;
  margin-bottom: 4px;
}