*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    min-height: 100vh;
    background-color: #000;
}
#contentdiv{
    position: relative;
    width: 320px;
    height: 568px;
    margin: 0 auto;
    margin-top: calc((100vh - 36px - 568px) / 2);
}
#startdiv{
    width: 320px;
    height: 568px;
    background-image: url(../image/start_background.png);
}
button{
    outline: none;
}
#startdiv button{
    position: absolute;
    top: 500px;
    left: 82px;
    width: 150px;
    height: 30px;
    border: 1px solid black;
    border-radius: 30px;
    background-color: #c4c9ca;
}
#maindiv{
    width: 320px;
    height: 568px;
    background-image:url(../image/background_1.png) ;
    display: none;
}
#maindiv img{
    position: absolute;
    z-index: 1;
}
#scorediv{
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 10px;
    display: none;
}
#scorediv{
    font-size: 18px;
    font-weight: bold;
}
#suspenddiv{
    position: absolute;
    top: 210px;
    left: 82px;
    display: none;
    z-index: 2;
}
#suspenddiv button{
    width: 150px;
    height: 30px;
    margin-bottom: 20px;
    border: 1px solid black;
    border-radius: 30px;
    background-color: #c4c9ca;
}
#enddiv{
    position: absolute;
    top: 210px;
    left: 75px;
    border: 1px solid gray;
    border-radius: 5px;
    text-align: center;
    background-color:#d7ddde;
    display: none;
    z-index: 2;
}
.plantext{
    width: 160px;
    height: 30px;
    line-height: 30px;
    font-size: 16px;
    font-weight: bold;
}
#planscore{
    width: 160px;
    height: 80px;
    line-height: 80px;
    border-top: 1px solid gray;
    border-bottom: 1px solid gray;
    font-size: 16px;
    font-weight: bold;
}
#enddiv div{
    width: 160px;
    height: 50px;
}
#enddiv div button{
    margin-top:10px ;
    width: 90px;
    height: 30px;
    border: 1px solid gray;
    border-radius: 30px;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    #contentdiv {
        transform: scale(0.8);
        transform-origin: center;
    }

    #startdiv button,
    #suspenddiv button,
    #enddiv div button {
        font-size: 16px;
        padding: 8px 16px;
        touch-action: manipulation;
    }
}

@media screen and (max-width: 480px) {
    #contentdiv {
        transform: scale(0.6);
        transform-origin: center;
    }
}

@media screen and (max-height: 600px) {
    #contentdiv {
        transform: scale(0.7);
        transform-origin: center;
    }
}

/* Touch-friendly buttons */
button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent text selection on mobile */
#contentdiv {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
