/* THEME v2 - Gen Z Edition */
:root {
  --color-bg: #ffffff;
  --color-text: #222;
  --color-primary: #1e90ff;
  --color-secondary: #20c997;
  --color-accent: #ff6b6b;
  --color-highlight-bg: #fff3cd;
  --color-highlight-border: #ffc107;
  --color-muted: #888;
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'Clash Display', sans-serif;
  --max-width: 900px;
  --spacing: 1rem;
  --radius: 12px;
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  margin: 0;
  padding: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--color-accent);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--color-primary);
}

h3 {
  font-size: 1.25rem;
  color: var(--color-secondary);
}

.section {
  margin-bottom: 4rem;
}

.title {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

#toc-toggle {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
}

#toc {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  z-index: 100;
  padding: 0.5rem 0.5rem;
  border-bottom: 2px solid var(--color-accent);
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}

#toc ul {
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  white-space: nowrap;
}

#toc a {
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius);
  background-color: #ffe3ec;
  font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

#toc a:hover {
  background-color: #f8bbd0;
}

.highlight {
  background-color: var(--color-highlight-bg);
  border-left: 4px solid var(--color-highlight-border);
  padding: 1rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-soft);
}

.btn {
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #17a589;
  transform: translateY(-1px);
}

.tldr {
  font-style: italic;
  font-size: 0.95rem;
  color: #d63384;
  margin-top: 1rem;
}

.share-btn {
  font-size: 1.15rem;
  padding: 0.65rem;
  border-radius: 50%;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-btn.twitter { background: #1DA1F2; }
.share-btn.facebook { background: #3B5998; }
.share-btn.linkedin { background: #0077B5; }

.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

.share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  #toc {
    display: none;
    position: fixed;
    bottom: 3.5rem;
    right: 1rem;
    width: 85vw;
    max-height: 70vh;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  #toc.show {
    display: block;
  }

  #toc ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  #toc-toggle {
    display: block;
  }
}

.dark-mode {
  --color-bg: #0d0d0d;
  --color-text: #e6e6e6;
  --color-highlight-bg: #1f1f1f;
  --color-highlight-border: #e0e057;
}

.dark-mode #toc {
  background: rgba(34, 34, 34, 0.9);
  border-bottom-color: #444;
}

.dark-mode .highlight {
  color: #fef6c5;
}

:focus {
  outline: 2px dashed var(--color-primary);
  outline-offset: 2px;
}

section.section {
  scroll-margin-top: 6rem;
}
@media (max-width: 600px) {
  #toc {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: #ffe3ec;
    padding: 0.5rem 1rem;
    border-radius: 16px;
    z-index: 9999;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    width: auto;
    overflow-x: auto;
    white-space: nowrap;
  }

  #toc ul {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
  }

  #toc li {
    display: inline;
  }

  #toc a {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
    background-color: #fbcfe8;
    color: #be185d;
    border-radius: 12px;
  }
}
