/* ===== Design tokens ===== */
:root{
  --brand: #2f74ff;          /* blue */
  --brand-dark:#1f5ae0;
  --bg1: #f4f7ff;
  --bg2: #eef3ff;
  --ink: #0f172a;
  --muted:#64748b;
  --card:#ffffff;
  --border:#e5e7eb;
  --ring: rgba(47,116,255,.25);
  --radius: 18px;
  --shadow: 0 12px 30px rgba(15,23,42,.08);
}

/* ===== Base ===== */
html,body{height:100%;}
body{
  background:
    radial-gradient(1200px 800px at 10% -10%, var(--bg2), transparent),
    radial-gradient(1200px 800px at 100% 0%, var(--bg1), transparent),
    #f6f8ff;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 1200px 800px, 1200px 800px, auto;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header bar (keep padlock + blue) ===== */
.site-bar{
  background: var(--brand);
  color:#fff;
}
.site-bar a{ color:#fff; text-decoration:none; }
.site-bar .navbar-brand{ font-weight:800; letter-spacing:.3px; }
.site-bar .navbar{ padding-top:.65rem; padding-bottom:.65rem; }

.navbar-light .navbar-toggler-icon {
  background-image: var(--bs-navbar-toggler-icon-bg);
}

/* Sticky header + tighter height */
.ds-header {
  position: sticky;      /* stays at top while scrolling */
  top: 0;
  z-index: 1030;
  background: var(--card);
  box-shadow: 0 2px 8px rgba(15,23,42,.05);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* Control vertical padding (shrinks bar) */
.ds-header .wrap {
  padding-top: .75rem;   /* tighter than py-3 */
  padding-bottom: .75rem;
}

.ds-header.is-stuck {
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
}

.site-logo {
  font-weight: 700;
  font-size: 1.5rem; /* slightly larger than body */
  color: var(--brand);
  letter-spacing: 0.3px;
}

.site-logo:hover {
  color: var(--brand-dark);
}

.site-logo i {
  color: var(--brand);
  font-size: 1.5rem;
}

.ds-header .nav-link {
  color: var(--brand);
  font-weight: 600;
  transition: color 0.2s ease-in-out;
  text-transform: uppercase;
}

.ds-header .nav-link:hover,
.ds-header .nav-link:focus {
  color: var(--brand-dark);
  text-decoration: none;
}

/* Global container */
.wrap{
  box-sizing: border-box;
  width: 100%;          /* fills available space */
  max-width: 980px;     /* caps at 980 on large screens */
  margin: 0 auto;
  padding: 0 16px;      /* safe gutters */
}

/* Header layout handled by Bootstrap navbar */

.container-980 { max-width: 980px; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  /* Tighter page gutters on mobile */
  .wrap {
    padding: 0 10px;
  }

  /* Reduce card padding on mobile */
  .card-elev {
    padding: 1rem !important;
  }

  /* Smaller hero text on mobile */
  .hero {
    margin-top: 16px;
    margin-bottom: 16px;
  }
  .hero h1 {
    font-size: 1.6rem;
    line-height: 1.15;
    margin-bottom: 0.6rem;
  }
  .hero p {
    font-size: 0.9rem;
  }
}

/* ===== Card ===== */
.card-elev{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== Hero ===== */
.hero{
  margin-top: 24px;
  margin-bottom: 26px;
}
.hero h1{
  font-weight: 800;
  letter-spacing: .2px;
  line-height:1.1;
  margin-bottom: 1rem;
}
.hero p{ color: var(--muted); margin: 0; }

/* ===== Form bits ===== */
.form-label{ font-weight:600; }
textarea.form-control{
  min-height: 200px;
  resize: vertical;
  border-radius: 14px;
}
textarea.form-control:focus{
  box-shadow: 0 0 0 .25rem var(--ring);
  border-color: var(--brand);
}
.help-muted{ color: var(--muted); font-size: 1rem; }

/* Brand button styling (matches the primary blue Generate Link) */
.btn-brand {
  background-color: #2962ff;       /* your primary blue */
  color: #fff !important;
  border: none;
  font-weight: 500;
  transition: background-color .2s ease, box-shadow .2s ease;
  padding: 0.5rem 1.2rem;
  border-radius: 0.6rem;
  font-size: 1rem;
}

.btn-brand-danger {
  border: none;
  font-weight: 500;
  transition: background-color .2s ease, box-shadow .2s ease;
    padding: 0.6rem 1.2rem;
  border-radius: 0.6rem;
  font-size: 1rem;
}

/* Force green success color when the button has both classes */
.btn-brand.btn-copied {
    background-color: #198754 !important; /* Bootstrap Success Green */
    border-color: #198754 !important;
    color: #fff !important;
    box-shadow: none !important; /* Remove the focus ring for a cleaner look */
}
  
.form-control[readonly] {
  background-color: #f8f9fa; /* Bootstrap’s disabled grey */
  opacity: 1;               /* prevent reduced contrast */
}

/* Active / pressed state */
.btn-brand:active,
.btn-brand:focus:active,
.btn-brand.active {
  background-color: var(--brand-dark);
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem var(--ring);
  transform: translateY(1px); /* subtle press effect */
}

.btn-brand:hover,
.btn-brand:focus {
  background-color: #1747d4;
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(41, 98, 255, 0.25);
}

.btn-brand:disabled {
  opacity: 0.65;
}

/* Footer */
.site-footer{
  color: var(--muted);
  font-size:.92rem;
}

main{ flex: 1 0 auto; }                     /* consume remaining space */
.site-footer{ margin-top: auto; }   

/* Small utility tweaks */
.copy-input{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

/* Remove overlay when revealed */
#preview-box:not(.ds-blur)::after {
  content: none;
}

/* When unblurred, still block selection/copy, keep pointer */
#preview-box:not(.ds-blur) {
  user-select: none;          /* still non-selectable */
  /* pointer-events: none;       /* prevent highlighting or context menu */
  cursor: pointer;            /* maintain pointer cursor */
}

#preview-box:not(.ds-blur) {
  filter: none;
  color: #111;
}

/* Match preview box styling with the top card */
.preview-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 1rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  background: #fff;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

/* Keep the blur box styling consistent inside the card */
.preview-card textarea {
  width: 100%;
  resize: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background-color: #fff;
  color: #111;
  min-height: 140px;
}

/* Reapply the blur effect */
.ds-blur {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  cursor: pointer;
  transition: filter .25s ease-in-out;
}

/* Overlay text hint */
.ds-blur::after {
  content: "Click Reveal to view text";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #555;
  background-color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
  border-radius: 0.5rem;
}

/* ===== Very narrow screens (< 365px) ===== */
@media (max-width: 364px) {

  /* Hide the padlock icon to save horizontal space */
  .site-logo i {
    display: none;
  }

  /* Smaller brand text so it fits beside the toggler */
  .site-logo {
    font-size: 1rem;
    letter-spacing: 0;
  }

  /* Tighten navbar padding */
  .ds-header .navbar {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  /* Hide New Secret CTA button even on very narrow - already hidden below lg */

  /* Minimal page gutters */
  .wrap {
    padding: 0 6px;
  }

  /* Even more compact card */
  .card-elev {
    padding: 0.75rem !important;
    border-radius: 12px;
  }

  /* Tighter hero */
  .hero {
    margin-top: 12px;
    margin-bottom: 12px;
  }
  .hero h1 {
    font-size: 1.35rem;
  }
  .hero p {
    font-size: 0.85rem;
  }

  /* Smaller form text */
  .form-label,
  .help-muted,
  .form-check-label {
    font-size: 0.85rem;
  }
}

/* ===== Off-canvas navigation ===== */
#siteNav .nav-link {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  transition: background 0.15s ease;
}
#siteNav .nav-link:hover {
  background: var(--bg1);
  color: var(--brand);
}