@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

/* CSS Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  background: black;
  display: block;
  min-height: 100vh;
  position: relative;
  background: transparent;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Video Background - Enhanced feature, falls back gracefully */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8; /* Ensure visibility of overlaid content */
}

/* Overlay to improve readability */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

hr {
  background-color: #fff;
}

#link--active {
  box-shadow: none;
  background-color: #ffd166;
  box-shadow: 2.5px 2.5px 0 var(--active);
}

.container-fluid {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.thinner {
  margin-top: 0;
  margin-bottom: 0px;
  height: 90px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  /* background-color: white; */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Ensure this base is fully transparent for glassmorphism to work on .navcol */
  background: transparent !important;
}

/* Ensure navbar sticks to top */
nav.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  max-height: 70px;
  /* Ensure base is transparent */
  background: transparent !important;
}

.maintitle {
  /* margin-bottom: 1rem; */
  min-height: 60px;
  max-height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease !important;
}
#title1 {
  font-weight: 700;
  font-size: 1.7rem;
  color: #ffffff !important;
}
.navbar-collapse {
  top: -10px;
  position: relative;
}

#container {
  color: #d7dfe4;
  margin-top: 100px;
  padding: 1rem;
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

@keyframes glow {
  from {
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.6), 0 0 80px rgba(102, 126, 234, 0.5), 0 0 120px rgba(118, 75, 162, 0.3);
    transform: scale(1);
  }

  to {
    text-shadow: 0 0 60px rgba(255, 255, 255, 1), 0 0 100px rgba(102, 126, 234, 0.8), 0 0 140px rgba(118, 75, 162, 0.6);
    transform: scale(1.02);
  }
}


/* Mobile First: Timer Display */
.digit {
  font-size: clamp(2rem, 8vw, 5rem);
  font-family: "digital-7";
  line-height: 1;
}

.txt {
  font-size: clamp(0.8rem, 3vw, 1.5rem);
  font-weight: bold;
  line-height: 1;
}

#btn-container {
  display: flex;
  width: 100%;
  max-width: 800px;
  justify-content: center;
  align-items: center;
  margin: 2rem auto;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.btn {
  padding: 7px 25px;
  font-size: 15px;
  margin: 4px 10px;
  color: white;
  border: 0px;
  border-radius: 5px;
  cursor: pointer;
}
.switch-theme {
  min-height: 80px;
  max-height: 90px;
  padding-top: 2px;
}
.timer {
  font-size: 100px;
  font-family: 'digital-7';
}

#time {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 1rem);
  text-align: center;
}

/* ===== RESPONSIVE DESIGN: MOBILE-FIRST ===== */

/* Small phones (320px and up) - Base mobile styles already applied above */
@media screen and (min-width: 320px) {
  .buttons {
    min-width: 100px;
    font-size: 0.8rem;
  }

  #btn-container {
    gap: 0.25rem;
  }

  .digit {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .txt {
    font-size: clamp(0.7rem, 2.5vw, 1rem);
  }
}

/* Large phones (480px and up) */
@media screen and (min-width: 480px) {
  .buttons {
    min-width: 110px;
    font-size: 0.9rem;
  }

  #btn-container {
    gap: 0.5rem;
  }

  .digit {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }

  .txt {
    font-size: clamp(0.8rem, 3vw, 1.2rem);
  }

  #container {
    margin-top: 110px;
    padding: 1.5rem;
  }
}

/* Tablets (768px and up) */
@media screen and (min-width: 768px) {
  .buttons {
    min-width: 130px;
    font-size: 1rem;
    flex: 0 1 auto;
  }

  #btn-container {
    gap: 1rem;
    max-width: 90%;
  }

  .digit {
    font-size: clamp(3rem, 10vw, 4.5rem);
  }

  .txt {
    font-size: clamp(1rem, 3.5vw, 1.8rem);
  }

  #container {
    margin-top: 120px;
    padding: 2rem;
  }

  #time {
    gap: clamp(1rem, 3vw, 1.5rem);
  }
}

