/* ============================================================================
   --- GLOBAL VARIABLES ---
============================================================================ */
:root {
  --page-gutter: clamp(2rem, 6vw, 80px);

  /* Colors (base palette) */
  --color-white: #fff;
  --color-black: #000;
  --color-grey0: #e3e3e3;
  --color-grey1: #aeaeae;
  --color-grey2: #808080;
  --color-grey3: #333;
  --color-warning: #e7a33c;
  --color-error: #e63420;
  --color-shadow: rgba(0, 0, 0, 0.25);
  --color-user-highlight: #e7a33c4d;
  --color-secondary: var(--color-white);
  --color-black-transp: rgba(0, 0, 0, 0.6);
  --color-black-transp-hover: rgba(0, 0, 0, 0.9);

  /* Typography */
  --font-main: 'IBM Plex Mono', monospace;
  --font-weight-light: 100;
  --font-weight-regular: 400;
  --font-weight-bold: 700;

  /* Sizing */
  --spacing-base: 1rem;
  --content-width: 40ch;
  --button-small-size: 35px;
  --scrollbar-width: 5px;

  /* Margins */
  --main-margin: 40px;
  --header-height: 90px;
  --footer-height: 100px;
  --history-footer-height: 110px;

  /* Borders */
  --border-width: 1px;
  --border-radius: 5px;
  --border-light: var(--border-width) solid var(--color-grey1);
  --border-dark: var(--border-width) solid var(--color-black);

  /* Transitions */
  --transition-fast: all 0.2s ease-in-out;
  --transition-medium: all 0.3s ease-in-out;
  --transition-color: color 0.5s ease;
}

/* ============================================================================
   --- GLOBAL STYLES ---
============================================================================ */

/* Add this rule */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Root html baseline */
html {
  align-items: center;
  font-size: 100%;
}

/* Page body layout & typography baseline */
body {
  min-height: calc(100dvh - var(--spacing-base));
  font-family: var(--font-main);
  font-size: 1rem;
  background-color: var(--color-white);
  color: var(--color-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.content-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Shared horizontal padding for main zones */
.main-content {
  width: 100%;
  padding-inline: var(--page-gutter);
}

/* ============================================================================
   --- LAYOUT ---
============================================================================ */

/* Container (page wrapper) */
.container {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--spacing-base) * 2);
  padding-top: var(--header-height);
  padding-bottom: var(--footer-height);
  width: 100%;
  max-width: 1200px;
}

/* Main content column */
.main-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Right/secondary sidebar panel */
.sidebar {
  width: var(--content-width);
  max-width: 100%;
  max-height: calc(var(--spacing-base) * 30);
  text-align: center;
  overflow-y: auto;
}

/* =====================================================================
   --- SITE HEADER ---
===================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  padding: 0 var(--page-gutter);
  background-color: var(--color-white);
  border-bottom: var(--border-light);
  z-index: 99;
  box-sizing: border-box;
  box-shadow: 0 2px 10px var(--color-shadow);
}


/* Style the login/logout link inside the #userStatus container */
.header-button a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0px 10px;
  text-decoration: none;
  color: var(--color-black);
  height: var(--button-small-size);
  transition: all 0.2s ease;
}

.title-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.title-wrapper h1.site-title {
  font-size: 1.8rem;
  font-weight: bold !important;
}

.header-button a:hover {
  background-color: var(--color-grey1);
}

.header-button a svg,
.header-button svg {
  width: 20px;
  height: 20px;
}

/* ============================================================================
   --- TYPOGRAPHY & CONTENT ---
============================================================================ */
.headline {
  font-size: 1rem;
  text-align: center;
  font-weight: var(--font-weight-regular);
  margin-bottom: calc(var(--spacing-base));
}

/* Main editable/preview text block */
.current-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: calc(var(--spacing-base)*2);
  font-weight: var(--font-weight-regular);
  min-width: 200px;
}
.current-text-section {
  width: 100%;
}

/* Scrollable variant of the text block */
.current-text.scrollable{
  width: 100%;
  text-align: justify;
  height: 200px;
  padding-right: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Wrapper for fade masks on scrollable content */
.text-wrapper {
  position: relative;
}

/* Top fade mask */
.text-wrapper.show-top-fade::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5rem;
  background: linear-gradient(to bottom, var(--color-white), transparent);
  pointer-events: none;
  z-index: 5;
}

