/* PassForge — same design tokens as original */
:root {
  --background: hsl(220, 20%, 7%);
  --foreground: hsl(150, 60%, 90%);
  --card: hsl(220, 18%, 10%);
  --card-foreground: hsl(150, 40%, 88%);
  --primary: hsl(142, 72%, 50%);
  --primary-foreground: hsl(220, 20%, 7%);
  --muted: hsl(220, 14%, 14%);
  --muted-foreground: hsl(220, 10%, 50%);
  --accent: hsl(172, 66%, 50%);
  --accent-foreground: hsl(220, 20%, 7%);
  --border: hsl(150, 20%, 18%);
  --destructive: hsl(0, 72%, 51%);
  --glow-primary: 0 0 20px hsla(142, 72%, 50%, 0.3);
  --glow-accent: 0 0 20px hsla(172, 66%, 50%, 0.3);
  --glow-purple: 0 0 20px hsla(265, 75%, 62%, 0.3);
  --strength-weak: hsl(0, 72%, 51%);
  --strength-fair: hsl(35, 92%, 50%);
  --strength-good: hsl(54, 80%, 50%);
  --strength-strong: hsl(142, 72%, 50%);
  --button-green: hsl(146, 70%, 44%);
  --button-green-hover: hsl(146, 74%, 49%);
  --radius: 0.5rem;
}

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(
      circle at top center,
      hsl(220, 25%, 10%) 0%,
      hsl(220, 20%, 7%) 60%,
      hsl(220, 20%, 6%) 100%
    ),
    hsl(220, 20%, 6%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--foreground);
  font-family: "Space Grotesk", sans-serif;
  border-color: var(--border);
  display: flex;
  flex-direction: column;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.font-mono,
code {
  font-family: "JetBrains Mono", monospace;
}

/* Keep copy/select enabled only where output text should be copied. */
.api-key,
.output,
#hash-result,
#jwt-output,
#entropy-output,
#common-password-output,
#ip-info-output,
#json-output,
#generated-password,
#key-output,
#hash-generator-output,
#b64-output,
#hash-id-output,
#crypto-output,
input[readonly],
input[disabled] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--border);
  background: hsl(220, 18%, 10%);
  /*background: rgba(30, 35, 45, 0.9);*/
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
  font-weight: 700;
  font-size: 1.25rem;
  font-family: "JetBrains Mono", monospace;
}

.logo-icon {
  font-size: 2rem;
  color: transparent;
  /* hide fill */
  -webkit-text-stroke: 2px hsla(142, 72%, 50%, 0.8);
  /* green outline */
  text-shadow:
    0 0 5px hsla(142, 72%, 50%, 0.6),
    0 0 10px hsla(142, 72%, 50%, 0.5),
    0 0 15px hsla(142, 72%, 50%, 0.4);
  display: inline-block;
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 6px;
  box-shadow: 0 0 10px hsla(142, 72%, 50%, 0.22);
}

.logo-accent {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logout-form {
  margin: 0;
}

.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-btn {
  border: 1px solid rgba(142, 72%, 50%, 0.3);
  color: var(--primary);
}

.nav-btn:hover {
  background: rgba(142, 72%, 50%, 0.1);
}

.logout-btn {
  background: transparent;
  border-color: hsla(0, 72%, 51%, 0.45);
  color: hsl(0, 80%, 70%);
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.logout-btn:hover {
  background: hsla(0, 72%, 51%, 0.14);
  border-color: hsla(0, 80%, 62%, 0.6);
  color: hsl(0, 90%, 78%);
  box-shadow: 0 0 0 1px hsla(0, 80%, 62%, 0.2);
}

.logout-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsla(0, 80%, 62%, 0.3);
}

/* Main */
.main {
  min-height: calc(100vh - 4rem - 80px);
}

/* Page layout */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.index-page .hero {
  text-align: center;
  margin-bottom: 3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(142, 72%, 50%, 0.1);
  border: 1px solid rgba(142, 72%, 50%, 0.2);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  margin-bottom: 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--primary);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  margin: 0 0 1rem;
  color: var(--foreground);
}

