@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

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

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: block;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-800);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation classes */
.animate-slide-up {
  animation: slideInUp 0.6s ease-out;
}

.animate-slide-down {
  animation: slideInDown 0.6s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.4s ease-out;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* 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: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--white) !important;
  font-family: var(--font-sans);
  letter-spacing: -0.025em;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.3);
}

.navbar-collapse {
  top: -10px;
  position: relative;
}

@media (min-width: 992px) {
  .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
}

#container {
  color: var(--white);
  margin-top: 100px;
  padding: var(--space-8);
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* Modern Glass Card for Timer */
.timer-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-2xl);
  padding: var(--space-12);
  box-shadow: var(--shadow-2xl);
  margin: var(--space-8) 0;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.timer-card::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) 100%);
  border-radius: var(--radius-2xl);
  pointer-events: none;
}

.timer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.25);
}

/* Modern Timer Display */
.digit {
  font-size: clamp(3rem, 12vw, 8rem);
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1;
  color: var(--white);
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
  transition: all var(--transition-normal);
  letter-spacing: -0.02em;
}

.txt {
  font-size: clamp(0.875rem, 3vw, 1.25rem);
  font-weight: 500;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-2);
}

#btn-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  width: 100%;
  max-width: 900px;
  gap: var(--space-4);
  margin: var(--space-12) auto;
  padding: var(--space-8);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
  #btn-container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    padding: var(--space-6);
  }
}

@media (max-width: 480px) {
  #btn-container {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-4);
  }
}

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

#time {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  text-align: center;
  margin: var(--space-8) 0;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.time-unit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left var(--transition-slow);
}

.time-unit:hover::before {
  left: 100%;
}

.time-unit:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  #time {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
  
  .time-unit {
    padding: var(--space-4);
  }
}

/* ===== 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;
  }
}

/* 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 {
  display: none;
  margin-top: var(--space-8);
  font-family: var(--font-sans);
  text-align: center;
  width: 100%;
  max-width: 900px;
  overflow-x: auto;
  padding: var(--space-6);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

#record-table {
  width: 100%;
  min-width: 300px;
  border-collapse: separate;
  border-spacing: 0 var(--space-2);
  margin: var(--space-4) auto;
}

/* tr:nth-of-type(odd) {
	background: rgb(65, 65, 65);
	} */

#record-table th,
#record-table td {
  text-align: center;
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  color: var(--white);
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  font-weight: 500;
  border: none;
}

#record-table tr {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

#record-table tr:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#record-table th {
  background: var(--primary-gradient) !important;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--white);
  box-shadow: var(--shadow-md);
}

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

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

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

.fa-moon {
  color: pink;
}

.fa-sun {
  color: yellow;
}

.todayDate {
  display: block;
  text-align: center;
  font-weight: 500;
  margin: var(--space-6) 0 0 0;
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.todayDate h3 {
  font-size: clamp(1rem, 3vw, 1.25rem);
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.025em;
}

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

/* Modern Button Variants */
#start {
  background: var(--success-gradient);
  border: 1px solid rgba(79, 172, 254, 0.3);
  box-shadow: 0 8px 32px rgba(79, 172, 254, 0.3);
}

#start:hover {
  box-shadow: 0 12px 40px rgba(79, 172, 254, 0.4);
  transform: translateY(-3px);
}

#reset {
  background: var(--danger-gradient);
  border: 1px solid rgba(250, 112, 154, 0.3);
  box-shadow: 0 8px 32px rgba(250, 112, 154, 0.3);
}

#reset:hover {
  box-shadow: 0 12px 40px rgba(250, 112, 154, 0.4);
  transform: translateY(-3px);
}

#lap {
  background: var(--warning-gradient);
  border: 1px solid rgba(67, 233, 123, 0.3);
  box-shadow: 0 8px 32px rgba(67, 233, 123, 0.3);
}

#lap:hover {
  box-shadow: 0 12px 40px rgba(67, 233, 123, 0.4);
  transform: translateY(-3px);
}

