/* Rows auto adjust height */
.row {
  display: flex;
  flex: 1;
}

/* Box base */
.box {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 3vw, 32px);
  font-weight: bold;
}

/* Top & bottom rows */

.box_6,
.box_7 {
  flex: 1;
  position: relative;
  /* background-color: #ff0064; */
}

/* Middle row sizing */
.box_3,
.box_5 {
  flex: 1;
  /* background-color: antiquewhite; */
}

/* Merged box_1 and box_2 */
.box_1_2 {
  flex: 1;
  position: relative;
  /* background-color: rgb(53, 108, 108); */
}


.box_4 {
  flex: 3;
  /* background: red; */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.svg-wrapper {
  position: relative;
   /* width: 550px;
  height: 550px; */
   /* width: 400px;
    height: 400px; */
}

.rotating-svg {
   max-width: 580px;
    max-height: 580px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
  will-change: transform;

}

/* BOX 6 - Sliders */
.box_6 {
  color: #0ff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  position: relative;
  z-index: 10;
  transition: background 0.3s ease;
}

.box_6.transparent {
  background: transparent;
}

.slider-wrapper {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-left: 20px;
}

.slider-wrapper.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  display: none;
}

.slider-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.slider-group input[type="range"] {
  writing-mode: bt-lr;
  appearance: slider-vertical;
  -webkit-appearance: slider-vertical;
  width: 8px;
  height: 120px;
  background: linear-gradient(to top, #0ff 0%, #0ff 50%, #f00 50%, #f00 100%);
  outline: none;
  border-radius: 5px;
  cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #0ff;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px #0ff, 0 0 20px #0ff;
}

.slider-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #0ff;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px #0ff, 0 0 20px #0ff;
}

.slider-group span {
  width: 40px;
  height: 40px;
  text-align: center;
 
  font-family: 'Arial', Courier, monospace;
  border-radius: 50%;
  /* padding-top: 7px; */
  font-size: 18px;

   background: rgba(0, 255, 255, 0.2);
  border: 2px solid #0ff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
 
}

.slider-group span:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5), inset 0 0 15px rgba(0, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Master Toggle Button */
.master-toggle-btn {
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(0, 255, 255, 0.2);
  border: 2px solid #0ff;
  color: #0ff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 25;
}

.master-toggle-btn:hover {
  background: rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  transform: scale(1.1);
}

.master-toggle-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Toggle Button */
.toggle-btn {
  -webkit-tap-highlight-color: transparent;

  position: absolute;
  right: 20px;
  bottom: 156px;
  width: 40px;
  height: 40px;
  background: rgba(0, 255, 255, 0.2);
  border: 2px solid #0ff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
}

.toggle-btn:hover {
  background: rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
  transform: scale(1.1);
}

.toggle-btn svg {
  width: 20px;
  height: 20px;
  stroke: #0ff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.toggle-btn.rotated svg {
  transform: rotate(180deg);
}

/* Info Button */
.info-btn {
  -webkit-tap-highlight-color: transparent;

  position: absolute;
  bottom: 290px;
  right: 20px;
  width: 45px;
  height: 45px;
  background: rgba(0, 255, 255, 0.2);
  border: 2px solid #0ff;
  color: #0ff;
  border-radius: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 20;
}

.info-btn:hover {
  background: rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  transform: scale(1.1);
}

.info-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Sound Toggle Button */
.sound-toggle-btn {
  -webkit-tap-highlight-color: transparent;

  position: absolute;
  bottom: 200px;
  right: 20px;
  width: 42px;
  height: 42px;
  background: rgba(0, 255, 255, 0.2);
  border: 2px solid #0ff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
}

.sound-toggle-btn:hover {
  background: rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
  transform: scale(1.1);
}

.sound-toggle-btn svg {
  width: 20px;
  height: 20px;
  stroke: #0ff;
  stroke-width: 2;
  fill: none;
}

/* Fullscreen Button */
.fullscreen-btn {
  -webkit-tap-highlight-color: transparent;

  position: absolute;
  right: 20px;
  bottom: 246px;
  width: 40px;
  height: 40px;
  background: rgba(0, 255, 255, 0.2);
  border: 2px solid #0ff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
}

.fullscreen-btn:hover {
  background: rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
  transform: scale(1.1);
}

.fullscreen-btn svg {
  width: 20px;
  height: 20px;
  stroke: #0ff;
  fill: none;
  stroke-width: 2;
}

/* Previous & Next Buttons */
.prev-btn,
.next-btn {
  -webkit-tap-highlight-color: transparent;

  position: absolute;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(0, 255, 255, 0.2);
  border: 2px solid #0ff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
}

.prev-btn:hover,
.next-btn:hover {
  background: rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
  transform: scale(1.1);
}

.prev-btn svg,
.next-btn svg {
  width: 20px;
  height: 20px;
  stroke: #0ff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prev-btn {
  bottom: 110px;
}

.next-btn {
  bottom: 65px;
}

/* Sound Wrapper */
.sound-wrapper {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  margin-left: 20px;
}

.sound-wrapper.hidden {
  display: none;
}

.sound-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sound-btn {
  background: rgba(0, 255, 255, 0.1);
  border: 2px solid rgba(0, 255, 255, 0.3);
  color: #0ff;
  border-radius: 4px;
  padding: 12px;
  cursor: pointer;
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.sound-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  border-color: #0ff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.sound-btn.active {
  background: rgba(0, 255, 255, 0.4);
  border-color: #0ff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.8), inset 0 0 10px rgba(0, 255, 255, 0.2);
  text-shadow: 0 0 10px #0ff;
}

.sound-number {
  letter-spacing: 1px;
}

/* Info Dialog */
.info-dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.info-dialog.active {
  display: flex;
}

.info-dialog-content {
  background: rgba(0, 20, 40, 0.95);
  border: 2px solid #0ff;
  border-radius: 8px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
  position: relative;
}

.info-dialog-content h2 {
  color: #0ff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 20px #0ff;
}

.info-dialog-content h3 {
  color: #0ff;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-content p {
  color: rgba(0, 255, 255, 0.8);
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 13px;
}

.info-content ul {
  list-style: none;
  padding: 0;
}

.info-content li {
  color: rgba(0, 255, 255, 0.7);
  margin-bottom: 10px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 0, 100, 0.2);
  border: 2px solid #ff0064;
  color: #ff0064;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 0, 100, 0.4);
  box-shadow: 0 0 15px rgba(255, 0, 100, 0.5);
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
    visibility: hidden;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
    visibility: hidden;
  }
}

