/*@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap');*/
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Roboto+Flex:opsz,wght,XOPQ,XTRA,YOPQ,YTDE,YTFI,YTLC,YTUC@8..144,100..1000,96,468,79,-203,738,514,712&display=swap');

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

body {
  background:
  /* radial-gradient(ellipse 30% 15% at 100% 0%, rgba(60,180,15,0.6) 0%, transparent 100%), */
  radial-gradient(ellipse 70% 40% at 100% 0%, rgba(35,115,8,1) 0%, rgba(35,115,8,0.35) 50%, transparent 100%),
  /* radial-gradient(ellipse 30% 15% at 0% 100%, rgba(60,180,15,0.6) 0%, transparent 100%), */
  radial-gradient(ellipse 70% 40% at 0% 100%, rgba(35,115,8,1) 0%, rgba(35,115,8,0.35) 50%, transparent 100%),
    #020202;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: "Roboto Flex", sans-serif;
  font-weight: 200;
  color: #fff;
  padding-top: 80px; /* so content isn't hidden under navbar */
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
  margin: 0 auto;
  padding-bottom: 60px;
}

#hex-canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  display: block;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  background-color: rgba(14, 14, 14, 0.75);
  backdrop-filter: blur(10px);
  border: 0.5px solid rgba(75, 220, 130, 0.15);
  border-radius: 5px;
  gap: 80px;
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: fit-content;
  min-width: 500px;
  z-index: 1000;
}

.nav-left .nav-logo {
  width: 40px;
  height: 40px;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-wordmark {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  flex-wrap: nowrap;
  white-space: nowrap;
  color: #4CBB17;
  letter-spacing: 0.04em;
}

.nav-right {
  font-family: "JetBrains Mono", monospace;
  font-weight: 100;
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
  white-space: nowrap;
  justify-content: flex-end;
}

.nav-right a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 16px;
  padding: 6px 12px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-right a.active {
  color: #4CBB17;
}

.nav-right a:hover {
  color: #84b96c;
  background-color: transparent;
}

/* responsive navbar */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.2s ease;
}

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

@media (max-width: 620px) {
  .navbar {
    overflow: visible;
    border-radius: 5px;
    min-width: unset;
    width: calc(100% - 32px);
    left: 50%;
    transform: translateX(-50%);
    flex-wrap: wrap;
    padding: 2px 2px;
    gap: 0;
  }

  .nav-right {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 4px;
    padding: 8px 0 4px;
  }

  .nav-right.open {
    display: flex;
  }

  .nav-right a {
    width: 100%;
    padding: 8px 4px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.08);
  }

  .hamburger {
    display: flex;
  }
}

#home-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 60px;
  margin: 100px auto 20px;
  letter-spacing: 0.01em;
}

h3 {
  font-size: clamp(18px, 3vw, 25px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgb(195, 191, 191);
  margin-bottom: 40px;
}

/* home page content with choosing image and selecting model choices */
#uploadForm {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.custom-upload {
  width: min(450px, 80vw);
  background: rgba(5, 5, 5, 0.75);
  color: white;
  border-radius: 8px;
  border: 1.5px solid #4CBB17;
  padding: 26px 14px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.custom-upload:hover {
  box-shadow: 
    0 5px 10px rgba(0, 0, 0, .25),
    0 0 0 2px #4CBB17;
}

.upload-title {
  font-weight: 700;
  font-size: 18px;
  color: white;
}

.upload-info {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.chooseMethod {
  font-family: "Roboto Flex", sans-serif;
  font-size: 18px;
}

.methods {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px;
}

#mlButton, #dlButton {
  font-family: "Roboto Flex", sans-serif;
  font-size: 14px;
  background: transparent;
  color: white;
  border: 2px solid #4CBB17;
  border-radius: 12px;
  padding: 15px 15px; 
  min-width: 200px;     
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
  transition: all 0.2s ease;
}

#mlButton.active, #dlButton.active {
  background: #4CBB17;
}

/* analyze button */
.analyze-row { 
  display: flex; 
  justify-content: center; 
  margin-top: 12px; 
}

