:root {
  --bg-main: #050816;
  --bg-elevated: #0b1220;
  --bg-elevated-soft: rgba(15, 23, 42, 0.96);
  --border-subtle: rgba(148, 163, 184, 0.5);
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #f97373;
  --success: #22c55e;
  --radius-pill: 999px;
  --shadow-soft: 0 22px 45px rgba(15, 23, 42, 0.7);
  --transition-fast: 150ms ease-out;
}

/* RESET / BASE */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top left, #1e293b 0, #020617 55%);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* NAVBAR */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.5rem 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.94)
  );

  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav-left {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-center {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.nav-right {
  justify-self: end;
}

.brand-link {
  text-decoration: none;
  color: var(--text-main);
  opacity: 0.9;
}

.brand-link:hover {
  opacity: 1;
}

/* LAYOUT */

.wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(2rem, 8vh, 5rem);  /* min 2rem, ideal 8vh, max 5rem */
  padding-bottom: 1rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.card {
  width: 100%;
  max-width: 720px;
  background: var(--bg-elevated-soft);
  border-radius: 20px;
  padding: 1.7rem 2.1rem 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
}

.card-inner {
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .wrap {
    padding: 1.6rem 1rem 1.6rem;
  }

  .card {
    padding: 1.5rem 1.3rem 1.6rem;
    border-radius: 18px;
  }

  .nav-inner {
    padding: 0.7rem 1rem;
    grid-template-columns: auto 1fr auto;
  }

  .nav-center {
    font-size: 1rem;
  }
}

/* TYPOGRAPHY */

.card-title {
  margin: 0 0 0.9rem;
  padding: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: var(--text-main);
}

.lead {
  margin: 0 0 2.6rem;
  font-size: 0.93rem;
  color: var(--text-muted);
  max-width: 44rem;
  line-height: 1.6;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Courier New", monospace;
  font-size: 0.83em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  backdrop-filter: blur(2px);
}

/* FORM */

.form {
  margin-bottom: 0.4rem;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.input {
  flex: 0 0 auto;
  width: auto;
  min-width: 38ch;     /* placeholder width */
  max-width: 38ch;     /* longest GUID width */

  background: rgba(15, 23, 42, 0.9);
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.45rem 0.55rem 0.45rem 0.85rem;
  font-size: 0.86rem;
  color: var(--text-main);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}



.input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.input:focus {
  border-color: #3b82f6; /* softer blue */
  background: rgba(15, 23, 42, 0.9);
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25); /* subtle clean ring */
}


/* BUTTONS – unified system */

.btn {
  border-radius: 0.5rem;
  border: 1px solid transparent;
  padding: 0.55rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

/* Primary CTA – Lookup + beer */

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-color: var(--accent-strong);
  color: #e5f0ff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: default;
  box-shadow: none;
}

/* Secondary – Clear */

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(229, 231, 235, 0.9);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}

/* Sizes */

.btn-sm {
  padding: 0.48rem 1.1rem;
  font-size: 0.8rem;
}

.btn-xs {
  padding: 0.3rem 0.9rem;
  font-size: 0.75rem;
}

.form-clear {
  padding-inline: 0.9rem;
}

/* Icon-sized button for copy actions */

.btn-icon {
  border-radius: 0.5rem;
  border: 1px solid transparent;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text-main);
  transform: translateY(-0.5px);
}

/* Copy state */

.copy-btn-copied {
  border-color: rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
}

/* RESPONSIVE FORM */

@media (max-width: 700px) {
  .form-row {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .input {
    width: 100%;
  }

  .btn-sm,
  .form-clear {
    width: 100%;
    justify-content: center;
  }
}

/* STATUS */

.status {
  min-height: 0.9rem;
  font-size: 0.82rem;
  margin: 2rem 0 0.4rem;
  color: var(--text-muted);
}

.status-info {
  color: var(--text-muted);
}

.status-success {
  color: var(--success);
}

.status-error {
  color: var(--danger);
}

/* RESULTS */

.result {
  margin: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding-top: 0.45rem;
  display: grid;
  gap: 0.55rem;
}

.result-row {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.result-row dt {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.result-row dd {
  margin: 0;
  font-size: 0.9rem;
}

.result-value {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

@media (max-width: 600px) {
  .result-value {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* RESULTS VISIBILITY */

.results-hidden {
  display: none;
}

.results-visible {
  display: block;
}

/* UTILITIES */

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

.muted {
  color: var(--text-muted);
}

/* FOOTER */

.footer {
  padding: 0.2rem 0 0.2rem;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem 1.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* KEYBOARD HINT (if used later) */

kbd {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.7rem;
  font-family: inherit;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-muted);
}

/* Support block */

.support-block {
  margin: auto auto 4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.support-block p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

@media (max-height: 600px) {
  .wrap {
    padding-top: 2.5rem;            /* bring card up a bit */
  }

  .support-block {
    margin-top: 1.5rem;             /* no longer auto – allow it closer */
    margin-bottom: 2rem;            /* less gap above footer */
  }
}


.support-btn {
  color: rgba(229, 240, 255, 0.88);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28); /* same as .btn-primary */
  opacity: 1; /* remove dimming */
  text-decoration: none;
}

.support-btn:hover {
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.25); /* still subtle */
  opacity: 1;
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
