@font-face {
  font-family: "Jost";
  src: url(/Jost-SemiBold.ttf);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Jost", sans-serif;
  /* to indentify elementsfor debugging */
  /* outline: 1px solid red; */
}

/*  Ensure the layout always fits the viewport:  */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: url("./image/cursor24.png") 0 0, auto;
}

body {
  background-color: black;
  color: white;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* default */
/* every button will have cursor pointer */
.button,
.icon-button {
  cursor: url("./image/cursor24.png") 0 0, auto;
}

/* Disable default drag-and-drop behavior for images */
img {
  user-select: none;
  -webkit-user-drag: none;
}

/* --------------------------------------- */

/* .main-content {
} */

/* --------------------------------------- */

/* Top menu */
.top-menu-wrapper {
  position: fixed; /* YouTube’s top menu stays fixed */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 56px; /* Standard YouTube height */

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 16px;
  margin-top: 5px;

  background-color: black; /* YouTube dark theme background */
  z-index: 1000; /* Stays above everything else */
}

/* hide h1 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; /* prevent text wrapping */
  border: 0;
}

/* Optional: If you want icons or text to match YouTube’s scale */
.top-menu-wrapper * {
  font-size: 14px;
  color: white;
}

/* Side menu */
.left-wrapper {
  position: fixed; /* YouTube’s top menu stays fixed */
  top: 0;
  right: 0;
  left: 0;
  width: 60px;
  height: 100%; /* Standard YouTube height */

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0; /* Matches YouTube spacing */

  background-color: black; /* YouTube dark theme background */
  z-index: 900; /* Just under top & bottom wrapper */
}

/* Container for features */
.feature-box {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;

  top: 55px;
  width: 60px;
}

/* Icons */
.featureTimer img,
.featureStory img,
.featureAbout img {
  width: 24px;
  height: 24px;
  margin-bottom: 6px;

  margin-top: 6px;
}

/* Labels */
.featureLabel {
  font-size: 12px;

  text-align: center;
  line-height: 1.2;
  white-space: nowrap;

  margin-bottom: 6px;
}

/* Each feature item */
.featureTimer,
.featureStory,
.featureAbout {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 100%;
  padding: 14px 0;
  transition: background-color 0.15s ease;

  color: #f2f2f2;
  position: relative; /* for tooltip positioning */
}

.featureTimer:hover,
.featureStory:hover,
.featureAbout:hover {
  background-color: #272727; /* light hover */
  color: #f2f2f2;
  border-radius: 10px;
}

.feature-button .tooltip {
  position: absolute;
  bottom: 20%; /* place above the button */
  left: 125%;

  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.15s ease-in-out;
  opacity: 0;
  z-index: 10;
}

.feature-button:hover .tooltip {
  opacity: 1;
  pointer-events: auto;
}

.featureTimer.selected img {
  content: url("./image/featureTimerWhiteSelected.png");
}
.featureStory.selected img {
  content: url("./image/featureStoryWhiteSelected.png");
}
.featureAbout.selected img {
  content: url("./image/featureAboutWhiteSelected.png");
}

/* Bottom menu */
.bottom-wrapper {
  position: fixed; /* YouTube’s top menu stays fixed */
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 56px; /* Standard YouTube height */

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 16px; /* Matches YouTube spacing */

  background-color: black; /* YouTube dark theme background */
  z-index: 950; /* Stays above everything else */
}

/* --------------------------------------- */

.menu-logo-container {
  display: flex;
  align-items: baseline; /* Align logo and text vertically */

  top: 8px; /* Matches YouTube vertical spacing */
  left: 16px; /* Matches YouTube horizontal spacing */
}

.menu-logo-container img {
  height: 26px; /* YouTube logo height ~40-48px */
  width: auto; /* maintain aspect ratio */
}

/* Sign in Wrapper */
.signIn-wrapper {
  position: absolute;
  top: 8px; /* Matches YouTube vertical spacing */
  right: 16px;

  margin-right: 16px;
}

