body {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  background: transparent;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', 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;
}

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

/* Main layout and body styles */
body {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  background: transparent;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
}

/* Timer display container */
#counter-background {
  padding: 140px 20px 60px;
  min-height: 100vh;
}

input:focus {
  outline: none;
  border: none;
}

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

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

.navigation {
  transition: background-color 0.5s ease;
}

.inactive {
  color: rgb(169, 188, 214);
  background: transparent;
  transition: background-color 0.3s ease;
}

.active {
  color: #fff;
  background: transparent;
  transition: background-color 0.3s ease;
}

.button-pill {
  font-size: 1em;
  border-radius: 35px;
  padding: 14px 32px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.timer {
  font-size: 160px;
  font-family: 'digital-7', monospace;
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.8), 0 0 100px rgba(102, 126, 234, 0.6), 0 0 140px rgba(118, 75, 162, 0.4);
  color: #ffffff;
  font-weight: 300;
  letter-spacing: 15px;
}

.counter-background {
  background: rgb(1, 47, 99);
}

.hide {
  color: rgb(137, 192, 189);
}

.checkbox {
  opacity: 0;
  position: absolute;
  z-index: 10;
  height: 2rem;
  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;
  position: relative;
  transform: scale(1);
}

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

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

.fa-moon {
  color: pink;
}

.fa-sun {
  color: yellow;
}

button.btn.btn-outline-primary.button-pill.px-3 {
  transition: transform 0.03s;
}

button.btn.btn-outline-primary.button-pill.px-3:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
  background: rgba(255, 255, 255, 0.25);
  border-color: white;
}

/* Navigation styles now come from main style.css */

#title1 {
  font-weight: 700;
  font-size: 1.3rem;
  color: white;
}

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

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

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

.hov:hover .link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: rgba(102, 126, 234, 0.8);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  color: white;
}

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

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: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 18px;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

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

.textfooter .heart {
  color: #ff4757 !important;
  font-size: 1.3rem;
}

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);
}

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

#custom-timer-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  padding: 0;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  #custom-timer-form {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
}

.form__group {
  position: relative;
  padding: 15px 0 0;
  width: 100%;
  max-width: 140px;
}

.form__group.field {
  min-width: 120px;
}
  
.btn-group {
  display: flex;
  align-items: flex-end;
  padding-bottom: 5px;
}

.form__field {
  font-family: inherit;
  width: 100%;
  border: none;
  border-bottom: 1px solid #ffffff;
  outline: 0;
  font-size: 14px;
  color: #fff;
  padding: 5px 0;
  background: transparent;
  transition: all 0.3s ease;
  font-weight: 500;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
  min-width: 80px;
}

.form__field::-webkit-outer-spin-button,
.form__field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form__field::placeholder {
  color: transparent;
}

.form__field:placeholder-shown ~ .form__label {
  font-size: 12px;
  cursor: text;
  top: 20px;
}

.form__label {
  position: absolute;
  top: 0;
  display: block;
  transition: 0.2s;
  font-size: 14px;
  color: #ffffff;
  pointer-events: none;
}