/* Large tablets and small desktops (1024px and up) */
@media screen and (min-width: 1024px) {
  .buttons {
    min-width: 150px;
    font-size: 1.1rem;
    margin: 0.5rem;
  }

  #btn-container {
    gap: 1.5rem;
    max-width: 80%;
  }

  .digit {
    font-size: clamp(4rem, 12vw, 6rem);
  }

  .txt {
    font-size: clamp(1.2rem, 4vw, 2.2rem);
  }

  #container {
    margin-top: 130px;
  }

  #time {
    gap: clamp(1.5rem, 4vw, 2rem);
  }
}

/* Desktop (1200px and up) */
@media screen and (min-width: 1200px) {
  .buttons {
    min-width: 160px;
    font-size: 1.2rem;
  }

  .digit {
    font-size: clamp(5rem, 10vw, 7rem);
  }

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

/* Large desktops (1400px and up) */
@media screen and (min-width: 1400px) {
  .digit {
    font-size: clamp(6rem, 8vw, 8rem);
  }

  .txt {
    font-size: clamp(1.8rem, 2.5vw, 3rem);
  }

  .buttons {
    min-width: 180px;
    font-size: 1.3rem;
  }
}

/* Mobile landscape optimization */
@media screen and (max-height: 600px) and (orientation: landscape) {
  #container {
    margin-top: 80px;
    padding: 0.5rem;
    min-height: calc(100vh - 160px);
  }

  .digit {
    font-size: clamp(1.5rem, 6vh, 2.5rem);
  }

  .txt {
    font-size: clamp(0.6rem, 2.5vh, 1rem);
  }

  #time {
    gap: clamp(0.5rem, 2vh, 1rem);
    margin-bottom: 1rem;
  }

  .buttons {
    min-height: 36px;
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
  }

  #btn-container {
    margin: 1rem auto;
    gap: 0.5rem;
  }
}

#navbarSupportedContent {
  background-color: transparent;
  display: flex;
  flex-direction: row; 
}

/* Very small height devices */
@media screen and (max-height: 480px) and (orientation: landscape) {
  .digit {
    font-size: clamp(1.2rem, 5vh, 2rem);
  }

  .txt {
    font-size: clamp(0.5rem, 2vh, 0.8rem);
  }

  #container {
    margin-top: 60px;
    padding: 0.25rem;
  }

  .buttons {
    min-height: 32px;
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }
}

/* Button layout improvements for very small screens */
@media screen and (max-width: 360px) {
  #btn-container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    max-width: 280px;
  }

  .buttons {
    width: 90%;
    max-width: 200px;
    min-width: 140px;
    flex: none;
  }
}

/* Two-column button layout for medium small screens */
@media screen and (min-width: 361px) and (max-width: 480px) {
  #btn-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    max-width: 400px;
  }

  .buttons {
    width: 100%;
    min-width: auto;
  }
}

/* Button hover and active states optimization for touch devices */
@media (hover: none) and (pointer: coarse) {
  .buttons:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }

  .buttons:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
  }
}

/* High DPI / Retina displays optimization */
@media screen and (min-resolution: 192dpi), screen and (min-resolution: 2dppx) {
  .digit, .txt {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .buttons {
    border-width: 1px;
  }
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .video-background, .video-overlay {
    display: none !important;
  }

  .buttons, #btn-container {
    display: none !important;
  }

  nav {
    display: none !important;
  }

  footer {
    display: none !important;
  }

  #container {
    margin-top: 0 !important;
    padding: 2rem !important;
  }

  .digit, .txt {
    color: black !important;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .buttons:hover {
    transform: none !important;
  }
}

#clearLap {
  background-color: #ee42a6;
}

#laps {
  margin-top: 100px;
  text-align: center;
  font-size: 25px;
}

#record-container {
  /* record container is hidden by default */
  display: none;
  margin-top: 20px;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  width: 100%;
  max-width: 800px;
  overflow-x: auto;
  padding: 0 1rem;
}

#record-table {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  margin: 2rem auto;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

footer {
  margin-top: auto;
  padding: 0 !important;
  width: 100% !important;
  color: white !important;
  background: transparent !important;
}

