:root {
    --bg: #121212;
    --card-bg: #1e1e1e;
    --fg: #e0e0e0;
    --accent: #bb86fc;
    --accent-hover: #9a66e0;
}
@media only screen and (min-width: 1800px) {
  .main-container {
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 0 auto !important;
    color: black !important;
    background-color: var(--bg) !important;
    background: var(--bg) !important;
    width: 100% !important;
    max-width: 1250px !important;
    right: -6.5vw !important;
    position: relative !important;
  }
}
@media only screen and (min-width: 2030px) {
  .main-container {
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 0 auto !important;
    color: black !important;
    background-color: var(--bg) !important;
    background: var(--bg) !important;
    width: 100% !important;
    max-width: 1500px !important;
    right: -6.5vw !important;
    position: relative !important;
  }
}
#menu-toggle {
    font-size: 1.2rem;
    background: var(--card-bg);
    color: var(--fg);
    border: none;
    border-radius: 4px;
    padding: .2rem .5rem .8rem .5rem;
    cursor: pointer;
    height: 100%;
    margin: .2rem;
    text-align: center;
    box-sizing: content-box;
}
#nav {
    font-size: 1.2rem;
    background: var(--card-bg);
    color: var(--fg) !important;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    height: 100%;
    margin: .2rem;
    text-align: center;
    box-shadow: 0px 0px 4px 2px #238;
    box-sizing: content-box;
}
#nav a {
    color: var(--fg);
}
a, a:visited {
    text-decoration: none;
    color: var(--fg);
}
#nav a:hover  {
    text-decoration: none;
    color: var(--accent-hover);
}
a:hover {
    text-decoration: none;
    color: var(--accent-hover);
}
#menu-toggle:hover {
    color: var(--accent) !important;
}
#top-buttons {
    display: flex; /* Creates a flex container */
    position: sticky;
    top: 1rem;
    margin-right: 0;
    margin: 0;
    right: 0;
    align-items: flex-end; /* Align children to the start if they have different widths */
    /* To make children overlap within the flex container */
    flex-direction: row-reverse;
    width: 100%;
    height: 100%;
    padding: 2px;
    text-align: center;
    z-index: 1000;
    height: 25px;
    box-sizing: content-box;
}
body {
    padding: 20px !important;
    text-align: center;
}
.countdown-container {
    margin: 20px 0;
    display: block;
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
}
.countdown-container-daily {
    margin: 0px;
    display: inline-flex;
    width: 90%;
    align-items: center;
    flex-wrap: nowrap;
}
.progress-bar {
    padding-top: 1px;
    width: calc(100% - 2px);
    height: 20px;
    background-color: #333;
    border-radius: 5px;
    margin: 0;
    position: relative;
    overflow: hidden;
    color: white;
    font-size: 1rem;
    text-align: center;
    min-width: 0;
    z-index: 1;
}
.timer-name {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    min-width: 0;
}
.timer-name-input {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    outline: none;
    text-align: center;
}
.progress {
    height: 200%;
    margin-top: -20px;
    background-color: #4caf50;
    /*border-radius: 5px;*/
    transition: width 1s linear;
}
.timer-gap {
    width: 4px;
    height: 20px;
    margin: 0;
    cursor: ew-resize;
    background: transparent;
    position: relative;
    z-index: 5;
    flex: 0 0 4px;
}
.timer-gap:hover {
    background: rgba(255, 255, 255, 0.15);
}
.timer-edit-mode .progress {
    width: 100% !important;
}
.countdown {
    font-size: 18px;
    margin-bottom: 10px;
}
#clock-holder-holder {
    display: flex;
      position: sticky;
      top: 4rem;
      margin-left: 0;
      margin: 0;
      left: 0;
      align-items: flex-start;
      flex-direction: row;
      width: 100%;
      height: 100%;
      padding: 2px;
      text-align: center;
      z-index: 100;
      height: 25px;
      box-sizing: content-box;
      pointer-events: none;
}
.clock-holder {
    /*top: 40px;
    left: 0px;*/
    position: fixed;
    background-color: #222;
    border-radius: 3px;
    padding: 3px 5px 5px 5px;
    width: 120px;
    height: 35px;
    border: var(--accent) solid 2px;
    box-sizing: border-box;
    pointer-events: auto;
}
#clock-div, .clock-text {
    right: 5px;
    position: absolute;
    font-size: 24px;
}
.glow {
    animation: glow 1s infinite;
}
@keyframes glow {
    0% { box-shadow: 0 0 10px #ff0000; }
    50% { box-shadow: 0 0 20px #ff0000; }
    100% { box-shadow: 0 0 10px #ff0000; }
}
.main-container {
    margin-top: 0px;
    margin-right: 0;
    width: 100%;
    z-index: 200;
    max-width: 1240px;
}
.timer-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.timer-nav-row .countdown-container-daily {
    flex: 1;
    width: auto;
}
.timer-nav-button {
    background: #222;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    line-height: 26px;
    cursor: pointer;
    font-size: 1rem;
}
.timer-nav-button:hover {
    border-color: #aaa;
}
.timer-day-banner {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #444;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10002;
    font-size: 0.95rem;
}
.timer-day-banner.show {
    opacity: 1;
}
.tooltip-trigger {
  cursor: pointer;
}
 .progress-bar .tooltip-trigger input {
    cursor: pointer;
    padding-top: 1px;
    width: calc(100% - 2px);
    height: 20px;
    background-color: #333;
    border-radius: 5px;
    margin: -45px 0px;
    position: relative;
    overflow: hidden;
    color: white;
    font-size: 1rem;
}
.tooltip-content {
  visibility: hidden; /* Hidden by default */
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  font-size: 1rem;
  padding: 16px 8px 8px;
  border-radius: 6px;
  position: absolute; /* Position relative to the trigger */
  z-index: 10000; /* Ensures it appears above other elements */
  bottom: -65px; /* shifted down ~40px */
  left: 50%;
  margin-left: -60px; /* Center the tooltip horizontally */
  opacity: 0; /* Fade in animation */
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.tooltip-close {
  position: absolute;
  top: 2px;
  right: 6px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  z-index: 1;
}
.tooltip-close:hover {
  color: #ff9999;
}
.scrub-value {
  cursor: default !important;
}
.color-tooltip-content {
  visibility: hidden;
  background-color: #555;
  border-radius: 6px;
  position: absolute;
  z-index: 10000;
  bottom: -70px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
  display: grid;
  grid-template-columns: repeat(4, 18px);
  gap: 6px;
  pointer-events: none;
}
.color-swatch {
  width: 18px;
  height: 18px;
  border: 1px solid #222;
  padding: 0;
  cursor: pointer;
  background: transparent;
  position: relative;
}
.color-swatch::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -4px);
  background: #222;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10001;
}
.color-swatch:hover::after {
  opacity: 1;
}
.color-swatch[data-label=""]::after {
  content: "";
  display: none;
}

/* Optional: Adding an arrow to the tooltip */
/*.tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}*/

/* Show the tooltip on click */
.countdown-container.is-open .tooltip-content {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.countdown-container.is-color-open .color-tooltip-content {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.gap-context-menu {
  position: fixed;
  background: #222;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px;
  display: none;
  z-index: 10003;
  min-width: 140px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.gap-context-menu.show {
  display: block;
}
.gap-context-action {
  background: #333;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.9rem;
}
.gap-context-action:hover {
  border-color: #aaa;
}