/* Sign in & Sign out buttons - same base style */
#signInBtn,
#signOutBtn {
  position: relative;
  background: none;
  box-shadow: none;

  color: #ffffff;
  font-size: 1rem;
  font-weight: 500; /* Slightly bold like YouTube */
  font-family: "Jost", sans-serif;

  background-color: black; /* Same as top menu */

  border: 1px solid rgb(132, 125, 125);
  border-radius: 17px; /* Pill shape */

  padding: 6px 20px; /* Vertical & horizontal padding */
  height: 36px;
  line-height: 20px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: background-color 0.2s ease, color 0.2s ease;

  min-width: 91.89px;
}

#signOutBtn {
  color: rgb(171, 169, 169);
  border: 1px solid rgb(132, 125, 125);
}

#signInBtn:hover,
#signOutBtn:hover {
  background: white; /* YouTube hover effect */
  color: black;
}

/* Optional: Add icon style if you use the Google account icon */
/* #signInBtn svg,
#signOutBtn svg {
  margin-right: 6px;
} */

/* Message: General (autoloop, sign-in) */
#messageContainer {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);

  width: fit-content;
  z-index: 2000; /* higher than the modal */
  pointer-events: none; /* don’t block clicks */
  background: transparent; /* no inherited background */
}

#message {
  padding: 1rem 2rem;
  border-radius: 12px;
  color: white;
  background: #000000; /* enforce base background */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* enforce base shadow */
  opacity: 1;
  display: inline-block;
}

/* Message: No internet connection */
#connection-toast {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 0, 0, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  font-size: 16px;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

#connection-toast.show {
  display: block;
  opacity: 1;
}

/* --------------------------------------- */

.today-statistics {
  position: absolute;
  left: 60px;
  top: 120px;

  display: flex;
  flex-direction: row;
  justify-content: space-between;

  gap: 12px;
  padding: 16px 0;

  margin-left: 16px;
}

/* --------- Left side: timeline grid --------- */

.today-statistics-left-timeline {
  text-align: center;
  font-weight: 100;
}

.today-statistics-left-timeline th {
  width: 100px;
  background: white;
  color: black;
}

.today-statistics-left-timeline td {
  width: 100px;
  background: #0f0f0f;
  color: white;
}

/* --------- Right side: record time --------- */

.today-statistics-right-record {
  position: relative;

  flex-shrink: 0;
  width: 150px;
  bottom: 2px;
}

/* Gradient border box */
.record-box {
  position: relative;
  display: flex;
  justify-content: center;

  background-color: #000; /* black background inside */
  border-radius: 1px;
  padding: 10px 4px; /* leave bottom padding for icons */

  /* Gradient border trick */
  border: 1px solid;
  border-image-slice: 1;
  border-width: 1px;
  border-image-source: linear-gradient(to right, black, white);
  box-sizing: border-box;

  color: white;

  font-size: 25px;
  font-weight: 600;
  text-align: center;

  height: 52px;
}

.record-box .completed-time-value {
  display: flex; /* make each pair a proper flex item */
  color: white;
  margin-right: 4px;
}
.record-box .completed-time-label {
  margin-left: 4px;
  color: #333333;
  display: inline-flex; /* ensures labels + numbers stay grouped */
}

/* Default: hidden but space preserved */
#comparisonBox {
  visibility: hidden; /* hidden but still takes up space */
  pointer-events: none; /* can't be hovered or clicked */
  text-align: right;
}

/* When active: visible + hoverable */
#comparisonBox.active {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.comparison-text {
  height: 25px;
  margin-right: 8px;

  font-size: 0.8rem;
  font-weight: 100;

  margin-bottom: -3px;
}

/* Tooltip span inside comparison-box */
#comparisonBox .tooltip {
  position: absolute;
  top: -30%; /* show above button */
  left: 80%;

  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.15s ease-in-out;
  z-index: 10;

  opacity: 0;
}

/* Tooltip only if active AND hovered */
#comparisonBox.active:hover .tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Record button icons container */
.record-button-wrapper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  gap: 5px;
}