.form__field:focus {
  padding-bottom: 6px;
  font-weight: 700;
  border-width: 3px;
  border-color: white;
  border-image: linear-gradient(to right, #116399, #21f341);
  border-image-slice: 1;
}

.form__field:focus ~ .form__label {
  position: absolute;
  top: 0;
  display: block;
  transition: 0.2s;
  font-size: 14px;
  color: #21f341;
  font-weight: 700;
}

/* reset input */
.form__field:required, .form__field:invalid {
  box-shadow: none;
}


/* button  */

.animated-button {
  position: relative;
  display: inline-block;
  padding: 6px 15px;
  border: none;
  font-size: 14px;
  background-color: inherit;
  border-radius: 100px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 0 0 2px #ffffff;
  cursor: pointer;
  overflow: hidden;
/*   transition: all 0.3s ease; */
  backdrop-filter: blur(10px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  margin-bottom: 6px;
  height: 34px;
}

.animated-button span:last-child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-color: #21f341;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
}

.animated-button span:first-child {
  position: relative;
  z-index: 1;
}

.animated-button:hover {
  box-shadow: 0 0 0 5px #21f35960;
  color: #ffffff;
}

.animated-button:active {
/*   scale: 0.95; */
  transform: scale(0.95);
}

.animated-button:hover span:last-child {
  width: 150px;
  height: 150px;
  opacity: 1;
}

/* Footer Styles - Standardized */
/* Social links for footer */
.social-links {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 5px 0;
  gap: 15px;
  list-style: none;
  margin: 0.5rem 0 1rem;
  width: 100%;
}

li.hov {
  width: max(4.5vw, 3.5rem);
  height: max(4.5vw, 3.5rem);
  list-style: none;
  margin: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link {
  width: 100%;
  height: 100%;
  display: flex !important;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: white;
  color: #333;
  font-size: 22px;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 209, 102, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  object-fit: contain;
  padding: 8px;
}

.hov:hover .link {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.7);
  border-color: rgba(255, 209, 102, 1);
  filter: brightness(1.1) drop-shadow(0 0 5px rgba(255, 209, 102, 0.5));
}

.social-container a:hover .social-icon {
  transform: scale(1.1);
}

.textfooter {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 8px 0;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  color: white;
}

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

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

/* Footer styling to exactly match main page */
footer {
  margin-top: auto;
  padding-left: 0;
  padding-right: 0;
  color: white !important;
  background: transparent !important;
  position: relative;
  width: 100%;
  z-index: 10;
  margin-top: 40px;
}

.my-class {
  background: rgba(0, 0, 0, 0.4) !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.3) !important;
  width: 100%;
  padding: 0.5rem 1rem;
  margin: 0;
}

.animated-button span:last-child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
}

.animated-button span:first-child {
  position: relative;
  z-index: 1;
}

.animated-button:hover {
  box-shadow: 0 0 0 2px white, 0 10px 25px rgba(255, 255, 255, 0.3);
  color: #f5576c;
  transform: translateY(-2px);
}

.animated-button:active {
  scale: 0.95;
}

.animated-button:hover span:last-child {
  width: 200px;
  height: 200px;
  opacity: 1;
 }
  
@keyframes pulse {
  from {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  }

  to {
    transform: scale(1.04);
    filter: drop-shadow(0 0 20px rgba(255, 71, 87, 0.8));
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.6);
  }
}

/* full-screen confetti layer */
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
}

/* single confetti piece */
.confetti {
  position: absolute;
  top: -10vh;
  width: 10px;
  height: 14px;
  opacity: 0.9;
  transform: translateY(-100px) rotate(0deg);
  animation: confetti-fall linear forwards;
}

.hidden {
  display: none !important;
}
/* Progress Bar Styles */
#progress-container {
  width: 100%;
  max-width: 600px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  overflow: hidden;
  margin: 35px auto;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

#progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  transition: width 0.25s linear;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(102, 126, 234, 0.8), 0 0 50px rgba(118, 75, 162, 0.4);
}

.buttons {
  font-size: 1em;
  border-radius: 35px;
  padding: 14px 32px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  outline: none;
  cursor: pointer;
}

.buttons:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.25);
  border-color: white;
}

.buttons:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
}

.confetti {
  position: absolute;
  top: -10vh;
  width: 10px;
  height: 14px;
  opacity: 0.9;
  transform: translateY(-100px) rotate(0deg);
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(120vh) rotate(720deg);
    opacity: 1;
  }
}

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

/* Dark mode navbar styles now come from main style.css */

body.dark-mode .my-class {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(20px);
}

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

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

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

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

body.dark-mode .timer {
  color: #ffffff !important;
  text-shadow: 0 0 40px rgba(102, 126, 234, 0.6), 0 0 80px rgba(118, 75, 162, 0.4) !important;
}

body.dark-mode .active {
  color: #667eea !important;
}

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

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

/* Dark mode hover for main buttons */
body.dark-mode .buttons:hover {
  background: rgba(255, 255, 255, 0.35) !important; /* from enh/ui */
  transform: translateY(-3px); /* from enh/ui */
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.3) !important; /* from enh/ui */
  color: black !important; /* optional: keeps text readable if needed */
}