.text-glow {
  text-shadow: 0 0 10px hsla(142, 72%, 50%, 0.5);
  color: var(--primary);
}

.hero-desc {
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Glow Effects */
.glow-green {
  box-shadow: var(--glow-primary);
}

.glow-cyan {
  box-shadow: var(--glow-accent);
}

.glow-purple {
  box-shadow: var(--glow-purple);
}

.glow-orange {
  box-shadow: 0 0 20px hsla(25, 95%, 53%, 0.3);
}

.glow-gray {
  box-shadow: 0 0 20px hsla(220, 14%, 71%, 0.3);
}

.glow-teal {
  box-shadow: 0 0 20px hsla(174, 71%, 41%, 0.3);
}

.glow-pink {
  box-shadow: 0 0 20px hsla(330, 81%, 60%, 0.3);
}

.glow-yellow {
  box-shadow: 0 0 20px hsla(45, 93%, 58%, 0.3);
}

.glow-blue {
  box-shadow: 0 0 20px hsla(210, 79%, 54%, 0.3);
}

.glow-indigo {
  box-shadow: 0 0 20px hsla(238, 84%, 67%, 0.3);
}

.glow-red {
  box-shadow: 0 0 20px hsla(0, 84%, 60%, 0.3);
}

.glow-lime {
  box-shadow: 0 0 20px hsla(82, 82%, 53%, 0.3);
}

.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    hsla(142, 72%, 50%, 0.03) 2px,
    hsla(142, 72%, 50%, 0.03) 4px
  );
  pointer-events: none;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.card-icon {
  font-size: 1.25rem;
  color: var(--primary);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  margin: 0;
  color: var(--foreground);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  font-family: "JetBrains Mono", monospace;
}

