:root {
  --page-bg: #007db3;
  --card-bg: rgba(252, 248, 242, 0.86);
  --card-top: rgba(255, 255, 255, 0.55);
  --border: rgba(34, 71, 98, 0.12);
  --text: #193247;
  --muted: #5e7484;
  --accent: #da6f3d;
  --accent-deep: #b9582b;
  --accent-soft: rgba(218, 111, 61, 0.14);
  --input-bg: rgba(255, 255, 255, 0.78);
  --shadow: 0 28px 80px rgba(10, 31, 53, 0.22);
  --inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 20px 40px;
  font-family: "Manrope", sans-serif;
  background: var(--page-bg);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.7;
}

body::before {
  top: -80px;
  right: -100px;
  background: rgba(255, 201, 156, 0.22);
}

body::after {
  bottom: -100px;
  left: -110px;
  background: rgba(134, 218, 255, 0.2);
}

.board {
  width: min(980px, 100%);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
  position: relative;
}

.board::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 140px;
  background: linear-gradient(180deg, var(--card-top), transparent);
  pointer-events: none;
}

.board-header {
  padding: 34px 36px 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.board-header h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.05;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(25, 50, 71, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(10, 31, 53, 0.08);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
  text-decoration: none;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(10, 31, 53, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) auto;
  gap: 18px;
  padding: 28px 36px 5px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent),
    rgba(255, 255, 255, 0.16);
}

.form-intro {
  grid-column: 1 / -1;
  margin: 0 0 6px;
  color: var(--accent-deep);
  font-size: 0.98rem;
  line-height: 1.6;
  font-weight: 700;
}

.field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  align-self: center;
}

.field input {
  width: 100%;
  height: 58px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  box-shadow: var(--inner-shadow);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus {
  outline: 2px solid rgba(218, 111, 61, 0.22);
  outline-offset: 2px;
  border-color: rgba(218, 111, 61, 0.48);
  box-shadow: 0 12px 28px rgba(218, 111, 61, 0.12);
  transform: translateY(-1px);
}

.field input.invalid {
  border-color: #c44747;
  background: rgba(196, 71, 71, 0.08);
}

.error-text {
  min-height: 1.1em;
  font-size: 0.88rem;
  color: #b13737;
}

.search-action {
  display: flex;
  align-items: center;
  align-self: center;
  transform: translateY(-10px);
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: linear-gradient(180deg, #ea8454 0%, var(--accent) 100%);
  color: #fffaf5;
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(218, 111, 61, 0.3);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-button:hover {
  background: linear-gradient(180deg, #f08d5d 0%, var(--accent-deep) 100%);
  transform: translateY(-1px);
  box-shadow: 0 22px 34px rgba(218, 111, 61, 0.34);
}

.results-banner {
  padding: 26px 36px 15px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.result-card-container {
  padding: 0 36px 36px;
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
}

.cell {
  min-height: 100px;
  padding: 26px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.05rem;
}

.cell:nth-child(2n) {
  border-right: none;
}

.header-cell {
  min-height: auto;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.44);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-cell.centered {
  justify-content: center;
  text-align: center;
}

.value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.alert-message {
  padding: 20px 24px;
  background: rgba(196, 71, 71, 0.08);
  border: 1px solid rgba(196, 71, 71, 0.2);
  border-radius: 18px;
  color: #b13737;
  font-weight: 600;
}

@media (max-width: 700px) {
  body {
    padding: 18px 12px;
  }
  .board-header {
    padding: 24px 20px 16px;
  }
  .form-row {
    grid-template-columns: 1fr;
    padding: 20px 20px 22px;
  }
  .search-action {
    transform: none;
  }
  .search-button {
    width: 100%;
  }
  .results-banner, .result-card-container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .header-cell {
    display: none;
  }
}