.container {
    perspective: 800px;
    width: 90vw; /* Adjusted for both mobile and desktop */
    max-width: 400px; /* Adjusted for both mobile and desktop */
    height: 50vh; /* Adjusted for both mobile and desktop */
    margin: 50px auto; /* Adjusted for both mobile and desktop */
    position: relative;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 10s infinite linear;
}

.face {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: rgba(0, 0, 255, 0.5); /* transparent blue */
    border: 1px solid #000;
}

.front  { transform: translateZ(50px); }
.back   { transform: translateZ(-50px); }
.right  { transform: rotateY(90deg) translateZ(50px); }
.left   { transform: rotateY(-90deg) translateZ(50px); }
.top    { transform: rotateX(90deg) translateZ(50px); }
.bottom { transform: rotateX(-90deg) translateZ(50px); }

.field {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
}

.shape-name {
    font-size: 5vw; /* Adjusted for both mobile and desktop */
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    padding: 5px 10px;
    border-radius: 5px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5); /* Adding text shadow */
    transform: rotateX(10deg); /* Adding slight rotation for 3D effect */
}

@keyframes rotate {
    from { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

.buttons-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

button {
    background-color: #FAEBD7; /* Pearl White */
    color: #333;
    border: none;
    padding: 10px 20px;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    width: 75%;
}

button:hover {
    background-color: #FFDAB9; /* Peach */
}

input[type="text"] {
    background-color: #FAEBD7; /* Pearl White */
    border: 1px solid #FAEBD7; /* Pearl White */
    color: #333; /* Text color */
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    width: 60%;
}

input[type="text"]:focus {
    outline: none;
    border-color: #8B4513; /* Darker shade for focus */
}
