body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #e0e0e0;
    margin: 0;
    font-family: 'Courier New', monospace;
}

.clock {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    padding: 20px;
    max-width: 100vw;
    flex-wrap: wrap;
    justify-content: center;
}

.digit {
    display: flex;
    flex-direction: column-reverse;
    width: 60px; /* Largura fixa base */
    min-width: 50px;
    max-width: 80px;
    transition: transform 1.2s ease-in-out;
    transform-origin: bottom center;
}

.digit.falling {
    animation: fall 1.2s forwards;
}

@keyframes fall {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(90deg) translateY(30px) translateX(70px); opacity: 0.4; }
}

.number {
    height: 35px; /* Altura fixa para consistência */
    line-height: 35px;
    background: linear-gradient(#aaa, #888);
    color: #333;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    border-radius: 6px;
    margin-top: 3px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 1px solid #666;
}

.colon {
    font-size: 60px;
    font-weight: bold;
    color: #444;
    align-self: center;
    animation: blink 1s infinite;
    padding: 0 10px;
}

@keyframes blink {
    50% { opacity: 0.3; }
}

/* Mobile: telas menores que 768px */
@media (max-width: 768px) {
    .clock {
        gap: 10px;
        padding: 15px;
    }
    .digit {
        width: 45px;
        max-width: 60px;
    }
    .number {
        height: 30px;
        line-height: 30px;
        font-size: 18px;
    }
    .colon {
        font-size: 50px;
        padding: 0 5px;
    }
}

/* Mobile muito pequeno (< 480px) */
@media (max-width: 480px) {
    .clock {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 20px;
    }
    .digit {
        width: 70px;
    }
    .number {
        height: 40px;
        font-size: 24px;
    }
    .colon {
        font-size: 60px;
    }
}