* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, #172554 0, transparent 35%),
    radial-gradient(circle at 80% 10%, #312e81 0, transparent 30%),
    #050816;
  color: #f8fafc;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 45px 0 70px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 2px;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
}

.subtitle {
  max-width: 700px;
  margin: 18px 0 0;
  color: #a5b4fc;
  font-size: 17px;
  line-height: 1.6;
}

.status {
  white-space: nowrap;
  padding: 10px 15px;
  border: 1px solid #334155;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #facc15;
  font-size: 13px;
}

.card {
  position: relative;
  margin-bottom: 20px;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.upload-card {
  text-align: center;
}

.upload-box {
  display: block;
  padding: 42px 20px;
  border: 2px dashed #475569;
  border-radius: 18px;
  cursor: pointer;
  transition: 0.25s;
}

.upload-box:hover {
  border-color: #60a5fa;
  background: rgba(59, 130, 246, 0.08);
}

.upload-icon {
  margin-bottom: 12px;
  font-size: 42px;
}

.upload-box h2 {
  margin: 0 0 8px;
}

.upload-box p {
  margin: 0;
  color: #94a3b8;
}

.preview-wrap {
  position: relative;
  width: min(650px, 100%);
  margin: 25px auto;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #334155;
  background: #020617;
}

.preview-wrap img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}

.scan-line {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: #60a5fa;
  box-shadow:
    0 0 10px #60a5fa,
    0 0 25px #60a5fa;
  opacity: 0;
  pointer-events: none;
}

.scanning .scan-line {
  opacity: 1;
  animation: scan 1.6s linear infinite;
}

@keyframes scan {
  0% {
    top: 0;
  }

  100% {
    top: 100%;
  }
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  border: 0;
  border-radius: 12px;
  padding: 13px 22px;
  background: #3b82f6;
  color: white;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #2563eb;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button.secondary {
  background: #1e293b;
  border: 1px solid #475569;
}

.button.secondary:hover {
  background: #334155;
}

.hidden {
  display: none !important;
}

.error {
  margin: 18px 0 0;
  color: #fca5a5;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.section-title h2 {
  margin: 0;
}

.section-title span {
  color: #94a3b8;
  font-size: 13px;
}

.result-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.result-icon {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.12);
  font-size: 42px;
}

.prediction {
  font-size: 34px;
  font-weight: bold;
  text-transform: capitalize;
}

.confidence {
  margin-top: 7px;
  color: #93c5fd;
}

.bar-wrap {
  margin: 25px 0;
}

.bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #1e293b;
}

.bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #60a5fa;
  transition: width 0.7s ease;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.class-item {
  padding: 15px;
  border: 1px solid #1e293b;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.5);
}

.class-name {
  color: #cbd5e1;
  font-size: 14px;
  text-transform: capitalize;
}

.class-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: bold;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.analysis-grid div {
  padding: 18px;
  border-radius: 15px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid #1e293b;
}

.analysis-grid span {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.analysis-grid strong {
  font-size: 16px;
}

.fact-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.fact-icon {
  font-size: 42px;
}

.fact-card h3 {
  margin: 0 0 8px;
}

.fact-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.explore-card {
  border-color: rgba(96, 165, 250, 0.35);
}

.explore-card h2 {
  margin-top: 0;
}

.explore-card p {
  margin-bottom: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.info-card {
  margin-bottom: 0;
}

.info-card h3 {
  margin-top: 0;
}

.info-card p {
  margin-bottom: 0;
  color: #94a3b8;
  line-height: 1.6;
}

@media (max-width: 750px) {
  .hero {
    flex-direction: column;
  }

  .status {
    align-self: flex-start;
  }

  .class-grid,
  .analysis-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    width: 94%;
    padding-top: 25px;
  }

  .card {
    padding: 20px;
    border-radius: 17px;
  }

  .class-grid,
  .analysis-grid {
    grid-template-columns: 1fr 1fr;
  }

  .prediction {
    font-size: 28px;
  }

  .result-icon {
    width: 65px;
    height: 65px;
    font-size: 32px;
  }
/* ===== CLEAN ANALYSIS SECTION ===== */

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.analysis-grid div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 82px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.55);
}

.analysis-grid span {
  display: block;
  margin-bottom: 7px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.analysis-grid strong {
  display: block;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 700;
}


/* ===== SPACE FACT ===== */

.fact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 110px;
}

.fact-icon {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 15px;
  background: rgba(59, 130, 246, 0.12);
  font-size: 28px;
}

.fact-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.fact-card p {
  margin: 0;
  color: #aab7ca;
  font-size: 14px;
  line-height: 1.6;
}


/* ===== EXPLORE ===== */

.explore-card {
  min-height: 110px;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.explore-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.explore-card p {
  margin: 0;
  color: #aab7ca;
  font-size: 14px;
  line-height: 1.7;
}


/* ===== MOBILE ===== */

@media (max-width: 750px) {

  .analysis-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 480px) {

  .analysis-grid {
    grid-template-columns: 1fr 1fr;
  }

  .fact-card {
    align-items: flex-start;
  }

}
}