/* Normal */
@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-72-Light.woff2') format('woff2');
  font-weight: 300; /* Light */
  font-style: normal;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-73-Book.woff2') format('woff2');
  font-weight: 400; /* Book (regular) */
  font-style: normal;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-75-Medium.woff2') format('woff2');
  font-weight: 500; /* Medium */
  font-style: normal;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-76-Bold.woff2') format('woff2');
  font-weight: 700; /* Bold */
  font-style: normal;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-77-Extrabold.woff2') format('woff2');
  font-weight: 800; /* ExtraBold */
  font-style: normal;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-86-Bold.woff2') format('woff2');
  font-weight: 700; /* Same as Bold */
  font-stretch: expanded; /* Wider */
  font-style: normal;
}

/* Italic */

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-72-Light-Italic.woff2') format('woff2');
  font-weight: 300; /* Light */
  font-style: italic;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-73-Book-Italic.woff2') format('woff2');
  font-weight: 400; /* Book (regular) */
  font-style: italic;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-75-Medium-Italic.woff2') format('woff2');
  font-weight: 500; /* Medium */
  font-style: italic;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-76-Bold-Italic.woff2') format('woff2');
  font-weight: 700; /* Bold */
  font-style: italic;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-77-Extrabold-Italic.woff2') format('woff2');
  font-weight: 800; /* ExtraBold */
  font-style: italic;
}

@font-face {
  font-family: 'HeadingNow';
  src: url('../fonts/HeadingNow-86-Bold-Italic.woff2') format('woff2');
  font-weight: 700; /* Same as Bold */
  font-stretch: expanded; /* Wider text */
  font-style: italic;
}

html {
  background-color: #1c002c;
}

label {
  font-weight: 500;
  margin-top: 0;
  display: block;
  margin: 0 10px 0 0; /* Add margin to the right for spacing */
}

body {
  font-family: 'HeadingNow', sans-serif;
  background: url('../images/season-10-main-stage.jpg') center center/cover no-repeat fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  min-height: 100vh;
  touch-action: manipulation;
  color: #FFFFFF;
}

h1 {
  font-family: 'HeadingNow', sans-serif;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 700;
  font-size: 35px;
}

h2 {
  font-family: 'HeadingNow', sans-serif;
  font-style: normal;
  font-weight: 500;
}

p { 
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  margin: 0 0 20px; /* Add bottom margin for spacing */
}

a {
  color: #FFE3B0;
  font-weight: 500;
  text-decoration: none; /* Remove underline */
}

button {
  font-family: 'headingNow', sans-serif;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
}

article {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: rgba(62, 20, 119, 0.8);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  color: #FFFFFF;
  font-size: 16px;
}

.article {
  padding: 7vh 0 7vh 0;
}

.email {
  font-style: var('--font-style', 'normal');
  font-weight: 500;
  color: #ffb143;
  text-decoration: none; /* Remove underline */
  margin: 0;
}

.section-heading  {
  font-style: italic;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 18px;
  margin: 10px 0 10px 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  margin-right: 20px;
}

.description {
  margin: 10px 0 0 0;
}

.page{
  height: 1300px;
  overflow: hidden;
}

.tap-tempo {
  border: 3px solid #b75aff;
  background: #6030BC;
  background: -moz-linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  background: -webkit-linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  background: linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  transition: background-color 0.3s ease;
  touch-action: manipulation;
  transition: transform 0.06s linear; /* Add a transition for smooth animation */
}

.tap-tempo.grow {
  transform: scale(1.02); /* Scale the button to 110% of its original size */
  background: #c071f4;
}

.slider {
  -webkit-appearance: none;  /* Override default CSS styles */
  appearance: none;
  outline: none;
  height: 26px;
  width: 100%;
  background: #7335ca;
  -webkit-transition: .2s;
  transition: opacity .2s;
  border-radius: 24px;
}

.slider:hover {
  background: #7e20dc;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  width: 25px; /* Set a specific slider handle width */
  height: 25px; /* Slider handle height */
  background: -moz-linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  background: -webkit-linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  background: linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  border: #b75aff 3px solid; /* Optional border for the thumb */
  cursor: pointer; /* Cursor on hover */
  border-radius: 999px; /* Rounded corners for the thumb */
  transform: scale(1.3);
}

