html, body {
    height: 100%;
}
/* Reset some default margin and padding */
body, h1, h2, h3, p, ul, ol, li {
  margin: 0;
  padding: 0;
}

/* Apply a simple style to the body */
body {
  font-family: 'Arial', sans-serif;
  line-height: 1.0;  
  background: #630f0f;
  color: #333;
    display: flex;              /* 🔑 VIKTIG */
    flex-direction: column;     /* 🔑 VIKTIG */
    /* overflow: hidden;           🔑 stoppar scroll     */
}
h1 {color: #FFF;
    padding:10px}
h2,h3,h4 {color: #222;}
p {
color: #222;
font-size: 13px;
}

/* Style the header */
header {
  background-color: #630f0f;
  opacity: 1; 
  margin-left: 0px;
  padding: 4px 4px;
  margin-top: 10px auto;
  text-align: center;
  font-size: 100%;

}

/* Style the main content container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

#project-description {
  max-width: 600px;
  margin-top: 30px;
  margin: 20px auto;
  background: #f7f5f5f8;
  padding: 20px;
  line-height: 1.4;
  box-shadow: 0 5px 5px rgba(0,0,0,0.15);
}

/* Style the form and sliders */
form {
  margin-bottom: 20px;
}

.sliders {
  display: flex;
  flex-direction: column;
}

label {
  display: block;
  margin-bottom: 5px;
}

input[type="range"] {
  width: 100%;
  margin-bottom: 10px;
}

#image-section {
  text-align: center;
}

img {
  max-width: 100%;
  height: auto;
  width: 100%;
  display: block;
  margin: 0 auto;
}

/* Style the button */
button {
  background-color: #630f0f;
  color: #fff;
  padding: 10px;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: #871f26;
}

/* Style the chart container */
.chart-container {
  margin-top: 20px;
}

/* Style the footer */
footer {
  background: #630f0f;
  color: #f8f0f1;
  padding: 10px;
  text-align: center;
}


canvas {
    position: relative;
    z-index: 1;
    touch-action: none;
}

#scene-container {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
}
/* UI-panel över scenen */
#ui {
    position: relative;
    top: 10px;
    left: 10px;
    z-index: 20;
    color: #fff;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 0.9em;

}

/* Knappar i UI */
#ui button {
    display: inline-block;
    margin: 4px 4px;
    padding: 10px 16px;
    background-color:#2e0d0f;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
}

#ui button:hover {
    background-color: #c24c54;
}

/* Text i UI */
#ui span {
    font-weight: bold;
}

#tree-specs { 
    position: absolute;
    left: 10px;
    top: 10px;     
    z-index:10;
    color: rgb(0, 0, 0);
    font-size: 1em;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    padding: 4px 4px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 220px;
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.modal-buttons button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #471417;
  color: white;
  font-weight: bold;
}

.modal-buttons button:hover {
  background: #6a1f24;
}

#si-list {
  margin-top: 10px;
}

.list-row {
  padding: 8px;
  margin: 4px 0;
  background: #f0f0f0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.list-row:hover {
  background: #471417;
  color: white;
}