/* Staggered animations */
.toggle-btn {
  animation: slideDown 0.4s ease-in-out forwards;
}

.info-btn {
  animation: slideDown 0.5s ease-in-out forwards;
}

.sound-toggle-btn {
  animation: slideDown 0.6s ease-in-out forwards;
}

.fullscreen-btn {
  animation: slideDown 0.7s ease-in-out forwards;
}

.prev-btn {
  animation: slideDown 0.8s ease-in-out forwards;
}

.next-btn {
  animation: slideDown 0.9s ease-in-out forwards;
}

/* Hidden states */
.toggle-btn.hidden {
  animation: slideUp 0.4s ease-in-out forwards;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.info-btn.hidden {
  animation: slideUp 0.35s ease-in-out forwards;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sound-toggle-btn.hidden {
  animation: slideUp 0.3s ease-in-out forwards;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.fullscreen-btn.hidden {
  animation: slideUp 0.25s ease-in-out forwards;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.prev-btn.hidden {
  animation: slideUp 0.2s ease-in-out forwards;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.next-btn.hidden {
  animation: slideUp 0.15s ease-in-out forwards;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .row {
    flex-direction: column;
  }

 
  .box_3,
  .box_4,
  .box_5,
  .box_6,
  .box_7 {
    flex: 1;
  }




  
  .svg-wrapper {
    width: 400px;
    height: 400px;
  }

  .svg-wrapper .rotating-svg {
    max-width: 100%;
    max-height: 100%;
  }

  .slider-wrapper {
    position: absolute;
  top: 29px;
  bottom: 1px;
  left: 20px;
  /* width: 40px;
  height: 40px; */

  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-left: 10px;
   margin-bottom: 40px;
}


/* 
  .master-toggle-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    order: -1;
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    z-index: 30;
  }

  .toggle-btn,
  .info-btn,
  .sound-toggle-btn,
  .fullscreen-btn,
  .prev-btn,
  .next-btn {
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 5px;
    z-index: 20;
  }

  .toggle-btn.hidden,
  .info-btn.hidden,
  .sound-toggle-btn.hidden,
  .fullscreen-btn.hidden,
  .prev-btn.hidden,
  .next-btn.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  } */
}