@import url('https://fonts.googleapis.com/css2?family=Jersey+10&display=swap');


body {
    background-color: #000;
    color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }
  
  .theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8em;
    cursor: pointer;
  }

  .container {
    text-align: center;
    padding: 0 20px;
    margin-top: 10px; /* Was 60px */
  }
  
  h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
  }
  
  #timer {
    font-size: 11em;
    margin: 10px 0; /* Was 40px 0 */
    font-family: 'Jersey 10', sans-serif;
    font-weight: 400;
  }
  
/* 🔲 Main timer buttons – 8-bit arcade style */
.controls button {
    background-color: #fff;
    color: #000;
    font-family: 'Jersey 10', sans-serif;
    font-size: 1.5em;
    padding: 12px 24px;
    margin: 10px;
    border: 4px solid #fff;
    border-radius: 0;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.1s ease;
  }
  
  .controls button:hover {
    transform: scale(1.05);
    background-color: #000;
    color: #fff;
    border-color: #fff;
  }
  
  
  /* ⚪ Overlay buttons – modern rounded style */
  .overlay-content button {
    background-color: #fff;
    color: #000;
    border: none;
    padding: 12px 24px;
    margin: 10px;
    font-size: 1.2em;
    font-family: 'Barlow Condensed', sans-serif;
    cursor: pointer;
    border-radius: 40px;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
  
  .overlay-content button:hover {
    transform: scale(1.05);
    background-color: #eaeaea;
  }
  

/* Gamified Save Feedback */
/* Saved message */
.main-save-feedback {
  margin-top: 1rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
  opacity: 0;
  transition: opacity 0.3s;
}

.main-save-feedback.show {
  opacity: 1;
}

@keyframes floatUpBadge {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-20px);
    opacity: 0;
  }
}


  
  #progress {
    margin-top: 20px;
    font-size: 1.5em;
  }
  
  /* Centered burger menu icon */
  .menu-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5em;
    cursor: pointer;
  }

  
  /* Full screen overlay menu */
  .overlay-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: black;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .overlay-menu.show {
    display: flex;
  }
  
  .overlay-inner {
    background-color: black;
    border: 3px solid white;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 6px 6px 0px white;
    position: relative;
  }
  
  .menu-style {
    box-shadow: 6px 6px 0px #fff;
    border: 3px solid #fff;
    border-radius: 12px;
  }
  

  .overlay-title {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
  }

  
  .overlay-close {
    font-size: 1.5rem;
    color: white;
    position: absolute;
    top: 12px;
    right: 16px;
    cursor: pointer;
  }
  
  .overlay-content label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: bold;
    margin-top: 1rem;
  }
  
  .overlay-content input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed #fff;
    background: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    border-radius: 6px;
  }
  
  
