* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* prevents padding and border from influencing the size */
}

body, html {
    height: 100%; /* of viewport  */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: white;
    margin: 15px;

    display: flex;
    justify-content: center;
    align-items: center;
}

header {
    height: flex;
}

#headerDiv {
    grid-column: 1;
    grid-row: 1;
    height: flex;
}

#distanceContainer {
    grid-column: 1;
    grid-row: 2;
    margin-top: 40px;
}

.grid-container {
    display: grid;
    grid-template-rows: repeat(3, auto); /* Three rows with dynamic height */
    margin: auto; /* centers the grid */
    background-color: white;
}

.grid-container > div {
    box-sizing: border-box; /* includes border in the width */
}

#container {
    grid-row: 3;
    grid-column: 1;
    overflow: hidden;
    position: relative;
    margin-bottom: 50px;
 
    background-size: auto 100%;     /* height of the picture is set to 100% of the container, width is proportional*/
    background-repeat: repeat-x;  
    background-position-x: 50%;
    background-position-y: center;
}

#spaceContainer {

    grid-column: 1;
    grid-row: 3;
    object-fit: cover;
}

/* Laptops/Desktops */
@media (min-width: 1201px) {
    h1 {
        font-size: 70px;
    }

    h4 {
        font-size: 30px;
        color: #0f0202;
        margin-bottom: 0px;
    }

    body, html {
        margin: 20px;
    }

    #headerDiv {
        width: 63vw;
    }

    #distanceContainer {
        margin-top: 40px;
        margin-bottom: 20px;
        width: 63vw;
    }

    #container {
        width: 63vw;
        height: 50vh;
    }

    #spaceContainer {
        width: 50vw;
        height: 50vh;
    }
}

/* Smartphones (portrait) */
@media (max-width: 800px) and (orientation: portrait) {

    h1 {
        font-size: 40px;
    }

    h4 {
        font-size: 20px;
    }

    body, html {
        margin: 10px;
    }

    #headerDiv {
        width: 85vw;
    }

    #distanceContainer {
        margin-top: 20px;
        margin-bottom: 10px;
        width: 85vw;
    }

    #container {
        width: 85vw;
        height: 50vh;
    }

    #spaceContainer {
        width: 85vw;
        height: 35vh;
    }
}

/* Smartphones (landscape) */
@media (max-width: 800px) and (orientation: landscape) {
    
    h1 {
        font-size: 35px;
    }

    h4 {
        font-size: 18px;
    }

    body, html {
        margin: 8px;
    }

    #distanceContainer {
        margin-top: 15px;
        margin-bottom: 8px;
        width: 85vw;
    }

    #headerDiv {
        width: 85vw;
    }

    #container {
        width: 85vw;
        height: 50vh;
    }

    #spaceContainer {
        width: 85vw;
        height: 85vh;
    }
}

/* Tablets (portrait) */
@media (min-width: 801px) and (max-width: 1200px) and (orientation: portrait) {
    h1 {
        font-size: 50px;
    }

    h4 {
        font-size: 25px;
    }

    body, html {
        margin: 15px;
    }

    #headerDiv {
        width: 80vw;
    }

    #distanceContainer {
        margin-top: 30px;
        margin-bottom: 15px;
        width: 80vw;
    }

    #container {
        width: 80vw;
        height: 50vh;
    }

    #spaceContainer {
        width: 80vw;
        height: 50vh;
    }
}

/* Tablets (landscape) */
@media (min-width: 801px) and (max-width: 1200px) and (orientation: landscape) {
    h1 {
        font-size: 45px;
    }

    h4 {
        font-size: 22px;
    }

    body, html {
        margin: 12px;
    }

    #headerDiv {
        width: 63vw;
    }

    #distanceContainer {
        margin-top: 25px;
        margin-bottom: 12px;
        width: 63vw;
    }

    #container {
        width: 63vw;
        height: 50vh;
    }

    #spaceContainer {
        width: 63vw;
        height: 63vh;
    }
}

#image {
    height: 100%;
}

#fullscreen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 48px; 
    height: 48px;
    background-color: rgba(0, 0, 0, 0.7); /* semi transparent background */
    border: none;
    border-radius: 50%; /* round form */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#fullscreen-btn:hover {
    background-color: rgba(0, 0, 0, 0.9); /* darker when hovered */
    transform: scale(1.1); /* Leichte Vergrößerung beim Hover */
}

#fullscreen-icon {
    width: 24px; /* Einheitliche Icon-Größe */
    height: 24px;
    fill: white; /* Weiße Farbe für das Icon */
}

#switchBox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px; /* Original width */
  height: 24px; /* Original height */
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px; /* Adjusted for original height */
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; /* Adjusted for original height */
  width: 18px; /* Adjusted for original height */
  left: 3px; /* Adjusted for original height */
  bottom: 3px; /* Adjusted for original height */
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  transform: translateX(24px); /* Adjusted for original width */
}

/* Optional: Add labels for the switches */
.switch-label {
  font-size: 16px;
  color: #333;
}