/* Bottom fade mask */
.text-wrapper.show-bottom-fade::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5rem;
  background: linear-gradient(to top, var(--color-white), transparent);
  pointer-events: none;
  z-index: 5;
}

/* Sidebar list (history/tags/whatever) */
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Sidebar list item */
.sidebar li {
  padding-bottom: calc(var(--spacing-base) / 2);
  animation: fadeIn 0.5s ease-in-out;
  transition: var(--transition-color);
  word-wrap: break-word;
}

/* Placeholder/empty-state list item */
.sidebar li.placeholder {
  color: var(--color-grey1);
  font-style: italic;
  cursor: default;
}

.word-submit-details {
  color: var(--color-grey2);
  font-style: italic;
}

/* ============================================================================
   --- FORM & CONTROLS ---
============================================================================ */

.submission-out-section {
  width: 100%;
  padding: var(--spacing-base);
  border-top: var(--border-light);
  border-bottom: var(--border-light);
  border-color: var(--color-grey0);
}

.submission-in-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Submission area row (input + button) */
.submission-area {
  display: flex;
}

/* Text input styling */
.submission-area input {
  flex: 1;
  font-size: 0.9rem;
  font-family: inherit;
  padding: calc(var(--spacing-base) / 2);
  border: var(--border-light);
  border-radius: var(--border-radius);
  margin-right: calc(var(--spacing-base) / 2);
  transition: var(--transition-fast);
}

/* Input focus/hover state */
.submission-area input:focus,
.submission-area input:hover {
  outline: none;
  border-color: var(--color-black);
}

/* Input placeholder color */
.submission-area input::placeholder {
  color: var(--color-grey2);
  opacity: 1;
}

/* Primary submit button */
.submit-button {
  font-family: inherit;
  font-size: 0.9rem;
  font-feature-settings: "tnum";
  padding: calc(var(--spacing-base) / 2) calc(var(--spacing-base) * 1.5);
  border: var(--border-dark);
  border-radius: var(--border-radius);
  background-color: var(--color-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  width: 80px;
  text-align: center;
}

/* Submit button hover (pointer devices) */
@media (hover: hover) {
  .submit-button:hover {
    background-color: var(--color-black);
    color: var(--color-white);
  }
}

/* Submit button active/press state */
.submit-button:active {
  transform: scale(0.9);
  background-color: var(--color-grey3);
}

/* Inline style button row (B / I / U) */
.style-options {
  margin-top: var(--spacing-base);
  display: flex;
  gap: calc(var(--spacing-base) / 2);
  align-items: center;
}

/* Inline style button base */
.style-btn {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--color-black);
  background-color: var(--color-white);
  border: var(--border-light);
  border-radius: var(--border-radius);
  width: var(--button-small-size);
  height: var(--button-small-size);
  cursor: pointer;
  transition: var(--transition-fast);
}

/* Variant indicators */
.style-btn[data-style="bold"] { font-weight: var(--font-weight-bold); }
.style-btn[data-style="italic"] { font-style: italic; }
.style-btn[data-style="underline"] { text-decoration: underline; }
.style-btn[data-style="newline"] { font-size: 1.2rem; }

/* Style button hover/active */
.style-btn:hover {
  border-color: var(--color-black);
}
.style-btn.active {
  color: var(--color-white);
  background-color: var(--color-black);
  border-color: var(--color-black);
  border-width: var(--border-width);
}

/* ============================================================================
   --- IMAGE DISPLAYS ---
============================================================================ */

/* Main Page - Latest Image */
.image-container {
  width: 100%;
  max-width: var(--content-width);
  margin-bottom: 3rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 15px var(--color-shadow);
  aspect-ratio: 1 / 1;
  background-color: var(--color-white);
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  box-shadow: none;
}

.image-marker {
  display: none;
}

/* Placeholder text when no image is available */
.image-placeholder-text,
.image-generating-text {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: var(--color-grey3);
  font-size: 0.9rem;
  text-align: center;
  user-select: none;
}

/* History Page - Chunk Image */
.chunk-image {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  box-shadow: none;
  align-self: center;
}

