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


body {
    min-height: 100vh;

    font-family: "Poppins", sans-serif;

    background:
        linear-gradient(
            135deg,
            #06191b,
            #0b3034,
            #123f43
        );

    color: white;
}


/* MAIN PAGE */

.mentor-page {
    min-height: 100vh;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 50px 20px;
}


/* CONTAINER */

.mentor-container {
    width: 100%;
    max-width: 850px;

    background: rgba(13, 20, 32, 0.95);

    border: 1px solid rgba(0, 229, 255, 0.18);

    border-radius: 20px;

    padding: 40px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35);

}


/* HEADER */

.mentor-header {
    text-align: center;

    margin-bottom: 35px;
}


.mentor-icon {
    width: 70px;
    height: 70px;

    margin: 0 auto 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 34px;

    border-radius: 50%;

    background: rgba(0, 229, 255, 0.1);

    border: 1px solid rgba(0, 229, 255, 0.3);
}


.mentor-header h1 {
    font-size: 32px;

    margin-bottom: 10px;

    color: white;
}


.mentor-header p {
    color: #aebbc7;

    font-size: 15px;

    line-height: 1.7;

    max-width: 650px;

    margin: auto;
}


/* FORM */

#mentorForm {
    width: 100%;
}


.form-group {
    display: flex;

    flex-direction: column;

    margin-bottom: 22px;
}


.form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;
}


label {
    margin-bottom: 8px;

    font-size: 14px;

    font-weight: 600;

    color: #e7f7fa;
}


input,
select,
textarea {

    width: 100%;

    padding: 14px 15px;

    border-radius: 10px;

    border: 1px solid #263746;

    outline: none;

    background: #0b1723;

    color: white;

    font-family: "Poppins", sans-serif;

    font-size: 14px;

    transition: 0.25s;
}


input::placeholder,
textarea::placeholder {
    color: #71808e;
}


input:focus,
select:focus,
textarea:focus {

    border-color: #00e5ff;

    box-shadow:
        0 0 0 3px rgba(0, 229, 255, 0.08);
}


select {
    cursor: pointer;
}


textarea {
    resize: vertical;

    min-height: 120px;
}


/* BUTTON */

#submitButton {

    width: 100%;

    border: none;

    border-radius: 10px;

    padding: 15px;

    background: linear-gradient(
        135deg,
        #00bcd4,
        #008fa3
    );

    color: white;

    font-family: "Poppins", sans-serif;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.25s;
}


#submitButton:hover {

    transform: translateY(-2px);

    box-shadow:
        0 8px 25px rgba(0, 229, 255, 0.2);
}


#submitButton:disabled {

    opacity: 0.6;

    cursor: not-allowed;

    transform: none;
}


/* MESSAGE */

.form-message {

    text-align: center;

    margin-top: 18px;

    min-height: 24px;

    font-size: 14px;
}


.form-message.success {
    color: #55e6a5;
}


.form-message.error {
    color: #ff7272;
}


/* MOBILE */

@media (max-width: 650px) {

    .mentor-page {
        padding: 25px 15px;
    }


    .mentor-container {
        padding: 25px 20px;
    }


    .mentor-header h1 {
        font-size: 25px;
    }


    .form-row {
        grid-template-columns: 1fr;

        gap: 0;
    }

}


@media (max-width: 400px) {

    .mentor-container {
        padding: 22px 16px;
    }


    .mentor-header h1 {
        font-size: 22px;
    }


    .mentor-header p {
        font-size: 13px;
    }

}
/* ================================
USTAD CHAT — TOGGLE BUTTON
================================ */

#ustadToggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #00a884;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 1100;
  transition: transform 0.2s ease;
}

#ustadToggle:hover {
  transform: scale(1.08);
}

/* ================================
CHAT WINDOW
================================ */

#ustadWindow {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 500px;
  height: 600px;
  background: #0b141a; /* WhatsApp dark mode chat background */
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(20px);
  color: #e9edef;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1100;
}

#ustadWindow.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ================================
HEADER
================================ */

.ustad-header {
  background: #202c33; /* WhatsApp dark header */
  color: #e9edef;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #2a3942;
}

.ustad-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #00a884;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.ustad-header-info {
  flex: 1;
  line-height: 1.3;
}

.ustad-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #e9edef;
}

.ustad-status {
  font-size: 0.75rem;
  color: #8696a0;
}

.ustad-close {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.8;
  padding: 4px;
  color: #aebac1;
}

.ustad-close:hover {
  opacity: 1;
}

/* ================================
MESSAGES AREA
================================ */

.ustad-messages {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #0b141a;
  /* subtle repeating pattern feel without an image asset */
  background-image: radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 18px 18px;
}

.ustad-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.ustad-msg.user {
  align-self: flex-end;
  align-items: flex-end;
}

.ustad-msg.bot {
  align-self: flex-start;
  align-items: flex-start;
}

.bubble {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.ustad-msg.user .bubble {
  background: #005c4b; /* WhatsApp dark-mode outgoing green */
  color: #e9edef;
  border-top-right-radius: 2px;
}

.ustad-msg.bot .bubble {
  background: #1f2c34; /* WhatsApp dark-mode incoming grey */
  color: #e9edef;
  border-top-left-radius: 2px;
}

.ustad-time {
  font-size: 0.68rem;
  color: #8696a0;
  margin-top: 2px;
  padding: 0 4px;
}

.ustad-msg.typing .bubble {
  font-style: italic;
  color: #8696a0;
}

/* --- Code blocks inside AI responses --- */

.bubble pre {
  background: #0a0f13;
  color: #d1d7db;
  padding: 10px 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 8px 0;
  font-size: 0.8rem;
  line-height: 1.5;
  border: 1px solid #2a3942;
}

.bubble code {
  font-family: "Courier New", monospace;
}

.bubble p code, .bubble li code {
  background: rgba(255, 255, 255, 0.08);
  color: #d1d7db;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ================================
INPUT ROW
================================ */

.ustad-input-row {
  display: flex;
  align-items: center;
  padding: 8px;
  background: #202c33; /* WhatsApp dark input bar */
  gap: 8px;
  border-top: 1px solid #2a3942;
}

.ustad-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  color: #e9edef;
  font-family: "Poppins", sans-serif;
  border-radius: 20px;
  outline: none;
  font-size: 1rem;
  background: #2a3942; /* WhatsApp dark input pill */
}

.ustad-input-row input::placeholder {
  color: #8696a0;
}

.ustad-input-row button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #00a884;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ustad-input-row button:hover {
  background: #06cf9c;
}

/* ================================
FORMATTED AI RESPONSE ELEMENTS
================================ */

.bubble strong {
  font-weight: 700;
  color: #ffffff;
}

.bubble em {
  font-style: italic;
}

.bubble h4 {
  font-size: 0.95rem;
  margin: 10px 0 4px 0;
  color: #06cf9c;
}

.bubble table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
  font-size: 0.8rem;
}

.bubble th,
.bubble td {
  border: 1px solid #2a3942;
  padding: 4px 8px;
  text-align: left;
}

.bubble th {
  background: #202c33;
  color: #e9edef;
  font-weight: 600;
}

.bubble td {
  color: #d1d7db;
}

/* ================================
RESPONSIVE — MOBILE
================================ */

@media (max-width: 500px) {
  #ustadWindow {
    width: 92vw;
    height: 70vh;
    bottom: 84px;
    right: 4vw;
  }
}

@media (max-width: 460px) {
  #ustadWindow {
    width: 60vw;
    height: 70vh;
    bottom: 84px;
    right: 4vw;
  }
}