/* Record button default */
.stats-button {
  position: relative; /* keep this to position tooltip */

  width: 24px;
  height: 24px;
  background-color: black;

  border: 0.5px solid rgb(79, 78, 78);

  margin: 0 -1px;

  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);

  z-index: 5; /* ensure it stays above other elements */
}

/* Selected Record button */
.stats-button.selected {
  background-color: white;
}

/* Tooltip span inside stats-button */
.stats-button .tooltip {
  position: absolute;
  bottom: -160%; /* show above button */
  left: 50%;

  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-in-out;

  z-index: 10;
}

/* Show tooltip on hover */
.stats-button:hover .tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Change images when selected */
#recordToday.selected img {
  content: url("./image/recordTodayBlack.png");
}
#recordTotal.selected img {
  content: url("./image/recordHistoryBlack.png");
}
#recordBest.selected img {
  content: url("./image/recordBestBlack.png");
}

/* Record button imgae size */
.stats-button img {
  width: 16px;
  height: 16px;

  padding: 2px;
}

/* --------------------------------------- */

/* Completed pomodoro */
.todayPomoBar-wrapper {
  position: absolute;
  left: 60px;
  bottom: 50px;

  margin-left: 16px;
}

#completedPomo {
  display: flex;
  flex-wrap: wrap; /* optional: wrap to multiple lines if needed */

  margin-top: 0.3em;
}

.pomo-bar-label-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

#pomoLabel {
  font-size: 1.2rem;
  margin-right: 8px;
}

#pomoNum {
  color: #303030;
  font-size: 1.2rem;
}

#pomoCount {
  color: white;
}

#pomoicon {
  display: flex; /* removes extra space below images caused by inline-block baseline */
}

#pomoicon img {
  height: 0.8em; /* match text height */
  width: 1em; /* keep aspect ratio */

  margin: 0 4px 0 0;
}

.pomoTick {
  display: inline-block;

  min-width: 14px;
  min-height: 22px;
  margin: -1.5px;

  background-size: contain;
  background-repeat: no-repeat;
}

.pomoTick:hover {
  transition: all 0.3s ease;
  transform-origin: right center;
  transform: scale(0.8);
}

/* Grey state */
.pomoTick.grey {
  background-image: url("./image/pomoTickDefault.png");
}

/* White state */
.pomoTick.white {
  background-image: url("./image/pomoTickAssigned.png");
}

/* Skipped state */
.pomoTick.skipped {
  background-image: url("./image/pomoTickAssignedSkipped.png");
}

/* --------------------------------------- */

.pomoTick .tooltip {
  visibility: hidden;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  text-align: left;
  padding: 4px 8px;
  border-radius: 4px;

  font-size: 1rem;
  white-space: nowrap;
  position: absolute;

  bottom: 150%; /* tooltip appears above */
  left: 100%;
  /* transform: translateX(-100%); */

  transition: opacity 0.15s ease-in-out;
  pointer-events: none;

  z-index: 10;
}

.pomoTick:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* --------------------------------------- */

.logo-container {
  position: relative;
  display: flex;

  justify-content: center;
  align-items: center;
  margin-top: 2vh;
  margin-bottom: 2vh;
}

.logo {
  width: max(12rem, 18vw);
  max-width: 180px; /*prevent logo from getting too large */

  border-radius: 50%;
}

/* Time Choice */
#timeChoiceContainer {
  position: absolute;
  top: 65%;
  left: 40%;
  transform: translateX(-50%);

  width: 0;
  height: 0;

  color: hsl(210, 5%, 36%);
  text-decoration: none; /* this is for <a> etc. */
  list-style: none; /* this is for ul & li */
  font-size: 2.2rem;

  z-index: 5;
  opacity: 0;
}

#timeChoiceContainer.show {
  opacity: 1;
}

.timeChoice {
  position: relative;
}

.timeChoice.active {
  color: red;
}

.timeChoice.active::after {
  content: "min";
  font-size: 12px;

  vertical-align: baseline;
  padding-left: 2px;

  position: absolute;
  bottom: 15%;
  left: 100%;
}