/* Hide default up/down arrows in number input */
.overlay-content input[type="number"]::-webkit-inner-spin-button,
.overlay-content input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.overlay-content input[type="number"] {
  appearance: textfield; /* Firefox */
  -moz-appearance: textfield; /* Older Firefox */
  font-size: 2em;
  font-weight: bold;
  padding: 12px 20px;
  border: 2px solid white;
  border-radius: 40px;
  background-color: #111;
  color: white;
  text-align: center;
  font-family: 'Barlow Condensed', sans-serif;
}
  
  .timer-buttons {
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .timer-buttons button {
    border-radius: 40px;
    padding: 12px 24px;
    font-size: 1.2em;
    font-family: 'Barlow Condensed', sans-serif;
    background-color: #fff;
    color: #000;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
  
  .timer-buttons button:hover {
    transform: scale(1.05);
    background-color: #eaeaea;
  }
  


  .overlay-buttons button {
    width: 100%;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    background: #000;
    border: 2px solid #fff;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
  }
  
  .overlay-buttons button:hover {
    background: #111;
    transform: scale(1.02);
  }



  .overlay-content select {
    display: block;
    width: 80%;
    margin: 10px auto;
    padding: 12px;
    font-size: 1.2em;
    font-family: 'Barlow Condensed', sans-serif;
    border: none;
    border-radius: 40px;
    background-color: #fff;
    color: #000;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
  
  .overlay-content select:hover {
    transform: scale(1.03);
    background-color: #eaeaea;
  }
  
  
  .overlay-content button:hover {
    background-color: #ccc;
  }

  .overlay-content button {
    margin-top: 20px;
    background-color: #fff;
    color: #000;
    border: none;
    padding: 12px 24px;
    font-size: 1.2em;
    font-family: 'Barlow Condensed', sans-serif;
    cursor: pointer;
    border-radius: 40px;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
  
  .overlay-content button:hover {
    transform: scale(1.05);
    background-color: #eaeaea;
  }
  
  /* Overlay top-right X button */
.overlay-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2em;
    cursor: pointer;
    color: #fff;
  }
  
  /* Consistent width for inputs and buttons */
  .overlay-content input[type="number"] {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    font-size: 1.3em;
    text-align: center;
    border: 2px solid #fff;
    border-radius: 30px;
    background-color: transparent;
    color: #fff;
    font-family: 'Barlow Condensed', sans-serif;
    transition: all 0.2s ease;
  }
  
  .overlay-content input[type="number"]:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  
  .overlay-content .bottom-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
  }
  

  .blink-colon {
    animation: blink 1s step-start infinite;
  }
  
  @keyframes blink {
    50% { opacity: 0; }
  }
  

  .settings-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    color: #fff;
    border: 3px solid #fff;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    z-index: 1000;
    box-shadow: 6px 6px 0px #fff;
    font-family: 'Courier New', monospace;
  }
  
  
  .settings-panel label {
    margin-top: 1rem;
    font-size: 1rem;
    display: block;
  }
  
  .settings-panel input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border: 2px solid #fff;
    border-radius: 6px;
    background: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
  }
  
  .settings-panel button {
    margin-top: 1.5rem;
    padding: 0.75rem;
    width: 100%;
    font-weight: bold;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
  }
  






  .mode-toggle {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
    font-size: 1.3em;
  }
  
  .mode-option {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 30px;
    font-family: 'Barlow Condensed', sans-serif;
    transition: all 0.2s ease;
    color: #fff;
    border: 2px solid transparent;
  }
  
  .mode-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .mode-option.active {
    border: 2px solid #fff;
    font-weight: bold;
  }
  







  .theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1em;
    font-family: 'Barlow Condensed', sans-serif;
    padding: 6px 12px;
    border: 2px solid #fff;
    border-radius: 30px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  body.light-mode {
    background-color: #fff;
    color: #000;
  }
  
  body.light-mode #timer {
    color: #000;
  }
  
  body.light-mode .controls button {
    background-color: #000;
    color: #fff;
    border: 4px solid #000;
  }
  
  body.light-mode .controls button:hover {
    background-color: #fff;
    color: #000;
    border-color: #000;
  }
  
  body.light-mode .overlay-menu {
    background-color: #f3f3f3;
    color: #000;
  }
  
  body.light-mode .overlay-close {
    color: #000;
  }
  
  body.light-mode .overlay-content label {
    color: #444;
  }
  
  body.light-mode .overlay-content input[type="number"] {
    background-color: #fff;
    color: #000;
    border: 2px solid #000;
  }
  
  body.light-mode .overlay-content input[type="number"]:focus {
    background-color: #f0f0f0;
  }

  body.light-mode .mode-option {
    color: #000 !important;
    border-color: transparent !important;
  }
  
  body.light-mode .mode-option:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
  }
  
  body.light-mode .mode-option.active {
    border: 2px solid #000 !important;
    color: #000 !important;
    font-weight: bold;
  }
  




  body.light-mode .theme-toggle {
    color: #000 !important;
    border: 2px solid #000 !important;
  }
  
  body.light-mode .theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
  }




  #clockDisplay {
    display: none;
    font-size: 4em;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: inherit; /* keeps dark or light theme */
    z-index: 999;
  }
  
  #clockTime {
    font-size: 30em;
    font-family: 'Jersey 10', sans-serif;
    color: white;
  }
  
  .clock-big {
    font-size: 10em;
    font-family: 'Jersey 10', sans-serif;
    font-weight: 400;
  }
  

  /* Make the colon blink */
  .blink-colon {
    animation: blink 1s step-start infinite;
  }

  .clock-toggle {
    position: absolute;
    top: 20px;
    right: 150px; /* adjust spacing from the other toggle */
    font-size: 1em;
    font-family: 'Barlow Condensed', sans-serif;
    padding: 6px 12px;
    border: 2px solid #fff;
    border-radius: 30px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .clock-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  body.light-mode .clock-toggle {
    border-color: #000;
    color: #000;
  }
  
  body.light-mode .clock-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }
  

  /* Fix clockTime color in light mode */