/* Dark mode styling for round buttons (from main) */
body.dark-mode .round-btn {
  border-color: #ff6b35 !important;
  color: #ff6b35 !important;
}

body.dark-mode .round-btn:hover {
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.5) !important;
}

/* Footer text color in dark mode */
body.dark-mode .textfooter {
  color: white !important;
}

/* Social icon adjustments for dark mode */
body.dark-mode .social-icon {
  background-color: white !important;
}

body.dark-mode .social-icon i {
  color: black !important;
}

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

/* Dark mode styling for social links */
body.dark-mode .link {
  background: rgba(102, 126, 234, 0.3) !important; /* from enh/ui */
  color: white !important; /* from enh/ui */
  border: 2px solid rgba(255, 209, 102, 0.2) !important; /* from main */
  font-size: 22px; /* from main */
}

/* Hover effect for links */
body.dark-mode .hov:hover .link {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.7);
  border-color: rgba(255, 209, 102, 1) !important;
  filter: brightness(1.1) drop-shadow(0 0 5px rgba(255, 209, 102, 0.5));
}

/* Dark mode for video overlay and header */
body.dark-mode .video-overlay {
  background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .thinner {
  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.2);
}

/* Dark footer */
body.dark-mode .my-class {
  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 footer {
  background: transparent !important;
}

/* Dark mode styling for input fields */
body.dark-mode .form__field {
  color: #ff6b35 !important;
  border-bottom-color: #ff6b35 !important;
}

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

body.dark-mode .form__field:focus {
  border-image: linear-gradient(to right, #ff6b35, #ff6b35) !important;
}

body.dark-mode .form__field:focus ~ .form__label {
  color: #ff6b35 !important;
}

/* Dark mode styling for buttons */
body.dark-mode .btn-outline-primary {
  color: white !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .btn-outline-primary:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
}


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

body.dark-mode #progress-bar {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important; /* from enh/ui */
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.6) !important; /* from enh/ui */
  transition: width 0.25s linear !important; /* from enh/ui */
}


/* Responsive Design */
@media screen and (max-width: 990px) {
  .digit {
    font-size: 70px;
  }

  .txt {
    font-size: 50px;
  }
  
  #time {
    max-width: 450px;
    padding: 12px 0;
  }
}

@media screen and (max-width: 890px) {
  .digit {
    font-size: 60px;
  }

  .txt {
    font-size: 45px;
  }

  #container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
  }
  
  #time {
    max-width: 400px;
  }
}

@media screen and (max-width: 768px) {
  .digit {
    font-size: 50px;
  }

  .txt {
    font-size: 40px;
  }

  #btn-container {
    width: 100%;
    justify-content: space-around;
  }

  #custom-timer-form {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .form__group, .btn-group {
    margin-bottom: 5px;
  }
  
  #time {
    max-width: 350px;
    padding: 10px 0;
  }
}

@media screen and (max-width: 490px) {
  .digit {
    font-size: 40px;
  }

  .txt {
    font-size: 30px;
    margin: 0 2px;
  }

  #container {
    padding: 0;
    margin: 20px auto 0;
  }
  
  #time {
    max-width: 300px;
    padding: 8px 0;
  }
}

body.dark-mode .animated-button {
  color: #ff6b35 !important;
  box-shadow: 0 0 0 2px #ff6b3520 !important;
}

body.dark-mode .animated-button:hover {
  box-shadow: 0 0 0 5px #ff6b3560 !important;
  color: #ffffff !important;
}

body.dark-mode .animated-button span:last-child {
  background-color: #ff6b35 !important;
}

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

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

/* Mobile navbar styles now come from main style.css */

@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%;
  }

  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;
  }

  #custom-timer-form {
    gap: 15px;
    flex-direction: column;
    align-items: center;
  }

  .form__group {
    max-width: 140px;
  }

  .animated-button {
    padding: 9px 25px;
    font-size: 13px;
  }
}

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

  .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;
  }

  #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;
  }

  #custom-timer-form {
    gap: 12px;
    flex-direction: column;
    align-items: center;
  }

  .form__group {
    max-width: 120px;
  }

  .animated-button {
    padding: 8px 20px;
    font-size: 12px;
  }
}