.my-class {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2) !important;
  width: 100% !important;
  padding: 1rem 2rem;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(20px);
}
/* tr:nth-of-type(odd) {
	background: rgb(65, 65, 65);
	} */

#record-table th,
#record-table td {
  text-align: center;
  border-radius: 3px;
  padding: clamp(0.5rem, 3vw, 1.5rem);
  box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.1);
  color: #000;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
}

tr {
  /* MODIFIED: Adjusted for Glassmorphism in light mode */
  background-color: rgba(255, 255, 255, 0.2) !important;
  margin-bottom: 25px;
  backdrop-filter: blur(10px);
}

th {
  background-color: #95a5a6;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#record-table-body:nth-child(n + 7) {
  visibility: hidden;
}

#record-table::-webkit-scrollbar {
  width: 4px;
}

@keyframes progressGlow {
  from {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6), 0 0 40px rgba(118, 75, 162, 0.3);
  }

  to {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.9), 0 0 60px rgba(118, 75, 162, 0.5);
  }
}

#record-table::-webkit-scrollbar-track {
  border-radius: 20px;
  box-shadow: none;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

#record-table::-webkit-scrollbar-thumb {
  border-radius: 20px;
  box-shadow: 0in;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

/*DIGITAL CLOCK FONT*/

@font-face {
  font-family: "digital-7";
  src: url("fonts/digital-7.ttf");
}

.checkbox {
  opacity: 0;
  position: relative;
  top: 0px;
  right: 27px;
  z-index: 10;
  height: 3rem;
  width: 4rem;
  cursor: pointer;
}

.label {
  width: 50px;
  height: 26px;
  background-color: #111;
  display: flex;
  border-radius: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  margin-top: -40px;
  position: relative;
  transform: scale(1);
}

.ball {
  width: 20px;
  height: 20px;
  background-color: white;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  transition: transform 0.2s linear;
}

.checkbox:checked + .label .ball {
  transform: translateX(24px);
}

.modal {
  display: none;
  /* Hidden by default */
  position: fixed !important;
  z-index: 1000 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(5px) !important;
  animation: fadeIn 0.3s ease !important;
  overflow: auto !important;
  /* Enable scroll if needed */
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  margin: 5% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  scroll-behavior: smooth;
  transform: translateY(20px);
  animation: slideUp 0.4s ease forwards;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fa-moon {
  color: pink;
}

.fa-sun {
  color: yellow;
}

.todayDate {
  display: block;
  text-align: center;
  font-weight: bold;
  margin: 1rem 0;
  padding: 0 1rem;
}

.todayDate h3 {
  font-size: clamp(1rem, 4vw, 1.5rem);
  margin: 0;
}

.hov {
  width: max(4.5vw, 3rem);
  height: max(4.5vw, 3rem);
  transition: all 0.3s ease;
  position: relative;
}

.hov:hover {
  transform: translateY(-5px) scale(1.1);
  filter: brightness(1.1);
}

.hov:hover .link {
  background: linear-gradient(135deg, #ffd166 0%, #ffc107 100%);
  border-color: rgba(255, 209, 102, 0.8);
  box-shadow: 0 8px 25px rgba(255, 209, 102, 0.4);
  color: #333;
}

#start {
  color: #00ff00;
  border-color: #00ff00;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  border-radius: 20px 20px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}
  
#start:hover {
  color: #ffffff;
  background: rgba(0, 255, 0, 0.2);
  border-color: #00ff00;
  box-shadow: 0 0 4px #00ff00, 0 0 5px #00ff00, 0 0 37px rgba(0, 255, 0, 0.3);
  transform: translateY(-2px);
  transition-delay: 0.001s;
}

#reset {
  color: #9966cc;
  border-color: #9966cc;
}

#reset:hover {
  color: #ffffff;
  background: rgba(153, 102, 204, 0.2);
  border-color: #9966cc;
  box-shadow: 0 0 4px #9966cc, 0 0 5px #9966cc, 0 0 37px rgba(153, 102, 204, 0.3);
  transform: translateY(-2px);
  transition-delay: 0.001s;
}

#lap {
  color: #ffff00;
  border-color: #ffff00;
}