#clearlap {
  background: var(--secondary-gradient);
  border: 1px solid rgba(240, 147, 251, 0.3);
  box-shadow: 0 8px 32px rgba(240, 147, 251, 0.3);
}

#clearlap:hover {
  box-shadow: 0 12px 40px rgba(240, 147, 251, 0.4);
  transform: translateY(-3px);
}

#exportlap {
  background: var(--primary-gradient);
  border: 1px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

#exportlap:hover {
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
  transform: translateY(-3px);
}

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

.nav-item>a {
  margin-right: 30px;
}

.nav-item>a:hover {
  box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 4px;
  transition: all 0.2s ease;
}

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

.nav-link {
  transition: all 0.15s ease !important;
}

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

.buttons {
  color: var(--white);
  outline: none;
  min-height: 56px;
  height: auto;
  text-align: center;
  min-width: 140px;
  width: auto;
  max-width: 200px;
  flex: 1 1 auto;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.025em;
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-normal);
  margin: var(--space-2);
  padding: var(--space-4) var(--space-6);
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.buttons::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-normal);
}

.buttons:hover::before {
  left: 100%;
}

.buttons:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.buttons:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.buttons i {
  margin-right: var(--space-2);
  font-size: 1.1em;
}

.buttons span {
  font-weight: 600;
}

/* Control Panel */
.control-panel {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .control-panel {
    flex-direction: column;
    gap: var(--space-3);
  }
}

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

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

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(255, 255, 255, 0.1) !important;
  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;
}

:root {
  /* Modern Color Palette */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  
  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Modern Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Neumorphism Shadows */
  --neu-shadow-light: 8px 8px 16px #d1d9e6, -8px -8px 16px #ffffff;
  --neu-shadow-dark: 8px 8px 16px #0a0e1a, -8px -8px 16px #1a2332;
  --neu-inset-light: inset 8px 8px 16px #d1d9e6, inset -8px -8px 16px #ffffff;
  --neu-inset-dark: inset 8px 8px 16px #0a0e1a, inset -8px -8px 16px #1a2332;
  
  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Footer Styles */
.minimal-footer {
  margin-top: 3rem;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #e0e0e0;
  padding: 2rem 0 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-nav {
  color: #666;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.footer-nav:hover {
  color: #43c6ac;
}

.footer-nav.active {
  color: #43c6ac;
  font-weight: 600;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: #43c6ac;
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding: 1rem 2rem 0;
  margin-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  color: #666;
  font-size: 0.9rem;
}

/* Footer and social links responsive */
.social-links {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  gap: clamp(0.5rem, 3vw, 1.5rem);
  flex-wrap: wrap;
}

.textfooter {
  font-size: clamp(1rem, 3vw, 1.2rem) !important;
  margin: 1rem 0 !important;
}

.link {
  width: clamp(2.5rem, 8vw, 4rem);
  height: clamp(2.5rem, 8vw, 4rem);
}

/* Video Background Responsive */
@media (max-width: 768px) {
  .video-background video {
    filter: blur(6px) brightness(0.8);
  }

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

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-links {
    gap: 1.5rem;
  }

  .footer-brand {
    justify-content: center;
  }

  .my-class {
    padding: 1rem !important;
  }
}

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

/* Modern Glass Navbar */
.navcol {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-top: none !important;
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl) !important;
  box-shadow: var(--shadow-xl) !important;
  position: relative !important;
  transition: all var(--transition-normal) !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 #dee2e6 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 999 !important;
    padding: 20px 0 !important;
    border-radius: 0 0 15px 15px !important;
  }

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

  .nav-item {
    flex-direction: column !important;
    width: 100% !important;
    min-height: auto !important;
    max-height: none !important;
  }

  .nav-item>a {
    margin: 8px 15px !important;
    padding: 12px 20px !important;
    text-align: center !important;
    display: block !important;
    background-color: #f8f9fa !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.15s ease !important;
    font-size: 0.9rem !important;
    will-change: transform, background-color !important;
  }

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

  .nav-item>a#link--active {
    background-color: #ffd166 !important;
    box-shadow: 2.5px 2.5px 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;
  }

  #title1 {
    font-size: 1.4rem !important;
  }

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

  body.dark-mode .nav-item>a:hover {
    background-color: #ff6b35 !important;
    transition: all 0.15s ease !important;
  }

  body.dark-mode .nav-item>a#link--active {
    background-color: #ff6b35 !important;
    color: black !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: var(--space-3) var(--space-6);
  margin: var(--space-1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-lg);
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  transition: all var(--transition-normal);
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.mode-btn.active {
  background: var(--primary-gradient);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(102, 126, 234, 0.3);
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 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 {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: var(--white);
}

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

body.dark-mode .thinner {
  background: rgba(255, 255, 255, 0.1) !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) !important;
}

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 {
  transition: all 0.15s ease !important;
}

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

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

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 #exportlap {
  color: #43c6ac !important;
  border-color: #43c6ac !important;
}

