/* Gugu Web App – Chat Background Animation + UI Enhancements */

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f9ff;
  color: #333;
  padding-bottom: 80px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  /*overflow: hidden;*/ stop the scroll 
  height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 25% 35%, rgba(255, 245, 200, 0.15), transparent 50%),
              radial-gradient(circle at 80% 65%, rgba(185, 220, 255, 0.1), transparent 40%);
  background-repeat: no-repeat;
  z-index: -2;
  animation: floatBubbles 30s infinite linear;
}

@keyframes floatBubbles {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

/*
container to fit within the page and scroll

.container {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
  position: relative;
  z-index: 2;

  height: calc(100vh - 100px); 
  overflow-y: auto;
  overflow-x: hidden;
}




*/

.container {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
  position: relative;
  z-index: 2;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

h1 {
  font-size: 1.8rem;
  margin: 4px 0;
  font-weight: 600;
}

img.penguin-head {
  width: 90px;
  height: auto;
  margin-top: -10px;
  margin-bottom: 4px;
}

.tagline {
  font-size: 1rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.divider-line {
  border-top: 1px dashed #ddd;
  margin: 8px 0 16px;
  width: 100%;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  background-color: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
  z-index: 100;
  padding: 8px 0;
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #777;
  cursor: pointer;
  flex: 1;
  transition: color 0.2s ease-in-out;
  padding: 4px 0;
}

.tab-btn span {
  font-size: 0.85rem;
  margin-top: 3px;
  line-height: 1;
}

.tab-btn:hover,
.tab-btn.active {
  color: #4f8cff;
  font-weight: 600;
}

.chat-log {
  height: 340px;
  overflow-y: auto;
  padding: 12px;
  background-color: #fefefe;
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #e4e4e4;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(3px);
}

.chat-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.4;
  animation: fadeIn 0.3s ease;
  transition: background 0.3s;
}

.chat-bubble.user {
  align-self: flex-end;
  background-color: #e0f7fa;
  color: #333;
  border-bottom-right-radius: 4px;
  text-align: left;
}

.chat-bubble.gugu {
  align-self: flex-start;
  background-color: #fff9c4;
  color: #333;
  border-bottom-left-radius: 4px;
  text-align: left;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

#chatInput {
  flex: 1;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccddee;
  border-radius: 10px;
  resize: vertical;
  min-height: 40px;
  max-height: 180px;
}

#sendChat {
  padding: 10px 16px;
  background-color: #4f8cff;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
}

#sendChat:hover {
  background-color: #3e78e0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Journal Styles */
.page-purpose {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 10px 0 5px 0;
  color: #4d4d4d;
}

.purpose-subtext {
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 20px;
}

.mood-section {
  margin: 20px 0;
}

.mood-options {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.mood-btn {
  font-size: 24px;
  padding: 12px;
  border: none;
  border-radius: 50%;
  background-color: #e6f0ff;
  color: #333;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

.mood-btn:hover {
  background-color: #d0e3ff;
  transform: scale(1.1);
}

.mood-btn.selected {
  background-color: #a8d1ff;
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2);
  transform: scale(1.1);
}

.journal-section textarea {
  width: 100%;
  padding: 15px;
  font-size: 1rem;
  border: 1.5px solid #ccddee;
  border-radius: 14px;
  resize: none;
  box-sizing: border-box;
  margin-top: 10px;
  margin-bottom: 12px;
  background-color: #fdfdfd;
  resize: vertical;
  min-height: 100px;
  max-height: 300px;
}

#submitJournal, #getInsight {
  padding: 12px 20px;
  background-color: #4f8cff;
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  margin: 4px;
}

#submitJournal:hover, #getInsight:hover {
  background-color: #397dee;
}

.insight-section {
  margin-top: 30px;
  padding: 15px;
  background-color: #f1f4f9;
  border-radius: 14px;
  color: #5c5c5c;
  min-height: 60px;
  font-style: italic;
}









/* Login Page for Gugu for users to Login */

.login-body {
  background: radial-gradient(circle, #fffdf5, #fff7d1);
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 60px;
}

.login-container {
  background: white;
  padding: 35px 25px 25px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  width: 320px;
  text-align: center;
}

.penguin-head {
  width: 60px;
  margin-bottom: 10px;
}

.login-container h1 {
  margin-bottom: 6px;
}

.login-container .tagline {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 20px;
}

.login-container input[type="email"] {
  display: block;
  margin: 10px auto;
  padding: 12px 12px;
  width: 90%;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-sizing: border-box;
}

.password-wrap {
  position: relative;
  width: 90%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
}

.password-wrap input {
  width: 100%;
  padding: 12px 12px;
  padding-right: 60px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.toggle-text {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  user-select: none;
  background-color: white;
  padding: 2px 4px;
  line-height: 1;
  min-width: 45px;
  text-align: right;
  transition: all 0.2s ease;
}

.toggle-text.active {
  color: #007bff;
  font-weight: bold;
}

.remember-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 12px 0 20px;
  font-size: 0.95rem;
}

#loginButton {
  width: 90%;
  padding: 10px;
  background-color: #ffc400;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#loginButton:hover {
  background-color: #ffb100;
}

.login-message {
  margin-top: 10px;
  color: #cc0000;
  font-size: 0.9rem;
}

/* 🔓 Logout Button Styling */
#logoutButton {
  background-color: #ffd966;
  color: #333;
  font-weight: bold;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}


#logoutButton:hover {
  background-color: #ffc400;
}







/* 🌙 Dark Mode Toggle Switch UI */
.dark-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  gap: 10px;
}

.toggle-label {
  font-size: 0.9rem;
  color: #666;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4f8cff;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* 🌚 Dark Mode Styles */
body.dark {
  background-color: #1d1d1f;
  color: #f1f1f1;
}

body.dark .container {
  background-color: #2a2a2d;
  color: #f0f0f0;
}

body.dark .chat-log {
  background-color: #222;
  border-color: #444;
}

body.dark .chat-bubble.user {
  background-color: #37474f;
  color: #fff;
}

body.dark .chat-bubble.gugu {
  background-color: #4a3e67;
  color: #fff;
}

body.dark .tagline,
body.dark .toggle-label {
  color: #bbb;
}

body.dark textarea,
body.dark input,
body.dark #chatInput {
  background-color: #333;
  color: #f0f0f0;
  border-color: #555;
}

body.dark .insight-section {
  background-color: #2e2e2e;
  color: #ccc;
}



.topbar-controls {
  position: absolute;
  top: 12px;
  right: 20px;
  z-index: 20;
}




#emojiPanel button {
  font-size: 1.6rem;
  margin: 4px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#emojiPanel button:hover {
  transform: scale(1.2);
}
