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

body {
    background-color: #0b0f16;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

.header {
    position: absolute;
    top: 40px;
    right: 50px;
    font-size: 16px;
    font-weight: 500;
    color: #6a7280;
    z-index: 20;
    letter-spacing: 0.5px;
}

.header #score {
    color: #ffffff;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    margin-left: 5px;
}

.viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
}

.pointer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    z-index: 10;
}

.pointer.top {
    top: calc(50% - 240px);
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 20px solid #ef4444; /* Pointing down */
}

.pointer.bottom {
    top: calc(50% + 220px);
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 20px solid #ef4444; /* Pointing up */
}

.digits-container {
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    /* Smooth bouncy translation */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15); 
}

.digit {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    transition: font-size 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2), 
                width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2),
                margin 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2),
                color 0.3s ease, 
                opacity 0.3s ease,
                text-shadow 0.3s ease;
    user-select: none;
    will-change: width, margin, font-size, color, opacity;
}

.digit.active {
    color: #ffffff;
    opacity: 1;
    text-shadow: 0 4px 40px rgba(255, 255, 255, 0.4);
    z-index: 5;
    position: relative;
}

.digit.dist-1 {
    color: #cbd5e1;
    opacity: 0.85;
}

.digit.dist-2 {
    color: #94a3b8;
    opacity: 0.7;
}

.digit.dist-3 {
    color: #64748b;
    opacity: 0.5;
}

.digit.dist-far {
    color: #475569;
    opacity: 0.3;
}