body.light-mode #clockTime {
  color: #000;
}

body.light-mode #escHint {
  color: #666; /* Light grey */
}






/* TASK MANAGER SECTION */
.task-box {
  /* …your existing styling… */
  background: #000;
  border: 3px solid #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 90%;
  max-width: 600px;
  margin: 40px auto 0;
  box-shadow: 6px 6px 0px #fff;

  /* ← NEW: cap total height & hide overflow */
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.task-content-wrapper {
  /* ← only this middle area scrolls */
  flex: 1 1 auto;
  overflow-y: auto;

  /* ← REVERT to block so items align flush under header */
  display: block;
  padding: 0;  /* container already has padding */
}

/* ← Ensure individual lists don’t scroll on their own */
.task-list,
#completedTaskList {
  max-height: none;
  overflow-y: visible;
}

.task-menu {
  background-color: #000;
  border: 3px solid #fff;
  border-radius: 12px;
  padding: 1rem;
  margin: 2rem auto;
  width: 90%;
  max-width: 400px;
  font-family: 'Jersey 10', sans-serif;
  box-shadow: 6px 6px 0px #fff;
  overflow: hidden;
  color: #fff;
}

.task-box-header {
  /* keep header always visible */
  flex: 0 0 auto;
}

.task-input {
  flex: 0 0 auto;
  margin-bottom: 0.5rem;
}

.task-input input {
  flex: 1;
  padding: 0.5rem;
  font-family: 'Courier New', monospace;
  border: 2px solid #fff;
  border-radius: 6px;
  background: #000;
  color: #fff;
}

.task-input button {
  font-weight: bold;
  padding: 0.5rem 1rem;
  border: 2px solid #fff;
  background: #000;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.task-menu-title {
  font-size: 25px;
  font-weight: bold;
  font-family: 'Jersey 10', sans-serif;
  display: flex;
  align-items: center;
}

.task-menu-title::before {
  content: ''; /* Make sure it's empty! */
}

.task-menu-level {
  font-size: 1rem;
  background: #fff;
  color: #000;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-weight: bold;
}

.task-list li {
  padding: 0.5rem;
  background: #000;
  border: 2px dashed #fff;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}

.add-task-container {
  display: flex;
  margin-top: 1rem;
  gap: 0.5rem;
}

#newTaskInput {
  flex: 1;
  padding: 0.5rem;
  font-family: 'Courier New', monospace;
  border: 2px solid #fff;
  border-radius: 4px;
  background: #000;
  color: #fff;
}

.add-task-container button {
  padding: 0.5rem 1rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  border: 2px solid #fff;
  background: #000;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.task-list li button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.task-item {
  background-color: black;
  border: 2px dashed white;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Courier New', monospace;
  animation: popIn 0.3s ease;
}

.task-content {
  display: flex;
  align-items: center;
}

/* Task text */
.task-text {
  flex-grow: 1;
  color: white;
  font-size: 1.1rem;
}

.completed-tasks {
  margin-top: 20px;
  border-top: 1px dashed #fff;
  padding-top: 10px;
  font-size: 0.9em;
  color: #999;
}

.completed-tasks h3 {
  margin-bottom: 5px;
  font-size: 1em;
  color: #bbb;
}

.completed-box {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 2px solid #fff;
}

.completed-box h3 {
  font-size: 0.9rem;
  color: #fff;
  font-family: 'Courier New', monospace;
  margin-bottom: 8px;
}

.completed-box.collapsed ul {
  display: none;
}

#toggleCompleted {
  background: transparent;
  border: 1px solid #fff;
  border-radius: 4px;
  color: #fff;
  padding: 2px 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

.task-list.completed .task-text {
  opacity: 0.6;
  text-decoration: line-through;
}

