/* Light theme with slim Inter font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
  --bg-1: linear-gradient(180deg, #f7fbff 0%, #ffffff 60%);
  --surface: #ffffff;
  --text: #0b1720;
  --muted: #5b6a72;
  --accent: #16a34a; /* green */
  --accent-600: #15803d;
  --shadow-1: 0 6px 20px rgba(20, 30, 40, 0.06);
  --shadow-2: 0 10px 30px rgba(20, 30, 40, 0.08);
  --radius: 12px;
  --max-width: 1100px;
  --gutter: 20px;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  font-weight: 300;
  color: var(--text);
  background: var(--bg-1);
  width: 100%;
  min-height: 100vh;
  padding: 0px 28px 18px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 12px;
}

/* Hero banner (uses images/hero.jpg). height adapts to image via clamp() */
.hero {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw; /* full viewport width */
  background-image: url("images/Strip\ 5.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 0; /* quitar redondeo lateral para llegar a los bordes */
  overflow: hidden;
  margin-bottom: 20px;
  /* altura aumentada +100px sobre la regla responsiva previa */
  min-height: calc(clamp(220px, 30vh, 420px) + 1px);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-2);
  /* mantener solo bordes superior/inferior */
  border-left: none;
  border-right: none;
  border-top: 1px solid rgba(10, 20, 30, 0.04);
  border-bottom: 1px solid rgba(10, 20, 30, 0.04);
  z-index: 0;
}

/* subtle light overlay so text remains legible */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(105, 105, 105, 0.55),
    rgba(105, 105, 105, 0.32)
  );
  z-index: 1;
}

/* content inside hero */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
  padding: 28px;
}

/* left column text */
.hero-left {
  flex: 1 1 60%;
  min-width: 0;
}

/* Hacer el título y el texto más oscuros para mejor contraste sobre el hero claro */
.hero-left h1 {
  margin: 0 0 8px 0;
  font-size: 1.6rem;
  line-height: 1.05;
  color: #dbdada;
  font-weight: 700;
  font-family: "Roboto", "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    Arial;
}
.hero-left p {
  color: #202122; /* texto de párrafo más oscuro */
  margin-top: 6px;
  line-height: 1.45;
  font-weight: 400;
}

/* subtle divider */
hr {
  border: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(11, 23, 32, 0.04),
    rgba(11, 23, 32, 0.02)
  );
  margin: 18px 0;
}

/* Page layout */
.row {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--gutter);
  align-items: start;
  margin: 20px 0;
}

/* Photo box */
.box-foto {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(10, 20, 30, 0.04);
  overflow: hidden;
}
.box-foto img {
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 260ms ease, filter 260ms ease;
}
.box-foto img:hover {
  transform: scale(1.01);
}

/* Result panel - light card */
.box-result {
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  min-height: 320px;
  box-shadow: var(--shadow-2);
  border: 1px solid rgba(10, 20, 30, 0.04);
}

/* Upload area */
.upload-btn-wrapper {
  width: 100%;
  border-radius: 10px;
  background: rgba(246, 249, 252, 0.9);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  border: 1px dashed rgba(10, 20, 30, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.upload-btn-wrapper:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(10, 20, 30, 0.06);
}

.upload-file {
  flex: 1;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 500;
  display: flex;
  gap: 12px;
  align-items: center;
}
.upload-file .inner-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}
.upload-file i {
  font-size: 20px;
  color: var(--accent);
  background: rgba(22, 163, 74, 0.08);
  padding: 8px;
  border-radius: 8px;
}

/* hidden native input */
.upload-btn-wrapper input[type="file"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  opacity: 0;
  cursor: pointer;
}

/* small helper text */
.upload-btn {
  display: block;
  font-size: 13px;
  color: var(--accent-600);
  padding-top: 8px;
}

/* Success badges */
.success-1,
.success-2 {
  display: none;
  color: var(--accent-600);
}
.success-1 i,
.success-2 i {
  font-size: 12px !important;
  margin-left: 6px;
  margin-top: 4px;
  color: var(--accent-600);
  border: 1px solid rgba(22, 163, 74, 0.12);
  padding: 6px;
  border-radius: 50%;
}

/* init status chip */
.init_status {
  display: inline-block;
  width: fit-content;
  margin: 6px auto;
  background: linear-gradient(90deg, var(--accent), var(--accent-600));
  color: #04210a;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.08);
}

/* Prediction label */
.pred_class {
  display: block;
  margin-top: 6px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: center;
}

/* Accuracy circular mini */
.accuracy {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  width: 100%;
}
.progress {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--accent) 0%, rgba(10, 20, 30, 0.04) 0%);
  box-shadow: inset 0 -6px 16px rgba(10, 20, 30, 0.04);
}
.progress > .inner {
  font-weight: 700;
  color: var(--text);
  font-size: 1.2rem;
}

/* helper text */
.tutorial {
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
  margin-top: 14px;
}

/* responsive */
@media (max-width: 880px) {
  .hero-content {
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
  }
  .header-img {
    width: 44vw;
    max-width: 360px;
    margin: 12px auto 0;
  }
  .hero-left h1 {
    font-size: 1.25rem;
  }
  .row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .box-foto {
    min-height: 300px;
  }
  .box-result {
    order: 2;
  }
  .box-foto {
    order: 1;
  }
}

/* accessibility: focus states */
.upload-btn-wrapper:focus-within,
.upload-file:focus {
  outline: 3px solid rgba(22, 163, 74, 0.12);
  outline-offset: 4px;
}

/* subtle hover for result items */
.box-result > *:hover {
  transform: translateY(-2px);
  transition: transform 160ms ease;
}
