@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
  --primary: #4169E1;
  /* Royal Blue */
  --primary-hover: #3154b3;
  --bg-light: #F4F6F9;
  --text-main: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --border-color: #E2E6ED;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

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

body {
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 70px;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-brand img {
  height: 40px;
}

.nav-brand .brand-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active-pill {
  background-color: var(--primary);
  color: var(--white);
  border-radius: 4px;
  padding: 6px 16px;
}

.nav-links a.active-pill:hover {
  background-color: var(--primary-hover);
  color: white;
}

.nav-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.nav-logout:hover {
  border-color: var(--primary);
  background: #f5f8ff;
  color: var(--primary);
}

.nav-logout svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

/* Index Page Specific */
.index-page {
  background-image: url('../home-bg.png');
  background-size: cover;
  background-position: center;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

.index-header {
  position: absolute;
  top: 30px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.index-logos {
  display: flex;
  align-items: center;
  gap: 20px;
}

.index-logos img {
  height: 60px;
  object-fit: contain;
}

.index-logos img.hk-logo {
  height: 60px;
  margin: 0 -2px;
}

.index-top-right {
  color: white;
  text-align: right;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.index-top-right h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.index-top-right p {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 1px;
}

.login-card {
  position: absolute;
  left: 10%;
  top: 22%;
  transform: translateY(-50%);
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 400px;
  z-index: 10;
}

.login-card h3 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 25px;
  font-weight: 700;
}

.login-tabs {
  display: flex;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--border-color);
}

.login-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}

.login-tab.active {
  color: var(--primary);
}

.login-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

.login-form-container {
  display: none;
}

.login-form-container.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  background-color: #fcfcfc;
}

.form-control:focus {
  border-color: var(--primary);
  background-color: var(--white);
}

.code-group {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

.btn-block {
  width: 100%;
  font-size: 16px;
  padding: 14px;
  margin-top: 10px;
}

.btn-code {
  background-color: var(--primary);
  color: white;
  white-space: nowrap;
}

.index-bottom-right {
  position: absolute;
  bottom: 40px;
  right: 40px;
  color: white;
  font-size: 52px;
  font-weight: 900;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  letter-spacing: 2px;
  z-index: 10;
}

/* Demo Page Specific */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
}

.scenario-selection {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-main);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.demo-layout {
  display: flex;
  gap: 25px;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.card {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 25px;
  box-shadow: var(--shadow-sm);
}

.upload-area {
  border: 1px dashed #ced4da;
  border-radius: var(--border-radius);
  padding: 30px 20px;
  text-align: center;
  background-color: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.upload-area:hover {
  border-color: var(--primary);
  background-color: #f0f4ff;
}

.upload-icon {
  margin-bottom: 15px;
}

.upload-icon svg {
  width: 40px;
  height: 40px;
  fill: #adb5bd;
  transition: fill 0.3s;
}

.upload-area:hover .upload-icon svg {
  fill: var(--primary);
}

.upload-text {
  font-size: 12px;
  color: var(--text-light);
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feature-item {
  padding: 12px 15px;
  border-radius: 6px;
  background-color: #f8f9fa;
  font-size: 15px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.3s;
  padding-left: 20px;
}

.feature-item:hover {
  background-color: #e9ecef;
}

.feature-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
}

.feature-item.blue::before {
  background-color: var(--primary);
}

.feature-item.green::before {
  background-color: #28a745;
}

.feature-item.orange::before {
  background-color: #fd7e14;
}

.feature-item.red::before {
  background-color: #dc3545;
}

.main-content {
  flex-grow: 1;
}

.result-view {
  display: flex;
  gap: 20px;
  height: 550px;
}

.image-view {
  flex: 6;
  background-color: #e9ecef;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
  background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Pseudo bounding boxes */
.bbox {
  position: absolute;
  border: 2px solid;
  background: rgba(0, 0, 0, 0.05);
}

.bbox-label {
  position: absolute;
  top: -24px;
  left: -2px;
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  white-space: nowrap;
  font-weight: 500;
}

.bbox-1 {
  border-color: #ffc107;
  top: 30%;
  left: 20%;
  width: 35%;
  height: 25%;
}

.bbox-1 .bbox-label {
  background-color: #ffc107;
  color: #000;
}

.bbox-2 {
  border-color: #ffc107;
  top: 60%;
  left: 25%;
  width: 30%;
  height: 20%;
}

.bbox-2 .bbox-label {
  background-color: #ffc107;
  color: #000;
}

.bbox-3 {
  border-color: #fd7e14;
  top: 10%;
  left: 70%;
  width: 20%;
  height: 50%;
}

.bbox-3 .bbox-label {
  background-color: #fd7e14;
}


.json-view {
  flex: 4;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  overflow-y: auto;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 25px;
  gap: 20px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-main);
}

.pagination span {
  cursor: pointer;
  user-select: none;
}

.pagination span:hover {
  color: var(--primary);
}

/* About Page Specific */
.about-page {
  background-color: var(--white);
  min-height: calc(100vh - 70px);
}

.about-header {
  margin-bottom: 40px;
}

.breadcrumb {
  color: var(--primary);
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}

.about-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 25px;
}

.about-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 50px;
  max-width: 900px;
}

.stats-container {
  display: flex;
  gap: 100px;
  margin-bottom: 60px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 48px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.team-section {
  background-color: #f8f9fa;
  padding: 60px 0;
  margin-top: 40px;
  width: 100%;
}

.team-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 30px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.contact-section {
  background-color: var(--white);
  padding: 60px 0;
  width: 100%;
}

.contact-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 40px;
  color: #1a202c;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.contact-card {
  border: 1px solid var(--border-color);
  padding: 40px 20px;
  text-align: center;
  border-radius: var(--border-radius);
  background-color: var(--white);
  transition: box-shadow 0.3s;
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: #f0f4ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
}

.contact-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
}

.contact-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.team-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.avatar {
  width: 90px;
  height: 90px;
  background-color: #ced4da;
  border-radius: 50%;
  margin: 0 auto 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
}

.team-role {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 15px;
}

.team-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