/* Allows to align the x vutton on the top right of the image */
.image-modal-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
  pointer-events: auto;
}

/* Make the image modal content area larger and responsive */
.modal-content.image-modal-content {
  background: transparent;
  max-width: 90vw;
  max-height: 85vh;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

/* Style the image itself within the modal */
.image-modal-content img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  box-shadow: none;
  border-radius: var(--border-radius);
}

/* Style for the "View Full Resolution" button */
.full-res-btn {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  background-color: var(--color-black-transp);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.8rem;
  transition: background-color 0.2s ease;
  opacity: 0.8;
  pointer-events: auto;
}

.full-res-btn:hover {
  background-color: var(--color-black-transp-hover);
  opacity: 1;
}

/* Seal timer on the main page */
.seal-timer-container {
  font-size: 0.9rem;
  color: var(--color-grey2);
  text-align: center;
  margin: -2.5rem 0 2rem 0;
  height: 1rem;
}

/* =====================================================================
   --- NAV BUTTONS ---
===================================================================== */

/* History navigation controls row */
.history-nav{
  display:flex;
  gap:.5rem;
  justify-content:center;
  align-items:center;
  margin: .5rem 0 1rem 0;
}

/* Navigation arrow buttons */
.nav-arrow{
  appearance:none;
  background:transparent;
  border:0;
  cursor:pointer;
  font-family: "Noto Sans Symbols 2","Segoe UI Symbol","Apple Symbols",system-ui,sans-serif;
  font-size: 1.2rem;
  line-height:1;
  padding:.5rem .5rem;
}

/* Current page indicator */
.nav-current{
  text-decoration: underline;
}

/* Arrow focus/disabled states */
.nav-arrow:focus{
  outline: none;
}
.nav-arrow[disabled] {
  color: var(--color-grey1);
  cursor: default;
}

/* Optional left gutter for time markers (used in history page) */
.history-gutter{
  width: 4.5rem; /* enough for HH:MM */
  color: color-mix(in srgb, var(--color-black) 60%, var(--color-white) 40%); /* ≈ #666 */
  text-align:right;
  padding-right:.5rem;
}

/* History row alignment */
.history-row{
  display:flex;gap:.75rem;
  align-items:flex-start;
}

/* ============================================================================
   --- FEEDBACK MESSAGE ---
============================================================================ */

/* Inline validation/feedback container */
.feedback-message {
  display: none;
  opacity: 0;
  overflow: hidden;
  transition: opacity 1s ease, transform 0.3s ease;
  color: var(--color-white);
  background-color: var(--color-white);
  text-align: center;
}

/* Coloring depending on message type */
.feedback-info {
  color: var(--color-grey2);
}

.feedback-warning {
  color: var(--color-warning);
}

.feedback-error {
  color: var(--color-error);
}

/* Visible/expanded state */
.feedback-message.visible {
  display: block;
  opacity: 1;
}

/* =========================================================
   LIVE FEED
========================================================== */
#liveFeedList {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.live-feed-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.vote-controls {
  display: flex;
  /* Use row for side-by-side layout */
  flex-direction: row;
  align-items: center;
  margin-right: 10px;
}

.vote-btn {
  background: none;
  border: none;
  color: var(--color-grey2);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-size: 14px;
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
}

.vote-btn.active {
  color: var(--color-black);
}

/* This rule prevents the hover effect on disabled buttons */
.vote-btn:hover:not([disabled]) {
  background-color: var(--color-grey1);
  color: var(--color-black);
}

/* Disabled buttons look unclickable */
.vote-btn:disabled {
  color: var(--color-grey1);
  cursor: not-allowed;
}

.vote-count {
  font-feature-settings: "tnum"; /* For tabular numbers */
  font-weight: var(--font-weight-bold);
  min-width: 2ch; /* Reserve space for 2 digits */
  text-align: center;
  padding: 0 4px;
  color: var(--color-grey2);
}

.word-content {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
}

.word-text {
  margin-right: 5px;
  overflow-wrap: break-word;
  word-break: break-all;
}

/* New line indicator */
.newline-indicator {
  display: none;
  align-self: center;
  margin-right: 0.5rem;
  color: var(--color-grey2);
  font-size: 1.2rem;
}

