/* Shallow Ocean — dark glass theme over the shallow-sea photograph */

:root {
  --teal: #35d0ba;
  --teal-soft: #7fe7d9;
  --teal-dim: rgba(53, 208, 186, 0.35);
  --ink: #dff5f2;
  --ink-dim: #9dbfba;
  --card: rgba(6, 26, 32, 0.78);
  --card-border: rgba(127, 231, 217, 0.16);
  --danger: #ff7a7a;
  --ok: #4ade80;
}

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

html, body { height: 100%; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, sans-serif;
  color: var(--ink);
  background: #04141a url("shallow-sea.jpg") center / cover no-repeat fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* dark vignette so the glass cards read well on the bright water */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(3, 18, 24, 0.35) 0%, rgba(3, 18, 24, 0.75) 100%),
    linear-gradient(rgba(3, 18, 24, 0.25), rgba(3, 18, 24, 0.45));
  z-index: 0;
}

.card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px 36px 32px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.card.wide { width: min(560px, 100%); }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* ---- brand ---- */
.brand { text-align: center; margin-bottom: 28px; }

.brand svg.logo {
  width: 64px; height: 64px;
  filter: drop-shadow(0 4px 14px rgba(53, 208, 186, 0.35));
  animation: bob 5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.brand h1 {
  margin-top: 10px;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(120deg, var(--teal-soft), var(--teal) 60%, #2b9fd8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand p { color: var(--ink-dim); font-size: 0.85rem; margin-top: 6px; letter-spacing: 0.04em; }

/* ---- forms / buttons ---- */
label { display: block; font-size: 0.8rem; color: var(--ink-dim); margin-bottom: 8px; letter-spacing: 0.06em; }

input[type="password"] {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(127, 231, 217, 0.22);
  background: rgba(3, 16, 21, 0.65);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="password"]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 13px 18px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #032420;
  background: linear-gradient(120deg, var(--teal-soft), var(--teal));
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(53, 208, 186, 0.35); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

.btn.ghost {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid rgba(127, 231, 217, 0.18);
}
.btn.ghost:hover { color: var(--ink); border-color: var(--teal-dim); box-shadow: none; }

.error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 122, 122, 0.12);
  border: 1px solid rgba(255, 122, 122, 0.35);
  color: var(--danger);
  font-size: 0.88rem;
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ---- portal ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.topbar .mini-brand { display: flex; align-items: center; gap: 10px; }
.topbar .mini-brand svg { width: 30px; height: 30px; }
.topbar .mini-brand span {
  font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.95rem;
  background: linear-gradient(120deg, var(--teal-soft), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.dropzone {
  border: 2px dashed rgba(127, 231, 217, 0.35);
  border-radius: 16px;
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--teal);
  background: rgba(53, 208, 186, 0.07);
}

.dropzone.dragover { transform: scale(1.015); }

.dropzone svg { width: 46px; height: 46px; margin-bottom: 12px; opacity: 0.9; }
.dropzone .dz-title { font-size: 1.05rem; font-weight: 600; }
.dropzone .dz-sub { color: var(--ink-dim); font-size: 0.83rem; margin-top: 6px; }
.dropzone .dz-sub em { color: var(--teal-soft); font-style: normal; }

/* processing waves */
.processing { text-align: center; padding: 36px 10px; }
.processing .waves { display: flex; justify-content: center; gap: 7px; height: 40px; align-items: flex-end; margin-bottom: 18px; }
.processing .waves span {
  width: 7px; border-radius: 4px;
  background: linear-gradient(var(--teal-soft), var(--teal));
  animation: wave 1s ease-in-out infinite;
}
.processing .waves span:nth-child(1) { animation-delay: 0s; }
.processing .waves span:nth-child(2) { animation-delay: 0.12s; }
.processing .waves span:nth-child(3) { animation-delay: 0.24s; }
.processing .waves span:nth-child(4) { animation-delay: 0.36s; }
.processing .waves span:nth-child(5) { animation-delay: 0.48s; }

@keyframes wave {
  0%, 100% { height: 12px; opacity: 0.6; }
  50%      { height: 38px; opacity: 1; }
}

.processing p { color: var(--ink-dim); font-size: 0.9rem; }
.processing .file-name { color: var(--ink); font-weight: 600; margin-bottom: 4px; }

/* results */
.result-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 18px;
  font-weight: 600; font-size: 0.95rem;
  animation: rise 0.45s ease both;
}
.result-badge.fixed { background: rgba(53, 208, 186, 0.12); border: 1px solid rgba(53, 208, 186, 0.4); color: var(--teal-soft); }
.result-badge.valid { background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.35); color: var(--ok); }

table.crc {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
  animation: rise 0.5s 0.08s ease both;
}
table.crc th, table.crc td { padding: 9px 10px; text-align: left; }
table.crc th { color: var(--ink-dim); font-weight: 500; font-size: 0.76rem; letter-spacing: 0.07em; text-transform: uppercase; border-bottom: 1px solid rgba(127, 231, 217, 0.15); }
table.crc td { border-bottom: 1px solid rgba(127, 231, 217, 0.07); font-variant-numeric: tabular-nums; }
table.crc td.stale { color: var(--danger); }
table.crc td.fresh { color: var(--teal-soft); font-weight: 600; }
table.crc td.same { color: var(--ok); }

.result-actions { display: flex; gap: 12px; margin-top: 20px; animation: rise 0.5s 0.16s ease both; }
.result-actions .btn { margin-top: 0; }
.result-actions .btn.secondary {
  color: var(--ink); background: rgba(127, 231, 217, 0.1);
  border: 1px solid rgba(127, 231, 217, 0.25);
}
.result-actions .btn.secondary:hover { box-shadow: none; background: rgba(127, 231, 217, 0.16); }

.btn.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53, 208, 186, 0.45); }
  50%      { box-shadow: 0 0 0 9px rgba(53, 208, 186, 0); }
}

.disclaimer {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid rgba(127, 231, 217, 0.1);
  color: var(--ink-dim); font-size: 0.75rem; line-height: 1.5; text-align: center;
}

.footer {
  position: relative; z-index: 1;
  margin-top: 18px; color: rgba(223, 245, 242, 0.55); font-size: 0.75rem; letter-spacing: 0.05em;
}

.hidden { display: none !important; }