.slider::-moz-range-thumb {
  width: 25px; /* Set a specific slider handle width */
  height: 25px; /* Slider handle height */
  background: -moz-linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  background: -webkit-linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  background: linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  border: #b75aff 3px solid; /* Optional border for the thumb */
  cursor: pointer; /* Cursor on hover */
  transform: scale(1.3);
}

#main-content {
  margin: 0 auto;
  padding-top: 20px;
  padding-bottom: 20px;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none; /* Prevent text selection */
}

#beat, #glow, #beat-glow {
  will-change: transform, opacity;
  contain: layout paint;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Replace any box-shadow/filter on animated elements; use images or separate static layers instead */
/* Example: if you had a shadow on #beat, move it to a non-animated wrapper or a static pseudo-element */
/* .beat-wrapper::before { content:''; position:absolute; inset:0; background: url(./images/beat-glow.png) no-repeat center/contain; opacity:.4; pointer-events:none; } */

.background-svg, #outline {
  width: 232px !important;
  height: 232px !important;
  max-width: 232px;
  max-height: 232px;
  min-width: 0;
  min-height: 0;
  display: block;
  margin: auto;
}

.txtInput {
    font-family: 'HeadingNow';
    color: #FFFFFF;
    font-style: italic;
    font-weight: 700;
    font-size: 20px;
    background-color: rgba(86, 20, 119, 0.6);
    border: 2px solid #842bc4;
    border-radius: 10px;
    text-align: center;
    width: 70px;
    height: 22px;
}

input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0.6em;
  transform: scaleY(1.1);
}

.background-svg, #outline {
  width: 232px !important;
  height: 232px !important;
  display: block;
  margin: auto;
}

img {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

#glow {
  transform: scale(0.4);
}

#beat{
  width: auto;
  height: auto;
  transition: transform 0.2s cubic-bezier(.4,2,.6,1);
  will-change: transform;
}

#beat-glow{
  transform: scale(0.62);
  opacity:0;
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1);
}

#counter-container {
  position: relative;
  width: 100%;
  max-width: 395px;
  min-width: 260px;
  aspect-ratio: 1/1.2;
  margin: 18vh auto auto auto;
  transform: scale(1);
  transform-origin: top center;
}

.bpm-control-container {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.controls {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: rgba(87, 27, 148, 0.8);
  backdrop-filter: blur(4px);
}

.header-container {
  position: relative;
  width: 100%;
}

#collapseButton {
  position: absolute;
  top: -7px;
  right: -6px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  opacity: 0.8;
}

#collapseButton:hover {
  opacity: 1;
}

#collapseButton.collapsed {
  transform: rotate(180deg);
}

#collapseButton svg {
  width: 24px;
  height: 24px;
  transform: scale(2);
}

#bgSelect {
  height: 25px;
  width: 20%;
  min-width: 120px;
  border-radius: 10px;
  border: none;
  background-color:#b75aff;
  font-family: 'HeadingNow', sans-serif;
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  color: #FFFFFF;
  padding: 0 5px;
}

.control-box {
  margin: 10px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  padding: 5px 0 0 0;
  gap: 20px;
}

.beatcount-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 10px 0;
  gap: 10px;
}

.control-button {
  padding: 5px 0;
  min-width: 90px;
  min-height: 40px;
  padding: 5px 5px;
  border-radius: 12px;
  cursor: pointer;
  color: #FFFFFF;
  font-family: 'HeadingNow', sans-serif;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 700;
  width: 40%;
  font-size: 150%;
  border: 3px solid #b75aff;
  background: #6030BC;
}

.center {
  display: flex;
  justify-content: center;
}

.button-box {
  gap: 20px;
}

.layer {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fade {
  animation-name: fade;
  animation-timing-function: steps(10);
  animation-iteration-count: infinite;
}

.pulse {
  animation-name: pulse;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.outline {
  transition: filter 0.2s ease;
}

.hidden {
  display: none;
}

.expanded {
  display: block;
}

/* Beat-text pulse animation now handled by JS scale transform for consistency */
#beat-text {
  font-family: 'HeadingNow', sans-serif;
  color: #AE90FE;
  display: flex;
  position: relative;
  top: 4px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-style: italic;
  z-index: 5;
  -webkit-user-select: none;
  user-select: none;
  transition: font-size 0.3s ease-out;
  line-height: 1;
  margin: auto;
  transform: scale(1);
}

/* Responsive Beats in Bar Buttons */
#beatsInBarBtns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7vw 0.7vw;
  margin: 0;
  width: 100%;
}

