.ms-counter {
    --ms-counter-digit-width: clamp(1.75rem, 7vw, 2.6rem);
    --ms-counter-digit-height: clamp(2.75rem, 10vw, 3.75rem);
    --ms-counter-font-size: clamp(1.65rem, 6vw, 2.55rem);
    display: inline-flex;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0;
    color: #f4f2e8;
    font-family: "Courier New", Consolas, Monaco, monospace;
    box-sizing: border-box;
}

.ms-counter,
.ms-counter * {
    box-sizing: border-box;
}

.ms-counter__digits {
    display: flex;
    max-width: 100%;
    justify-content: center;
    align-items: center;
    gap: clamp(0.1rem, 0.8vw, 0.25rem);
    overflow: hidden;
}

.ms-counter__digit {
    position: relative;
    flex: 0 1 var(--ms-counter-digit-width);
    width: var(--ms-counter-digit-width);
    min-width: 0;
    height: var(--ms-counter-digit-height);
    overflow: hidden;
    border: 1px solid #555a5e;
    border-radius: 0.25rem;
    background: #090a0b;
    box-shadow: inset 0 0 0.55rem rgba(0, 0, 0, 0.95), 0 1px rgba(255, 255, 255, 0.08);
}

.ms-counter__digit::before,
.ms-counter__digit::after {
    content: "";
    position: absolute;
    left: 0;
    z-index: 2;
    width: 100%;
    pointer-events: none;
}

.ms-counter__digit::before {
    top: 0;
    height: 45%;
    border-radius: inherit;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0));
}

.ms-counter__digit::after {
    top: 50%;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.85);
}

.ms-counter__wheel {
    width: 100%;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.ms-counter__wheel-item {
    display: flex;
    width: 100%;
    height: var(--ms-counter-digit-height);
    justify-content: center;
    align-items: center;
    color: #f5f3e7;
    font-size: var(--ms-counter-font-size);
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 1px #000;
    font-variant-numeric: tabular-nums;
}

.ms-counter__separator {
    flex: 0 0 auto;
    align-self: flex-end;
    padding-bottom: clamp(0.15rem, 1vw, 0.35rem);
    color: #d5d2c8;
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 1px #000;
}

.ms-counter__label {
    display: none;
}

.ms-counter__accessible-value {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ms-counter--animating .ms-counter__digit {
    box-shadow: inset 0 0 0.65rem rgba(0, 0, 0, 1), 0 1px rgba(255, 255, 255, 0.08);
}

.ms-counter--reduced-motion .ms-counter__wheel {
    transition-duration: 1ms;
    transition-delay: 0ms;
}

@media (max-width: 420px) {
    .ms-counter {
        width: 100%;
    }

    .ms-counter__digits {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ms-counter__wheel {
        transition-duration: 1ms;
        transition-delay: 0ms;
    }
}
