
* {
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #e5e7eb;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =====================================================
   APP CONTAINER
===================================================== */
.app-container {
  width: 100%;
  max-width: 560px; /* thinner for readability */
  background: #020617;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;

  box-shadow:
    0 25px 50px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.03);
}

/* =====================================================
   HEADER
===================================================== */
.app-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

.app-header p {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* =====================================================
   CONTROLS / DROPDOWNS
===================================================== */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px;
  background: #020617;
  border: 1px solid #1f2937;
  border-radius: 12px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.control-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
}

/* Dropdown */
.control-group select {
  appearance: none;
  height: 40px;
  padding: 0 38px 0 12px;
  border-radius: 10px;
  border: 1px solid #374151;

  background-color: #020617;
  color: #e5e7eb;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;

  background-image: url("data:image/svg+xml;utf8,<svg fill='%239ca3af' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;

  transition: border .2s ease, box-shadow .2s ease;
}

.control-group select:hover {
  border-color: #4b5563;
}

.control-group select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.25);
}

/* =====================================================
   CHAT SECTION
===================================================== */
.chat-section {
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

/* Taller, not wider */
.chat-window {
  height: 420px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Scrollbar */
.chat-window::-webkit-scrollbar {
  width: 6px;
}
.chat-window::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 8px;
}

/* =====================================================
   MESSAGES
===================================================== */
.message-row {
  display: flex;
  width: 100%;
}

.message-row.user {
  justify-content: flex-end;
}

.message-row.bot {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 78%;
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  border-radius: 12px;
  animation: messageIn .2s ease;
}

/* User */
.user .message-bubble {
  background: #2563eb;
  color: #f9fafb;
  border-bottom-right-radius: 4px;
}

/* Bot */
.bot .message-bubble {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #1f2937;
  border-bottom-left-radius: 4px;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   INPUT AREA
===================================================== */
.input-area {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

#questionInput {
  flex: 1;
  height: 44px;
  padding: 10px 12px;
  resize: none;
  border-radius: 10px;
  border: 1px solid #374151;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.9rem;
  transition: border .2s ease, box-shadow .2s ease;
}

#questionInput:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.25);
}

#sendBtn {
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  background: #16a34a;
  color: #f9fafb;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}

#sendBtn:hover {
  transform: translateY(-1px);
  opacity: .95;
}

#sendBtn:active {
  transform: scale(.97);
}

#sendBtn:disabled {
  background: #4b5563;
  cursor: not-allowed;
}

/* =====================================================
   MOBILE – PROPER EDGE SPACING
===================================================== */
/* =====================================================
   MOBILE – MORE SPACE + SHORTER CHAT
===================================================== */
@media (max-width: 640px) {
  body {
    align-items: stretch;

    /* Safe + spacious */
    padding:
      env(safe-area-inset-top)
      env(safe-area-inset-right)
      env(safe-area-inset-bottom)
      env(safe-area-inset-left);
  }

  .app-container {
    max-width: 100%;
    height: 100%;

    /* 👈 MUCH MORE EDGE SPACE */
    margin: 18px;
    padding: 22px;

    border-radius: 16px;
    gap: 18px;
  }

  /* Controls feel airy */
  /* ===============================
   MOBILE – COMPACT DROPDOWNS
================================ */
@media (max-width: 640px) {

  /* Controls container */
  .controls {
    padding: 10px 12px;     /* less vertical padding */
    gap: 8px;
  }

  /* Each dropdown group */
  .control-group {
    gap: 2px;
  }

  /* Labels: subtle, secondary */
  .control-group label {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.85;
  }

  /* Dropdowns: compact but usable */
  .control-group select {
    height: 32px;           /* 👈 slightly smaller than before */
    font-size: 0.76rem;
    padding: 0 28px 0 8px;
    border-radius: 6px;

    background-position: right 7px center;
    background-size: 13px;
  }
}
  /* Chat section */
  .chat-section {
    padding: 12px;
  }

  /* 👇 SHORTER chat relative to screen */
  .chat-window {
    height: 48vh;   /* was ~60vh → now balanced */
    padding: 10px;
    gap: 14px;
  }

  .message-bubble {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  /* Input area */
  .input-area {
    gap: 12px;
  }

  #questionInput {
    height: 50px;
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  #sendBtn {
    padding: 0 18px;
  }
}




/* ===========================
   RESPONSIVE BIG LOGIN CARD
   =========================== */
/* Page background */
.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}


/* Card */
.login-card {
  width: 100%;
  max-width: 900px;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.95),
    rgba(2, 6, 23, 0.95)
  );
  border-radius: 28px;
  padding: 56px 64px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.75),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(14px);
}

/* Header */
.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #f9fafb;
  letter-spacing: -0.02em;
}

.login-header p {
  margin-top: 6px;
  font-size: 1rem;
  color: #9ca3af;
}

/* Divider */
.login-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    #1f2937,
    transparent
  );
  margin: 36px 0;
}

/* Form */
.login-form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* Fields */
.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5f5;
}

.login-field input {
  height: 54px;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 1rem;
  border: 1px solid #334155;
  background: rgba(2, 6, 23, 0.9);
  color: #e5e7eb;
  transition: all 0.25s ease;
}

.login-field input::placeholder {
  color: #64748b;
}

.login-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.25),
    0 10px 30px rgba(59, 130, 246, 0.25);
  background: #020617;
}

/* Button */
.login-btn {
  margin-top: 12px;
  align-self: center;
  padding: 15px 44px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #f9fafb;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.6);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}
