#lap:hover {
  color: #ffffff;
  background: rgba(255, 255, 0, 0.2);
  border-color: #ffff00;
  box-shadow: 0 0 4px #ffff00, 0 0 5px #ffff00, 0 0 37px rgba(255, 255, 0, 0.3);
  transform: translateY(-2px);
  transition-delay: 0.001s;
}

#clearlap {
  color: #ff0000;
  border-color: #ff0000;
}

#clearlap:hover {
  color: #ffffff;
  background: rgba(255, 0, 0, 0.2);
  border-color: #ff0000;
  box-shadow: 0 0 4px #ff0000, 0 0 5px #ff0000, 0 0 37px rgba(255, 0, 0, 0.3);
  transform: translateY(-2px);
  transition-delay: 0.001s;
}

.nav-item {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 80px;
  max-height: 90px;
}

.close:hover {
  color: #fff;
  transform: rotate(90deg);
  background: rgba(255, 255, 255, 0.1);
}
  
.nav-item > a {
  margin-right: 30px;
}

.nav-item > a:hover {
  box-shadow: rgba(0, 0, 0, 0.185) 0px 3px 8px;
}

/* Navigation links always dark */
.nav-link {
  color: #33001f !important;
}

.nav-link:hover {
  color: #eb4f16 !important;
}

.buttons {
  color: #fefefe;
  outline: none;
  min-height: 44px;
  height: auto;
  text-align: center;
  min-width: 120px;
  width: auto;
  max-width: 200px;
  flex: 1 1 auto;
  border-radius: 55px;
  background: rgba(228, 15, 15, 0.1);
  letter-spacing: 1px;
  text-shadow: 0;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.25s ease;
  margin: 0.25rem;
  padding: 0.75rem 1rem;
  font-family: "Roboto";
  overflow: hidden;
  border: 2px solid rgba(42, 17, 186, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.buttons:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(215, 6, 6, 0.3);
  transition-delay: 0.001s;
}

.animated-input input,
.animated-input textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #444;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  background-color: rgba(30, 30, 30, 0.9);
  color: #e0e0e0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.buttons:active {
  letter-spacing: 2px;
}

.buttons:focus {
  outline: none;
}

#disabling {
  pointer-events: none;
}

::-webkit-scrollbar {
  width: 10px;
  background-color: #ffffff90;
  /* background-color: transparent; */
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  /* background-image: -webkit-gradient(linear,
      left bottom,
      left top,
      color-stop(0.44, rgb(122, 153, 217)),
      color-stop(0.72, rgb(73, 125, 189)),
      color-stop(0.86, rgb(28, 58, 148))); */
  background-color: rgba(46, 46, 46, 0.729);
}

.social-links {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  gap: 20px;
}

