:root {
  --bg:          #fdf6ff;
  --bg2:         #f5eaff;
  --card:        #ffffff;
  --ink:         #1a0a2e;
  --ink-soft:    #5c4a7a;
  --border:      rgba(196, 77, 255, 0.14);
  --coral:       #ff6b9d;
  --lavender:    #c44dff;
  --mint:        #4ecdc4;
  --butter:      #ffd166;
  --sky:         #74c0fc;
  --rose:        #ff9fc6;
  --nav-bg:      rgba(253, 246, 255, 0.85);
  --card-shadow: 0 4px 24px rgba(196, 77, 255, 0.13);
  --radius:      18px;
  --star-clr:    rgba(196, 77, 255, 0.09);
}

html.dark {
  --bg:       #0e0820;
  --bg2:      #160d2e;
  --card:     #1c1038;
  --ink:      #f0e8ff;
  --ink-soft: #b09ec8;
  --border:   rgba(196, 77, 255, 0.22);
  --nav-bg:   rgba(14, 8, 32, 0.88);
  --card-shadow: 0 4px 28px rgba(196, 77, 255, 0.22);
  --star-clr: rgba(196, 77, 255, 0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.star-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-star {
  position: absolute;
  animation: float-star linear infinite;
  fill: var(--star-clr);
  filter: blur(0.3px);
}

@keyframes float-star {
  0%   { transform: translateY(0px) rotate(0deg);   }
  50%  { transform: translateY(-18px) rotate(20deg); }
  100% { transform: translateY(0px) rotate(0deg);   }
}

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav-logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--coral), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 99px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  background: rgba(196, 77, 255, 0.1);
  color: var(--lavender);
}

.theme-toggle {
  background: rgba(196, 77, 255, 0.1);
  border: 1.5px solid var(--border);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  margin-left: 4px;
}

.icon-toggle {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.theme-toggle:hover {
  background: rgba(196, 77, 255, 0.2);
  transform: scale(1.1) rotate(20deg);
}

.nav-right-mobile {
  display: none;
  align-items: center;
  gap: 8px;
}

.hamburger {
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  z-index: 99;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 12px 24px 20px;
  gap: 4px;
}

.mobile-menu.open { display: flex; }

.mob-link {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.mob-link:last-child { border-bottom: none; }

@media (max-width: 640px) {
  .nav-links     { display: none; }
  .nav-right-mobile { display: flex; }
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 128px 24px 72px;
  max-width: 780px;
  width: 100%;
}

.badge-pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--coral), var(--lavender));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 6px 20px;
  border-radius: 99px;
  margin-bottom: 28px;
}

.hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(3.8rem, 11vw, 6.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -1.5px;
  color: var(--ink);
  margin-bottom: 20px;
}

.accent {
  background: linear-gradient(135deg, var(--coral) 0%, var(--lavender) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 48px;
  font-weight: 600;
}

.bookmarklet-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.drag-hint {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--lavender);
  text-transform: uppercase;
}

.bookmarklet-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--coral), var(--lavender));
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem; 
  font-weight: 800;
  padding: 12px 54px; 
  border-radius: 99px;
  text-decoration: none;
  cursor: grab;
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.3); 
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  -webkit-user-drag: element;
}

.bookmarklet-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 40px rgba(196, 77, 255, 0.5);
}

.bookmarklet-btn:active { cursor: grabbing; transform: scale(0.98); }

.btn-star {
  font-size: 1.4rem;
  animation: spin-star 5s linear infinite;
  display: inline-block;
}

@keyframes spin-star {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.copy-btn {
  background: transparent;
  border: 2px solid var(--lavender);
  color: var(--lavender);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 24px;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.copy-btn:hover { background: var(--lavender); color: #fff; }
.copy-btn.copied { background: var(--mint); border-color: var(--mint); color: #fff; }

#sl-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--coral), var(--lavender));
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 13px 22px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(255, 107, 157, 0.5), 0 0 0 0 rgba(196, 77, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fab-pulse 3s ease-in-out infinite;
}

#sl-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 32px rgba(196, 77, 255, 0.55);
  animation: none;
}

#sl-fab:active {
  transform: scale(0.97);
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(255,107,157,.45), 0 0 0 0 rgba(196,77,255,.35); }
  50%       { box-shadow: 0 4px 24px rgba(255,107,157,.45), 0 0 0 10px rgba(196,77,255,0); }
}

@media (max-width: 480px) {
  #dl-fab .fab-label { display: none; }
  #dl-fab { padding: 14px; border-radius: 50%; }
}

.section {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1060px;
  padding: 72px 24px;
}

.section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  margin-bottom: 52px;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--card-shadow);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--coral), var(--lavender));
}

.step-card:hover { transform: translateY(-5px); border-color: var(--lavender); }

.step-num {
  font-family: 'Fraunces', serif;
  font-size: 3.8rem;
  font-weight: 700;
  color: var(--lavender);
  opacity: 0.16;
  line-height: 1;
  margin-bottom: 8px;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--card-shadow);
  border: 2px solid transparent;
  border-top: 4px solid var(--accent-clr, var(--lavender));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 36px rgba(196, 77, 255, 0.22);
}

.feature-emoji {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  color: var(--accent-clr, var(--lavender));
}

.feature-emoji svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.feature-desc em { font-style: italic; color: var(--ink); }

.feature-desc code {
  background: rgba(196, 77, 255, 0.12);
  color: var(--lavender);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.82em;
  font-family: 'Courier New', monospace;
}

.site-footer {
  width: 100%; 
  margin-top: auto; 
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 40px; 
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 10;
}

.footer-left, .footer-right {
  flex: 1;
}

.footer-center {
  flex: 2; 
  text-align: center;
}

.footer-left {
  text-align: left;
}

.footer-right {
  display: flex;
  justify-content: flex-end;
}

.footer-alter-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--coral);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer-alter-link:hover {
  color: #fff;
  filter: drop-shadow(0 0 8px var(--coral));
}

.alter-icon {
  margin-left: 4px;
}

.github-icon, .heart-icon, .alter-icon {
	color: var(--coral);
    transition: stroke 0.3s ease;
    vertical-align: middle;
}

.footer-link:hover { 
color: var(--lavender); 
}

.heart-icon:hover {
    animation: heartBeat 1s ease-in-out infinite;
    color: #ff85a1;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.25); } 
    30% { transform: scale(1); }  
    45% { transform: scale(1.15); } 
    100% { transform: scale(1); } 
}

.footer-copy { 
font-size: 0.78rem; color: var(--ink-soft); opacity: 0.55; 
}

@media (max-width: 600px) {
  .hero      { padding: 100px 20px 52px; }
  .section   { padding: 52px 20px; }
  .try-card  { padding: 36px 24px; }
  .bookmarklet-btn { font-size: 1.1rem; padding: 16px 28px; }
  .steps-row, .features-grid { grid-template-columns: 1fr; }
  .navbar    { padding: 0 20px; }
 .site-footer {
    flex-direction: column;
    gap: 24px;   
    padding: 40px 24px;
    text-align: center;
  }

  .footer-left, 
  .footer-center, 
  .footer-right {
    flex: none; 
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
  }

  .footer-q {
    margin-bottom: 0; 
  }

  .footer-by {
    margin-bottom: 8px; 
  }
  
  .footer-alter-link {
    justify-content: center;
    width: auto;
  }
}