.timeChoice:hover {
  color: white;
}

.timeChoice .tooltip {
  visibility: hidden;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  text-align: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;

  white-space: nowrap;
  position: absolute;

  bottom: 100%;
  left: 100%;
  transform: translateX(-50%);
  transition: opacity 0.15s ease-in-out;
  pointer-events: none;

  /* 🔑 Break out of li’s transform stacking context */
  z-index: 9999;
}

.timeChoice:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* --------------------------------------- */

/* Small Timer */
.timerSmall-wrapper {
  position: absolute;
  top: 14vh;
  right: 16px;

  margin-right: 16px;
}

#timerSmall {
  display: inline-flex;
  flex-direction: row;

  /* color: hsl(200, 7%, 92%); */
  color: hsl(210, 5%, 36%);
  text-decoration: none; /* this is for <a> etc. */
  list-style: none; /* this is for ul & li */
  font-size: 2rem;

  gap: 0.1rem;

  opacity: 0;
}

#timerSmall.show {
  opacity: 1;
}

#sessionTextSmall {
  position: absolute;
  top: -1rem;
  left: 50%;
  width: fit-content;
  transform: translateX(-50%);
  text-align: center;

  /* color: hsl(200, 7%, 92%); */
  color: hsl(210, 5%, 36%);
  font-size: 1rem;

  display: none;
  opacity: 0;

  pointer-events: none; /* make it unclickable */
  white-space: nowrap; /* ✅ force text in one line */
}

#sessionTextSmall.show {
  display: block;
  opacity: 1;
}

/* --------------------------------------- */

/* Main Menu Timer */
.timer-control {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative; /* it pulls start-menu to logo level, why?*/

  width: 100%;
  max-width: 1200px;
  padding: 0rem 1rem 1rem 1rem;
}

.timer-wrapper {
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;

  width: 125px;
  height: 50px;

  margin: 0 0 0.5rem 0;
}

/* Countdown timer */
.timer {
  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;
  gap: 1rem;

  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;

  color: hsl(210, 5%, 36%);
  text-decoration: none; /* this is for <a> etc. */
  list-style: none; /* this is for ul & li */
  font-size: 2rem;

  opacity: 0;
}

.timer.show {
  opacity: 1;
}

.sessionText {
  position: absolute;
  top: -1rem;
  left: 50%;

  white-space: nowrap; /* ✅ force text in one line */
  transform: translateX(-50%);
  text-align: center;

  width: 80px;
  height: 25px;

  color: hsl(210, 5%, 36%);
  font-size: 1rem;

  opacity: 0;

  pointer-events: none; /* make it unclickable */
}

.sessionText.show {
  opacity: 1;
}

/* mode selection */
.mode-wrapper {
  position: fixed; /* stick to viewport */
  top: 50vh; /* vertical position */
  right: 2em; /* always 2em from right edge */

  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.mode-option-selector {
  position: relative;
  display: flex;
  flex-direction: column;
}

.mode {
  background: none;
  border: none;

  color: #585d62;
  font-size: 1.5rem;

  text-align: right;
  margin: -2px;

  transition: all 0.3s ease;
  transform-origin: right center;
  transform: scale(0.8);

  white-space: nowrap;
}

.mode:hover {
  background: none;
  color: white;
  transform: scale(1.3);
}

.mode.selected {
  background: none;
  color: white;
  transform: scale(1.3);
}

.mode.clicked {
  background: none;
  color: rgb(57, 51, 51);
  transform: scale(1.3);
  transition: all 0.1s ease;
}

/* timer control: Start & Pause, Skip, Cancel */
.timer-button-wrapper {
  display: inline-flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  gap: 2rem;

  z-index: 500;
}

/* start btn */
#start {
  border: none;
  background-color: white;
  color: black;
  width: 10rem;

  font-size: 1.5rem;
  text-transform: uppercase;

  padding: 0.5rem 1rem;
  margin: 0.5rem 0 0.5rem 0;
  border-radius: 5px;
}

