@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@900&family=Inter:ital,wght@0,400;0,700;0,900;1,400&display=swap');

:root {
  --vocab-blue: #0066ff;
  --vocab-yellow: #ffff00;
  --vocab-pink: #ff00ff;
  --vocab-green: #00ff66;
}

/* =========================
   Vocab Reading Typography
   ========================= */

.vocab-single {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #111;
}

/* Paragraph spacing */
.vocab-single p {
  margin: 1.3rem 0;
}

/* Headings */
.vocab-single h1,
.vocab-single h2,
.vocab-single h3 {
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  margin: 3rem 0 1.2rem;
  line-height: 1.15;
}

/* Lists */
.vocab-single ul,
.vocab-single ol {
  margin: 1.2rem 0 1.2rem 1.5rem;
}

.vocab-single li {
  margin: 0.6rem 0;
}

/* Blockquotes */
.vocab-single blockquote {
  border-left: 4px solid var(--vocab-blue);
  padding: 1rem;
  margin: 2rem 0;
  font-style: italic;
  background: rgba(0, 102, 255, 0.05);
}

/* Links */
.vocab-single a {
  color: var(--vocab-blue);
  font-weight: 700;
  text-decoration: underline;
}

/* =========================
   Brutalist Cards
   ========================= */

.brutalist-card {
  background: white;
  border: 4px solid black;
  box-shadow: 8px 8px 0 black;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.15s;
  overflow: hidden;
}

.brutalist-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0 var(--vocab-blue);
}

.card-image {
  height: 180px;
  width: 100%;
  background-size: cover;
  background-position: center;
  border-bottom: 4px solid black;
  position: relative;
}

.sticker {
  background: white;
  color: black;
  padding: 4px 10px;
  font-weight: 900;
  font-size: 11px;
  border: 2px solid black;
  display: inline-block;
  transform: rotate(-1deg);
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
}

.vocab-badge-inline {
  background: var(--vocab-yellow);
  color: black;
  padding: 2px 6px;
  font-weight: 700;
  font-style: italic;
  font-size: 12px;
  border: 1px solid black;
  display: inline-block;
}

/* =========================
   Interactive Vocabulary
   ========================= */

.vocab-single .learn-word {
  background-color: rgba(0, 102, 255, 0.12);
  border-bottom: 3px solid var(--vocab-blue);
  font-weight: 700;
  cursor: pointer;
  position: relative;
  padding: 0 3px;
  display: inline-block;
  transition: background-color 0.2s, color 0.2s;
}

.vocab-single .learn-word:hover {
  background-color: var(--vocab-blue);
  color: white;
  border-bottom-color: black;
}

/* Tooltip */
.vocab-single .word-tooltip {
  display: none; /* hidden by default */
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  max-width: 260px;
  background: black;
  color: white;
  padding: 16px;
  border: 3px solid var(--vocab-yellow);
  z-index: 9999;
  font-size: 13px;
  font-weight: 400;
  box-shadow: 1px 1px 0 var(--vocab-blue);
  pointer-events: auto;
}

/* tooltip visible on hover */
.vocab-single .learn-word:hover .word-tooltip {
  display: block;
}