body.dark-mode #exportlap:hover {
  color: #ffffff !important;
  background: rgba(67, 198, 172, 0.2) !important;
  border-color: #43c6ac !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;
}

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

/* ============================================
   ANIMATED PROGRESS CIRCLE STYLES
   ============================================ */

#progress-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.progress-circle {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-background {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}

.progress-ring-circle {
  fill: none;
  stroke: #00ff88;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 879.646; /* 2 * π * 140 */
  stroke-dashoffset: 879.646;
  transition: stroke-dashoffset 0.3s ease;
  filter: drop-shadow(0 0 10px #00ff88);
}

.progress-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Lap Progress Bars */
#lap-progress-bars {
  margin: 20px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  max-width: 600px;
  margin: 20px auto;
}

#lap-progress-bars h4 {
  color: white;
  text-align: center;
  margin-bottom: 15px;
}

.lap-bar {
  margin: 10px 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  height: 30px;
  position: relative;
}

.lap-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #00ccff);
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
}

.lap-bar-text {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  color: white;
  font-weight: bold;
  font-size: 12px;
  z-index: 1;
}

/* ============================================
   THEME PACKS / SEASONAL THEMES
   ============================================ */

#theme-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-dropdown {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

.theme-dropdown option {
  background: #333;
  color: white;
}

/* Halloween Theme */
body.halloween-theme {
  --primary-color: #ff6b35;
  --secondary-color: #8b4513;
  --accent-color: #ffa500;
}