.animated-input input:focus~.input-focus-effect,
.animated-input textarea:focus~.input-focus-effect {
  width: 100%;
  height: 100%;
  display: flex !important;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  color: #333;
  font-size: 18px;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 209, 102, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

li {
  width: max(4.5vw, 3rem);
  height: max(4.5vw, 3rem);
  list-style: none;
  margin: 8px;
}

.link {
  width: 100%;
  height: 100%;
  display: flex !important;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  color: #333;
  font-size: 18px;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 209, 102, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.textfooter {
  /* color: #333 !important; */
  font-size: 1.2rem;
  font-weight: 600;
  margin: 10px 0;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Style for red heart */
.textfooter .heart {
  color: #ff4757 !important;
  font-size: 1.3rem;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.container-fluid {
  padding: 0.3rem;
}

/* Main content container styling to match other pages */
body > .container-fluid {
  min-height: calc(100vh - 290px);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Additional container-fluid styling for footer */
footer {
  margin-top: auto;
  padding-left: 0;
  padding-right: 0;
  color: white !important;
  background: transparent !important;
}

.my-class {
  /* MODIFIED: Glassmorphism for Footer Content */
    background: rgba(0, 0, 0, 0.25) !important;
background-color: transparent;
  backdrop-filter: blur(10px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-top: 2px solid rgba(255, 255, 255, 0.5) !important; /* Enhanced separation border */
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2) !important;
  min-width: 100%;
  padding: 1rem 2rem;
  margin: 0 auto;
  margin-top: 40px;
}

input:checked+.toggle-label .toggle-inner {
  background-color: #ff6b6b;
}

input:checked+.toggle-label .toggle-inner:before {
  transform: translateX(24px);
}

:root {
  --main: #9aa4bf;
  --active: #d82323;
  --secondary: #800080;
  --tertiary: #;
  --light: white;
  --dark: black;
}

.btn {
  background-color: white;
  padding: auto 12px;
  height: 2.3em;
  position: relative;
  box-shadow: 5px 5px 0 var(--main);
  z-index: 2;
  border-radius: 5px;
}

.btn:hover {
  cursor: pointer;
}

.btn:before {
  content: "";
  width: 0;
  height: 0;
  bottom: 0px;
  right: 0px;
  position: absolute;
  z-index: -1;
  background: var(--main);
  transition: width 0.3s, height 0.3s;
  border-top-left-radius: 5px;
}

.btn:hover:before {
  width: calc(100% - 3px);
  height: calc(100% - 3px);
}

#timer-control {
  color: hsl(127, 100%, 57%);
}

.submit-btn:hover,
.cancel-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

.submit-btn:active,
.cancel-btn:active {
  transform: translateY(1px);
}
#timer-control:hover {
  color: #000000;
  background: hsl(131, 100%, 69%);
  box-shadow: 0 0 4px hsl(151, 88%, 70%), 0 0 5px hsl(159, 93%, 77%),
    0 0 37px hsl(157, 96%, 72%);
  transition-delay: 0.001s;
  font-size: large;
}


.navbar-nav {
  width: 100%;
  min-height: 80px;
  max-height: 90px;
  text-align: center;
}

/* Enhanced Glass-like transparent effect for navcol */
.navcol {
  /* MODIFIED: Adjusted for a lighter glass effect */
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(15px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(15px) saturate(150%) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-top: none !important;
  border-radius: 0 0 clamp(15px, 4vw, 25px) clamp(15px, 4vw, 25px) !important;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  position: relative !important;
}

.navcol::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.02) 100%
  ) !important;
  border-radius: 0 0 25px 25px !important;
  pointer-events: none;
}

.container-fluid-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  max-height: 90px;
  background: transparent !important;
}

/* Hamburger menu styles */
.navbar-toggler {
  display: none !important; /* Hidden by default on larger screens */
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  padding: 6px 10px !important;
  font-size: 1.25rem !important;
  line-height: 1 !important;
  background-color: rgb(77, 123, 247) !important;
  border-radius: 8px !important;
  z-index: 1001 !important;
  box-shadow: 0 4px 15px rgba(77, 123, 247, 0.3) !important;
  transition: all 0.3s ease !important;
}

.navbar-toggler:focus {
  text-decoration: none;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(77, 123, 247, 0.5) !important;
}

.navbar-toggler-icon {
  display: inline-block !important;
  width: 1.5em !important;
  height: 1.5em !important;
  vertical-align: middle !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 100% !important;
}

/* Navbar responsive behavior */
@media screen and (max-width: 991.98px) {
  .navbar-toggler {
    display: block !important;
  }

  .navbar-collapse {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    z-index: 999 !important;
    min-height: auto !important;
    padding: 1rem 0 !important;
    border-radius: 0 0 15px 15px !important;
  }

  .nav-item {
    flex-direction: column !important;
    width: 100% !important;
    min-height: auto !important;
    gap: 0.5rem !important;
  }

  .nav-item > a {
    margin: 0.25rem 1rem !important;
    padding: 0.75rem 1rem !important;
    text-align: center !important;
    display: block !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(0, 51, 51, 0.2) !important;
    color: #003333 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-size: 0.9rem !important;
  }
}

body.dark-mode {
  color: white;
  background: transparent;
}

body.dark-mode .video-overlay {
  background: rgba(0, 0, 0, 0.7) !important;
}