#analyzeButton {
  font-family: "Roboto Flex", sans-serif;
  width: 90px;  
  height: 40px;
  font-size: 16px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #007BFF;
  background: #007BFF;
  color: white;
  cursor: pointer;
}

#analyzeButton:disabled {
  cursor: not-allowed;
}

.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

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

.analyzing-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#loadingIndicator {
  margin-top: 20px;
}

#loadingIndicator.hidden {
  display: None
}

#preview-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

#preview {
  display: none;
  max-width: 80%;
  height: 300px;
  width: 400px;
  border-radius: 10px;
  margin-top: 10px;
  border: 2px solid #4CBB17;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#result {
  margin-top: 40px;
  font-size: 16px;
  color: white;
}

.feature-card {
  padding: 15px 20px;
  border-radius: 10px;
  text-align: center;
  width: 220px;
  background-color: #111;
  border: 2px solid #666;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  transition: 0.3s ease;
}

/* row of cards */
.feature-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

/* text inside cards */
.feature-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.feature-score,
.feature-vote {
  font-size: 16px;
  margin: 5px 0;
}

/* green = real */
.card-green {
  border-color: #2ecc71;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.6);
}

/* red = tampered */
.card-red {
  border-color: #e74c3c;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.6);
}

/* yellow/orange = uncertain */
.card-uncertain {
  border-color: #f1c40f;
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.6);
}

/* vote text colors */
.real {
  color: #2ecc71;
  font-weight: bold;
}

.tampered {
  color: #e74c3c;
  font-weight: bold;
}

.unknown {
  color: #bdc3c7;
  font-weight: bold;
}

.consensus-note {
  margin-top: 15px;
  color: #bdc3c7;
  font-size: 18px;
  text-align: center;
}

.results-container {
  display: flex;
  column-gap: 4rem;
  margin-top: 10px;
  margin-left: 20px auto;
  margin-right: 20px auto;
}

.results-column {
  flex: 1;
  min-width: 0;
}

.module-evidence-row {
  display: flex;
  gap: 25px;
  margin-top: 20px;
}

.module-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.module-col .feature-card {
  width: 100%;
  box-sizing: border-box;
}

.evidence-panel {
  margin-top: 12px;
}

.evidence-img {
  width: 100%;
  display: block;
  border-radius: 6px;
  border: 1px solid #444;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.evidence-img:hover {
  opacity: 0.8;
}

.evidence-caption {
  font-size: 16px;
  color: #999;
  margin-top: 6px;
  margin-bottom: 10px;
  line-height: 1.4;
  text-align: left;
}

/* clicking the evidence images */
#imageViewer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#imageViewer.active {
  display: flex;
}

#imageViewer-img {
  width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  object-fit: contain;
  transition: transform 0.1s ease;
  cursor: zoom-in;
}

#imageViewer-img.zoom-active {
  cursor: zoom-out;
}

#imageViewer-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  pointer-events: none;
  margin: 0;
}

#imageViewer-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

#imageViewer-close:hover {
  opacity: 1;
}

#total-result-container {
  padding: 20px;
}

.shared-evidence-section {
  margin-top: 48px;
  text-align: center;
}

.shared-evidence-section h2 {
  margin-bottom: 16px;
}

.evidence-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.evidence-grid {
  display: grid;
  column-gap: 25px;
  row-gap: 0;
  justify-content: center;
  margin-top: 20px;
  text-align: left;
  align-items: start;
}

.evidence-module-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.12em;
  text-align: center;
}

.evidence-grid .evidence-img {
  margin-top: 12px;
}

.evidence-grid .evidence-caption {
  margin-bottom: 4px;
}

/* paragraph styling */
p {
  font-size: 20px;
  color: #D3D3D3;
}

.titles {
  font-family: "JetBrains Mono", monospace;
  font-size: 34px;
  margin: 10px 0px;
}

/* REPOSITORY PAGE */
#repo-link {
  font-size: 16px;
  color: #4CBB17;
  padding: 5px;
  background: rgba(12, 12, 12, 0.6);
  backdrop-filter: blur(1px);
}

#repo-link:hover {
  color: #FFFFFF;
}

