/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

/* Body */
body {
  background-color: #fff;
  color: #222;
  font-size: 16px;
  line-height: 1.5;
}

/* Top Navigation Bar */

.tabbar {
  display: flex;
  justify-content: flex-start; /* Align everything to the left */
  align-items: center;
  background-color: #f8f9fa;
  padding: 12px 24px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 24px; /* spacing between nav-buttons and brand */
}

.nav-buttons {
  display: flex;
}

.nav-buttons button {
  background: none;
  border: none;
  padding: 8px 12px;
  margin-left: 0;
  margin-right: 12px;
  font-size: 14px;
  cursor: pointer;
  color: #5f6368;
  transition: color 0.2s ease;
}


.tabbar .brand {
  font-size: 20px;
  font-weight: bold;
  color: #4285f4;
}



.nav-buttons button:hover {
  color: #202124;
  text-decoration: underline;
}

/* Sections */
.section {
  display: none;
  padding: 40px 20px;
  width: fit-content;
  margin: 0; /* or margin-left: 0; margin-right: 0; */
}


.section.active {
  display: block;
}

/* Leaf Subtabs */
.subtabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.subtabs button {
  background-color: #ede8fe;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: bold;
}

.subtabs button.active {
  background-color: #4285f4;
  color: white;
}

/* Leaf World Subtabs */
#leafWorldSubtabs {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

#leafWorldSubtabs button {
  background-color: #f1f3f4;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
}

.leafWorldSub {
  display: none;
}

.leafWorldSub.active {
  display: block;
  padding: 20px;
  background-color: #fefefe;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* Container for chat box and friend list side by side */
#chatContainer {
  display: flex;
  gap: 15px;
  height: 70vh; /* adjust as needed */
  max-width: 900px;
  margin: 0 auto;
}

/* Friend list (left side) fixed width */
#friendList {
  flex: 0 0 250px; /* fixed width */
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow-y: auto;
  background: #fff;
  box-sizing: border-box;
  height: 100%;
}

/* Chat box area (right side) auto fit */
#chatBox {
  flex: 1 1 auto; /* take remaining space */
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #030303;
  padding: 12px;
  box-sizing: border-box;
  height: 100%;
  min-width: 900px; /* optional minimum width */
}

/* Chat header showing who you chat with */
#chatBox h4 {
  margin: 0 0 10px 0;
  font-weight: 600;
  font-size: 18px;
}

/* Chat messages container */
#chatMessages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}

/* Message bubbles */
.my-message, .their-message {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.my-message {
  align-self: flex-end;
  background-color: #dcf8c6;
  border-bottom-right-radius: 6px;
}

.their-message {
  align-self: flex-start;
  background-color: #fff;
  border: 1px solid #ddd;
  border-bottom-left-radius: 6px;
}

/* Chat input container */
#chatInputContainer {
  display: flex;
  gap: 10px;
}

/* Chat input box */
#messageInput {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
}

/* Send button */
#sendChatBtn {
  width: 70px;
  border-radius: 20px;
  border: none;
  background-color: #4285f4;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

#sendChatBtn:hover {
  background-color: #3367d6;
}

/* Friend list items */
#friendList li {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.15s;
  font-size: 14px;
  color: #333;
}

#friendList li:hover {
  background-color: #f0f0f0;
}

/* Active friend highlight */
#friendList li.active {
  background-color: #d0e6ff;
  font-weight: 700;
  color: #1a73e8;
}

/* =================== End Chat Subtab layout =================== */

/* Chat Layout (Legacy, remove if you use #chatContainer above) */
#chatBox {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fafafa;
}

#chatMessages {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
}

input[type="text"], input[type="email"], input[type="password"] {
  padding: 8px;
  margin: 5px 0;
  width: 100%;
  max-width: 400px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  background-color: #4285f4;
  color: white;
  border: none;
  padding: 8px 16px;
  margin-top: 5px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background-color: #3367d6;
}

/* Responsive */
@media (max-width: 768px) {
  .tabbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-buttons {
    margin-top: 10px;
  }

  /* Make chat subtab vertical stacked on small screens */
  
  #friendList {
    height: auto;   /* Adjust height as needed */
    max-height: none;
    flex: 0 0 250px; /* Fixed width like desktop */
  }

  #chatBox {
    height: auto;
    min-width: 0; /* Allow shrinking on smaller screen */
  }
}

