* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1a1a1a;
    color: white;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

#menu {
    padding: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 1;
}

button {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #444;
}

#text-input {
    padding: 20px;
    display: flex;
    gap: 10px;
    z-index: 1;
}

#text-input.hidden {
    display: none;
}

input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #333;
    color: white;
}

#display-container {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
}

#flip-dot-display {
    width: 100%;
    height: 100%;
    display: grid;
    gap: 3px;
    background-color: #111;
    padding: 15px;
    border-radius: 10px;
}

.dot {
    aspect-ratio: 1;
    position: relative;
    transform-style: preserve-3d;
    background: #0a0a0a;
    padding: 3px;
    border-radius: 3px;
}

.dot::before,
.dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    transition: transform 0.05s linear;
}

.dot::before {
    background: #222;
    transform: rotateX(0deg);
}

.dot::after {
    background: #ffd700;
    transform: rotateX(180deg);
}

.dot.active::before {
    transform: rotateX(180deg);
}

.dot.active::after {
    transform: rotateX(360deg);
}

.dot.inactive::before {
    transform: rotateX(0deg);
}

.dot.inactive::after {
    transform: rotateX(180deg);
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #333;
    padding: 5px 15px;
    border-radius: 5px;
}

.speed-control label {
    color: #fff;
    font-size: 14px;
}

.speed-control input[type="range"] {
    width: 100px;
    accent-color: #ffd700;
}

.speed-control #speed-value {
    color: #ffd700;
    font-size: 14px;
    min-width: 30px;
}