.submission-area.newline-selected .newline-indicator {
  display: inline;
}

/* ============================================================================
   --- INFO MODAL ---
============================================================================ */

/* Small info button next to title */
.info-btn {
  font-family: var(--font-main);
  background: transparent;
  color: var(--color-grey2);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  border: none;
  align-items: center;
  justify-content: center;
}

/* Info button hover */
.info-btn:hover {
  color: var(--color-black);
}

/* Modal container (portal root) */
.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Toggled visible state */
.modal-container.visible {
  display: flex;
}

/* Backdrop/scrim */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-grey2);
}

/* Modal card/content */
.modal-content {
  position: relative;
  background: var(--color-white);
  padding: calc(var(--spacing-base) * 2);
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 90%;
  z-index: 1001;
  line-height: 1.6;
  animation: fadeIn 0.3s ease-out;

  /* Set a max height relative to the viewport's height for all screen sizes */
  max-height: 85vh;
  /* Add a vertical scrollbar only if the content overflows */
  overflow-y: auto;
}

/* Modal headings/lists */
.modal-content h2 {
  margin-top: 0;
}
.modal-content ul {
  padding-left: 20px;
}
.modal-content hr {
    border: none;
    border-top: 1px solid var(--color-grey0);
    margin: 1.5rem 0;
}

/* Close (×) button */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--color-black-transp);
  color: var(--color-white);
  font-size: 1.2rem;
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  opacity: 0.8;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  padding: 0;
  z-index: 10;
}

/* Close hover */
.modal-close:hover {
  background-color: var(--color-black-transp-hover);
}

/* Media query for wider (desktop) screens */
@media (min-width: 769px) {
  .modal-content {
    /* Allow the modal to be wider on larger screens */
    max-width: 700px;
  }
}

/* =====================================================================
   --- USER DROP DOWN ---
===================================================================== */
.user-menu-container {
  position: relative;
  display: inline-block;
}

.user-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 5px;
  background-color: var(--color-white);
  min-width: 100px;
  box-shadow: 0 4px 15px var(--color-shadow);
  border: var(--border-light);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.user-dropdown-content a {
  color: var(--color-black);
  padding: 5px;
  text-decoration: none;
  display: block;
  align-content: center;
  text-align: center;
}

.user-dropdown-content a:hover {
  background-color: var(--color-grey1);
}

.user-dropdown-content a#deleteAccountBtn {
  color: var(--color-error);
}

/* Class to show the dropdown */
.show-dropdown {
  display: block;
}

/* =====================================================================
   --- CONTRIBUTOR FILTER DROPDOWN ---
===================================================================== */
.contributors-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--color-grey2);
  font-size: 0.9rem;
}

.contributors-dropdown {
  position: relative;
  display: inline-block;
  z-index: 50;
}

.contributors-dropdown-btn {
  background-color: var(--color-white);
  color: var(--color-black);
  padding: 5px 10px;
  font-family: var(--font-main);
  border: 1px solid var(--color-grey1);
  border-radius: var(--border-radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
  justify-content: space-between;
  font-size: 0.9rem;
}

.contributors-dropdown-btn:hover {
  border-color: var(--color-black);
}

.contributors-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 5px;
  background-color: var(--color-white);
  min-width: 160px;
  box-shadow: 0 4px 15px var(--color-shadow);
  border: var(--border-light);
  border-radius: var(--border-radius);
  max-height: 200px;
  overflow-y: auto;
}

.contributors-dropdown-content a {
  color: var(--color-black);
  padding: 8px 12px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
}

.contributors-dropdown-content a:hover {
  background-color: var(--color-grey1);
}

.contributors-dropdown-content.show-dropdown {
  display: block;
}

