.back-top{
  left: 50%;
  transform: translate(-50%, 50%);
  z-index: 9999;
}

.form-label.required:after {content:"*";margin-left:.25rem;color:#d63939}

.floating-button{
    position: fixed;
    bottom: 20px; /* Position from the top */
    left: 20px; /* Position from the left */
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 9999;
}

.floating-button:hover{
    background-color: #0056b3;
}

/* Heatmap button (stacked above the blue button with a vibrant color) */
#heatmap-statistic{
    bottom: 80px; /* Positioned above the blue button */
    background-color: #ff9800; /* Vibrant orange color */
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.5); /* Subtle glow effect */
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    z-index: 9999;
}

#heatmap-statistic:hover{
    background-color: #e67e00; /* Darker orange on hover */
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.7); /* Stronger glow effect */
}

/* Overlay for heatmap */
#heatmap-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Use modern transparency */
    z-index: 2000; /* Ensure it's above other elements */
    pointer-events: none; /* Prevent interactions with the overlay */
}

/* Click markers */
#heatmap-container div{
    position: absolute;
    width: 20px;
    height: 20px;
    background: url('/assets/img/click.png') no-repeat center center;
    background-size: cover;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.6); /* Glow effect */
    z-index: 2002;
    pointer-events: none; /* Prevent interactions */
}

/* Optional pulsing animation */
@keyframes pulse{
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#blur-background{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--tl-paper-deep);
    z-index: 0;
}

#password-container{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    background: var(--tl-panel);
    color: var(--tl-ink);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 300px;
}

/* The rich text editor, on the theme tokens so both faces come from one rule.
   It was stock greys with a hand-kept dark copy in #333 and Arial. */