#start:hover {
  background-color: #ababab;
  color: black;
  font-size: 1.5rem;
}

#start.hidden {
  display: none;
}

.icon-button {
  border: none;
  background-color: black;
  background-size: contain;

  margin-top: 0.3rem;
}

/* delete btn */
#deletePomoBtn {
  background-image: url("./image/cancel.png");
  width: 24px;
  height: 24px;
}

#deletePomoBtn:hover {
  background-image: url("./image/cancelRed.png");
}

#deletePomoBtn.hidden {
  display: none;
}

/* skip btn */
#skipPomoBtn {
  background-image: url("./image/skip.png");
  width: 24px;
  height: 24px;
}

#skipPomoBtn:hover {
  background-image: url("./image/skipGreen.png");
}

#skipPomoBtn.hidden {
  display: none;
}

/* System button */
/* --------------------------------------- */

/* Auto loop */
/* .system-button-wrapper {
  position: absolute;

  right: 16px;
  margin-right: 16px;

  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2rem;
} */
.system-button-wrapper {
  top: 0;
  right: 0;
}

/* loop btn */
#autoloop {
  background-image: url("./image/loop.png");
  width: 32px;
  height: 32px;

  margin: 0;

  cursor: pointer;
}

#autoloop:hover {
  background-image: url("./image/loopWhite.png");
}

#autoloop.active {
  background-image: url("./image/loopWhite.png");
}

/* --------------------------------------- */

/* Time Now Display */
.today-date {
  position: absolute;
  left: 60px;
  top: 80px;

  display: flex;
  flex-direction: column;

  margin-left: 16px;
}

.data-header {
  text-align: left;
}

/* Sidebar time */
.time-container {
  pointer-events: none; /* make it unclickable */
}

.time-container span {
  padding-right: 0.3rem;
}

#todayWeek {
  color: white;
  font-size: 1.5rem;
  display: inline-block;
}

#todayWeek.sat {
  color: #259223;
}

#todayWeek.sun {
  color: red;
}

#todayTime {
  font-size: 1.5rem;
  width: 20px;
  height: 10px;
}

#todayTime:hover {
  color: #259223;
}

#todayDate span {
  padding: 0;
}

#todayDay {
  font-size: 0.9rem;
  vertical-align: baseline;
}

#todayYear {
  font-size: 0.9rem;
}

/* --------------------------------------- */
/*              Sign in                    */
/* --------------------------------------- */

/* Sign in & Credit Modal Overlay*/
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 5, 5, 0.85); /* darker than default */
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;

  /* Blur background - cross browser */
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* Modal Content Box */
.modal-content {
  background: radial-gradient(circle at center, #1c1b18 0%, #0d0d0d 100%);
  padding: 30px;
  border-radius: 12px;

  position: relative;
  box-shadow: 0 0 25px rgba(163, 141, 93, 0.6); /* soft gold glow */
  border: 2px solid #a38d5d; /* antique gold border */
  font-family: "Cinzel", serif; /* fantasy-style font */
  color: #e6decf;
}

/* Modal Content Box: default hidden */
.hidden {
  display: none;
}

/* Sign in: Modal Content Box */
.signin-content {
  width: 90%;
  max-width: 400px;
}

/* Title */
#form-title {
  text-align: center;
  font-size: 28px;
  color: #d4b76e;
  text-shadow: 0 0 5px #d4b76e, 0 0 10px rgba(255, 215, 0, 0.6);
  letter-spacing: 2px;

  margin-bottom: 30px;
}

/* Form wrapper */
/* Sign-in wrapper (like a section in Credit modal) */
#signinMethodWrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  /* Add spacing to match Credit modal style */
  padding: 20px 0; /* top & bottom padding like credit sections */
  margin: 0 auto; /* center horizontally */
  width: 100%; /* use full width of modal */
  max-width: 300px; /* optional, keep button section compact */

  gap: 12px; /* spacing if more elements added later */
  border-top: 1px solid #a38d5d;
  /* border-bottom: 1px solid #a38d5d; */
}

