* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background:  #eeedee;
    font-family: 'IBM Plex Sans', sans-serif;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}





.sidebar {
    width:220px;
    position:fixed;
    top: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;

}



  #control-window label {
    font-size: x-small;
    margin-bottom: 2px;
  }

/* Header */
.header {
    background-color: #0000ff;
    border-radius: 4px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    height:40px;
}



.header-text {
    font-family: 'EB Garamond', serif;
    font-weight: 700;
    color: white;
    font-size: 24px;
    line-height: normal;
    white-space: nowrap;
    text-decoration: none;
}

  
.header-text:hover {

    text-decoration: underline;

  }



/* Main Card */
#control-window {
    background-color: black;
    border-radius: 24px;
    padding: 18px 12px 12px 12px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15);

}

#control-window .separator{

        background-color: rgb(255, 255, 255);

}


.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.title-centered {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 500;
    color: white;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
}

.description {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    color: #ffffff;
    font-size: 12px;
    line-height: 14px;
}

.separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Input Rows */
.input-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.label {
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    color: white;
    font-size: 12px;
    line-height: 16px;
}

.value-container {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 18px;
}

.value-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    position: relative;
    width: 22px;
    
}

.value-input {
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    color: white;
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
    outline: none;
    background: transparent;
    border: none;
    transition: transform 0.2s ease-in-out;
    min-width: 20px;
    transform:  translateY(2px);

}

.value-input:hover {
    transform:  translateY(-2px);
}

.value-input.editing {
    animation: bounceY 1s ease-in-out infinite;
}

.underline {
    height: 1px;
    background-color: rgb(255, 255, 255);
    width: 100%;
    min-width: 20px;
}

.unit {
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    color: white;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    width: 36px;
    height: 12px;
}


/* Expandable Sections */
.section {
    border-radius: 18px;
    background-color: #f3f4f4;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    cursor: default;

}

.def {
    background-color: #c6ff01;
}

.section-header {
    padding: 8px 12px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 500;
    color: #4c4c4c;
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    text-transform:uppercase;
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ;
    padding: 0 12px ;

}

.section:hover .section-content {
    max-height: 220px;
    padding: 0 12px 12px 12px;
}

.section-separator {
    height: 1px;
    background-color: #4c4c4c;
    margin-bottom: 8px;
}

.section-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    color: #4c4c4c;
    font-size: 12px;
    line-height: 16px;
}

.instructions{
    background-color: rgba(255, 255, 255, 0.1); /* subtle white tint */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* for Safari */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#canvas-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0px;
    flex-grow: 1;
  }
  
  canvas {
    z-index: 100;
    width: 80vw;
    height: 100vh;
    object-fit: contain;
    display: block;
    background: transparent;
  }




button {
    font-size: x-small;
    padding: 12px;
    height: 24px;
    border-radius: 32px;
    color: white;
        background-color: rgba(135, 135, 135, 0.1); /* subtle white tint */
        border: 1px solid rgb(255, 255, 255);    
        justify-content: space-around;
    font-size: x-small;
    transition-duration: .4s;
    cursor: pointer;
        padding: 2px;
        transition: transform 0.15s ease-in-out;
        min-width: 20px;
    
    }
  
  
  
  button:hover{
            transform:  translateY(-2px);
        background-color: rgb(0, 60, 255);

      }
  
  
  #instructions {
    position: absolute; 
    bottom:60px;
    left: calc(50% - 200px);
    background-color: rgba(255, 255, 255, 0.1); /* subtle white tint */
    font-size: x-small;
    padding: 16px;
    height: 32px;
    max-width: 80vw;
    border-radius: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* for Safari */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
  z-index: 1000;
  }
  
  
  
  
  hr{width: 100%;
  margin: 0;
  border-bottom: 1px solid white;}
  
  
  .header1{
    font-family: 'DM Mono', monospace;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 12px;
  color: #4c4c4c;
    text-align: center;
  }
  
  .bgfelx{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    width: 100%; 
    position: absolute; 

  }
/* background text */
  .header2{
    font-family: 'EB Garamond', serif;
    font-style: italic;
  font-weight: 100;
  text-transform: uppercase;
  font-size: 36px;
  color: #4c4c4c10;
    text-align: center;
    top: 0px; width: 70%; 
    z-index: 0;
   
    
  }
  

  /* For WebKit browsers (Chrome, Safari, Edge, Opera) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* For Mozilla Firefox */
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Animations */
@keyframes bounceY {
    0%   { transform: translateY(-2px); }
    50%  { transform: translateY(2px); }
    100% { transform: translateY(-2px); }
  }

/* -------------------------------------------------- */
/* Mobile layout                                       */
/* -------------------------------------------------- */
@media (max-width: 480px) {
  body {
    align-items: stretch;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    position: static;
    top: auto;
    left: auto;
    width: calc(100% - 48px);
    margin: 24px;
    gap: 12px;
  }

  /* Match sidebar spacing for the moved sections container */
  #mobile-sections-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: calc(100% - 48px);
    margin: 24px;
    z-index: 1000;
  }

  /* Canvas full width */
  #canvas-wrapper {
    width: 100%;
  }

  canvas {
    width: 100vw;
    height: auto;
    max-height: 40vh;
  }

  /* Hide the instruction section on mobile */
  #instructions {
    display: none !important;
  }

  /* Reduce background poem size */
  .header2 {
    font-size: 12px;
  vertical-align: middle;
  }

  /* Disable hover-open on mobile; use .open class instead */
  .section:hover .section-content {
    max-height: 0;
    padding: 0 12px;
  }

  .section.open .section-content {
    max-height: 220px;
    padding: 0 12px 12px 12px;
  }
}