
* { box-sizing: border-box; }

body {
  background: linear-gradient(120deg, #65b6ff 0%, #84d6c1 50%, #d4425f 100%);
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page wrapper */
main {
  max-width: 1200px;
  margin: 32px auto;
  padding: 28px 12px 18px;
}

/* Heading */
h1 {
  text-align: center;
  color: #e80909;
  font-size: 1.9rem;
  letter-spacing: 2px;
  margin: 0 0 18px;
}

/* Flex container: allow wrapping on small screens */
.container-flex {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap; /* important for mobile */
}

/* Card */
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 7px 28px rgba(101,182,255,0.16);
  padding: 22px 16px;
  flex: 1 1 440px;   /* try to keep two columns on wide screens */
  min-width: 280px;   /* allow it to shrink on mobile */
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

/* left border color variants */
.card-vala { border-left: 7px solid #d4425f; }
.card-ipko { border-left: 7px solid #2296ca; }

/* Upload block */
.upload-block { margin-bottom: 12px; }
.upload-block label {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: #157fad;
  margin: 6px 0 6px;
}

/* Inputs / selects */
.upload-block select,
.upload-block input[type="file"],
.upload-block input[type="number"],
.upload-block input[type="text"],
.upload-block input[type="datetime-local"] {
  width: 100%;
  padding: 9px 10px;
  font-size: 1rem;
  background: #fff;
  border: 1px solid #d6eefc;
  margin-bottom: 8px;
  border-radius: 8px;
  outline: none;
}

/* multiple select looks */
select[multiple] {
  max-height: 160px;
  overflow: auto;
}

/* Hints */
.hint, .small-muted {
  font-size: 0.88rem;
  color: #6a8fa6;
  margin-top: 4px;
}

/* Buttons */
.findBtn, .copyBtn, #compareBtn {
  padding: 11px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg,#2296ca 60%,#84d6c1 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 8px;
  margin-top: 8px;
  transition: background 0.20s, transform 0.06s;
  box-shadow: 0 3px 10px rgba(34,150,202,0.22);
  display: inline-block;
}

/* hover / active */
.findBtn:hover, .copyBtn:hover, #compareBtn:hover {
  background: linear-gradient(90deg,#156fa9 80%,#70c6b0 100%);
}
.findBtn:active, #compareBtn:active { transform: translateY(1px); }

/* Result card */
.resultCard {
  background: linear-gradient(100deg,#fbfcfd 60%,#eafcff 100%);
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(132,214,193,0.09);
  padding: 12px 14px;
  margin-top: 12px;
  min-height: 56px;
  font-size: 1.02rem;
  color: #126f93;
  font-family: 'Consolas', monospace;
  overflow: auto;
  word-break: break-word;
}

/* Result list */
.resultHeader { font-weight: 800; color: #156fa9; font-size: 1.02rem; margin-bottom: 8px; }
.resultList { counter-reset: my-count; list-style: none; margin: 6px 0; padding-left: 18px; }
.resultList li {
  background: #e8f7fb;
  margin-bottom: 8px;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.98rem;
  color: #065484;
  position: relative;
}
.resultList li:before {
  counter-increment: my-count;
  content: counter(my-count) ". ";
  font-weight: 700;
  color: #2268ad;
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.02rem;
}

/* small copy message */
.msg { text-align:center; color: #1b7a3a; font-weight:700; margin-bottom:8px; }

/* Footer */
footer {
  background: #3c9ae8;
  color: #f7f7f7;
  font-size: 0.95rem;
  text-align: center;
  padding: 10px 8px;
  margin-top: 20px;
  letter-spacing: 1px;
  border-radius: 0 0 18px 18px;
}

/* Accessibility focus outlines */
button:focus, input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(34,150,202,0.18);
  outline: none;
  border-color: #1e90d7;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 900px) {
  main { padding: 18px 10px; }
  h1 { font-size: 1.5rem; }
  .container-flex { gap: 14px; }
  .card { flex: 1 1 100%; min-width: auto; padding: 16px; border-radius: 12px; }
  .card h2 { font-size: 1.02rem; margin: 0 0 8px; }
  .upload-block label { font-size: 0.98rem; }
  .upload-block select,
  .upload-block input[type="file"],
  .upload-block input[type="number"],
  .upload-block input[type="text"],
  .upload-block input[type="datetime-local"] { font-size: 0.97rem; padding: 10px; }
  .findBtn, .copyBtn, #compareBtn { width: 100%; font-size: 1rem; padding: 12px; margin-top: 6px; }
  .resultCard { font-size: 0.98rem; padding: 10px; min-height: 50px; }
  .resultList li { font-size: 0.95rem; padding: 8px 12px; }
}

/* Extra small devices */
@media (max-width: 480px) {
  h1 { font-size: 1.25rem; }
  main { padding: 12px 8px; }
  .resultList li:before { left: -18px; font-size: 1rem; }
}

/* Prevent horizontal overflow */
html, body { overflow-x: hidden; }