.task-counter {
  font-size: 1rem;
  background: #fff;
  color: #000;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: bold;
  font-family: 'Jersey 10', sans-serif;
}

/* Keep header pinned */
.task-box-header {
  flex: 0 0 auto;
}

/* Buttons */
.edit-btn,
.delete-btn {
  margin-left: 12px;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.edit-btn:hover,
.delete-btn:hover {
  transform: scale(1.2);
}

.edit-input {
  font-family: monospace;
  font-size: 1.2em;
  background: black;
  color: white;
  border: 2px dashed white;
  border-radius: 6px;
  padding: 5px;
  flex-grow: 1;
}



/* Buttons */
.edit-btn,
.delete-btn {
  margin-left: 12px;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.edit-btn:hover,
.delete-btn:hover {
  transform: scale(1.2);
}

.edit-input {
  font-family: monospace;
  font-size: 1.2em;
  background: black;
  color: white;
  border: 2px dashed white;
  border-radius: 6px;
  padding: 5px;
  flex-grow: 1;
}

/* === ANIMATION === */
@keyframes popIn {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ✅ Done Button Style */
.done-btn {
  margin-left: 12px;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.done-btn:hover {
  transform: scale(1.2);
}

/* ✅ Strike-through and faded when done */
.task-done {
  text-decoration: line-through;
  opacity: 0.5;
}



#mainSaveFeedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: #000;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  z-index: 9999;
  display: none;
  opacity: 0;
  pointer-events: none;
}

.fadeIn {
  display: block;
  animation: fadeInUp 0.5s ease forwards;
}

.fadeOut {
  animation: fadeOutDown 0.5s ease forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes fadeOutDown {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
}


#timeUpPopup {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: #000;
  font-family: 'Courier New', monospace;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 0 0 4px #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 9999;
}
#timeUpPopup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}
#timeUpPopup.hide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
}

/* XP BAR */

/* =====================================
   XP Progress Bar
===================================== */
.xp-bar {
  width: 80%;
  max-width: 400px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid #fff;
  border-radius: 10px;
  margin: 20px auto 0;
  position: relative;
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(to right, #00ff99, #00ccff);
  width: 0%;
  transition: width 0.3s ease;
}

.xp-level {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Jersey 10', sans-serif;
  font-size: 0.8em;
  color: #fff;
  pointer-events: none;
}

.xp-bar-retro {
  display: flex;
  gap: 2px;
  justify-content: center;
  margin: 10px auto;
  width: fit-content;
}

.xp-block {
  width: 10px;
  height: 12px;
  border: 1px solid #fff;
  background-color: transparent;
}

.xp-retro-bar-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px auto;
  width: fit-content;
}

.xp-retro-label {
  font-family: 'Jersey 10', sans-serif;
  font-size: 1rem;
  color: #fff;
}

.xp-retro-bar-outer {
  width: 200px;
  height: 12px;
  border: 2px solid #fff;
  background-color: transparent;
  position: relative;
  overflow: hidden;
}

.xp-retro-bar-fill {
  height: 100%;
  width: 0%;
  background-color: #fff;
  transition: width 0.3s ease;
}

.xp-block[data-filled="true"] {
  background-color: #353535;
}


body.light-mode #xpLevel {
  color: #000;
}

body.light-mode #xpBarOuter {
  border-color: #000;
  background: #ccc;
}

body.light-mode #xpBarInner {
  background: green;
}


.xp-popup {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: #00ff99;
  opacity: 0;
  pointer-events: none;
  animation: xpFloatUp 1s ease forwards;
  z-index: 9999;
}

@keyframes xpFloatUp {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
  }
}



.xp-progress-text {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  text-align: center;
  color: #fff;
  margin-top: 5px;
}

body.light-mode .xp-progress-text {
  color: #000;
}





/* Stats Overlay */
.stats-overlay {
  display: none;
  flex-direction: column;
}
.stats-overlay.show {
  display: flex;
}
.stats-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.kpi-card {
  background: #111;
  border: 2px solid #fff;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-family: 'Courier New', monospace;
}
.kpi-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f0;
}
.kpi-card p {
  margin: 0.5rem 0 0;
  font-size: 1rem;
}