/* Tools grid */
.tools-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tools-grid.two-layout {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.tools-grid.three-layout {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Force single-column tools on smaller devices/tablets */
@media (max-width: 900px) {
  .index-page .tools-grid,
  .index-page .tools-grid.two-layout,
  .index-page .tools-grid.three-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Tool Card Internal Structure */
.tool-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tool-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-output-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tool-controls .btn {
  flex: 1;
  min-width: 0;
}

.tool-controls .btn-sm {
  flex: 0 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tools-grid.two-layout,
  .tools-grid.three-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tool-controls {
    flex-direction: column;
  }

  .tool-controls .btn {
    width: 100%;
  }

  .tool-controls .btn-sm {
    width: auto;
  }

  .card {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .tool-input-group,
  .tool-output-group {
    gap: 0.5rem;
  }

  .tool-controls {
    gap: 0.25rem;
  }
}

.input-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 1rem;
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(142, 72%, 50%, 0.2);
}

.input-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 0.25rem;
}

.input-toggle:hover {
  color: var(--primary);
}

.meter-wrap {
  margin-bottom: 0.75rem;
}

.meter-bar {
  display: flex;
  gap: 2px;
  height: 8px;
}

.meter-seg {
  flex: 1;
  border-radius: 9999px;
  background: var(--muted);
  transition: background 0.3s;
}

.meter-seg.strength-weak {
  background: var(--strength-weak);
}

.meter-seg.strength-fair {
  background: var(--strength-fair);
}

.meter-seg.strength-good {
  background: var(--strength-good);
}

.meter-seg.strength-strong {
  background: var(--strength-strong);
}

.strength-label {
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 0.75rem;
}

.strength-label.strength-weak {
  color: var(--strength-weak);
}

.strength-label.strength-fair {
  color: var(--strength-fair);
}

.strength-label.strength-good {
  color: var(--strength-good);
}

.strength-label.strength-strong {
  color: var(--strength-strong);
}

.feedback-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-family: "JetBrains Mono", monospace;
}

.feedback-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.bullet {
  color: var(--primary);
}

.input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.input-row .input {
  flex: 1;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-accent {
  background: var(--button-green);
  color: var(--accent-foreground);
  box-shadow: 0 0 14px hsla(146, 80%, 52%, 0.4);
}

.btn-accent:hover {
  background: var(--button-green-hover);
  box-shadow: 0 0 20px hsla(146, 90%, 58%, 0.58);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  border-color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
  text-decoration: none;
}

.btn-ghost:hover {
  color: var(--destructive);
}

.hash-result {
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: "JetBrains Mono", monospace;
  margin-top: 0.5rem;
}

.hash-result.found {
  background: hsla(142, 72%, 50%, 0.1);
  border: 1px solid hsla(142, 72%, 50%, 0.3);
}

.hash-result.not-found {
  background: hsla(0, 72%, 51%, 0.1);
  border: 1px solid hsla(0, 72%, 51%, 0.3);
  color: var(--destructive);
}

.hash-result .muted {
  color: var(--muted-foreground);
}

/* Ad space */
.ad-space {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  background: hsl(220, 18%, 8%);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  margin: 4rem 0;
}

.ad-space span {
  color: rgba(220, 10%, 50%, 0.4);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Features */
.features {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.section-title .accent {
  color: var(--primary);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: hsla(142, 72%, 50%, 0.4);
}

.feature-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.feature-title {
  font-size: 0.875rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  margin: 0 0 0.25rem;
  color: var(--foreground);
}

.feature-desc {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin: 0;
}

.construction-pill {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-left: 0.4rem;
}

.construction-output {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  background: hsla(220, 14%, 14%, 0.55);
}

.index-rate-popup {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(360px, calc(100vw - 2rem));
  z-index: 1200;
  border: 1px solid hsla(0, 80%, 62%, 0.6);
  background: linear-gradient(
    180deg,
    hsla(220, 18%, 12%, 0.96),
    hsla(220, 18%, 9%, 0.98)
  );
  box-shadow: 0 12px 34px hsla(0, 72%, 40%, 0.25);
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  color: hsl(0, 90%, 86%);
  font-family: "JetBrains Mono", monospace;
}

.index-rate-popup strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 0.32rem;
  color: hsl(0, 95%, 82%);
}

.index-rate-popup p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: hsl(0, 75%, 84%);
}

.auth-popup.success {
  border-color: hsla(142, 72%, 50%, 0.6);
  box-shadow: 0 12px 34px hsla(142, 72%, 40%, 0.25);
}

.auth-popup.success strong,
.auth-popup.success p {
  color: hsl(142, 80%, 84%);
}

.auth-popup.warning {
  border-color: hsla(45, 95%, 56%, 0.7);
  box-shadow:
    0 12px 34px hsla(45, 95%, 45%, 0.3),
    0 0 18px hsla(45, 95%, 56%, 0.35);
}

.auth-popup.warning strong,
.auth-popup.warning p {
  color: hsl(48, 100%, 82%);
}

.auth-popup.rate-limit {
  border-color: hsla(0, 88%, 62%, 0.75);
  box-shadow:
    0 12px 34px hsla(0, 78%, 42%, 0.34),
    0 0 18px hsla(0, 90%, 62%, 0.32);
}

.auth-popup.rate-limit strong,
.auth-popup.rate-limit p {
  color: hsl(0, 96%, 86%);
}

/* Footer */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-family: "JetBrains Mono", monospace;
  margin: 0;
}

@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 1rem;
    text-align: center;
  }

  .footer-section h4 {
    margin-bottom: 0.6rem;
    font-size: 0.82rem;
  }

  .footer-links li {
    margin-bottom: 0.35rem;
  }

  .footer-links a {
    font-size: 0.84rem;
  }

  .footer-bottom {
    margin-top: 1.2rem;
    padding-top: 1rem;
  }
}

/* Docs */
.docs-page .page-title {
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
}

