.clock-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.8rem;
    opacity: 0;
    font-size: 1.2rem;
    font-family: sans-serif;
    background-color: rgba(255, 255, 255, 0.8);
    transition: opacity 1s;
    border-radius: 4px;
    text-align: center;
    min-width: 160px;
    width: auto;
    --base-opacity: 0;
    --size-scale: 1;
    
    /* Scale the entire element based on size slider */
    transform: translateX(-50%) scale(var(--size-scale));
    transform-origin: center bottom;
    
    /* Default position: bottom */
    bottom: 50px;
}

/* Position variants */
.clock-container.position-top {
    top: 50px;
    bottom: auto;
    transform-origin: center top;
}

.clock-container.position-center {
    top: 50%;
    bottom: auto;
    transform: translateX(-50%) translateY(-50%) scale(var(--size-scale));
    transform-origin: center center;
}

.clock-container.position-bottom {
    bottom: 50px;
    top: auto;
    transform-origin: center bottom;
}

/* Show on resize event (like other elements) */
html.resizing-on .clock-container {
    opacity: 1;
}

/* Show on hover (like other elements) */
.clock-container:hover {
    opacity: 1;
}

/* Custom opacity control when enabled */
.clock-container.always-visible {
    opacity: var(--base-opacity);
}

/* Full opacity on hover when enabled */
.clock-container.always-visible:hover {
    opacity: 1;
}

.clock-container .label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.1rem;
}

.clock-container .time {
    font-size: 1.4rem;
    font-weight: bold;
    color: #000;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}