body.dark-mode .thinner {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .navbar-collapse {
  background: rgba(0, 0, 0, 0.9) !important;
}

body.dark-mode .nav-item>a {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .nav-item>a:hover {
  background-color: #ff6b35 !important;
  color: black !important;
}

body.dark-mode .nav-item>a#link--active {
  background-color: #ff6b35 !important;
  color: black !important;
}

  .nav-item > a:hover {
    background: #ffd166 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }

  .nav-item > a#link--active {
    background: #ffd166 !important;
    box-shadow: 2px 2px 0 var(--active) !important;
  }

  #switch-theme {
    display: flex !important;
    justify-content: center !important;
    margin: 1rem 0 0 0 !important;
  }

  .maintitle {
    margin-bottom: 0 !important;
  }

  .maintitle img {
    height: 2.5rem !important;
    width: 2.5rem !important;
  }

footer .container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.dark-mode #title1 {
  color: white !important;
  #title1 {
    font-size: 1.4rem !important;
  }
}

/* Extra small phones */
@media screen and (max-width: 480px) {
  .nav-item > a {
    margin: 0.25rem 0.5rem !important;
    padding: 0.6rem 0.8rem !important;
    font-size: 0.8rem !important;
  }

  .maintitle img {
    height: 2rem !important;
    width: 2rem !important;
    margin-right: 0.5rem !important;
  }

  #title1 {
    font-size: 1.2rem !important;
  }
}
@media (max-width: 480px) {
  .video-background video {
    filter: blur(4px) brightness(0.9);
  }

  .video-overlay {
    background: rgba(0, 0, 0, 0.5);
  }
}

#mode-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mode-btn {
  padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.8rem, 3vw, 1.2rem);
  margin: 0.25rem;
  border: 2px solid #003333;
  background-color: white;
  cursor: pointer;
  font-weight: bold;
  border-radius: 8px;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.mode-btn.active {
  background-color: #003333;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 51, 51, 0.3);
}

/* Countdown input responsive styles */
#countdown-input-container {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
  padding: 0 1rem;
}

#countdown-minutes {
  min-width: 100px;
  max-width: 150px;
  padding: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  text-align: center;
  color: #333;
}

#countdown-minutes::placeholder {
  color: rgba(51, 51, 51, 0.7);
}

/* #start-countdown inherits from .buttons class */

/* Dark Mode Styles */
body.dark-mode {
  color: white;
}

body.dark-mode .video-overlay {
  background: rgba(0, 0, 0, 0.7);
}

body.dark-mode #music-controls {
  background: rgba(0, 0, 0, 0.3) !important;
}
body.dark-mode .thinner {
  /* MODIFIED: Dark Glassmorphism for .thinner (Header) */
  background: rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(15px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(15px) saturate(150%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .my-class {
  /* MODIFIED: Dark Glassmorphism for Footer Content */
  background: rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(10px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: 2px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode hr {
  background-color: #ff6b35;
}

body.dark-mode #link--active {
  background-color: #ff6b35;
  color: black;
}

body.dark-mode .nav-link {
  color: #003333 !important;
}

body.dark-mode .nav-link:hover {
  color: #ff6b35 !important;
}

body.dark-mode .digit {
  color: #ff6b35 !important;
}

@keyframes buttonPulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6), 0 0 40px rgba(118, 75, 162, 0.3);
  }

  50% {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.9), 0 0 60px rgba(118, 75, 162, 0.5);
  }
}
body.dark-mode .txt {
  color: #ff6b35 !important;
}

body.dark-mode .todayDate h3 {
  color: white !important;
}

body.dark-mode .buttons {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .buttons:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode #start {
  color: #00ff00 !important;
  border-color: #00ff00 !important;
}

body.dark-mode #start:hover {
  color: #ffffff !important;
  background: rgba(0, 255, 0, 0.2) !important;
  border-color: #00ff00 !important;
}

body.dark-mode #reset {
  color: #9966cc !important;
  border-color: #9966cc !important;
}

body.dark-mode #reset:hover {
  color: #ffffff !important;
  background: rgba(153, 102, 204, 0.2) !important;
  border-color: #9966cc !important;
}

body.dark-mode #lap {
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}

body.dark-mode #lap:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 0, 0.2) !important;
  border-color: #ffff00 !important;
}