/* Google Button */
#googleSignInBtn {
  background: none; /* remove gradient */
  padding: 0; /* Google button already has padding baked into the image */

  width: 250px;
  height: 40px;

  border: none;
  border-radius: 6px;
  transition: transform 0.1s ease, background 0.2s ease;

  cursor: pointer;
  margin: 20px 0; /* center it */
}

#googleSignInBtn:hover {
  transform: scale(1.02);
}

#googleSignInBtn img {
  max-width: 250px;
  max-height: 40px;
  object-fit: contain; /* keeps aspect ratio, no stretching */
}

/* Toggle Auth Link */
.toggle-auth {
  text-align: center;
  margin-top: 10px;
  color: #a38d5d;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s ease;
}

.toggle-auth strong {
  color: #d4b76e;
}

.toggle-auth:hover {
  color: #d4b76e;
}

/* Close Button */
.close-btn#closeAuthModal {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #a38d5d;
  transition: color 0.2s ease;
}

.close-btn:hover#closeAuthModal {
  color: #d4b76e;
}

/* --------------------------------------- */
/*              Credit                     */
/* --------------------------------------- */

.credit-content {
  background: radial-gradient(circle at center, #1c1b18 0%, #0d0d0d 100%);
  border: 2px solid #a38d5d;
  border-radius: 10px;
  padding: 20px 30px;

  width: 500px;

  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 25px rgba(163, 141, 93, 0.5);
  font-family: "Cinzel", serif; /* Skyrim-like fantasy font */
  color: #e0d6b8;
}

.credit-title {
  text-align: center;
  font-size: 2.2rem;
  color: #d4b76e;
  text-shadow: 0 0 5px #d4b76e, 0 0 10px rgba(255, 215, 0, 0.6);
  letter-spacing: 2px;

  margin-bottom: 20px;
}

.credit-section {
  margin-bottom: 18px;
}

.credit-section h2 {
  font-size: 1.8rem;
  color: #c9b37d;
  border-bottom: 1px solid #a38d5d;
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.credit-section h3 {
  font-size: 1.4rem;
  color: #c9b37d;
  border-bottom: 1px solid #a38d5d;
  padding-bottom: 4px;
  margin-bottom: 6px;
  margin-top: 6px;
}

.credit-section b {
  font-size: 1.2rem;
}

.credit-section p {
  font-size: 1rem;
}

.credit-section .sub {
  color: rgb(10, 169, 95);
  font-size: 1rem;
}

.credit-section ul {
  list-style: none;
  padding-left: 0;
}

.credit-section li {
  font-size: 1rem;
  padding: 4px 0;
  color: #e0d6b8;
}

.credit-section li::before {
  content: "• ";
  color: #a38d5d;
}

/* Credit modal links styled like .toggle-auth */
.credit-section a {
  color: #a38d5d;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none; /* removes ugly defualt hyperlink underline */
  transition: color 0.2s ease;
}

.credit-section a:hover {
  color: #d4b76e;
}

.credit-section a strong {
  color: #d4b76e;
}

.version-wrapper {
  color: #c9b37d;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  color: #d4b76e;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #fff;
}

/* Scrollbar styling (WebKit browsers: Chrome, Edge, Safari) */
/* Skyrim style scrollbar for Credit Modal */

/* WebKit browsers: Chrome, Edge (Chromium), Safari */
.credit-content::-webkit-scrollbar {
  width: 8px;
}

.credit-content::-webkit-scrollbar-track {
  background: #0d0d0d; /* dark stone */
}

.credit-content::-webkit-scrollbar-thumb {
  background-color: #a38d5d; /* antique gold */
  border-radius: 4px;
  border: 1px solid #d4b76e; /* lighter gold edge */
}

.credit-content::-webkit-scrollbar-thumb:hover {
  background-color: #d4b76e; /* brighter gold on hover */
}

/* --------------------------------------- */

.animated-text {
  padding: 1rem 2rem;
  border-radius: 8px;

  color: white;
  font-size: 1.2rem;

  white-space: nowrap;

  opacity: 0;
  pointer-events: none;
}

.animated-text.animated {
  animation: slideDownFade 4s ease-in-out forwards;
}

@keyframes slideDownFade {
  0% {
    transform: translateY(-50px);
    opacity: 0;
  }
  10%,
  75%,
  90% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

/* Timer glitch effect */
.glitch {
  text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
    -0.025em -0.05em 0 rgba(0, 255, 0, 0.75), 0.025em 0 0 rgba(0, 0, 255, 0.75);
  animation: glitch 750ms infinite;
}

@keyframes glitch {
  0% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
      -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
      0.025em 0 0 rgba(0, 0, 255, 0.75);
  }
  14% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
      -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
      -0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
  }
  15% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
      0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
      -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  49% {
    text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
      0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
      -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  50% {
    text-shadow: 0.25em 0.05em 0 rgba(255, 0, 0, 0.75),
      0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  99% {
    text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
      0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  100% {
    text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75),
      -0.025em -0.025em 0 rgba(0, 255, 0, 0.75),
      -0.025em -0.05em 0 rgba(0, 0, 255, 0.75);
  }
}

svg path {
  fill: transparent;
}

svg.animate path {
  fill: transparent;
  stroke: #fff;
  stroke-width: 0.1;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: textAnimation 4s ease-in-out 1 forwards;
}

@keyframes textAnimation {
  0% {
    stroke-dashoffset: 260;
  }
  80% {
    fill: transparent;
  }
  100% {
    fill: white;
    stroke-dashoffset: 0;
  }
}

/* Number Counting */
/* Container for one number */
.completed-time-number {
  display: inline-flex;
  flex-direction: column;
  overflow: hidden;
  height: 2.4rem;
  line-height: 2.4rem;
  width: 2ch; /* optional, adjust width */
  font-weight: bold;
}

/* Each number inside */
.completed-time-number div {
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* MOBILE STYLES */

/* ============================= */
/*   Mobile Optimization Layer   */
/* ============================= */
@media (max-width: 600px) {
  html,
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* WebKit browsers: Chrome, Edge (Chromium), Safari */
  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    width: 8px;
  }

  html::-webkit-scrollbar-track,
  body::-webkit-scrollbar-track {
    background: #0d0d0d; /* dark stone */
  }

  html::-webkit-scrollbar-thumb,
  body::-webkit-scrollbar-thumb {
    background-color: #ababab; /* antique gold */
    border-radius: 4px;
    border: 1px solid #b9b9b9; /* lighter gold edge */
  }

  html::-webkit-scrollbar-thumb:hover,
  body::-webkit-scrollbar-thumb:hover {
    background-color: #ababab80; /* brighter gold on hover */
  }

  .main-content {
    margin: 0; /* remove top margin */
  }

  /* Top bar: shrink height */
  .top-menu-wrapper {
    max-height: 48px;
    padding: 18px 14px;
    margin-top: 0; /* remove top margin */
  }
  .menu-logo-container img {
    /* max-width: 15rem;
    min-height: 30px; */

    width: 100%; /* fills the container width */
    max-width: 9rem; /* caps the size */
    height: auto; /* maintains aspect ratio */
    display: block; /* remove inline spacing */
  }

  .signIn-wrapper {
    display: flex;
    justify-content: flex-end;

    margin: 0;
  }

  #signInBtn,
  #signOutBtn {
    font-size: 0.8rem;
    padding: 0;
    /* min-width: unset; */
    width: 100%; /* fills the container width */
    max-width: 4rem; /* caps the size */

    border: 1px solid rgb(132, 125, 125);
    border-radius: 17px; /* Pill shape */
  }

  /* Message box */
  #messageContainer {
    top: 7em;
  }

  #message {
    padding: 1rem 2rem;
    border-radius: 12px;
    color: white;
    background: transparent; /* enforce base background */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* enforce base shadow */
    opacity: 1;
    display: inline-block;
  }

  /* Feature menu: move to bottom */
  .left-wrapper {
    position: fixed; /* stick to viewport */
    bottom: 0; /* anchor to bottom */
    top: auto !important; /* cancel the desktop top:0 */
    left: 0;
    right: 0;
    width: 100%;
    height: 60px; /* fixed height like a nav bar */

    display: flex;
    justify-content: space-around;
    align-items: center;

    background-color: black;
    z-index: 1000; /* above content */
  }

  .feature-box {
    position: relative;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    width: 100%;
    top: 0;
    padding-bottom: 3px;
  }

  .feature-button .tooltip {
    position: absolute;
    bottom: 110%; /* place above the button */
    left: 5%;

    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    /* white-space: nowrap; */
    pointer-events: none;
    transition: opacity 0.15s ease-in-out;
    opacity: 0;
    z-index: 10;
  }

  .feature-button:hover .tooltip {
    opacity: 1;
    pointer-events: auto;
  }

  /* Main content: stack vertically */
  .main-content {
    position: relative;
    margin-top: 350px; /* below top bar */
    padding: 0 10px 70px 10px; /* space for bottom bars */

    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Mode selector: move next to logo */
  .mode-wrapper {
    order: -1;

    position: static; /* override absolute positioning */

    margin-top: 10em;
    margin-left: 0;

    display: flex;
    align-items: center;
    width: auto;
  }

  .mode-option-selector {
    display: flex;
    flex-direction: row;

    padding: 10px;
    align-items: flex-start;
    justify-content: right;
  }

  .mode {
    font-size: clamp(1rem, 2vw, 1.5rem); /* responsive font size */
    transform: none !important;
    text-align: left;

    margin-right: 8px;

    background-color: black;
    border: 1px solid rgb(132, 125, 125);
    border-radius: 8px; /* Pill shape */
    padding: 2px 8px;
  }

  .mode.selected {
    background-color: white;
    color: black;
  }

  .logo-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem; /* spacing between logo and modes */

    margin-top: 3em;
    margin-left: 0.6em;
  }

  .logo {
    max-width: 120px;
    max-height: 60vw;

    padding-right: 10px;
  }

  /* Timer + controls stack */
  .time-choice-container {
    position: relative;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    margin: 1.5em 0 0.5em 0.68em;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    width: 100%;
  }

  .timerSmall-wrapper {
    position: fixed;
    top: 25vh;

    z-index: 50;
  }

  .timer-control {
    width: 100%;
    padding: 0;
  }
  .timer-wrapper {
    width: 100%;
    height: auto;

    /* margin-top: 1em; */

    justify-content: center;
    gap: 1em;
  }

  #sessionText {
    margin-top: -8px;
  }

  .timer {
    font-size: clamp(3rem, 1.7vw, 1.5rem);
  }

  .timer-button-wrapper {
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
  }

  #start {
    max-width: 200px;
    max-height: 2em;

    font-size: 1.5rem;
  }

  /* loop btn */
  #autoloop {
    margin: 1.5em;
  }

  /* Today date + stats: full width stacked */
  .today-date {
    position: relative;
    left: auto;
    top: auto;
    margin: 0.2rem 0 0 0;
    text-align: center;

    font-size: clamp(1rem, 2vw, 1.8rem);
  }

  .today-statistics {
    position: relative;
    left: auto;
    top: auto;
    flex-direction: column;
    align-items: center;
    margin: 0.5rem 0 1rem 0;
    gap: 12px;
  }
  .today-statistics-left-timeline th,
  .today-statistics-left-timeline td {
    min-width: 80px;
    font-size: 1rem;
  }
  .today-statistics-right-record {
    width: auto;
  }

  .record-box {
    min-width: 155px; /* allow more space for text */
  }

  /* Pomo bar: full width bottom */
  .todayPomoBar-wrapper {
    position: relative;
    left: auto;
    bottom: auto;

    padding: 0 2em;

    margin: 1rem 0.5em;
    width: 75%;
  }

  #completedPomo {
    margin-bottom: 2em;
  }
}
