/*
 * Global styles for Q‑star website
 *
 * This stylesheet defines the dark‑themed design with neon accents inspired by
 * contemporary web design trends. The color palette takes cues from neon
 * highlights on a dark background, which creates a futuristic and high‑energy
 * mood recommended for technology and AI companies【160911342353410†L176-L210】.
 * Micro‑interactions such as hover effects and a custom cursor enhance user
 * engagement and are aligned with modern UX trends【795837903468238†L449-L458】.
 */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background-color: #0d0d0d;
  color: #e5e5e5;
  font-family: 'Montserrat', 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Chatbot widget */
/* Chatbot widget hidden by default; will be toggled via JS */
.chatbot-widget {
  display: none;
  position: fixed;
  bottom: 90px; /* place above toggle button */
  right: 20px;
  width: 360px;
  height: 700px; /* match the iframe min-height for a consistent appearance */
  z-index: 10000;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

/* Toggle button for chatbot */
.chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f0ff, #ba00ff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10001;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.6), 0 0 10px rgba(255, 0, 255, 0.6);
}

.chatbot-toggle i {
  color: #ffffff;
  font-size: 1.5rem;
}

.chatbot-widget iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 600px) {
  .chatbot-widget {
    width: 90vw;
    height: 70vh;
    bottom: 10px;
    right: 5vw;
  }
}
/* Layout helpers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  z-index: 1000;
}
nav .logo {
  display: flex;
  align-items: center;
}
/* Logo image styling */
nav .logo img {
  height: 40px;
  width: auto;
  display: block;
  /* subtle glow around the logo to enhance neon feel */
  filter: drop-shadow(0 0 4px rgba(0, 255, 133, 0.8));
}
nav .logo .brand-name {
  margin-left: 10px;
  font-size: 1.8rem;
  font-weight: bold;
  color: #00ff85;
}
nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}
nav ul li a {
  color: #fff;
  font-weight: 500;
  position: relative;
}
nav ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ff85, #1e90ff, #ff0099);
  transition: width 0.3s ease;
}
nav ul li a:hover::after {
  width: 100%;
}

/* Feature and application cards */
.feature-cards,
.application-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.feature-card,
.application-card {
  background: #121212;
  padding: 30px;
  border-radius: 16px;
  width: 250px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.feature-card:hover,
.application-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 255, 133, 0.1), 0 20px 40px rgba(30, 144, 255, 0.15);
}
.feature-card h3,
.application-card h3 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 15px;
}
.feature-card p,
.application-card p {
  color: #ccc;
  font-size: 0.9rem;
  min-height: 60px;
}

/* Case studies section */
.case-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}
.case-card {
  background: #121212;
  padding: 30px;
  border-radius: 16px;
  width: 320px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.case-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 255, 133, 0.1), 0 20px 40px rgba(30, 144, 255, 0.15);
}
.case-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: #fff;
}
.case-card p {
  font-size: 0.95rem;
  color: #ccc;
}

/* Learning section */
#learning {
  background: #0b0b0b;
}
.learning-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.learning-text {
  flex: 1 1 300px;
}
.learning-text h2 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 20px;
}
.learning-text p {
  color: #ccc;
  font-size: 1.1rem;
  margin-bottom: 30px;
}
.learning-qr {
  flex: 1 1 300px;
  text-align: center;
}
.learning-qr img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 255, 133, 0.1), 0 20px 40px rgba(30, 144, 255, 0.15);
}

@media (max-width: 900px) {
  .learning-container {
    flex-direction: column;
    text-align: center;
  }
  .learning-text, .learning-qr {
    flex: 1 1 auto;
  }
  .learning-qr img {
    margin-top: 20px;
  }
}

/* Why list styling */
.why-list {
  list-style: none;
  margin-top: 20px;
  padding-left: 0;
}
.why-list li {
  margin-bottom: 12px;
  font-size: 1rem;
  color: #ccc;
  line-height: 1.6;
}
.why-list strong {
  color: #fff;
}

/* Hero section */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  /* Default hero image for the home page. This will be overridden
     by inline styles on other pages (e.g. agent, digital‑human) */
  background-image: url('./assets/hero_bg.png');
}
#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.9) 100%);
}
#hero .hero-content {
  position: relative;
  text-align: center;
  color: #fff;
  max-width: 700px;
  padding: 0 20px;
}
#hero h1 {
  font-size: 3.2rem;
  margin-bottom: 20px;
  line-height: 1.2;
}
#hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  background: linear-gradient(90deg, #00ff85, #1e90ff, #ff0099);
  color: #0d0d0d;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(0, 255, 133, 0.4), 0 0 30px rgba(30, 144, 255, 0.2);
  transition: transform 0.3s ease;
}
.btn:hover {
  transform: scale(1.05);
}

section {
  padding: 80px 0;
}

/* Services section */
#services {
  background: #0b0b0b;
}
#services h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: #fff;
}
.service-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.service-card {
  background: #121212;
  padding: 30px;
  border-radius: 16px;
  width: 280px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 255, 133, 0.1), 0 20px 40px rgba(30, 144, 255, 0.15);
}
.service-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  margin-bottom: 20px;
  border-radius: 8px;
}
.service-card h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 15px;
}
.service-card p {
  color: #ccc;
  font-size: 0.95rem;
  margin-bottom: 20px;
  min-height: 60px;
}
.service-card a.more {
  color: #00ff85;
  font-weight: 600;
  transition: color 0.3s ease;
}
.service-card a.more:hover {
  color: #1e90ff;
}

/* About preview & CTA sections share background colors */
#about-preview, #cta {
  background: #0d0d0d;
  text-align: center;
}
#about-preview h2, #cta h2 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 20px;
}
#about-preview p, #cta p {
  color: #ccc;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* About page specifics */
#about .container {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: center;
}
#about .about-text {
  flex: 1;
}
#about img {
  width: 400px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 255, 133, 0.1);
}

/* Footer */
footer {
  background: #050505;
  padding: 40px 20px;
  color: #666;
  font-size: 0.9rem;
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}
footer .footer-col {
  flex: 1 1 250px;
}
footer h4 {
  color: #fff;
  margin-bottom: 15px;
}
footer ul {
  list-style: none;
}
footer ul li {
  margin-bottom: 8px;
}
footer ul li a {
  color: #666;
  transition: color 0.3s ease;
}
footer ul li a:hover {
  color: #00ff85;
}
footer .copyright {
  text-align: center;
  margin-top: 30px;
  color: #444;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  nav ul {
    gap: 20px;
  }
  #about .container {
    flex-direction: column;
    text-align: center;
  }
  #about img {
    width: 100%;
  }
  .service-cards {
    flex-direction: column;
    align-items: center;
  }
}

/* Custom cursor implementation */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2000;
  border-radius: 50%;
}
.cursor-dot {
  width: 8px;
  height: 8px;
  background: #00ff85;
  transform: translate(-50%, -50%);
}
.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid #00ff85;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.15s ease, height 0.15s ease, border-color 0.15s ease;
  mix-blend-mode: difference;
}