body.dark-mode #clearlap {
  color: #ff0000 !important;
  border-color: #ff0000 !important;
}

body.dark-mode #clearlap:hover {
  color: #ffffff !important;
  background: rgba(255, 0, 0, 0.2) !important;
  border-color: #ff0000 !important;
}

body.dark-mode .textfooter {
  color: white !important;
}

body.dark-mode .link {
  background-color: #ff6b35 !important;
  color: white !important;
}

body.dark-mode tr {
  /* MODIFIED: Dark Glassmorphism for Lap rows */
  background-color: rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(5px);
}

body.dark-mode th,
body.dark-mode td {
  color: white !important;
}

body.dark-mode th {
  background-color: #333 !important;
}

body.dark-mode .mode-btn {
  background-color: transparent !important;
  color: white !important;
  border-color: white !important;
}

@media (max-width: 991px) {
  .navbar-collapse {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(94, 95, 105, 0.74) !important;
    border-top: 1px solid #dee2e6 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    z-index: 999 !important;
    min-height: 300px !important;
    padding: 20px 0 !important;
  }

  .navbar-nav {
    margin-top: 0 !important;
  }

  .nav-item {
    flex-direction: column !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .nav-item>a {
    margin: 5px 15px !important;
    padding: 15px 20px !important;
    text-align: center !important;
    display: block !important;
    background-color: #f8f9fa !important;
    border-radius: 8px !important;
    border: 1px solid #e9ecef !important;
    color: #003333 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
  }

  .nav-item>a:hover {
    background-color: #ffd166 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
  }

  .nav-item>a#link--active {
    background-color: #ffd166 !important;
    box-shadow: 2.5px 2.5px 0 var(--active) !important;
  }

  #switch-theme {
    margin-left: 45%;
    margin-top: 25%;
  }
}

@media (max-width: 768px) {
  .timer {
    font-size: 80px;
    letter-spacing: 6px;
  }

  .button-pill {
    font-size: 0.85em;
    padding: 10px 20px;
  }

  #counter-background {
    padding: 100px 15px 40px !important;
  }

  .buttons {
    font-size: 0.9em;
    padding: 12px 25px;
    margin: 5px;
  }

  .progress-container {
    max-width: 90%;
  }

  #music-controls {
    padding: 15px !important;
  }

  .music-controls-row {
    flex-wrap: wrap;
    gap: 8px !important;
  }

  .music-control-btn {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .playlist-track {
    padding: 6px 8px;
    font-size: 14px;
  }

  h5 {
    font-size: 1em !important;
  }

  h3 {
    font-size: 1.2em !important;
  }

  #title1 {
    font-size: 1.1rem;
  }

  .maintitle img {
    height: 2.5rem !important;
    width: 2.5rem !important;
  }
}

@media (max-width: 480px) {
  .timer {
    font-size: 60px;
    letter-spacing: 4px;
  }

  .button-pill {
    font-size: 0.75em;
    padding: 8px 16px;
  }

  #counter-background {
    padding: 90px 10px 30px !important;
  }

  .buttons {
    font-size: 0.8em;
    padding: 10px 20px;
    margin: 5px;
  }

  h5 {
    font-size: 0.9em !important;
  }

  h3 {
    font-size: 1.1em !important;
  }

  .music-control-btn {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  #music-controls {
    padding: 12px !important;
  }

  .progress-container {
    max-width: 95%;
    height: 6px;
  }

  #title1 {
    font-size: 1rem;
  }

  .maintitle img {
    height: 2rem !important;
    width: 2rem !important;
    margin-right: 0.5rem !important;
  }

  .nav-link {
    font-size: 0.85rem !important;
  }
}
body.dark-mode .mode-btn.active {
  background-color: #ff6b35 !important;
  color: black !important;
}

body.dark-mode #countdown-minutes {
  background-color: rgba(0, 0, 0, 0.8) !important;
  color: white !important;
  border: 1px solid #ff6b35 !important;
}

body.dark-mode #countdown-minutes::placeholder {
  color: rgba(255, 255, 255, 0.7);
}