/* Tooltip animation */
@keyframes popIn {
  from { transform: translateX(-50%) scale(0.85); opacity: 0; }
  to   { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* Tooltip container must be relative */
.vocab-single .word-tooltip {
  position: relative; /* already set */
}

/* Share button pops out at bottom-right */
.vocab-single .word-tooltip .share-word-btn {
  position: absolute;
  bottom: -10px;   /* negative to make it “outside” tooltip */
  right: -10px;    /* slight right offset */
  padding: 3px 3px;
  font-size:11px;
  background-color: #25D366; /* WhatsApp green */
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  transition: background-color 0.2s, transform 0.1s;
  z-index: 10;
}

/* Hover effect */
.vocab-single .word-tooltip .share-word-btn:hover {
  background-color: #128C7E;
  transform: scale(1.05);
}

/* Optional: small icon before text */
.vocab-single .word-tooltip .share-word-btn::before {
    /* link emoji to make it more noticeable */
  font-size: 7px;
}

/* Close button */
.tooltip-close-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  background: transparent;
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

/* Tooltip */
.vocab-single .word-tooltip {
  display: none; /* hidden initially */
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  background: black;
  color: white;
  padding: 16px;
  border: 3px solid var(--vocab-yellow);
  z-index: 9999;
  font-size: 13px;
  font-weight: 400;
  box-shadow: 2px 2px 0 var(--vocab-blue);
  pointer-events: auto;
}


@keyframes popIn {
  from { transform: translateX(-50%) scale(0.85); opacity: 0; }
  to   { transform: translateX(-50%) scale(1); opacity: 1; }
}

.word-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -10px;
  border-width: 10px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}


/* =========================
   Controls & UI
   ========================= */

.vocab-single .filter-btn {
  border: 3px solid black;
  padding: 10px 20px;
  font-weight: 900;
  background: white;
  cursor: pointer;
  box-shadow: 4px 4px 0 black;
  transition: transform 0.1s, box-shadow 0.1s;
}

.vocab-single .filter-btn.active {
  background: black;
  color: white;
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* Reading Overlay */
#reading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: white;
  z-index: 500;
  overflow-y: auto;
}


/* Progress Bar - positioned below header with shadow and gradient */
.progress-bar {
  height: 8px;
  background: #ddd;
  width: 100%;
  position: fixed;
  top: 52px; /* adjust to match your header height */
  left: 0;
  z-index: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* subtle shadow */
  border-radius: 4px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 4px;
  /* subtle gradient for a dynamic look */
  background: linear-gradient(90deg, var(--vocab-blue) 0%, #3399ff 50%, var(--vocab-blue) 100%);
}

/* Mastered Counter - small and minimalistic */
.vocab-single .mastered-count {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background: var(--vocab-green);
  border: 2px solid black;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 3px 3px 0 black;
  border-radius: 4px;
  z-index: 1000;
  text-align: center;
}

/* =========================
   Scrollbar
   ========================= */

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
  background: black;
  border: 3px solid #f0f0f0;
  border-radius: 10px;
}

/* =========================
   Mobile Tweaks
   ========================= */

@media (max-width: 600px) {
  .vocab-single {
    font-size: 1rem;
    padding: 1.5rem 1.2rem;
  }

  .vocab-single .word-tooltip {
    width: 180px;
    font-size: 12px;
  }
}

/* ==========================================================================
   SINGLE ARTICLE READ PAGE (single.html only)
========================================================================== */

.read-page-wrapper {
  padding: 60px 20px;
  min-height: 100vh;
  background: #f0f0f0;
}

.article-sheet {
  max-width: 850px;
  margin: 0 auto;
  background: white;
  border: 4px solid black;
  box-shadow: 2px 2px 0 black;
  padding: 60px;
}

@media (max-width: 768px) {
  .article-sheet {
    padding: 30px 20px;
    border-width: 3px;
  }

  .read-page-wrapper {
    padding: 20px 10px;
  }
}

/* Header */
.article-header {
  margin-bottom: 40px;
  border-bottom: 2px solid #eee;
  padding-bottom: 30px;
}

.article-category-tag {
  background: var(--vocab-blue);
  color: #fff;
  display: inline-block;
  padding: 4px 12px;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.2em;
  margin-bottom: 15px;
}

.article-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.1;
  font-weight: 900;
  margin-bottom: 20px;
}

/* Featured image */
.article-featured-image {
  width: calc(100% + 40px);
  margin-left: -20px;
  border: 3px solid #000;
  margin-bottom: 40px;
}

.article-featured-image img {
  width: 100%;
  display: block;
}

/* PROSE */
.article-sheet .prose {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #334155;
}

.article-sheet .prose p {
  margin-bottom: 1.75rem;
}

.article-sheet .prose h2 {
  font-size: 1.75rem;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  font-weight: 900;
  border-bottom: 4px solid var(--vocab-blue);
  display: inline-block;
  padding-bottom: 4px;
}

.article-sheet .prose h3 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.article-sheet .prose blockquote {
  margin: 3rem 0;
  padding: 30px;
  background: rgba(255, 0, 0, 0.05);
  border: 2px dashed var(--vocab-blue);
}

.article-sheet .prose blockquote p {
  font-style: italic;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
}

/* Footer */
.article-footer {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 4px solid #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.meta-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--vocab-blue);
}

.meta-value {
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
}

/* Share strip */
.share-strip-button {
  display: inline-flex;
  align-items: center;
  background: #000;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 var(--vocab-blue);
  transition: all 0.2s ease;
}

.share-strip-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--vocab-blue);
}

.share-label {
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 0 16px;
}

.share-icons {
  display: flex;
  background: #fff;
  border-left: 2px solid #000;
}

.share-icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-weight: 900;
  transition: background 0.2s;
}

.share-icon-btn:hover {
  background: var(--vocab-blue);
  color: #fff;
}

.article-sheet,
.vocab-single,
.prose {
  overflow: visible;
}
