/* Define the B1Berghain-Regular font */
@font-face {
  font-family: 'Berghain';
  src: url('./fonts/B1Berghain-Reg.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HelveticaV';
  src: url('./fonts/HelveticaNowText-ExtraBold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kyiv';
  src: url('./fonts/KyivTypeSans-VarGX.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kepler';
  src: url('./fonts/Kepler 296.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Berghain', sans-serif;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header Section */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Place items at opposite ends */
  padding: 1vw;
  background-color: #fff;
  box-sizing: border-box;
}

.header h1 {
  font-size: 7vw; /* Big title */
  margin: 0;
  color: #121619;
  margin-left: 1.2vw; /* Aligns with buttons */
}

.header img {
  width: 3vw; /* Adjusted size to 57% */
  height: 3vw;
  margin-right: 1.2vw;
}

#icon7 {
  transition: opacity 0.16s ease;
}
.hidden {
  opacity: 0.9;
}

.controls {
  display: flex;
  flex-wrap: nowrap; /* Keep buttons in one row */
  background-color: #fff;
  box-sizing: content-box;
  flex-shrink: 0;
  margin-bottom: 1vw; /* Space between controls and visualizer */
  height: 5.1vw; /* Fixed height */
}

.controls button {
  flex: 1 1 auto;
  background-color: #121619; /* Black when turned off */
  color: #dfe1e3f2;
  border: none;
  border-radius: 0; /* Sharp rectangular corners */
  font-size: 4.68vw;
  cursor: pointer;
  padding: 1.22vw;
  font-family: 'Berghain', sans-serif;
}

.controls button.active {
  color: #121619; /* Black text when active */
}

#white-noise.active {
  background-color: #eeeeee; /* White */
  border-radius: 0; /* Sharp corners */
}

#pink-noise.active {
  background-color: #da94ca; /* Pink */
}

#brown-noise.active {
  background-color: #794e39; /* Brown */
}

#green-noise.active {
  background-color: #198b58; /* Chartreuse Green */
}

#grey-noise.active {
  background-color: #b5b5b5; /* Grey */
}

#blue-noise.active {
  background-color: #2b80ca; /* Blue */
}

#violet-noise.active {
  background-color: #a470db; /* Violet */
}

/* Adjust the mono/poly button */
#mode-toggle {
  flex: 1 1 auto;
  width: 5.1vw; /* Set width equal to height */
  height: 5.1vw; /* Fixed height */
  background-color: #121619; /* Black when turned off */
  color: #dfe1e3f2;
  border-radius: 0; /* Sharp rectangular corners */
  font-size: 1.1vw;
  cursor: pointer;
  font-family: 'Kyiv', sans-serif;
}

#mode-toggle:hover {
  background-color: #eee;
  color: #121619;
}

.visualizer-container {
  position: relative; /* To position the text over the canvas */
  flex-grow: 1;
  width: 100%;
  background-color: #fff;
  margin-top: 1vw;
  padding: 0; /* Ensure no padding */
}

#visualizer {
  width: 100%;
  height: 100%;
  background-color: #fff;
  margin: 0; /* Ensure no margin */
  padding: 0; /* Ensure no padding */
  box-sizing: border-box;
  display: block; /* Remove any inline spacing */
}

/* Existing styles remain unchanged */

/* Plus-Icon (rechts unten) */
.footer {                    /* Container für das Plus-Icon */
  position: fixed;
  right: 1.2vw;
  bottom: 0.8vw;
  z-index: 10;
}

#icon502 {                   /* tatsächliches Plus-Bild */
  width: 3vw;
  height: 3vw;
  cursor: pointer;
}

/* Stone-Icon (links unten, gespiegelt) */
#stone-icon {                /* Bild innerhalb des <a>-Tags */
  position: fixed;           /* vom Container losgelöst → ans Viewport geklebt */
  left: -0.1vw;
  bottom: -0.8vw;
  width: 6.3vw;
  height: 6.3vw;
  cursor: pointer;
  z-index: 9999;               /* gleiche Ebene wie Plus-Icon */
}

/* Overlay styles */
.overlay {
  position: fixed;
  display: none; /* Hidden by default */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9); /* Fallback background */
  /* Vendor prefixes for backdrop-filter */
  -webkit-backdrop-filter: blur(42px);
  backdrop-filter: blur(42px); /* Apply blur effect */
  z-index: 20;
}

/* Close icon inside the overlay */
.overlay-close-icon {
  position: fixed;
  bottom: 0.8vw;
  right: 1.2vw;
  width: 3vw; /* Adjust size as needed */
  height: 3vw;
  cursor: pointer;
  z-index: 30; /* Ensure it's above other overlay content */
}

/* Hover effects for interactivity */
.footer img:hover,
.overlay-close-icon:hover {
  opacity: 0.9; /* Slightly reduce opacity on hover */
}

.overlay-content {
  text-align: center;
}

.overlay-content img {
  max-width: 68%;
  height: auto;
  margin-bottom: 0.4vw;
  margin-top: 0.4vw;
  opacity: 0.98; /* Adjust the opacity as desired */
}

.overlay-text {
  max-width: 80%;
  margin: 0 auto;
  margin-top: 6vw;
  /*margin-bottom: 1vw;*/
}

.overlay-text p {
  font-size: 0.7vw; /* Adjust font size as needed */
  font-family: 'Kyiv', sans-serif;
  color: #121619;
  opacity: 0.9;
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* (A) Adjust Header Size */
  .header h1 {
      font-size: 17vw; /* 70% of 96px */
      margin-left: 1.2vw; /* 70% of 19px */
  }

  .header img {
      width: 8vw;
      height: 8vw;
      margin-right: 3.3vw;
  }

  /* (B) Split Controls into Two Rows */
  .controls {
      flex-wrap: wrap; /* Allow buttons to wrap */
      height: auto; /* Let height adjust based on content */
  }

  .controls button {
      flex: 1 1 22%; /* Each button takes up 22% of the row */
      font-size: 9.2vw; /* 70% of 71px */
      padding: 1vw; 
      height: 22vw;
  }

  /* Ensure the mode-toggle spans correctly */
  #mode-toggle {
      flex: 0 1 22.5%; /* Each button takes up 50% of the row */
      font-size: 3.6vw; /* Adjust as needed */
      padding: 1vw; 
      height: 22vw; 
      width: 22vw; 
  }
  
  #icon502 {
    width: 12vw;
    height: 12vw;
  }
  #stone-icon {                /* Bild innerhalb des <a>-Tags */
  position: fixed;           /* vom Container losgelöst → ans Viewport geklebt */
  left: -2vw;
  bottom: -3vw;
  width: 22vw;
  height: 22vw;
  cursor: pointer;
  z-index: 9999;               /* gleiche Ebene wie Plus-Icon */
  margin-bottom: -0.6vw;
}
  
  .overlay-close-icon {
      width: 12vw;
      height: 12vw;
  }
  
  .overlay-content img {
      max-width: 98%;
  }
  
  .overlay-text p {
      font-size: 3vw;
  }
  
}
