html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: "Gill Sans", sans-serif;
}
.landing {
    background-image: url("images/landing.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

.start-btn {
    position: absolute;
    bottom: 5%;          /* distance from bottom */
    left: 50%;
    transform: translateX(-50%); /* true center */
    
    padding: 8px 18px;
    font-size: 18px;
    cursor: pointer;
    border:none;
    border-radius: 10px;
    color: white;
    background-color: black;
}
.start-btn:hover {
    background-color: rgb(47, 44, 44);

}
.type {
    background-image: url("images/type.png");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 2%;
    position: relative;
}
.options {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 60px 110px;  /* row gap | column gap */
    width: 60%;
    margin: 320px auto 0; /* push section down */
}

.option-btn {
    background: black;
    color: white;
    text-decoration: none;
    text-align: center;

    padding: 30px 5px;
    font-size: 20px;
    font-weight: 400;

    border-radius: 15px;
    display: block;
    width: 100%;

    border: none;        
    cursor: pointer;
}
.option-btn:hover {
    background-color: rgb(47, 44, 44);

}
.personality {
    background-image: url("images/personality.png");
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center 2%;
    position: relative;
}
.mode {
    display: flex;
    flex-direction: column;
    gap: 50px;  /* space between buttons */
    width: 20%;
    margin: 220px auto 0;
}

.mode-btn {
    background: black;
    color: white;
    text-decoration: none;
    text-align: center;

    border: none;    
    cursor: pointer; 
    width: 100%;

    padding: 20px 0px;
    font-size: 20px;
    font-weight: 400;

    border-radius: 15px;
    display: block;
}
.mode-btn.selected {
    outline: 3px solid black;
    outline-offset: 4px;
}
.mode-btn:hover {
    background-color: rgb(47, 44, 44);

}
.name-section {
    margin-top: 50px;
    text-align: center;
}

.name-section label {
    font-size: 22px;
    font-weight: 400;
    margin-right: 15px;
}

.name-section input {
    padding: 7px 10px;
    font-size: 14px;
    text-align: center;
    border-radius: 8px;
    border: none;
    background: #eee;
    width: 150px;
}
.enter-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 40px;

    padding: 10px 18px;
    font-size: 16px;
    cursor: pointer;
    border:none;
    border-radius: 10px;
    color: white;
    background-color: black;
}
.enter-chat-btn:hover {
    background-color: rgb(47, 44, 44);

}
body.chat {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.top-bar {
  width: 80%;
  max-width: 900px;;
  margin: 0 auto;          
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 6px;
}
.top-bar-wrapper {
  border-bottom: 1px solid #ccc; 
  flex: 0 0 auto;
}

.left-info {
      font-size: 20px;
      font-weight: 400;   
}

.end-btn {
      padding: 10px 18px;
      font-size: 14px;
      border: none;
      border-radius: 8px;
      background: black;
      color: white;
      cursor: pointer;
}

.chat-shell {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 80%;
  min-height: 0;
  max-width: 900px;
  margin: 0 auto;
}

/* Scrollable message area */
.chat-feed {
  flex: 1;
  min-height: 0; 
  overflow-y: auto;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Message row alignment */
.msg-row {
  display: flex;
}

.msg-row.left  { justify-content: flex-start; }
.msg-row.right { justify-content: flex-end; }

/* Bubbles */
.bubble {
  max-width: 65%;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 20px;
  line-height: 1.25;
  background: #000;
  color: #fff;
}

.bubble.ai { }
.bubble.user { }

.composer {
  width: 80%;
  max-width: 900px;
  margin: 0 auto;

  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 0 22px;
}

.composer-input {
  flex: 1;
  height: 56px;
  font-size: 16px;
  padding: 0 18px;
  border: none;
  outline: none;
}
.composer-wrapper {
  border-top: 1px solid #ccc;
  flex: 0 0 auto;
   position: sticky;
  bottom: 0;
  background: #fff;        
  z-index: 10;
}

.composer-btn {
  padding: 10px 18px;
  font-size: 14px;
  border: none;   
  border-radius: 8px;
  background: black;
  color: white;
  cursor: pointer;
}
.composer-input::placeholder {
  color: #999;
}

.end-btn:hover,
.composer-btn:hover {
  background-color: rgb(47, 44, 44);
}

/* Typing dots look */
.typing {
  display: inline-flex;
  gap: 10px;
  padding: 12px 18px;
  background: transparent;
}
.typing span {
  width: 10px;
  height: 10px;
  background: #000;
  border-radius: 999px;
  opacity: 0.75;
  animation: bounce 1s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-6px); opacity: 1; }
}
