body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-height: 100vh; /* Tinggi maksimal adalah 100% dari viewport */
    overflow-y: auto; /* Aktifkan scrolling vertikal */
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.grid-container {
    max-height: 80vh; /* Contoh: atur tinggi maksimal menjadi 80% dari viewport */
    overflow-y: auto; /* Aktifkan scrolling vertikal */
}

/* Gaya untuk desktop */
@media (min-width: 768px) {
    .grid-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 4 kolom pada desktop */
        gap: 20px;
    }
}

/* Gaya untuk handphone */
@media (max-width: 767px) {
    .grid-container {
        display: block; /* Stack secara vertikal pada handphone */
        max-height: 60vh; /* Tinggi lebih kecil untuk layar yang lebih kecil */
    }

    .column {
        margin-bottom: 20px; /* Tambahkan margin di bawah setiap kolom */
    }
}

.column {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.column label {
    display: block;
    margin-bottom: 5px;
}

.column input[type="text"], .column input[type="number"] {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

button:hover {
    background-color: #0056b3;
}

#results {
    margin-top: 20px;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

th {
    background-color: #f2f2f2;
}

.star {
    color: gold;
    font-size: 1.5em;
}

#cuttingMessage {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: black;
    margin-top: 20px;
}

#gameOverMessage {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: black;
    margin-top: 20px;
}
