/* ==========================================================================
   Space CV — Incompatible device / error page
   Displayed when the Flutter engine cannot start (missing WebAssembly,
   WebGL, WASM-GC, load timeout, …). Hidden by default, revealed through
   window.showIncompatibleMessage(reason) defined in web/error.js.
   Style matches the app: background #141414, teal #00F5C4 accent,
   glass rgba(255,255,255,0.09), border rgba(255,255,255,0.2), DM Sans.
   Loaded via <link> from web/index.html — never embedded inline.
   ========================================================================== */

#app-error {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(640px 420px at 15% 10%, rgba(255, 68, 68, 0.1), transparent 65%),
    radial-gradient(720px 480px at 85% 85%, rgba(123, 97, 255, 0.15), transparent 65%),
    radial-gradient(500px 360px at 80% 12%, rgba(0, 245, 196, 0.07), transparent 60%),
    #141414;
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

#app-error[hidden] {
  display: none !important;
}

.err-card {
  width: min(560px, 100%);
  margin: auto;
  padding: 40px 38px 34px;
  text-align: center;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: err-rise 0.55s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

@keyframes err-rise {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.err-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 68, 68, 0.12);
  border: 1px solid rgba(255, 68, 68, 0.4);
  box-shadow: 0 0 36px rgba(255, 68, 68, 0.22);
}

.err-icon svg {
  width: 36px;
  height: 36px;
}

.err-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #00f5c4;
}

.err-title {
  margin: 0;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.err-desc {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
}

.err-reason {
  margin: 16px 0 0;
  padding: 11px 16px;
  font-size: 12.5px;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.err-reason:empty {
  display: none;
}

.err-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.err-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease;
}

.err-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

.err-btn:active {
  transform: translateY(0);
}

.err-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.err-btn-primary {
  color: #06281f;
  background: linear-gradient(92deg, #00f5c4, #4be3b6);
  border-color: transparent;
  box-shadow: 0 6px 26px rgba(0, 245, 196, 0.35);
}

.err-btn-primary:hover {
  background: linear-gradient(92deg, #4dffd2, #00f5c4);
  border-color: transparent;
  box-shadow: 0 8px 30px rgba(0, 245, 196, 0.45);
}

.err-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.err-divider::before,
.err-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.err-resume-label {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.err-foot {
  margin: 22px 0 0;
  font-size: 11.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 480px) {
  .err-card {
    padding: 32px 22px 28px;
  }

  .err-title {
    font-size: 22px;
  }

  .err-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .err-card {
    animation: none;
  }

  .err-btn {
    transition: none;
  }
}