/* === Home Section: Hero with full-screen background image === */
.hero-bg {
  background-image: url('intro.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  position: relative;
  color: #ffffff;
}

/* Optional: Add dark overlay for readability */
.hero-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay */
  z-index: 1;
}

/* Left-side full content block */
.hero-content {
  width: 50%;                      /* Take left half */
  padding: 60px;
  position: relative;
  z-index: 2;                      /* Above overlay */
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Text shadow for readability */
.hero-content h2,
.hero-content p {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.hero-content h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #ffffff;
  cursor: text;
}

.hero-content p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: #e8eaed;
}

.hero-content strong {
  color: #1a73e8;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-bg {
    justify-content: center;  /* center vertically and horizontally */
    align-items: center;
    text-align: center;
    padding: 20px 15px;       /* reduce padding a bit */
    min-height: 100vh;        /* full viewport height */
  }

  .hero-content {
    width: 100%;
    margin: 0 auto;
    padding: 20px 15px;       /* smaller padding for phones */
    box-sizing: border-box;
  }

  .hero-content h2 {
    font-size: 24px;          /* slightly smaller font */
    margin-bottom: 15px;
  }

  .hero-content p {
    font-size: 14px;          /* easier to read on small screens */
    line-height: 1.5;
  }
}



/* === Leaf Sub Tabs: Profile, Chat, World === */
.leaf-subtabs {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.leaf-subtabs button {
  background: none;
  border: 1px solid #ccc;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  color: #555;
}

.leaf-subtabs button.active {
  border-color: #1a73e8;
  background-color: #e8f0fe;
  color: #1a73e8;
}

/* Leaf subtab content sections */
.leaf-subsection {
  display: none;
}

.leaf-subsection.active {
  display: block;
}

/* === Services Container and Cards === */
.services-container {
  display: flex;
  flex-direction: column;  /* stack vertically */
  gap: 30px;               /* space between cards */
  margin: 30px auto 0;     /* top margin + center horizontally */
  max-width: 900px;        /* max container width */
  width: 100%;              /* responsive width */
  align-items: stretch;    /* make children take full width */
}

.service-box {
  background: #f9faff;
  border: 1px solid #d1d9e6;
  border-radius: 12px;
  padding: 30px 25px;
  box-shadow: 0 6px 15px rgba(20, 60, 150, 0.1);
  color: #1a202c;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;

  /* Make box fill container width */
  width: 100%;   
  box-sizing: border-box; /* include padding and border in width */
}


/* Headings inside service */
.service-box h3 {
  color: #0b3d91; /* strong blue */
  font-weight: 700;
  margin-bottom: 15px;
}

.service-box h4 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #1c2331;
  font-weight: 600;
}

/* Lists styling */
.service-box ul {
  padding-left: 20px;
  margin-bottom: 15px;
  list-style-type: disc;
  color: #333e57;
}

.service-box ul li {
  margin-bottom: 8px;
  font-size: 15px;
}

/* Paragraph emphasis */
.service-box p strong {
  color: #2a4d9b;
}

/* Responsive stack on small devices */
@media (max-width: 768px) {
  .services-container {
    flex-direction: column;
  }
  
  .service-box {
    flex: 1 1 100%;
    max-width: 100%;
  }
}


/* === Login Container Centering === */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* Full screen height */
  background-color: #f1f8f6; /* Soft leafy background */
}

/* === Login Form Styling (Card Style) === */
.login-form {
  max-width: 380px;
  width: 100%;
  padding: 24px;
  background-color: #e0f2f1;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 150, 136, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* === Form Inputs === */
.login-form input {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #b0bec5;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.login-form input:focus {
  border-color: #00796b;
  outline: none;
}

/* === Buttons === */
.login-form button {
  padding: 12px;
  border-radius: 6px;
  border: none;
  background-color: #00796b;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-form button:hover {
  background-color: #004d40;
  transform: translateY(-1px);
}

#logoutBtn {
  background-color: #d32f2f;
}

#logoutBtn:hover {
  background-color: #9a0007;
}

#loginStatus {
  text-align: center;
  font-weight: 600;
  color: #37474f;
  margin-top: 12px;
}

/* === Responsive === */
@media (max-width: 768px) {
  .login-container {
    padding: 16px;
  }

  .login-form {
    padding: 20px;
  }
}