#beat-count-range {
  width: 78px;
}

#beat-selector-img {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mini-button {
  color: #FFFFFF;
  background: #6c6c6c;
  border: #494949 solid 2px;
  border-radius: 10px;
  height: 28px;
  width: 68px;
}

.mini-button:hover {
  transform: scale(1.1);
  transition: ease-in-out .2s;
}

#beatMode-up.active {
  background: #00aa93;
  border: #007464 solid 2px;
}

#beatMode-down.active {
  background: #d8b000;
  border: #8f8500 solid 2px;
}

.beats-btn {
  border-radius: 12px;
  padding: 0.15vw;
  margin: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
  border: 3px solid #b75aff;
  background: #6030BC;
  background: -moz-linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  background: -webkit-linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  background: linear-gradient(45deg, #6030BC 0%, #B600FF 71%, #CB14FF 100%);
  min-width: 40px;
  min-height: 40px;
}

.beats-btn:hover {
  transform: scale(1.1);
  transition: ease-in-out .2s;
}

.beats-btn.selected {
  border: 3px solid #ffd150;
  background: #F28F52;
  background: -moz-linear-gradient(45deg, #F28F52 0%, #F28F52 14%, #FBBC2E 100%);
  background: -webkit-linear-gradient(45deg, #F28F52 0%, #F28F52 14%, #FBBC2E 100%);
  background: linear-gradient(45deg, #F28F52 0%, #F28F52 14%, #FBBC2E 100%);
}

.beats-btn img {
  width: 2.8vw;
  height: 2.8vw;
  pointer-events: none;
}

.toggle-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.toggle-group {
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  display: inline-flex;
  border-radius: 999px;
  background: #6c1eba;
  padding: 5px;
  gap: 0;
  width: 100%;
  height: 25px;
}

.toggle-group input[type="radio"] {
  display: none;
}

.toggle-option {
  color: #FFFFFF;
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  text-align: center;
  z-index: 1;
  line-height: 25px;
  cursor: pointer;
  border-radius: 999px;
  padding: 0;
  margin: 0;
}

.toggle-highlight {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(50% - 5px);
  height: 25px;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: #9811E8;
  background: -moz-linear-gradient(45deg, #9811E8 0%, #c422ff 100%);
  background: -webkit-linear-gradient(45deg, #9811E8 0%, #c422ff 100%);
  background: linear-gradient(45deg, #9811E8 0%, #c422ff 100%);
}

.toggle-highlight.bounce-right {
  animation: toggleBounceRight 0.4s cubic-bezier(.68,-0.55,.27,1.55);
  background: #F28F52;
  background: -moz-linear-gradient(45deg, #F28F52 0%, #F28F52 44%, #FBBC2E 100%);
  background: -webkit-linear-gradient(45deg, #F28F52 0%, #F28F52 44%, #FBBC2E 100%);
  background: linear-gradient(45deg, #F28F52 0%, #F28F52 44%, #FBBC2E 100%);
}
.toggle-highlight.bounce-left {
  animation: toggleBounceLeft 0.4s cubic-bezier(.68,-0.55,.27,1.55);
}

#beatcount:checked ~ .toggle-highlight {
  transform: translateX(100%);
}

.start {
  border: 3px solid #ffd150;
  background: #F28F52;
  background: -moz-linear-gradient(45deg, #F28F52 0%, #F28F52 44%, #FBBC2E 100%);
  background: -webkit-linear-gradient(45deg, #F28F52 0%, #F28F52 44%, #FBBC2E 100%);
  background: linear-gradient(45deg, #F28F52 0%, #F28F52 44%, #FBBC2E 100%);
}

.start:hover {
  background: #ec9b69;
  background: -moz-linear-gradient(45deg, #eaa174 0%, #eea374 44%, #ffce5a 100%);
  background: -webkit-linear-gradient(45deg, #eaa174 0%, #eea374 44%, #ffce5a 100%);
  background: linear-gradient(45deg, #eaa174 0%, #eea374 44%, #ffce5a 100%);
}

.stop {
  background: #d03ce7;
  background: -moz-linear-gradient(45deg, #991cac 0%, #c52fdc 44%, #d03ce7 100%);
  background: -webkit-linear-gradient(45deg, #991cac 0%, #c52fdc 44%, #d03ce7 100%);
  background: linear-gradient(45deg, #991cac 0%, #c52fdc 44%, #d03ce7 100%);
}

.stop:hover{
  background: #d574e4;
}

.switchbox {
  display: flex;
  align-items: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 26px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.switch.round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CCCCCC;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 34px;
}

.switch.round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: #FFFFFF;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .switch {
  background: #F28F52;
  background: -moz-linear-gradient(45deg, #F28F52 0%, #F28F52 44%, #FBBC2E 100%);
  background: -webkit-linear-gradient(45deg, #F28F52 0%, #F28F52 44%, #FBBC2E 100%);
  background: linear-gradient(45deg, #F28F52 0%, #F28F52 44%, #FBBC2E 100%);
}

input:focus + .switch {
  box-shadow: 0 0 1px #FF8737;
}

input:checked + .switch:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Keyframes for animations */
@keyframes toggleBounceRight {
  0% { transform: translateX(0) scale(1); }
  60% { transform: translateX(105%) scale(1.04); }
  75% { transform: translateX(95%) scale(0.95); }
  90% { transform: translateX(102%) scale(1.02); }
  100% { transform: translateX(100%) scale(1); }
}

@keyframes toggleBounceLeft {
  0% { transform: translateX(100%) scale(1); }
  60% { transform: translateX(-10%) scale(1.04); }
  75% { transform: translateX(5%) scale(0.95); }
  90% { transform: translateX(-2%) scale(1.02); }
  100% { transform: translateX(0) scale(1); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(0.65); }
  50% { transform: scale(0.8); }
}

@keyframes shrinkGrow {
  0% { transform: scale(0.8); }
  85% { transform: scale(0.6); }
  100% { transform: scale(0.8); }
}


/* Responsive layout: mobile-first, then desktop */
@media (hover: none) and (pointer: coarse),
       (max-width: 1020px) {
  .body {
    max-width: 100%;
  }

  .page {
    min-height: 800px;
    overflow: auto;
  }

  .footer-content {
    display: flex;
    flex-direction: column;
    background: #101010;
    color: #FFFFFF;
    text-align: left;
    padding: 40px 10vh;
    justify-content: center;
}
  
  #main-content {
    margin: 0;
  }
  .controls {
    max-width: 800px;
    margin: auto;
    padding: 20px 20px 20px 20px;
    border-radius: 10px;
  }
  #counter-container {
    width: 260px;
    height: 320px;
    margin-top: 15vh;
  }
  .background-svg, #outline {
    width: 180px !important;
    height: 180px !important;
  }

  #beat-text {
    width: 180px;
    height: 180px;
    font-size: 90px;
  }
  #beat{
    max-width: 95%;
    max-height: 95%;
  }
  #bpm {
  min-width: 10px;
  max-width: 70%;
  margin: 0 0 0 10px;
  }
  #beatsInBarBtns {
  max-width: 100%;
  min-width: 10%;
  }
}

/* Desktop: hover and fine pointer */
@media (hover: hover) and (pointer: fine) {
  /* Responsive layout: fixed width on desktop, mobile-friendly on small screens */
  #main-content {
    width: 800px;
    min-width: 200px;
    max-width: 100vw;
    margin: 0 auto;
  }
  .controls {
    min-width: 200px;
    max-width: 800px;
    padding: 30px;
    margin: 2vh auto 12vh auto;
    border-radius: 40px;
  }
  .footer-content {
    display: flex;
    flex-direction: row;
    background: #101010;
    color: #FFFFFF;
    text-align: left;
    padding: 40px 10vh;
    justify-content: space-between;
}

  #beat-text {
    max-width: 240px;
    height: 240px;
    font-size: 125px;
  }
  #beat{
    max-width: 78%;
    max-height: 78%;
  }
  #bpm {
  min-width: 10px;
  max-width: 100%;
  margin: 0 0 0 10px;
  }
}