:root {
  --blue-950: #020a4a;
  --blue-900: #061a86;
  --blue-700: #1a39d8;
  --blue-500: #3f65ff;
  --white: #ffffff;
  --white-soft: #e9eeff;
  --line: rgba(255, 255, 255, 0.24);
  --shadow: rgba(2, 10, 74, 0.55);
}

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

body {
  background:
    radial-gradient(circle at 50% 12%, var(--blue-500), transparent 38%),
    radial-gradient(circle at 85% 100%, #0f29b7, transparent 42%),
    linear-gradient(170deg, var(--blue-950), var(--blue-900));
  color: var(--white);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.08), transparent 28%);
  pointer-events: none;
  opacity: 0.8;
  z-index: 5;
}

main {
  position: relative;
  z-index: 10;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.4rem;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid var(--line);
  pointer-events: none;
  border-radius: 24px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  pointer-events: none;
  border-radius: 20px;
}

.corner {
  position: absolute;
  width: 60px;
  height: 60px;
  pointer-events: none;
}

.corner-tl {
  top: 4px;
  left: 4px;
  border-top: 3px solid var(--white);
  border-left: 3px solid var(--white);
}

.corner-tr {
  top: 4px;
  right: 4px;
  border-top: 3px solid var(--white);
  border-right: 3px solid var(--white);
}

.corner-bl {
  bottom: 4px;
  left: 4px;
  border-bottom: 3px solid var(--white);
  border-left: 3px solid var(--white);
}

.corner-br {
  bottom: 4px;
  right: 4px;
  border-bottom: 3px solid var(--white);
  border-right: 3px solid var(--white);
}

.epita-tag {
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white-soft);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.epita-tag::before,
.epita-tag::after {
  content: "";
  width: 42px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.logo-wrap {
  width: clamp(130px, 20vw, 190px);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.52);
  background: radial-gradient(circle at 30% 20%, #2f53ff, var(--blue-900));
  display: grid;
  place-items: center;
  margin-bottom: 1.3rem;
  box-shadow: 0 18px 45px var(--shadow), 0 0 0 8px rgba(255, 255, 255, 0.06);
}

.logo-image {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 999px;
}

.team-name {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 8vw, 4.8rem);
  line-height: 1;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 6px 24px var(--shadow);
}

.subtitle {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 2.3rem;
  text-align: center;
}

.divider-ornament {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  width: min(560px, 86vw);
  margin: 0 auto 2.4rem;
}

.divider-ornament::before,
.divider-ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.55), transparent);
}

.divider-ornament span {
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
}

.tool-card {
  width: min(780px, 92vw);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  border: 1px solid var(--line);
  position: relative;
  padding: 2.1rem;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  border-radius: 24px;
  backdrop-filter: blur(8px);
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
  border-radius: 18px;
}

.tool-badge {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
  padding: 0.25rem 0.7rem;
  margin-bottom: 1.1rem;
  border-radius: 999px;
}

.tool-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(1.22rem, 3.2vw, 1.7rem);
  margin-bottom: 0.7rem;
  line-height: 1.3;
}

.tool-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.2rem;
}

.inputs label {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.55rem;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
}

input[type="text"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: rgba(5, 15, 85, 0.55);
  color: var(--white);
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  padding: 0.86rem 0.95rem;
}

input[type="text"]:focus {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 1px;
}

input[type="text"]::placeholder {
  color: rgba(233, 238, 255, 0.68);
}

button {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--white), #cfd9ff);
  color: var(--blue-900);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.86rem 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(25, 53, 209, 0.45);
}

button:disabled {
  cursor: wait;
  opacity: 0.76;
}

.output {
  margin-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 1rem;
}

.hint {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 0.5rem;
}

.result {
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: rgba(3, 11, 70, 0.62);
  padding: 0.75rem 0.85rem;
  font-family: "Inter", sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--white);
  transition: box-shadow 0.2s ease;
}

.result.live {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 0 25px rgba(63, 101, 255, 0.4);
}

.engraving-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0.08;
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.engraving-lines div {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  width: 100%;
}

@media (max-width: 760px) {
  .hero {
    padding: 2rem 0.9rem;
  }

  .tool-card {
    padding: 1.4rem;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
