/* VaultMint — Main Styles */

:root {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --text: #111827;
  --heading: #101828;
  --muted: #667085;
  --border: #e4e7ec;
  --input: #f8fafc;
  --accent: #635bff;
  --accent-2: #7c3aed;
  --success: #16a34a;
  --bar: #e5e7eb;
  --shadow: 0 18px 60px rgba(16, 24, 40, 0.10);
}

html[data-theme="dark"] {
  --bg: #090b10;
  --surface: rgba(18, 21, 29, 0.94);
  --surface-solid: #12151d;
  --text: #f4f6fa;
  --heading: #ffffff;
  --muted: #aab3c2;
  --border: #2b313d;
  --input: #0e1118;
  --accent: #8178ff;
  --accent-2: #a855f7;
  --success: #4ade80;
  --bar: #303641;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 5%, rgba(99, 91, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 85% 10%, rgba(168, 85, 247, 0.10), transparent 25rem),
    var(--bg);
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

h1, h2, h3, strong {
  color: var(--heading);
}

.app {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 22px;
  box-shadow: 0 10px 25px rgba(99, 91, 255, 0.25);
}

.brand h1 {
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.4px;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  backdrop-filter: blur(14px);
  transition: 0.2s;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero h2 {
  color: var(--heading);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  margin: 0 0 10px;
  letter-spacing: -1.8px;
}

.hero p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

.layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  min-width: 0;
}

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.password-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  contain: layout;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 8px 8px 8px 16px;
  margin-bottom: 15px;
}

.password {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  font-family: "SFMono-Regular", Consolas, monospace;
  color: var(--text);
  font-size: clamp(16px, 2.2vw, 21px);
  font-weight: 650;
  letter-spacing: 0.3px;
  padding: 10px 0;
  scrollbar-width: none;
}

.password::-webkit-scrollbar {
  display: none;
}

.small-action {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  transition: 0.2s;
}

.small-action:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.strength-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 0 2px 8px;
}

.strength-name {
  color: var(--heading);
  font-weight: 750;
  font-size: 14px;
}

.entropy {
  color: var(--muted);
  font-size: 12px;
}

.meter {
  height: 7px;
  background: var(--bar);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 9px;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 0.3s, background 0.3s;
}

.feedback {
  color: var(--muted);
  font-size: 12px;
  min-height: 18px;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 20px 0 12px;
}

.section-title strong {
  color: var(--heading);
  font-size: 14px;
}

.length-value {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.range-wrap {
  background: var(--input);
  border: 1px solid var(--border);
  padding: 13px 14px;
  border-radius: 15px;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 13px;
}

.switch {
  position: relative;
  width: 39px;
  height: 22px;
  flex: 0 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: var(--bar);
  border-radius: 99px;
  transition: 0.2s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 3px #0002;
}

.switch input:checked + .slider {
  background: var(--accent);
}

.switch input:checked + .slider::before {
  transform: translateX(17px);
}

.templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template {
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 650;
  transition: 0.2s;
}

.template:hover,
.template.active {
  border-color: var(--accent);
  color: var(--accent);
}

.note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.note b {
  color: var(--heading);
}

.side h3 {
  color: var(--heading);
  margin: 0 0 5px;
  font-size: 17px;
}

.side .sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.stat {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 14px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}

.stat strong {
  color: var(--heading);
  font-size: 17px;
}

.check-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.check i {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: rgba(22, 163, 74, 0.13);
  color: var(--success);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
}

.bottom-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  border: 0;
  border-radius: 15px;
  padding: 13px 16px;
  font-weight: 750;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  flex: 1;
  box-shadow: 0 10px 25px rgba(99, 91, 255, 0.20);
}

.btn-secondary {
  background: var(--input);
  border: 1px solid var(--border);
  color: var(--text);
  width: 52px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--heading);
  color: var(--bg);
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 750;
  box-shadow: var(--shadow);
  transition: 0.25s;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 25px;
}

@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side {
    margin-bottom: 76px;
  }
}

@media (max-width: 560px) {
  .app {
    width: calc(100% - 20px);
    max-width: 540px;
    padding: 18px 0 18px;
  }

  .layout,
  .card,
  .side {
    min-width: 0;
    max-width: 100%;
  }

  .hero {
    margin-bottom: 22px;
  }

  .hero h2 {
    font-size: 34px;
  }

  .card {
    padding: 16px;
    border-radius: 20px;
  }

  .password-box {
    min-height: 56px;
    padding-left: 12px;
  }

  .password {
    font-size: 15px;
    letter-spacing: 0;
  }

  .small-action {
    width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0;
  }

  .small-action span {
    display: none;
  }

  .options {
    grid-template-columns: 1fr;
  }

  .bottom-actions {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-width: calc(100vw - 20px);
    z-index: 10;
    margin: 0;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  }

  .btn {
    min-height: 48px;
  }

  .btn-primary {
    min-width: 0;
    white-space: nowrap;
  }

  footer {
    padding-bottom: 76px;
  }
}


footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 750;
}

footer a:hover {
  text-decoration: underline;
}

/* SEO content */
.seo-content {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.seo-content h2 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 22px;
  letter-spacing: -0.5px;
}

.seo-content > p {
  max-width: 850px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.seo-grid article {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--input);
}

.seo-grid h3 {
  margin: 0 0 6px;
  color: var(--heading);
  font-size: 14px;
}

.seo-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 560px) {
  .seo-content {
    padding: 18px;
    border-radius: 20px;
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }
}
