/* Font */
.dm-mono-light {
  font-family: "DM Mono", monospace;
  font-weight: 300;
  font-style: normal;
}

.dm-mono-regular {
  font-family: "DM Mono", monospace;
  font-weight: 400;
  font-style: normal;
}

.dm-mono-medium {
  font-family: "DM Mono", monospace;
  font-weight: 500;
  font-style: normal;
}

.dm-mono-light-italic {
  font-family: "DM Mono", monospace;
  font-weight: 300;
  font-style: italic;
}

.dm-mono-regular-italic {
  font-family: "DM Mono", monospace;
  font-weight: 400;
  font-style: italic;
}

.dm-mono-medium-italic {
  font-family: "DM Mono", monospace;
  font-weight: 500;
  font-style: italic;
}

button {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
}


*, *::before, *::after {
  box-sizing: border-box;
}


html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100vw;
  background-color: #EDEDF9;
  font-family: "DM Mono", monospace;
  color: #222;
  
}


body {
  display: grid;
  grid-template-rows: auto 1fr; 
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
}

/* Announcement Bar */
.announcement-bar {
  position: sticky; 
  top: 0;
  width: 100%;
  background: #E6F5DC;
  color: #222;
  overflow: hidden;
  white-space: nowrap;
  z-index: 1000;
  border-bottom: 1px solid lightgray;
  height: 1.8rem;
  display: flex;
  align-items: center;
  font-size: 0.7rem;
}


.announcement-bar .marquee {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}


.announcement-bar .marquee span {
  display: inline-block;
  padding-right: 2rem;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}



.main-content {
  display: grid;
  grid-template-columns: 40% 60%;
  height: 100%; 
  overflow: hidden;
  gap: 2rem;
  max-width: 100vw; 
}

/* Scrollable content */
.grid-wrapper {
  overflow-y: scroll; 
  overflow-x: hidden;
  height: 100%;     
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  min-width: 0; 
  min-height: 0;
  flex-shrink: 0;
  flex-grow: 0;
  max-width: 100%;
  max-inline-size: 100%;
  contain: strict; 
    padding-bottom: 2rem;
}

.effects-panel {
  display: flex;
  justify-content: center; 
  align-items: center;     
  height: 100vh;           
  width: 100%;
  min-width: 0;
  position: relative;
  box-sizing: border-box;
}

.effects-console {
  background: #fff;
  padding: 1rem;
  width: 380px;
  box-sizing: border-box;
  top: auto;
  align-self: center;
  margin-top: -20px;
}


.effects-console input[type="range"] {
  display: block;
  width: 100%;
 margin: 20px auto 20px auto; 
  font-size: 14px;
  cursor: pointer;
}

.effects-console button {
  display: block;
  width: 100%;
  text-align: center;
  border: 1px solid lightgrey;
  padding: 8px 8px;
  text-decoration: none;

  background-color: #fff;
  color: #000;
  cursor: pointer;
}

/* Active state */
.effects-console button.active {
  color: #000;
  background-color: #EDEDF9;
}

/* Disabled state */
.effects-console button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #b0b0b0;
  color: #666;
}

.effects-console label[for="master-gain-slider"] {
  font-size: 12px;
  text-transform: uppercase;
}

/* Each item as a row card */
.item.canvas-container {
  display: flex;
  flex-direction: row;
    align-items: stretch;
  background-color: #fff;
  overflow: hidden;


  border-bottom: 1.5px solid transparent;
  border-image: repeating-linear-gradient(
    to right,
    #e6e6f4 0 12px,     /* dash length */
    transparent 12px 26px /* gap length */
  ) 1;

  transition: box-shadow 0.2s ease;
  padding: 1rem;
  gap: 1rem;
}

.item.canvas-container:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Image */
.canvas-container img {
  width: 120px; 
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Canvas */
.canvas-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 160px;
  pointer-events: none;
  z-index: 10;
  display: block;
  border-radius: 4px;
}

/* Text + Controls */
.item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Title, caption */
.item-title {
  color: #444;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

.item-caption {
  font-size: 0.75rem;
  color: #444;
  margin-bottom: 0.5rem;
}

.item-description {
  font-size: 0.7rem;
  color: #444;
  margin-bottom: 0.5rem;
  line-height: 1rem;
  max-width: 25rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.tag {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  background: #EDEDF9;
  color: #333;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  transition: background 0.2s ease;
}

.tag:hover {
  background: #dcdcf0;
}

/* Play button */
.my-play-button {
  width: 32px;
  height: 32px;
  background-size: 31% 31%;
  background-color: #F7F7F7;        
  background-image: url('play.png'); 
  background-repeat: no-repeat;
  background-position: center;         
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
  border-radius: 4px;                
  transition: background-color 0.3s ease, background-image 0.3s ease;
  flex-shrink: 0;   
}

.my-play-button.playing {
  background-image: url('pause.png'); 
}

.my-play-button:hover {
  background-color: #E6F5DC;
}

/* sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1px;
  background: #000;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background 0.3s ease;
  margin: 10px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #000;
  cursor: pointer;
  transition: transform 0.2s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
}

/* Title */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 500;
  padding-top: 1rem;
  margin-bottom: 2rem;
  position: fixed;
}

.help-icon {
  position: fixed;
  font-family: "DM Mono";
  bottom: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background-color: #FAD4D8; 
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  font-size: 0.9rem;
  cursor: pointer;
  z-index: 1020;
  user-select: none;
  border: none;
  padding: 0;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.15);
}

