*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
body{
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(./images/bg.jpg);
    background-size: cover;
    opacity: 0.8; 
    z-index: -1; 
}
h1 {
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    position: fixed;
    top: 3%;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}
.container{
    border: 3px solid #00abf0;
    border-radius: 10px;
    box-shadow: 0 0 10px #00abf0;
    width: 500px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}
#lapContainer {
    position: fixed;
    text-align: center;
    top: calc(10% + 300px); 
    width: 500px; 
    max-height: 50%;
    overflow-y: auto;
}
#laps{
    font-size: 28px;
    font-weight: bold;
}
#timedisplay{
    height: 100px;
    width: 400px;
    font-size: 50px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #00abf0;
    border-radius: 10px;
    box-shadow: 0 0 10px #00abf0;
}
.btn{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
    padding: 50px;
}
.button{
    font-size: 18px;
    font-weight: bold;
    width: 100px;
    padding: 10px;
    border-radius: 10px;
    border: none;
}

#start{
    background-color: rgb(0, 167, 0);
    color: white;
}
#start:active{
    background-color: rgb(7, 203, 7);
    color: white;
}
#lap{
    background-color: orange;
    color: white;
}
#lap:active{
    background-color:rgb(255, 192, 75);
    color: white;
}
#pause{
    background-color: blue;
    color: white;
}
#pause:active{
    background-color: rgb(36, 103, 248);
    color: white;
}
#reset{
    background-color: red;
    color: white;
}
#reset:active{
    background-color: rgb(239, 73, 73);
    color: white;
}
/* Media Query for max-width of 503px */
@media screen and (max-width: 503px) {
    .container {
        width: 90%; 
    }

    h1 {
        font-size: 24px; 
    }

    #timedisplay {
        width: 90%; 
        font-size: 40px; 
    }

    .button {
        width: 70px;
        font-size: 14px; 
    }
}
/* Media Query for max-width of 367px */
@media screen and (max-width: 367px) {
    .container {
        width: 90%; 
    }

    h1 {
        font-size: 20px; 
    }

    #timedisplay {
        width: 90%; 
        font-size: 32px;
    }

    .button {
        width: 80px; 
        font-size: 14px; 
    }

    .btn {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
        padding: 10px;
    }
}
