body {
    font-family: 'Arial', sans-serif;
    background-color: #f7f7f7;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

:root {
    --overlay-bg: white; /* Default for light theme */
}

@media (prefers-color-scheme: dark) {
    :root {
        --overlay-bg: #1e1e1e; /* Darker background for dark theme */
    }
}

.container {
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 600px; /* From the first file */
    margin: 0 auto; /* Added from the second file */
    text-align: center;
}

h1 {
    font-size: 2em;
    color: #783389ff; /* Purple from Principal Palette */
    margin-bottom: 20px;
    text-align: center; /* Added from the second file */
}

h2 {
    font-size: 1.5em;
    color: #ed2b71ff; /* Pink from Principal Palette */
    margin-bottom: 15px;
    text-align: center; /* Added from the second file */
}

p {
    text-align: center; /* Added from the second file */
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"] {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

input[type="file"] {
    padding: 5px;
}

.btn {
    background-color: #00d2abff; /* Cyan from Secondary Palette */
    color: #fff;
    border: none;
    padding: 10px 20px; /* From the first file */
    text-transform: uppercase;
    font-size: 1em;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: block; /* Added from the second file */
    width: 100%; /* Added from the second file */
    margin-top: 10px; /* Added from the second file */
    text-align: center; /* Added from the second file */
}

.btn:hover {
    background-color: #0b7cfeff; /* Blue from Secondary Palette */
}

audio {
    margin-top: 10px;
    width: 100%;
}

.sample-images {
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
}

.sample-images img {
    width: 80px;
    height: 80px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sample-images img:hover {
    transform: scale(1.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Ensure the image respects the boundaries of its container */
.system-gif {
    width: 100%;
    height: auto;
    display: block; /* Ensures the image behaves as a block element */
    margin: 0 auto; /* Center the image */
    cursor: pointer;
    overflow: hidden; /* Prevent any overflow issues */
}

/* Modal image styling */
#gifModal img {
    width: 100%;
    height: auto;
}

.step {
    margin-bottom: 20px; /* Added from the second file */
}

.capture-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px; /* Added from the second file */
}

.capture-container .example-container img,
.capture-container .camera-container video {
    width: 100%;
    object-fit: cover; 
    aspect-ratio: 4 / 3; 
}

#captureSection {
    width: 100%;
}

/* High-resolution mobile devices */
@media screen and (min-width: 1440px) and (max-width: 1440px) and (min-height: 2960px) and (max-height: 2960px) and (orientation: portrait),
       screen and (max-width: 450px) and (min-height: 800px) and (orientation: portrait) {
    #captureSection {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .capture-container .example-container img,
    .capture-container .camera-container video {
        width: 100%;
        aspect-ratio: auto;
        height: 100%;
    }

    .capture-container .example-container,
    .capture-container .camera-container {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    #confirmationSection .capture-container img {
        width: 100%;
        aspect-ratio: auto;
        margin: 0;
    }
}

/* Standard mobile portrait */
@media screen and (max-width: 767px) and (orientation: portrait) {
    #captureSection {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .capture-container .example-container img,
    .capture-container .camera-container video {
        width: 100%;
        aspect-ratio: auto;
        height: 100%;
    }

    .capture-container .example-container,
    .capture-container .camera-container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
}

@media screen and (max-width: 768px) {
    .capture-container .example-container img,
    .capture-container .camera-container video {
        width: 100%;
        aspect-ratio: 3 / 4;
        height: 100%;
    }
}

.capture-container .example-container,
.capture-container .camera-container {
    flex: 1;
    max-width: 50%;
    padding: 10px; /* Added from the second file */
}

#confirmationSection .capture-container img {
    width: 45%;
    object-fit: cover;
    aspect-ratio: 4 / 3; /* Added from the second file */
}

#canvas {
    display: none;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover; /* Added from the second file */
}

/* Fullscreen Overlay Styling */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Added from the second file */
}

.overlay img {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block; /* Added from the second file */
}

.overlay #closeOverlay {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer; /* Added from the second file */
}