.page-desc {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.docs-page .card {
  margin-bottom: 1.5rem;
}

.subtitle {
  font-size: 0.875rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  margin: 1rem 0 0.5rem;
  color: var(--foreground);
}

.code-block {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.code-block code {
  white-space: pre;
}

@media (max-width: 768px) {
  .code-block {
    font-size: 0.8rem;
    padding: 0.75rem;
  }
}

.link {
  color: var(--primary);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* Login */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem;
}

.login-card {
  max-width: 28rem;
  width: 100%;
  text-align: center;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

.login-title {
  font-size: 1.125rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 1rem;
}

.login-note {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

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

.small {
  font-size: 0.75rem;
}

/* Dashboard */
.dashboard-page .page-title {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.dashboard-page .card {
  margin-bottom: 1.5rem;
}

/* Plans Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: stretch;
}

.plan-features {
  margin: 1rem 0;
}

.plan-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 1rem 0;
}

.plan-period {
  font-size: 1rem;
  color: var(--muted-foreground);
  font-weight: 400;
}

.plan-per-day {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  font-weight: 500;
  margin-left: 0.35rem;
}

.plan-note {
  margin: -0.2rem 0 0.9rem;
  font-size: 0.82rem;
  color: hsl(46, 95%, 62%);
  font-family: "JetBrains Mono", monospace;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.feature-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 1.5rem;
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

.feature-list li:last-child {
  border-bottom: none;
}

.current-plan-badge {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.plan-activated {
  animation: planActivatedPulse 2.2s ease-out;
}

@keyframes planActivatedPulse {
  0% {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
      0 0 0 0 rgba(14, 243, 157, 0.75),
      0 0 34px rgba(14, 243, 157, 0.48);
  }
  45% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 10px rgba(14, 243, 157, 0),
      0 0 26px rgba(14, 243, 157, 0.32);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: inherit;
  }
}

.plan-badge-popular,
.plan-badge-enterprise {
  margin-left: auto;
  border-radius: 9999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.plan-badge-popular {
  background: hsla(146, 85%, 56%, 0.2);
  border: 1px solid hsla(146, 85%, 56%, 0.45);
  color: hsl(146, 92%, 76%);
}

.plan-badge-enterprise {
  background: hsla(44, 90%, 58%, 0.2);
  border: 1px solid hsla(44, 90%, 58%, 0.45);
  color: hsl(47, 95%, 74%);
}

.plan-card-pro {
  transform: scale(1.05);
  z-index: 2;
  box-shadow:
    0 0 28px hsla(265, 80%, 62%, 0.38),
    0 22px 38px hsla(220, 24%, 4%, 0.5);
}

.plan-card-enterprise {
  transform: scale(1.11) translateY(-8px);
  z-index: 3;
  border: 1px solid hsla(45, 92%, 60%, 0.55);
  box-shadow:
    0 0 35px hsla(45, 95%, 58%, 0.44),
    0 30px 52px hsla(220, 22%, 4%, 0.62);
}

/* Usage Stats */
.usage-stats {
  margin-top: 1rem;
}

.usage-bar {
  width: 100%;
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* API Key Row */
.api-key-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.api-key {
  background: var(--muted);
  padding: 0.75rem;
  border-radius: var(--radius);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  word-break: break-all;
  flex: 1;
  min-width: 200px;
}

.btn-success {
  background: var(--primary) !important;
  color: var(--primary-foreground) !important;
  border-color: var(--primary) !important;
}

.plan-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-plan {
  text-transform: uppercase;
  background: hsla(142, 72%, 50%, 0.1);
  border: 1px solid hsla(142, 72%, 50%, 0.3);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
}

@media (max-width: 1024px) {
  .plan-card-pro,
  .plan-card-enterprise {
    transform: none;
  }
}

.api-key-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.api-key {
  flex: 1;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-code {
  color: var(--primary);
}

.usage {
  font-size: 1.875rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  margin: 0;
}

.usage .muted {
  font-size: 0.875rem;
  margin-left: 0.25rem;
}

/* 404 */
.not-found-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.nf-box {
  text-align: center;
}

.nf-title {
  font-size: 4rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.nf-desc {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.nf-box .link {
  font-size: 1rem;
}

/* Tools on index */
.three-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  /* centers whole block */
}

.box {
  background: var(--card);
  padding: 20px;
  border-radius: 10px;
}

/* Make third section centered below */
.centered {
  grid-column: 1 / span 2;
  /* takes full width */
  justify-self: center;
  /* centers it horizontally */
  width: 50%;
  /* adjust width as needed */
}

@media (max-width: 900px) {
  .index-page .tools-grid.three-layout {
    grid-template-columns: 1fr !important;
    max-width: 100%;
  }

  .index-page .tools-grid.three-layout .centered {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
  }
}

.password-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 0;
}

.password-card {
  width: 80%;
  max-width: 420px;
  padding: 32px;
  background: var(--card);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.label {
  font-size: 13px;
  opacity: 0.7;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 10px 40px 10px 14px;
  font-size: 14px;
  font-weight: 500;

  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background-color: #111;
  color: #fff;

  cursor: pointer;
  transition: all 0.2s ease;

  /* Custom arrow */
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.select:hover {
  border-color: #555;
}

.select:focus {
  outline: none;
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

.input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: stretch;
}

#generated-password {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 10px;
  /* ↑ slightly more vertical padding */
  line-height: 1.4;
  /* ↑ makes underscore sit better */
  font-size: 15px;
  /* optional but helps */
  background: #1f2430;
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  color: #00ffae;
  font-family: monospace;
  margin-top: 2px;
  margin-bottom: 2px;
}

.icon-btn {
  padding: 8px 10px;
  background: #1f2430;
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: 0.2s ease;
}

.icon-btn:hover {
  background: #2a2f3a;
}

@media (max-width: 600px) {
  .password-card .input-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "password password"
      "copy refresh";
  }

  .password-card #generated-password {
    grid-area: password;
    font-size: 14px;
  }

  .password-card #copy-btn {
    grid-area: copy;
    width: 100%;
  }

  .password-card #refresh-btn {
    grid-area: refresh;
    width: 100%;
  }
}

.strength-info {
  font-size: 13px;
  color: #00ffae;
}

.explanation {
  font-size: 12px;
  opacity: 0.6;
  line-height: 1.4;
}

.entropy-box {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entropy-calc-color {
  color: var(--primary);
}

.entropy-info {
  font-size: 13px;
  margin-top: 6px;
  opacity: 0.85;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feedback-list li {
  font-size: 13px;
  opacity: 0.9;
}

.feedback-list .entropy-line {
  color: #00ffae;
}

.feedback-list .entropy-line:first-of-type {
  margin-top: 6px;
}

/* Login page adjustments */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  /* full screen height */
  padding: 2rem;
}

.login-card {
  max-width: 360px;
  /* proper card width */
  width: 100%;
  text-align: center;
  padding: 2.5rem 2rem;
  /* more breathing room */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  /* space between child elements */
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* vertical spacing between label/input if added */
  margin-bottom: 2vh;
}

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(142, 72%, 50%, 0.1);
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  font-family: "JetBrains Mono", monospace;
}

#submit-btn {
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

/* Modern Login + 404 refinements */
.login-page {
  min-height: calc(100vh - 4rem - 80px);
}

.login-card-modern {
  max-width: 430px;
  border: 1px solid hsla(142, 72%, 50%, 0.28);
  box-shadow:
    0 0 22px hsla(142, 72%, 50%, 0.24),
    0 0 56px hsla(172, 66%, 50%, 0.08);
}

.login-subtitle {
  margin: -0.6rem 0 0.1rem;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.5;
}

.full-width {
  width: 100%;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.switch-text {
  margin: 0.75rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.86rem;
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  padding: 0;
  margin-left: 0.2rem;
}

.link-btn:hover {
  text-decoration: underline;
}

.nf-card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  border: 1px solid hsla(210, 79%, 54%, 0.3);
  box-shadow: 0 0 22px hsla(210, 79%, 54%, 0.22);
}

.nf-title {
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 0.6rem;
}

.nf-desc {
  margin-bottom: 1.25rem;
}

.nf-actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
