:root {
  /* Dark Mode */
  --dark-bg: #0F172A;
  --dark-text: #FFFFFF;
  --dark-input-bg: #141C2B;
  --dark-coffee-bg: #1E293B;

  /* Light Mode */
  --light-bg: #FFFFFF;
  --light-text: #0F172A;
  --light-input-bg: #F0F0F0;
  --light-coffee-bg: #E3E3E3;

  /* Shared */
  --primary-gradient-start: #644AFF;
  --primary-gradient-end: #A368EA;
  --input-placeholder: #A1A1AA;
  /* Gray placeholder color */
}

/* Reset and global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--dark-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.3s, color 0.3s;
}

/* Light mode override */
body.light-mode {
  background-color: var(--light-bg);
  color: var(--light-text);
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

/* Left side: "Mr.Doctor" */
.header-left h1 {
  font-family: 'Raleway', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--primary-gradient-start), var(--primary-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.4);
  margin: 0;
}

.header-left h1:hover {
  transform: scale(0.9);
  z-index: 1;
}

/* Right side: CoffeeCode bubble + Sun/Moon icon button */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.coffee-code-bubble {
  background-color: var(--dark-coffee-bg);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  /* pill shape */
  font-weight: 500;
  font-size: 20px;
  transition: background-color 0.3s;
}

.coffee-code-bubble:hover {
  transform: scale(0.9);
  z-index: 1;
}

body.light-mode .coffee-code-bubble {
  background-color: var(--light-coffee-bg);
  color: var(--light-text);
}

/* Sun/Moon Button */
.emoji-toggle {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.emoji-toggle:hover {
  transform: scale(1.2);
}

/* Main content: center the Caduceus */
main {
  position: relative;
  /* added */
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}


.caduceus-image {
  max-width: 300px;
  width: 100%;
  height: auto;
  opacity: 70%;
}

@keyframes glow-animation {
  0% {
    box-shadow: 0 0 10px cyan;
  }

  50% {
    box-shadow: 0 0 30px cyan;
  }

  100% {
    box-shadow: 0 0 10px cyan;
  }
}

.glow-img {
  width: 300px;
  height: auto;
  border-radius: 10px;
  animation: glow-animation 3.5s infinite alternate;
}

/* Footer chat bar */
footer {
  padding: 1rem 2rem;
}

.chat-bar {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  /* Use dark variable for dark mode */
  background-color: var(--dark-input-bg);
  border-radius: 999px;
  /* pill shape */
  padding: 0.5rem 0.75rem;
  transition: background-color 0.3s;
}


.chat-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: inherit;
  margin-left: 1rem;
}

#user-input {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  /* Use dark variable for dark mode */
  background-color: var(--dark-input-bg);
  border-radius: 999px;
  /* pill shape */
  padding: 0.5rem 0.75rem;
  transition: background-color 0.3s;
  color: var(--input-placeholder);
  font-size: 18px;
}

.chat-bar button {
  background: linear-gradient(to right,
      var(--primary-gradient-start),
      var(--primary-gradient-end));
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 999px;
  /* pill shape */
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: opacity 0.3s;
  margin-left: 0.5rem;
}

.chat-bar button:hover {
  opacity: 0.8;
}

#chat-response {
  position: absolute;
  bottom: 15px;
  /* adjust this value to sit just above the chat bar */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  /* allow vertical movement, but we’ll hide the scrollbar */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#chat-response::-webkit-scrollbar {
  display: none;
}

.chat-message {
  max-width: 75%;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 16px;
  word-wrap: break-word;
}

.chat-message.user {
  align-self: flex-end;
  background: var(--primary-gradient-start);
  color: white;
}

.chat-message.bot {
  align-self: flex-start;
  background: var(--dark-coffee-bg);
  color: white;
}

body.light-mode .chat-message.bot {
  background: var(--light-coffee-bg);
  color: var(--light-text);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-left {
    margin-bottom: 0.5rem;
  }

  .header-right {
    align-self: flex-end;
  }

  footer {
    padding: 1rem;
  }

  .chat-bar {
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .chat-bar input {
    margin: 0;
  }

  .chat-bar button {
    margin: 0;
  }
}




/* 3) 3D Cube Background */
.threeDanimations {
  position: fixed;     /* Stays behind everything */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  perspective: 1000px; /* Essential for 3D */
}

.scene {
  width: 200px;
  height: 200px;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 10s infinite linear;
}

.face {
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(72, 61, 139, 0.8), rgba(255, 105, 215, 0.8));
  box-shadow: 0px 4px 20px rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  color: #ffffff;
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

/* Position each face of the cube */
.front {
  transform: translateZ(100px);
}
.back {
  transform: rotateY(180deg) translateZ(100px);
}
.right {
  transform: rotateY(90deg) translateZ(100px);
}
.left {
  transform: rotateY(-90deg) translateZ(100px);
}
.top {
  transform: rotateX(90deg) translateZ(100px);
}
.bottom {
  transform: rotateX(-90deg) translateZ(100px);
}

/* 4) Animation for the Cube */
@keyframes rotateCube {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

/* 5) Modal Container for the 3 Cards */
.modal-container {
  position: fixed; /* Keep in center above the cube */
  top: 80%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 1.5rem;
}

/* 6) Individual Cards with Translucent Background */
.card {
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 2rem;
  width: 250px;
  height: 150px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s, background-color 0.3s;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
  color:rgb(224, 178, 255)
}

.card h2 {
  margin-bottom: 0.1rem;
}

.card p {
  font-size: 18px;
  font-style: italic;
  color: #e2e2e2;
}

/* 7) Card Hover Animations */
.card:hover {
  transform: scale(1.05);
  background-color: rgba(0, 0, 0, 0.25);
}