/* Style for highlighted words */
.word.highlighted-word {
    background-color: var(--color-user-highlight);
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

/* =====================================================================
   --- LOGIN PAGE ---
===================================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-container {
  max-width: 400px;
  padding: 2rem;
  text-align: center;
}

.login-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 5px;
  background-color: var(--color-black);
  color: var(--color-white);
  text-decoration: none;
  font-weight: bold;
  margin-top: 20px;
}

/* =====================================================================
   --- HISTORY PAGE ---
===================================================================== */

/* Header area (title + subtitle) */
.history-header {
  text-align: center;
}
.history-header h1 {
  margin: 0;
}
.history-subheader {
  padding-bottom: 10px;
  color: var(--color-grey2);
}

/* History container sizing/padding */
/* Add this new, consolidated rule for the history page layout */
#historyContainer {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-bottom: var(--history-footer-height);
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  align-items: stretch;
  width: 100%;
}

/* Empty/error state text */
.history-error {
  text-align: center;
  color: var(--color-grey2);
  margin-top: 2rem;
}

/* History text block & interactive words */
.history-text-block {
  width: 100%;
  font-family: var(--font-main);
  line-height: 1.8;
  font-weight: var(--font-weight-regular);
  text-align: justify;
}
.word {
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 2px;
}
.word:hover {
  background-color: var(--color-grey1);
}

/* Word hover tooltip */
.word-tooltip {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  font-size: 0.85rem;
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  z-index: 500;
  white-space: nowrap;
  box-shadow: 0 4px 15px var(--color-shadow);
}
.word-tooltip.visible {
  visibility: visible;
  opacity: 1;
}

/* --- Pagination --- */

/* Pagination container and layout */
.pagination-nav {
  background-color: var(--color-white);
  padding: 1rem 0;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

/* Pagination links (pages) */
.pagination-nav a {
  color: var(--color-grey2);
  text-decoration: none;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--color-grey1);
  border-radius: 4px;
  transition: all 0.2s ease;
}
.pagination-nav a:hover {
  color: var(--color-black);
  border-color: var(--color-black);
}

/* Current page chip */
.pagination-nav a.current {
  color: var(--color-white);
  background-color: var(--color-black);
  border-color: var(--color-black);
  pointer-events: none;
}

/* Navigation arrows (<< < > >>) inside pagination */
.pagination-nav .nav-arrow {
  font-weight: bold;
  border: none;
  background: transparent;
  padding: 0.25rem 0.5rem;
}

/* Disabled pagination arrows/links */
.pagination-nav a[disabled] {
  color: var(--color-grey1);
  pointer-events: none;
  background: transparent;
  border: none;
}

/* ============================================================================
   --- HISTORY PAGE CHUNKS ---
============================================================================ */

/* Chunk wrapper */
.history-chunk {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px dotted var(--color-grey2);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}
.history-chunk:last-child {
  border-bottom: none;
}

/* Chunk metadata row */
.chunk-meta {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--color-grey2);
}

/* Chunk info (left side) */
.chunk-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hash badge (copy target) */
.chunk-hash {
  font-family: var(--font-main);
  background-color: color-mix(in srgb, var(--color-white) 94%, var(--color-black) 6%); /* ≈ #f0f0f0 */
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.chunk-hash:hover {
  background-color: color-mix(in srgb, var(--color-white) 88%, var(--color-black) 12%); /* ≈ #e0e0e0 */
}

/* Share button on chunks */
.chunk-actions .share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  background: transparent;
  border: 1px solid var(--color-grey1);
  border-radius: 5px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: var(--color-grey2);
}
.chunk-actions .share-btn:hover {
  border-color: var(--color-black);
  color: var(--color-black);
}

/* ============================================================================
   --- ANIMATIONS ---
============================================================================ */

/* Fade-in translate animation used for list items and modal */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   --- SOCIAL ICONS ---
============================================================================ */
.social-link {
  display: inline-block;
  padding: 14px;
}

.icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: var(--color-black);
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;
  pointer-events: none;
  transition: background-color 0.2s ease-in-out;
}

.social-link:hover .icon {
  background-color: var(--color-grey2);
}

/* ============================================================================
   --- FOOTER ---
============================================================================ */

.site-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  padding-bottom: 1rem;
  border-top: var(--border-light);
  color: var(--color-grey2);
  background-color: var(--color-white); /* Added background to hide content scrolling underneath */
  box-shadow: 0 -2px 10px var(--color-shadow);
  box-sizing: border-box; /* Ensures padding is included in the element's total width and height */
  z-index: 99; /* Ensures it stays on top of other content */
}

.site-footer p {
  margin: 0;
}