@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
body {
    color:white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    padding: 20px;
    background: linear-gradient(to top left, #11001c, #290025);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#main-title {
    background: linear-gradient(
        to bottom right,
        #940068, #29045a);
    font-size: 4rem;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    height: 7.5%;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    border-bottom: 2px solid black;
}
#main-title-text {
    padding-left: 1rem;
}
#gridContainer {
    margin-bottom: 5rem;
    width: 100%;
    aspect-ratio: 1;
}

table {
    margin-top: 1%; 
    background-color: #ffffff;
    border-spacing: 0;
    width: 100%;
    height: 100%;
}

tr {
    width: 100%;
    aspect-ratio: 1;
}

td {
    border: 1px solid #000000;
    width: 1rem;
    height: 1rem;
    aspect-ratio: 1;
}

td:hover {
    cursor: pointer;
}

.controls {
    margin-top: 1rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    column-gap: 1rem;
    row-gap: 1rem;
}

#start, #clear, #random, #next, #go-back {
    color: white;
    padding: .75em;
    border-radius: 1rem;
    border: none;    
    background: linear-gradient(
        to bottom right,
        #940068, #29045a);
    font-size: 2.5rem;
}
#start:hover, #clear:hover, #random:hover, #next:hover, #go-back:hover {
    cursor: pointer;
}

#back-container {
    width: 50%;
}

#go-back {
    margin-top: 1rem;
    border: 1px solid white;
    width: 100%;
}

#go-back:hover {
    background: linear-gradient(
        to bottom right,
        #db009a, #4d07a8);
    border: 1px solid transparent;
}

#start span, #clear span, #random span, #next span {
    color: white;
}

td.dead {
    background-color: transparent;
}

td.live {
    background-color: #940068;
}

/* ----------- Laptops (Non-Retina Screens) ----------- */
@media screen 
  and (min-device-width: 1200px) 
  and (-webkit-min-device-pixel-ratio: 1) { 

    #gridContainer {
        width: 50%;
        aspect-ratio: 1;
        padding-bottom: 0.25rem;
    }
    table {
        margin-top: 0.25rem;
        width: 100%;
    }
    #main-title {
    height: 4.5%;
    font-size: 2rem;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    }
    td {
        height: auto;
    }
    .controls {
        width: 50%;
        margin-top: 0;
        column-gap: 0.5rem;
        row-gap: 0.5rem;
    }
    #start, #clear, #random, #next, #go-back {
        font-size: 1rem;
        border-radius: 0.5rem;
    }
    #go-back {
        margin-top: 0.5rem;
    }
    #back-container {
        width: 25%;
    }

}