/* glow ring on hover */
.help-icon:hover {
    box-shadow:
    0 0 3px 3px rgba(255, 255, 255, 1),   
    0 0 3px 3px rgba(255, 255, 255, 0.9), 
    0 0 8px 8px rgba(255, 255, 255, 0.8); 
}

/*BOX FOR HELP*/
.help-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1050;
}

.help-popup.hidden {
  display: none;
}

.help-popup-content {
  background-color: #FAD4D8; 
  color: #222;
  padding: 1.5rem 3rem;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  font-size: 1rem;
  position: relative;
  text-align:center;
}


.help-popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  color: #222;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.help-popup-close:hover {
  color: #fff;
}

.help-popup-text { 
  padding-top: 0;   
  padding-bottom: 20px;    
  padding-left: 10px;
  padding-right: 10px;
}

.help-popup-title {
  font-size: 0.9rem;
}

.help-popup-description {
  font-size: 0.7rem;
  line-height: 1.5;
  color: #333;
}

.help-popup-gif {
  display: flex;
  justify-content: center; 
  padding-left: 27px;         
}

.help-popup-gif img {
  max-width: 120px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}



.mobile-top-bar {
  position: fixed;       
  top: 0;
  width: 100%;
  background: #E6F5DC;
  color: #222;
  overflow: hidden;
  white-space: nowrap;
  z-index: 1000;
  border-bottom: 1px solid lightgray;
  height: 1.8rem;
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  justify-content: center; 
    display: none;
}

.mobile-top-bar p {
  margin: 0;
  padding: 0;
  text-align: center;
  width: 100%;
  line-height: 1.8rem;
}







@media (max-width: 600px) {

    .mobile-top-bar {
    display: block;
  }

  body {
    overflow: auto; 
    padding-top: 1.8rem;
  }

  .item-description {
    font-size: 0.6rem;
    line-height: 1.2;
    max-width: 100%;
  }

  .tag {
    font-size: 0.6rem;
  }

.effects-console {
  display: none;
  width: 100%;
  padding: 1.2rem;
  background: rgba(237, 237, 249, 0.95); 
  backdrop-filter: blur(6px); 
  border-radius: 0;
  box-sizing: border-box;
  font-size: 0.75rem;
  box-shadow: none;
  transform-origin: top center;
  transform: scale(0.85);
  margin-top: 38%;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

  .effects-console.show {
    display: block; 
  }

  .effects-panel {
    position: absolute;
    top: 41%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90vw;
    max-width: 100vw;
    padding-left: calc(0.5rem + env(safe-area-inset-left));
    padding-right: calc(0.5rem + env(safe-area-inset-right));
    box-sizing: border-box;
    pointer-events: none; 
    margin-left: auto;
    margin-right: auto;
  }

  .effects-panel.active {
    pointer-events: auto; 
  }

  .effects-console button,
  .effects-console input[type="range"],
  .effects-console label[for="master-gain-slider"] {
    margin-bottom: 1.5rem; 
  }

  .effects-console button {
    font-size: 0.75rem; 
    padding: 0.3rem 0.3rem;
  }

  .effects-console label[for="master-gain-slider"] {
    font-size: 12px;
    margin-bottom: 0.75rem; 
  }

  .effects-console input#master-gain-slider {
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    display: block;
    width: 100%;
  }

  .effects-console input[type="range"]:not(#master-gain-slider) {
    margin: 0 0 1.5rem 0;
    display: block;
    width: 100%;
  }

  .effects-console button:last-child {
    margin-bottom: 0; 
  }

  .effects-console button.active {
    color: #000;
    background-color: #dfdff8;
  }

  .my-play-button {
    width: 24px;
    height: 24px;
    background-size: 50% 50%;
  }

  .toggle-controls-button {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1010;
    background-color: #E6F5DC;
    text-decoration: none;
    border: none;
    padding: 0.6rem 1.5rem;
    font-family: "DM Mono", monospace;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    color: #000;
  text-transform: uppercase;
  text-decoration: none;
 
  }

  .help-icon {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    font-size: 0.8rem;
      padding: 0.6rem;
  }
  .main-content {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100vh;
    position: relative;
  }

  .grid-wrapper {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: 100%;
    contain: strict;
      padding-bottom: 4rem;
  }

  .help-popup {
    margin-top: -40px;
  }
  .help-popup-content {
    padding: 16px;          
    margin: 16px;
  }
  
.help-popup-text { 
  padding-top: 0;   
  padding-bottom: 10px;    
  padding-left: 15px;
  padding-right: 15px;
}
  
  .help-popup-description {
    font-size: 0.6rem;
  }
  
  .help-popup-title {
    font-size: 0.7rem;
  }

  .help-popup-gif img {
  max-width: 110px;
}

  .announcement-bar {
  display: none;
}

}

@media (min-width: 601px) {
  .toggle-controls-button {
    display: none;
  }
}