.wysiwyg-toolbar{
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.wysiwyg-toolbar button{
    border: 1px solid var(--tl-hairline);
    background: var(--tl-panel);
    color: var(--tl-ink);
    padding: 5px 8px;
    cursor: pointer;
    border-radius: var(--tl-radius-sm);
    transition: border-color .15s ease, color .15s ease;
}

.wysiwyg-toolbar button:hover{
    border-color: var(--tl-accent);
    color: var(--tl-accent);
}

.wysiwyg-editor{
    min-height: 150px;
    border: 1px solid var(--tl-hairline);
    padding: 10px;
    border-radius: var(--tl-radius);
    background: var(--tl-panel);
    color: var(--tl-ink);
}

pre code{
    background: #2d2d2d; /* Dark background for contrast */
    color: #f8f8f2; /* Light text for readability */
    padding: 15px; /* Add more padding for better spacing */
    border-radius: 8px; /* Smooth rounded corners */
    display: block; /* Ensure the block layout */
    overflow-x: auto; /* Enable horizontal scrolling */
    font-family: 'Courier New', Courier, monospace; /* Monospace font for code */
    font-size: 0.95rem; /* Slightly smaller font size */
    line-height: 1.5; /* Better line height for readability */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    margin: 1rem 0; /* Space above and below */
    border: 1px solid #444; /* Add a subtle border for definition */
}

[data-bs-theme="dark"] pre code{
    background: #1e1e1e; /* Darker background for contrast */
    color: #dcdcdc; /* Softer light text color */
    padding: 15px; /* Add more padding for better spacing */
    border-radius: 8px; /* Smooth rounded corners */
    display: block; /* Ensure the block layout */
    overflow-x: auto; /* Enable horizontal scrolling */
    font-family: 'Courier New', Courier, monospace; /* Monospace font for code */
    font-size: 0.95rem; /* Slightly smaller font size */
    line-height: 1.5; /* Better line height for readability */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    margin: 1rem 0; /* Space above and below */
    border: 1px solid #555; /* Subtle border for definition */
}

.wysiwyg-editor a{
    color: var(--tl-accent);
    text-decoration: underline;
}

.wysiwyg-editor a:hover{
    color: var(--tl-accent-hover);
}

.wysiwyg-editor:empty:before{
    content: 'Start typing...';
    color: var(--tl-dim);
    font-style: italic;
}

/* Container */
.dfp-step-label{
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Hold button + progress ring */
.dfp-hold-btn{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

.dfp-hold-ring{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  position: relative;
}

/* Determinate progress arc — fills clockwise as the hold countdown runs.
   Driven by the JS --dfp-progress custom property (0 → 1). */
.dfp-hold-ring-inner{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(currentColor calc(var(--dfp-progress, 0) * 1turn), transparent 0);
  /* punch out the centre so only a thin rim shows */
  -webkit-mask: radial-gradient(farthest-side, transparent calc(50% - 3px), #000 calc(50% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(50% - 3px), #000 calc(50% - 3px));
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* When holding: reveal the progress arc */
.dfp-hold-btn.dfp-holding .dfp-hold-ring-inner{
  opacity: 1;
}

/* When successful (>= MIN_HOLD_MS), mark green-ish */
.dfp-hold-btn.dfp-hold-ok{
  border-color: var(--bs-success, #198754);
  color: var(--bs-success, #198754);
}

.dfp-hold-btn.dfp-hold-ok .dfp-hold-ring{
  border-color: rgba(25, 135, 84, 0.3);
}

/* Hide spinner when done, show the check */
.dfp-hold-btn.dfp-hold-ok .dfp-hold-ring-inner{
  opacity: 0;
  animation: none;
}

.dfp-hold-btn.dfp-hold-ok .dfp-hold-check{
  opacity: 1;
  transform: scale(1);
}

.dfp-hold-check{
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--bs-success, #198754);
  background-color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Spinner animation */
@keyframes dfp-hold-spin{
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Word choices */
.dfp-choice-list .btn{
  font-size: 0.8rem;
  border-radius: 999px;
}

.dfp-choice-list .btn.active{
  color: #fff;
  background-color: var(--bs-primary, #0d6efd);
  border-color: var(--bs-primary, #0d6efd);
}

/* ------------------------------------------------------
   Theme tokens for gradient text + hills (global)
   ------------------------------------------------------ */
:root,
[data-bs-theme="light"]{
  /* Light theme */
  --tl-hill-fill: color-mix(in oklab, var(--bs-gray-900) 8%, transparent);
  /* Primary (green) → Warning (yellow) */
  --tl-grad-start: color-mix(in oklab, var(--bs-primary) 78%, #fff 12%);
  --tl-grad-end:   color-mix(in oklab, var(--bs-warning) 75%, #fff 8%);
}

[data-bs-theme="dark"]{
  /* Dark theme */
  --tl-hill-fill: color-mix(in oklab, var(--bs-body-color) 16%, transparent);
  /* Boost chroma in dark for readability */
  --tl-grad-start: color-mix(in oklab, var(--bs-primary) 86%, #6ea8fe 6%);
  --tl-grad-end:   color-mix(in oklab, var(--bs-warning) 82%, #ffda6a 6%);
}

/* Fallback if no data-bs-theme is set: respect OS */
@media (prefers-color-scheme: dark){
  :root:not([data-bs-theme]) {
    --tl-hill-fill: color-mix(in oklab, var(--bs-body-color) 16%, transparent);
    --tl-grad-start: color-mix(in oklab, var(--bs-primary) 86%, #6ea8fe 6%);
    --tl-grad-end:   color-mix(in oklab, var(--bs-warning) 82%, #ffda6a 6%);
  }
}

/* Gradient text (shared) */
.text-gradient{
  background: linear-gradient(90deg, var(--tl-grad-start), var(--tl-grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hills (ridge) — keep hero with SVG as-is */
.hill-fill{ fill: var(--tl-hill-fill); }
.hill-back{
  fill: color-mix(in oklab, var(--bs-primary) 28%, var(--bs-body-bg));
  opacity: .35;
}
[data-bs-theme="dark"] .hill-back{
  opacity: .45;
  fill: color-mix(in oklab, var(--bs-primary) 32%, var(--bs-body-bg));
}

/* Theme transitions (big hero + its parts) */
.text-gradient,
.hill-fill,
.hill-back{
  transition: background .25s ease, color .25s ease, fill .25s ease, border-color .25s ease, opacity .25s ease;
}

/* ======================================================
   MINI HERO / SMALL HEADERS — unified top→bottom gradient
   Affects: track, news
   (All headers without SVG)
   ====================================================== */

/* ======================================================
   Shared base for all small headers (unified gradient system)
   ====================================================== */
.hero-track,
.hero-news{
  color: var(--bs-body-color);
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--bs-primary) 12%, var(--bs-body-bg)) 0%,
    var(--bs-body-bg) 100%
  );
  transition: background .25s ease, color .25s ease;
}

/* Dark mode override once (no duplication) */
[data-bs-theme="dark"] .hero-track,
[data-bs-theme="dark"] .hero-news{
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--bs-primary) 18%, var(--bs-body-bg)) 0%,
    var(--bs-body-bg) 100%
  );
}

/* Title gradient stays consistent across all small headers */
.hero-track .text-gradient,
.hero-news .text-gradient{
  background: linear-gradient(90deg, var(--tl-grad-start), var(--tl-grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Small helpers / polish per header */
.hero-news h1 i{ color: var(--bs-primary); }

/* Compact padding for small heroes on mobile */
@media (max-width: 575.98px){
  .hero-news {
    padding-top: .9rem;
    padding-bottom: .9rem;
  }
}

/* ======================================================
   Mini hero building blocks (used in cards/sections)
   ====================================================== */

/* Hills scoped block (if used outside hero) */
:root,
[data-bs-theme="light"]{ --tl-hill-fill: color-mix(in oklab, var(--bs-gray-900) 8%, transparent); }
[data-bs-theme="dark"]{ --tl-hill-fill: color-mix(in oklab, var(--bs-body-color) 16%, transparent); }

/* ======================================================
   Track / Stats cards (shared)
   ====================================================== */
.stat-card {
  --tl-pad: .5rem;
  padding: var(--tl-pad) calc(var(--tl-pad) + .25rem);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  border-radius: .6rem;
  box-shadow: var(--bs-box-shadow-sm);
  min-width: 108px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.stat-card .stat-value { font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: .75rem; color: var(--bs-secondary-color); line-height: 1; }
.stat-card i { color: var(--bs-primary); }
.stat-card:hover,
.stat-card:focus-within {
  border-color: color-mix(in oklab, var(--bs-primary) 40%, var(--bs-border-color));
  box-shadow: 0 0.5rem 1rem rgba(var(--bs-dark-rgb), .06), 0 0 0 .15rem rgba(var(--bs-primary-rgb), .08);
  transform: translateY(-1px);
}

/* Mobile niceties */
@media (max-width: 575.98px) {
  .stat-card{ min-width: 100px; }
}

/* ======================================================
   DataTables / Utilities
   ====================================================== */
.dataTables_wrapper .dataTables_processing {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  padding: .5rem 1rem;
  border-radius: .5rem;
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.08);
}