body.halloween-theme .progress-ring-circle {
  stroke: #ff6b35;
  filter: drop-shadow(0 0 15px #ff6b35);
}

body.halloween-theme .digit {
  color: #ff6b35 !important;
  text-shadow: 0 0 20px #ff6b35;
}

body.halloween-theme .txt {
  color: #ffa500 !important;
}

body.halloween-theme .buttons {
  border-color: #ff6b35 !important;
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

body.halloween-theme .video-overlay {
  background: rgba(139, 69, 19, 0.4) !important;
}

/* Winter Theme */
body.winter-theme {
  --primary-color: #87ceeb;
  --secondary-color: #4682b4;
  --accent-color: #b0e0e6;
}

body.winter-theme .progress-ring-circle {
  stroke: #87ceeb;
  filter: drop-shadow(0 0 15px #87ceeb);
}

body.winter-theme .digit {
  color: #87ceeb !important;
  text-shadow: 0 0 20px #87ceeb;
}

body.winter-theme .txt {
  color: #b0e0e6 !important;
}

body.winter-theme .buttons {
  border-color: #87ceeb !important;
  box-shadow: 0 0 15px rgba(135, 206, 235, 0.3);
}

body.winter-theme .video-overlay {
  background: rgba(70, 130, 180, 0.3) !important;
}

/* Summer Theme */
body.summer-theme {
  --primary-color: #ffd700;
  --secondary-color: #ff8c00;
  --accent-color: #ffff00;
}

body.summer-theme .progress-ring-circle {
  stroke: #ffd700;
  filter: drop-shadow(0 0 15px #ffd700);
}

body.summer-theme .digit {
  color: #ffd700 !important;
  text-shadow: 0 0 20px #ffd700;
}

body.summer-theme .txt {
  color: #ffff00 !important;
}

body.summer-theme .buttons {
  border-color: #ffd700 !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

body.summer-theme .video-overlay {
  background: rgba(255, 140, 0, 0.2) !important;
}

/* Spring Theme */
body.spring-theme {
  --primary-color: #98fb98;
  --secondary-color: #32cd32;
  --accent-color: #90ee90;
}

body.spring-theme .progress-ring-circle {
  stroke: #98fb98;
  filter: drop-shadow(0 0 15px #98fb98);
}

body.spring-theme .digit {
  color: #98fb98 !important;
  text-shadow: 0 0 20px #98fb98;
}

body.spring-theme .txt {
  color: #90ee90 !important;
}

body.spring-theme .buttons {
  border-color: #98fb98 !important;
  box-shadow: 0 0 15px rgba(152, 251, 152, 0.3);
}

body.spring-theme .video-overlay {
  background: rgba(50, 205, 50, 0.2) !important;
}

/* Neon Theme */
body.neon-theme {
  --primary-color: #ff00ff;
  --secondary-color: #00ffff;
  --accent-color: #ff0080;
}

body.neon-theme .progress-ring-circle {
  stroke: #ff00ff;
  filter: drop-shadow(0 0 20px #ff00ff);
}

body.neon-theme .digit {
  color: #ff00ff !important;
  text-shadow: 0 0 30px #ff00ff, 0 0 40px #ff00ff;
}

body.neon-theme .txt {
  color: #00ffff !important;
  text-shadow: 0 0 20px #00ffff;
}

body.neon-theme .buttons {
  border-color: #ff00ff !important;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

body.neon-theme .video-overlay {
  background: rgba(128, 0, 128, 0.3) !important;
}

/* ============================================
   ANIMATED BACKGROUNDS
   ============================================ */

.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Particles Background */
.particles-bg {
  background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
}

.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.8;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Waves Background */
.waves-bg {
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: wave 4s ease-in-out infinite;
}

@keyframes wave {
  0% { transform: translateX(-50%) translateY(0px); }
  50% { transform: translateX(-50%) translateY(-10px); }
  100% { transform: translateX(-50%) translateY(0px); }
}

/* Matrix Rain Background */
.matrix-bg {
  background: #000;
  position: relative;
  overflow: hidden;
}

.matrix-char {
  position: absolute;
  color: #0f0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  animation: matrix-fall 3s linear infinite;
}

@keyframes matrix-fall {
  0% { transform: translateY(-100vh); opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* Starfield Background */
.stars-bg {
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  position: relative;
  overflow: hidden;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* Background Controls */
#background-controls {
  transition: all 0.3s ease;
}

#background-controls.hidden {
  transform: translateX(100%);
  opacity: 0;
}

#bg-toggle {
  transition: all 0.3s ease;
}

#bg-toggle:hover {
  background: rgba(255,255,255,0.4) !important;
  transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .progress-ring {
    width: 250px;
    height: 250px;
  }
  
  .progress-ring-background,
  .progress-ring-circle {
    r: 115;
    cx: 125;
    cy: 125;
  }
  
  #theme-controls {
    flex-direction: column;
    gap: 10px;
  }
  
  #background-controls {
    right: 10px;
    top: 80px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .progress-ring {
    width: 200px;
    height: 200px;
  }
  
  .progress-ring-background,
  .progress-ring-circle {
    r: 90;
    cx: 100;
    cy: 100;
  }
  
  .digit {
    font-size: 2.5rem !important;
  }
  
  .txt {
    font-size: 1rem !important;
  }
}
/* === FIX: Stopwatch menu/content overlap === */
.thinner,
nav.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

/* Push main content down so it doesn’t hide behind the fixed navbar */
#container {
  margin-top: 150px !important; /* previously 100–120px in media queries */
}

/* Optional – make sure stopwatch cards don’t overlap each other */
.timer-card,
#btn-container,
#record-container {
  position: relative;
  z-index: 1;
  margin-top: 20px;
}