#readme-container {
  width: min(1000px, 90vw);
  height: min(600px, 70vh);
  /* border: 2px solid #4CBB17;
  border-radius: 10px; */
  margin: 0 auto;
  padding: 20px 40px;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-color: #ffffff transparent;
  text-align: left;
  background: rgba(12, 12, 12, 0.2);
  backdrop-filter: blur(1px);
  border-radius: 14px;
}

/* .markdown-body h1 {
  padding-bottom: 20px;
}

.markdown-body h3 {
  color: #FFFFFF;
  padding-top: 10px;
}

.markdown-body p {
  color: #D3D3D3;
  font-size: 16px;
} */

.markdown-body {
  color-scheme: dark;
  --color-canvas-default: transparent;
  --color-fg-default: #e6edf3;
  --color-fg-muted: rgba(255,255,255,0.5);
  --color-border-default: rgba(255,255,255,0.1);
  font-size: 15px;
  line-height: 1.7;
}

#home-container {
  width: min(85%, 90vw);
  margin: 0 auto;
  padding: 10px 10px;
  background: rgba(12, 12, 12, 0);
  backdrop-filter: blur(1px);
}

/* ABOUT PAGE */
.text-container {
  width: min(1000px, 90vw);
  margin: 0 auto;
  padding: 15px 30px;
  background: rgba(12, 12, 12, 0.2);
  backdrop-filter: blur(1px);
  border-radius: 14px;
}

#about-text, #info-text {
  text-align: left;
}

.about-section {
  padding: 36px 0;
}

.about-divider {
  border: none;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}

.about-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: #4CBB17;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-size: 12px;
  text-shadow: none;
}

.about-description {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.8;
  margin-top: 16px;
}

.about-institution {
  font-size: 18px;
  color: white;
  font-weight: 400;
  margin-bottom: 6px;
}

.about-course {
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
}

.team-member {
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(74, 222, 128, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
  align-items: start;
}

.team-card {
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(74, 222, 128, 0.2);
  border-radius: 8px;
  padding: 16px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}

.team-member {
  align-self: start;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(74, 222, 128, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.team-member:hover {
  border-color: rgba(76, 187, 23, 0.35);
  box-shadow: 0 0 0 1px rgba(76, 187, 23, 0.08);
}

.team-toggle {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}

.team-toggle:hover {
  color: white;
}

.team-arrow {
  font-size: 16px;
  color: #cfd4ff;
  transition: transform 0.25s ease;
  flex-shrink: 0;
} 

.team-member.active .team-arrow {
  transform: rotate(180deg);
}

.team-links {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.team-member.active .team-links {
  max-height: 120px;
  padding: 0 16px 16px;
}

.team-links a {
  text-decoration: none;
  color: #4CBB17;
  font-size: 15px;
  font-family: "JetBrains Mono", monospace;
  text-shadow: none;
  transition: color 0.2s ease;
}

.team-links a:hover {
  color: #ffffff;
}

/* info page accordion styling */
#faq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.faq-category-btn {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid rgba(76, 187, 23, 0.5);
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
  text-shadow: none;
}

.faq-category-btn:hover {
  border-color: #4CBB17;
  color: white;
}

.faq-category-btn.active {
  background: #4CBB17;
  border-color: #4CBB17;
  color: #020202;
  font-weight: 600;
}

.faq-hidden {
  display: none;
}

#faq-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 0 0;
  text-align: left;
}

.faq-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  margin-bottom: 18px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(76, 187, 23, 0.35);
  box-shadow: 0 0 0 1px rgba(76, 187, 23, 0.08);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: white;
  padding: 20px 24px;
  font-family: "Roboto Flex", sans-serif;
  font-size: 20px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 28px;
}

.faq-answer p {
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.70);
  padding-bottom: 24px;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 28px;
}

.arrow {
  font-size: 20px;
  color: #cfd4ff;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item.active .arrow {
  transform: rotate(180deg);
}

@media (max-width: 770px) {
  .faq-question {
    font-size: 22px;
    padding: 20px;
  }

  .faq-answer {
    padding: 0 20px;
  }

  .faq-item.active .faq-answer {
    padding: 0 20px;
  }

  .faq-answer p {
    font-size: 16px;
    padding-bottom: 20px;
  }
}