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


body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #050e1f url('/assets/chatbg.jpg') center center / cover no-repeat;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.page-home {
  background-image: url('/assets/chatbg.jpg');
  overflow: auto;
}

body.page-news {
  background-image: url('/assets/mainpage.jpg');
}

body.page-info {
  background-image: url('/assets/cartoon-ai-robot-scene.jpg');
  background-attachment: fixed;
}

/* ---- Title bar ---- */
.title-bar {
  width: 100%;
  background: #0d2a6e;
  border-top: 2px solid #000000;
  border-bottom: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 0 24px;
  height: 72px;
  flex-shrink: 0;
  box-shadow: 0 2px 20px rgba(0, 120, 255, 0.35);
}

.title-bar-name {
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(0, 200, 255, 0.6);
}

.title-bar-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.title-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* ---- Hamburger menu ---- */
.hamburger-menu {
  position: relative;
}

.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.hamburger-btn:hover {
  background: rgba(0, 150, 255, 0.2);
  border-color: #00c8ff;
}

.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: #00c8ff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}

.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #0a1628;
  border: 1px solid #1a3a6e;
  border-radius: 8px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 100;
}

.nav-dropdown.open { display: block; }

.nav-item {
  display: block;
  padding: 12px 18px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover { background: #1a3a6e; color: #00c8ff; }
.nav-item.active { color: #00c8ff; background: rgba(0, 200, 255, 0.08); }

.nav-divider {
  height: 1px;
  background: #1a3a6e;
  margin: 4px 0;
}

.nav-user {
  display: block;
  padding: 6px 18px 2px;
  color: #4a7fb5;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-login  { color: #00c8ff; }
.nav-login:hover { color: white; }
.nav-logout { color: #f87171; }
.nav-logout:hover { background: rgba(248, 113, 113, 0.1); color: #fca5a5; }

/* ---- Home feed columns ---- */
.home-feeds {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  padding: 14px 16px 0;
  overflow: hidden;
}

.home-feeds-inner {
  width: 75%;
  max-width: 1400px;
  min-width: 0;
  display: flex;
  gap: 12px;
  overflow: hidden;
}

.feed-col {
  flex: 1;
  min-width: 0;
  background: rgba(10, 22, 40, 0.82);
  border: 1px solid #1a3a6e;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.feed-col-header {
  padding: 8px 14px;
  background: #0d2a6e;
  color: #00c8ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.feed-col-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feed-item {
  flex: 1;              /* each item takes equal share of column height */
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  border-bottom: 1px solid #0d2245;
  transition: background 0.15s;
  min-height: 0;
}

.feed-item:hover { background: #0d2245; }
.feed-item:last-child { border-bottom: none; }

.feed-thumb {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 6px;
}

.feed-thumb-placeholder {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  background: #0d2a6e;
  border: 1px solid #1a3a6e;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #00c8ff;
  text-transform: uppercase;
  user-select: none;
}

.feed-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feed-item-title {
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feed-item-desc {
  color: #8aafcc;
  font-size: 0.72rem;
  line-height: 1.4;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin: 4px 0 2px;
}

.feed-item-meta {
  color: #4a7fb5;
  font-size: 0.66rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.feed-loading {
  color: #2a5a8e;
  font-size: 0.82rem;
  font-style: italic;
  padding: 12px;
}

/* ---- Home page content area ---- */
.home-content {
  flex: 1;
  min-height: 0;
}

/* ---- Info page ---- */
body.page-info {
  overflow-y: auto;
}

.info-content {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 36px 24px 60px;
}

.info-card {
  background: rgba(10, 22, 40, 0.88);
  border: 1px solid #1a3a6e;
  border-radius: 14px;
  padding: 44px 52px;
  max-width: 820px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Document headings */
.info-card h1 {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
  margin-bottom: 8px;
}

.info-card .doc-lead {
  color: #8aafcc;
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 36px;
  border-bottom: 1px solid #1a3a6e;
  padding-bottom: 28px;
}

.info-card h2 {
  color: #00c8ff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 32px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1a3a6e;
}

.info-card h3 {
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 6px;
}

.info-card p {
  color: #a0bfe0;
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 10px;
}

.info-card ul {
  color: #a0bfe0;
  font-size: 0.9rem;
  line-height: 1.75;
  padding-left: 20px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-card li::marker { color: #00c8ff; }

.info-card .doc-section {
  border-bottom: 1px solid #0d2245;
  padding-bottom: 24px;
  margin-bottom: 4px;
}

.info-card .doc-section:last-child { border-bottom: none; }

.info-card .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.info-card .tag {
  background: #0d2a6e;
  border: 1px solid #1a4fa0;
  border-radius: 16px;
  padding: 4px 14px;
  color: #00c8ff;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
  .info-card { padding: 32px 36px; }
}

@media (max-width: 639px) {
  .info-content { padding: 20px 12px 40px; }
  .info-card { padding: 24px 20px; border-radius: 10px; }
  .info-card h1 { font-size: 1.4rem; }
  .info-card h2 { font-size: 0.9rem; }
}

/* ---- Main layout: chat centred at 75% on desktop ---- */
.layout {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  padding: 12px 16px 8px;
}

.container {
  width: 75%;
  max-width: 1200px;
  min-width: 0;
  height: 100%;
  background: transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tool-list {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 150, 255, 0.3);
  object-fit: cover;
  cursor: default;
  transition: background 0.2s, border-color 0.2s;
  padding: 3px;
}

.tool-icon:hover {
  background: rgba(0, 150, 255, 0.2);
  border-color: #00c8ff;
}

.tool-icon-fallback {
  font-size: 0.8rem;
  color: #00c8ff;
}

/* ---- Messages ---- */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.msg-wrapper.user  { align-items: flex-end; }
.msg-wrapper.bot,
.msg-wrapper.typing { align-items: flex-start; }

.msg-time {
  font-size: 0.68rem;
  color: #2a5a8e;
  padding: 0 6px;
  white-space: nowrap;
}

.messages::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-thumb { background: #1a4fa0; border-radius: 2px; }

.msg {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 16px;
  line-height: 1.6;
  font-size: 0.92rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.msg.user {
  background: #1a4fa0;
  color: #e2e8f0;
  border-bottom-right-radius: 4px;
  white-space: pre-wrap;
}

.msg.bot {
  background: #0d2245;
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
  white-space: normal;
}

.msg.typing {
  background: #0d2245;
  color: #4a7fb5;
  font-style: italic;
}

/* Markdown inside bot messages */
.msg.bot h1, .msg.bot h2, .msg.bot h3 {
  color: #00c8ff;
  margin: 12px 0 6px;
  font-weight: 600;
}
.msg.bot h1 { font-size: 1.1rem; }
.msg.bot h2 { font-size: 1rem; }
.msg.bot h3 { font-size: 0.92rem; }

.msg.bot p { margin: 6px 0; }
.msg.bot ul, .msg.bot ol { padding-left: 20px; margin: 6px 0; }
.msg.bot li { margin: 3px 0; }
.msg.bot strong { color: #b3d4ff; }
.msg.bot em { color: #a0bfe0; }

.msg.bot table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
  font-size: 0.83rem;
  display: block;
  overflow-x: auto;
}
.msg.bot th, .msg.bot td {
  border: 1px solid #1a4fa0;
  padding: 6px 10px;
  text-align: left;
  white-space: nowrap;
}
.msg.bot th { background: #0d2a6e; color: #00c8ff; }
.msg.bot tr:nth-child(even) { background: #0a1a3a; }

.msg.bot code {
  background: #1a1a1a;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.88em;
  color: #ce9178;
}
.msg.bot pre {
  background: #000000;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px 14px 10px;
  overflow-x: auto;
  margin: 8px 0;
  position: relative;
}
.msg.bot pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.88em;
}

/* ---- Pygments syntax highlighting (monokai) ---- */
pre { line-height: 125%; }
.codehilite { background: #272822; color: #F8F8F2; border-radius: 8px; padding: 10px 14px; overflow-x: auto; margin: 8px 0; position: relative; border: 1px solid #3a3a2e; }
.codehilite pre { background: transparent; border: none; border-radius: 0; padding: 0; margin: 0; }
.codehilite .hll { background-color: #49483e }
.codehilite .c  { color: #959077 } .codehilite .err { color: #ED007E } .codehilite .k  { color: #66D9EF }
.codehilite .l  { color: #AE81FF } .codehilite .n  { color: #F8F8F2 } .codehilite .o  { color: #FF4689 }
.codehilite .p  { color: #F8F8F2 } .codehilite .ch { color: #959077 } .codehilite .cm { color: #959077 }
.codehilite .cp { color: #959077 } .codehilite .c1 { color: #959077 } .codehilite .cs { color: #959077 }
.codehilite .gd { color: #FF4689 } .codehilite .gi { color: #A6E22E } .codehilite .go { color: #66D9EF }
.codehilite .kc { color: #66D9EF } .codehilite .kd { color: #66D9EF } .codehilite .kn { color: #FF4689 }
.codehilite .kp { color: #66D9EF } .codehilite .kr { color: #66D9EF } .codehilite .kt { color: #66D9EF }
.codehilite .m  { color: #AE81FF } .codehilite .s  { color: #E6DB74 } .codehilite .na { color: #A6E22E }
.codehilite .nb { color: #F8F8F2 } .codehilite .nc { color: #A6E22E } .codehilite .no { color: #66D9EF }
.codehilite .nd { color: #A6E22E } .codehilite .ne { color: #A6E22E } .codehilite .nf { color: #A6E22E }
.codehilite .nt { color: #FF4689 } .codehilite .nv { color: #F8F8F2 } .codehilite .ow { color: #FF4689 }
.codehilite .mb { color: #AE81FF } .codehilite .mf { color: #AE81FF } .codehilite .mi { color: #AE81FF }
.codehilite .mo { color: #AE81FF } .codehilite .s2 { color: #E6DB74 } .codehilite .se { color: #AE81FF }
.codehilite .s1 { color: #E6DB74 } .codehilite .ss { color: #E6DB74 } .codehilite .sr { color: #E6DB74 }
.codehilite .fm { color: #A6E22E } .codehilite .nx { color: #A6E22E } .codehilite .il { color: #AE81FF }

/* ---- Copy button inside code blocks ---- */
.copy-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #1a3a6e;
  color: #00c8ff;
  border: 1px solid #00c8ff44;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.copy-btn:hover { background: #00c8ff; color: #050e1f; }

/* ---- Rich text: blockquote ---- */
.msg.bot blockquote {
  border-left: 3px solid #1a4fa0;
  margin: 8px 0;
  padding: 4px 12px;
  color: #a0bfe0;
  font-style: italic;
  background: rgba(13, 34, 69, 0.4);
  border-radius: 0 6px 6px 0;
}

/* ---- Rich text: horizontal rule ---- */
.msg.bot hr {
  border: none;
  border-top: 1px solid #1a3a6e;
  margin: 12px 0;
}

/* ---- Input area ---- */
.input-area {
  padding: 12px 16px;
  background: #0d2a6e;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

input {
  flex: 1;
  padding: 11px 18px;
  border: none;
  border-radius: 24px;
  background: #0a1628;
  color: white;
  font-size: 0.93rem;
  outline: none;
  min-width: 0;
}

input::placeholder { color: #2a5a8e; }

button {
  padding: 11px 20px;
  background: #1565d4;
  color: white;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  font-size: 0.93rem;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

button:hover { background: #2a7fff; }
button:disabled { background: #0d2245; cursor: not-allowed; }

#stop {
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid #f87171;
}
#stop:hover { background: #dc2626; color: white; }

/* ---- Research progress ---- */
.research-progress {
  align-self: flex-start;
  max-width: 88%;
  background: #050e1f;
  border: 1px solid #1a4fa0;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.research-progress-title {
  color: #00c8ff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.research-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid #1a4fa0;
  border-top-color: #00c8ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.research-stages { display: flex; flex-direction: column; gap: 4px; }

.research-stage {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #2a5a8e;
  transition: color 0.3s;
}

.research-stage.active { color: #e2e8f0; }
.research-stage.done   { color: #4ade80; }

.stage-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0d2245;
  flex-shrink: 0;
  transition: background 0.3s;
}

.research-stage.active .stage-dot { background: #00c8ff; }
.research-stage.done   .stage-dot { background: #4ade80; }

/* ---- News strip ---- */
.news-strip {
  flex-shrink: 0;
  width: 100%;
  height: 200px;
  background: transparent;
  display: flex;
  justify-content: center;
  padding: 5px 16px 8px;
}

.news-inner {
  width: 75%;
  max-width: 1400px;
  min-width: 0;
  background: #0a1628;
  border-radius: 0 0 12px 12px;
  border: 1px solid #1a3a6e;
  border-top: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.news-header {
  padding: 5px 16px;
  background: #0d2a6e;
  color: #00c8ff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.news-scroll-area {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.news-arrow {
  flex-shrink: 0;
  width: 30px;
  padding: 0;
  background: rgba(10, 22, 40, 0.7);
  border: none;
  border-radius: 0;
  color: #00c8ff;
  font-size: 1.6rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.news-arrow:hover { background: #0d2a6e; color: white; }
.news-arrow:disabled { opacity: 0.2; cursor: default; }

.news-list {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: stretch;
  scrollbar-width: none;
}

.news-list::-webkit-scrollbar { display: none; }

.news-loading {
  color: #2a5a8e;
  font-size: 0.85rem;
  padding: 8px;
  font-style: italic;
  white-space: nowrap;
}

.news-item {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  background: #0d2245;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s;
  overflow: hidden;
}

.news-item:hover { background: #1a3a6e; }

.news-thumb {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 5px;
  flex-shrink: 0;
}

.news-title {
  color: #e2e8f0;
  font-size: 0.74rem;
  line-height: 1.35;
  margin-bottom: 3px;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.news-meta {
  color: #4a7fb5;
  font-size: 0.66rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-score { color: #00c8ff; }

/* ================================================================
   ABOUT US PAGE
   ================================================================ */

body.page-aboutus {
  overflow-y: auto;
  background-image: url('/assets/cartoon-ai-robot-scene.jpg');
  background-attachment: fixed;
}

.aboutus-page {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Hero */
.aboutus-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.aboutus-hero-icon { font-size: 3.2rem; line-height: 1; }

.aboutus-hero-title {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 0 24px rgba(0, 200, 255, 0.45);
}

.aboutus-hero-sub {
  color: #8aafcc;
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 540px;
}

/* Section */
.aboutus-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aboutus-section-title {
  color: #00c8ff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #1a3a6e;
  padding-bottom: 8px;
}

/* Feature cards grid */
.aboutus-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.aboutus-card {
  background: rgba(10, 22, 40, 0.82);
  border: 1px solid #1a3a6e;
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.aboutus-card:hover {
  border-color: #00c8ff44;
  background: rgba(13, 42, 110, 0.7);
}

.aboutus-card-icon { font-size: 1.8rem; line-height: 1; }

.aboutus-card-label {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 700;
}

.aboutus-card-text {
  color: #8aafcc;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Privacy highlight rows */
.aboutus-highlight-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aboutus-highlight {
  background: rgba(10, 22, 40, 0.82);
  border: 1px solid #1a3a6e;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.aboutus-highlight-icon { font-size: 1.6rem; flex-shrink: 0; padding-top: 2px; }

.aboutus-highlight-label {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.aboutus-highlight-text {
  color: #8aafcc;
  font-size: 0.82rem;
  line-height: 1.55;
}

/* Tech pills */
.aboutus-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.aboutus-tech-pill {
  background: #0d2a6e;
  border: 1px solid #1a4fa0;
  border-radius: 20px;
  padding: 6px 16px;
  color: #00c8ff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.aboutus-tech-note {
  color: #4a7fb5;
  font-size: 0.82rem;
  margin-top: 4px;
}

/* ================================================================
   HOME LANDING PAGE
   ================================================================ */

.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 48px;
  gap: 36px;
  min-height: 0;
}

.landing-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.landing-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 0 30px rgba(0, 200, 255, 0.5);
}

.landing-sub {
  color: #8aafcc;
  font-size: 1rem;
  font-weight: 400;
}

.landing-clock {
  color: #00c8ff;
  font-size: 1.4rem;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-shadow: 0 0 16px rgba(0, 200, 255, 0.4);
  margin-top: 4px;
}

.landing-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  max-width: 860px;
  width: 100%;
}

.landing-card {
  flex: 1 1 200px;
  max-width: 220px;
  background: rgba(10, 22, 40, 0.82);
  border: 1px solid #1a3a6e;
  border-radius: 14px;
  padding: 28px 20px 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
}

.landing-card:hover {
  background: rgba(13, 42, 110, 0.88);
  border-color: #00c8ff;
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 200, 255, 0.18);
}

.landing-card-accent {
  border-color: #1565d4;
  background: rgba(21, 101, 212, 0.18);
}

.landing-card-accent:hover {
  border-color: #2a7fff;
  background: rgba(21, 101, 212, 0.32);
  box-shadow: 0 8px 28px rgba(42, 127, 255, 0.25);
}

.landing-card-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.landing-card-title {
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.landing-card-desc {
  color: #8aafcc;
  font-size: 0.78rem;
  line-height: 1.5;
}

/* ================================================================
   FILE MANAGER PAGE
   ================================================================ */

body.page-files {
  overflow: hidden;
}

.fm-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 0;
  padding: 16px;
  overflow: hidden;
}

.fm-sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-right: 16px;
}

.fm-drop-zone {
  border: 2px dashed #1a4fa0;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: rgba(10, 22, 40, 0.7);
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
  user-select: none;
}

.fm-drop-zone:hover,
.fm-drop-zone.drag-over {
  border-color: #00c8ff;
  background: rgba(0, 200, 255, 0.06);
}

.fm-drop-zone input[type="file"] { display: none; }

.fm-drop-icon {
  font-size: 2rem;
  color: #1a4fa0;
  margin-bottom: 8px;
}

.fm-drop-label {
  color: #4a7fb5;
  font-size: 0.82rem;
}

.fm-drop-zone.drag-over .fm-drop-icon,
.fm-drop-zone.drag-over .fm-drop-label { color: #00c8ff; }

.fm-files-section {
  flex: 1;
  min-height: 0;
  background: rgba(10, 22, 40, 0.7);
  border: 1px solid #1a3a6e;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fm-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #0d2a6e;
  color: #00c8ff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.fm-refresh-btn {
  padding: 2px 8px;
  font-size: 1rem;
  background: transparent;
  border: 1px solid #1a3a6e;
  border-radius: 6px;
  color: #4a7fb5;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.fm-refresh-btn:hover { color: #00c8ff; border-color: #00c8ff; background: transparent; }

.fm-file-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fm-file-list::-webkit-scrollbar { width: 4px; }
.fm-file-list::-webkit-scrollbar-thumb { background: #1a4fa0; border-radius: 2px; }

.fm-empty,
.fm-loading {
  color: #2a5a8e;
  font-size: 0.82rem;
  font-style: italic;
  padding: 12px 8px;
  text-align: center;
}

.fm-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #a0bfe0;
  font-size: 0.83rem;
  transition: background 0.15s, color 0.15s;
  cursor: default;
}

.fm-file-pdf { cursor: pointer; }

.fm-file-pdf:hover,
.fm-file-pdf.active {
  background: #0d2245;
  color: #e2e8f0;
}

.fm-file-pdf.active { background: #0d2a6e; color: #00c8ff; }

.fm-file-icon { font-size: 1rem; flex-shrink: 0; }

.fm-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-file-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #00c8ff;
  background: rgba(0, 200, 255, 0.1);
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.fm-upload-status {
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 6px;
  color: #8aafcc;
  background: #0a1628;
}

.fm-upload-status.ok { color: #4ade80; }
.fm-upload-status.err { color: #f87171; }

.fm-viewer {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: rgba(10, 22, 40, 0.7);
  border: 1px solid #1a3a6e;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.fm-viewer-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #2a5a8e;
}

.fm-viewer-placeholder-icon { font-size: 3rem; }
.fm-viewer-placeholder-text { font-size: 0.88rem; font-style: italic; }

.fm-viewer-header {
  padding: 12px 18px;
  background: #0d2a6e;
  color: #00c8ff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-viewer-loading,
.fm-viewer-error {
  padding: 20px 24px;
  color: #4a7fb5;
  font-style: italic;
  font-size: 0.88rem;
}

.fm-viewer-error { color: #f87171; }

.fm-viewer-iframe {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  border: none;
  display: block;
}

@media (max-width: 768px) {
  .fm-layout { flex-direction: column; overflow-y: auto; }
  .fm-sidebar { width: 100%; margin-right: 0; margin-bottom: 16px; }
  .fm-file-list { max-height: 200px; }
  .fm-viewer { min-height: 300px; }
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

/* Tablet: 640px – 1024px → widen chat to 90% */
@media (max-width: 1024px) {
  .home-feeds-inner { width: 90%; gap: 8px; }
  .container { width: 90%; }
  .landing-title { font-size: 1.8rem; }
  .landing-cards { gap: 14px; }
  .aboutus-page { padding: 28px 20px 48px; }
  .aboutus-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

  .title-bar { height: 60px; padding: 0 16px; }
  .title-bar-name { font-size: 1.2rem; }
  .title-bar-logo { height: 44px; }

  .news-inner { width: 90%; }
  .news-item { width: 180px; }
}

/* Phone: up to 639px → full width, compact everything */
@media (max-width: 639px) {
  .home-feeds { overflow-y: auto; }
  .home-feeds-inner { width: 100%; flex-direction: column; overflow: visible; }
  .feed-col         { min-height: 0; flex: none; }
  .feed-item        { flex: none; }
  .feed-thumb, .feed-thumb-placeholder { width: 72px; height: 72px; }
  .container { width: 100%; }
  .landing { padding: 24px 16px 32px; gap: 24px; }
  .landing-title { font-size: 1.5rem; }
  .landing-clock { font-size: 1.1rem; }
  .landing-card { flex: 1 1 140px; max-width: 160px; padding: 20px 14px 18px; }
  .landing-card-icon { font-size: 1.8rem; }
  .landing-card-title { font-size: 0.9rem; }
  .landing-card-desc { font-size: 0.72rem; }
  .aboutus-page { padding: 20px 16px 40px; gap: 32px; }
  .aboutus-hero-title { font-size: 1.5rem; }
  .aboutus-hero-icon { font-size: 2.4rem; }
  .aboutus-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .aboutus-highlight { padding: 14px 16px; gap: 12px; }

  .layout { padding: 0; }

  .title-bar { height: 52px; padding: 0 12px; }
  .title-bar-name { font-size: 1rem; }
  .title-bar-logo { height: 36px; }
  .hamburger-btn { width: 44px; height: 44px; }
  .news-arrow { width: 44px; min-width: 44px; }

  .messages { padding: 12px; gap: 8px; }

  .msg { max-width: 92%; font-size: 0.88rem; padding: 9px 12px; }

  .msg.bot table { font-size: 0.76rem; }
  .msg.bot th, .msg.bot td { padding: 4px 7px; }

  .input-area { padding: 10px 12px; gap: 8px; }
  input { padding: 10px 14px; font-size: 0.88rem; }
  button { padding: 10px 14px; font-size: 0.88rem; }

  .news-strip { height: 175px; padding: 0 0 8px; }
  .news-inner { width: 100%; border-radius: 0; border-left: none; border-right: none; }
  .news-item { width: 160px; }
  .news-thumb { height: 72px; }
  .news-title { font-size: 0.7rem; }

  .research-progress { max-width: 96%; }
  .tool-icon { width: 24px; height: 24px; }
}
