body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    overflow: hidden; /* Prevent scrollbars */
}



.welcome-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #ffffff;
    cursor: pointer;
}

.welcome-text {
    font-size: 2em;
    color: #333;
    text-align: center;
    transition: color 0.3s;
    font-weight: normal;
}

.welcome-text:hover {
    color: #0000FF;
}


.main-page {
    text-align: center;
}

h2 {
    position: absolute;
    top: 0;
    left: 0;
    margin: 20px; 
    font-size: 1em; 
    font-weight: bold;

}




.circle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allow clicks to pass through to background */
}

.circle-container .circle {
    pointer-events: auto; /* Re-enable clicks on circles */
}

/* Base circle class with common properties */
.circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    position: absolute; /* Changed from fixed to absolute */
    transform: translate(50%, -50%); /* Center the circle on the coordinates */
}

.circle:hover {
    background-color: #fffd40;
}

.circle.playing {
    background-color: #fffd40;
}

/* Color classes for different types of sounds */
.door { background-color: black; }           /* Doors */
.light { background-color: #bba392; }        /* Lights */
.outdoor { background-color: #8dd48c; }      /* Outdoor sounds */
.window { background-color: #ff914d; }       /* Windows */
.water { background-color: #0a05ff; }        /* Water sounds */
.furniture { background-color: #ffc1e7; }    /* Furniture */
.appliance { background-color: #ff3131; }    /* Electrical appliances */

/* Responsive Position classes - calculated from 1440x800 base */
.pos-1 { top: 46.25%; right: 24.7%; }   /* antre door (370/800 = 46.25%, 355/1440 = 24.7%) */
.pos-2 { top: 64.38%; right: 25.3%; }   /* antre light (515/800 = 64.38%, 365/1440 = 25.3%) */
.pos-3 { top: 68.75%; right: 24.7%; }   /* door closing (550/800 = 68.75%, 355/1440 = 24.7%) */
.pos-4 { top: 66.25%; right: 23.6%; }   /* door lock (530/800 = 66.25%, 340/1440 = 23.6%) */
.pos-5 { top: 55.0%; right: 20.8%; }    /* toilet door (440/800 = 55.0%, 300/1440 = 20.8%) */
.pos-6 { top: 43.75%; right: 70.5%; }   /* kitchen door (350/800 = 43.75%, 1015/1440 = 70.5%) */
.pos-7 { top: 46.88%; right: 70.1%; }   /* kitchen light (375/800 = 46.88%, 1010/1440 = 70.1%) */
.pos-8 { top: 56.0%; right: 61.1%; }    /* bathroom door (448/800 = 56.0%, 880/1440 = 61.1%) */
.pos-9 { top: 57.13%; right: 59.7%; }   /* bathroom light (457/800 = 57.13%, 860/1440 = 59.7%) */
.pos-10 { top: 54.38%; right: 55.6%; }  /* shower door (435/800 = 54.38%, 800/1440 = 55.6%) */
.pos-11 { top: 31.25%; right: 83.3%; }  /* outdoor sound 1 (250/800 = 31.25%, 1200/1440 = 83.3%) */
.pos-12 { top: 33.75%; right: 86.8%; }  /* outdoor sound 2 (270/800 = 33.75%, 1250/1440 = 86.8%) */
.pos-13 { top: 62.5%; right: 83.3%; }   /* outdoor sound 3 (500/800 = 62.5%, 1200/1440 = 83.3%) */
.pos-14 { top: 43.75%; right: 90.3%; }  /* outdoor sound 4 (350/800 = 43.75%, 1300/1440 = 90.3%) */
.pos-15 { top: 25.0%; right: 76.4%; }   /* living room window (200/800 = 25.0%, 1100/1440 = 76.4%) */
.pos-16 { top: 58.75%; right: 76.4%; }  /* kitchen window (470/800 = 58.75%, 1100/1440 = 76.4%) */
.pos-17 { top: 61.88%; right: 16.0%; }  /* toilet flush (495/800 = 61.88%, 230/1440 = 16.0%) */
.pos-18 { top: 65.0%; right: 76.4%; }   /* kitchen sink (520/800 = 65.0%, 1100/1440 = 76.4%) */
.pos-19 { top: 61.25%; right: 55.6%; }  /* bathroom sink (490/800 = 61.25%, 800/1440 = 55.6%) */
.pos-20 { top: 50.0%; right: 54.5%; }   /* shower (400/800 = 50.0%, 785/1440 = 54.5%) */
.pos-21 { top: 25.0%; right: 17.4%; }   /* wardrobe (200/800 = 25.0%, 250/1440 = 17.4%) */
.pos-22 { top: 45.0%; right: 48.6%; }   /* blue cabinet (360/800 = 45.0%, 700/1440 = 48.6%) */
.pos-23 { top: 12.5%; right: 45.1%; }   /* bed (100/800 = 12.5%, 650/1440 = 45.1%) */
.pos-24 { top: 14.38%; right: 48.6%; }  /* small lamp (115/800 = 14.38%, 700/1440 = 48.6%) */
.pos-25 { top: 13.13%; right: 43.4%; }  /* sofa (105/800 = 13.13%, 625/1440 = 43.4%) */
.pos-26 { top: 71.88%; right: 72.9%; }  /* kitchen cabinet (575/800 = 71.88%, 1050/1440 = 72.9%) */
.pos-27 { top: 56.25%; right: 71.2%; }  /* dishes (450/800 = 56.25%, 1025/1440 = 71.2%) */
.pos-28 { top: 73.75%; right: 66.0%; }  /* trash can (590/800 = 73.75%, 950/1440 = 66.0%) */
.pos-29 { top: 58.75%; right: 52.8%; }  /* bathroom cabinet (470/800 = 58.75%, 760/1440 = 52.8%) */
.pos-30 { top: 30.0%; right: 73.3%; }   /* table (240/800 = 30.0%, 1055/1440 = 73.3%) */
.pos-31 { top: 25.0%; right: 72.8%; }   /* chair (200/800 = 25.0%, 1048/1440 = 72.8%) */
.pos-32 { top: 30.0%; right: 17.7%; }   /* wardrobe drawer (240/800 = 30.0%, 255/1440 = 17.7%) */
.pos-33 { top: 44.38%; right: 28.1%; }  /* vacuum (355/800 = 44.38%, 405/1440 = 28.1%) */
.pos-34 { top: 59.38%; right: 74.0%; }  /* cooking (475/800 = 59.38%, 1065/1440 = 74.0%) */
.pos-35 { top: 67.5%; right: 73.3%; }   /* dishwasher 1 (540/800 = 67.5%, 1055/1440 = 73.3%) */
.pos-36 { top: 61.25%; right: 72.9%; }  /* washing machine start (490/800 = 61.25%, 1050/1440 = 72.9%) */
.pos-37 { top: 63.75%; right: 73.6%; }  /* washing machine running (510/800 = 63.75%, 1060/1440 = 73.6%) */
.pos-38 { top: 69.38%; right: 72.2%; }  /* dishwasher 2 (555/800 = 69.38%, 1040/1440 = 72.2%) */
.pos-39 { top: 71.25%; right: 70.5%; }  /* coffee machine (570/800 = 71.25%, 1015/1440 = 70.5%) */
.pos-40 { top: 71.25%; right: 68.7%; }  /* kettle (570/800 = 71.25%, 989/1440 = 68.7%) */
.pos-41 { top: 56.25%; right: 73.6%; }  /* refrigerator (450/800 = 56.25%, 1060/1440 = 73.6%) */
.pos-42 { top: 50.0%; right: 30.6%; }   /* scanner (400/800 = 50.0%, 440/1440 = 30.6%) */
.pos-43 { top: 48.13%; right: 28.8%; }  /* printer (385/800 = 48.13%, 415/1440 = 28.8%) */
.pos-44 { top: 58.75%; right: 19.8%; }  /* toilet light (470/800 = 58.75%, 285/1440 = 19.8%) */

/* Room labels - responsive */
.pieces1 { /* toilet */
    position: absolute; /* Changed from fixed to absolute */
    top: 53%; 
    right: 17.4%; 
    font-size: 16px;
    color: black;
    transform: translateX(50%); /* Center the text */
}

.pieces2 { /* bedroom */
    position: absolute; /* Changed from fixed to absolute */
    top: 20.0%; 
    right: 45.1%; 
    font-size: 16px;
    color: black;
    transform: translateX(50%); /* Center the text */
}

.pieces3 { /* kitchen */
    position: absolute; /* Changed from fixed to absolute */
    top: 63%; 
    right: 69.4%; 
    font-size: 16px;
    color: black;
    transform: translateX(50%); /* Center the text */
}

.pieces4 { /* bathroom */
    position: absolute; /* Changed from fixed to absolute */
    top: 52%;
    right: 49%; 
    font-size: 16px;
    color: black;
    transform: translateX(50%); /* Center the text */
}



#mapLegend {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 52vw; /* Responsive width */
    max-width: 750px; /* Original size as maximum */
    min-width: 300px; /* Minimum size for readability */
    height: auto; /* Maintain aspect ratio */
    z-index: 1000; /* Ensure it stays on top */
    background-color: rgba(255, 255, 255, 0.8); /* Optional: add a semi-transparent background */
    padding: 1vw; /* Responsive padding */
}


.info-link {
    position: absolute;
    top: 0px; /* Adjust to position the link in the top-right corner */
    right: 60px; /* Adjust to position the link in the top-right corner */
    
}


.info-link h2 {
    font-size: 1em; /* Adjust font size as needed */
    color: #000; /* Text color */
    font-weight: bold;
    
}

.info-link h2:hover {
    color: #0000FF;
}



/* General styles for text page */
.text-page {
    padding: 20px;
    max-width: 800px;  /* Control the max-width */
    margin: 0 auto;  /* Center the text-page container on the page */
    text-align: center; /* Ensure the text itself is centered */
}

/* Title styling */
.text-page h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #222;
}

/* Paragraph styling */
.text-page p {
    font-size: 1.2em;
    line-height: 1.6;
    margin: 0 20px;  /* Add margin on the left and right for space */
}

/* Optional: Additional styling for sections */
.content {
    width: 100%;
    margin: 0;  /* Ensure there is no conflicting margin */
}

/* Media queries for different screen sizes */

/* Large screens (desktop) */
@media screen and (min-width: 1200px) {
    .circle {
        width: 18px;
        height: 18px;
    }
    .pieces1, .pieces2, .pieces3, .pieces4 {
        font-size: 16px;
    }
}

/* Medium screens (tablet landscape) */
@media screen and (max-width: 1199px) and (min-width: 768px) {
    .circle {
        width: 12px;
        height: 12px;
    }
    .pieces1, .pieces2, .pieces3, .pieces4 {
        font-size: 14px;
    }
    #mapLegend {
        width: 600px;
    }
}

/* Small screens (tablet portrait and large phones) */
@media screen and (max-width: 767px) and (min-width: 481px) {
    .circle {
        width: 14px;
        height: 14px;
    }
    .pieces1, .pieces2, .pieces3, .pieces4 {
        font-size: 12px;
    }
    #mapLegend {
        width: 400px;
    }
    h2 {
        font-size: 0.9em;
    }
}

/* Extra small screens (mobile) */
@media screen and (max-width: 480px) {
    .circle {
        width: 12px;
        height: 12px;
    }
    .pieces1, .pieces2, .pieces3, .pieces4 {
        font-size: 10px;
    }
    #mapLegend {
        width: 300px;
    }
    h2 {
        font-size: 0.8em;
        margin: 10px;
    }
    .info-link h2 {
        font-size: 0.8em;
    }
}

/* Maintain aspect ratio on very wide screens */
@media screen and (min-aspect-ratio: 16/10) {
    .main-page {
        background-size: auto 100%;
    }
}

/* Maintain aspect ratio on very tall screens */
@media screen and (max-aspect-ratio: 4/3) {
    .main-page {
        background-size: 100% auto;
    }
}
