body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    background-color: #f5f5f5;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

#towerOfHanoi {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

#diskInput {
    padding: 10px;
    font-size: 16px;
    margin-bottom: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    width: 400px;
    /* Increased width */
    text-align: center;
}

.buttons {
    margin-bottom: 20px;
}

button {
    padding: 10px;
    font-size: 12px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    transition: background-color 0.3s;
    width: 120px;
}

button:hover {
    background-color: #0056b3;
}

#rods {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 600px;
    margin-top: 40px;
    /* Increased margin-top to add space between buttons and rods */
}

.rod {
    position: relative;
    width: 20px;
    height: 250px;
    /* Increased height to accommodate more disks */
    background-color: #9e9e9e;
    border-radius: 10px;
}

.rod::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -30px;
    width: 80px;
    height: 20px;
    background-color: #9e9e9e;
    border-radius: 10px;
}

.disk {
    height: 20px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.disk:nth-child(2n) {
    background-color: #4682b4;
}

.disk:nth-child(3n) {
    background-color: #32cd32;
}