.theme-controls {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    flex-direction: row-reverse;
    gap: 0.5rem;
    align-items: center;
    z-index: 100;
}

.theme-toggle {
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.4rem;
    border-radius: 50%;
    background-color: rgba(200, 200, 200, 0.3);
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 120ms ease;
}

.theme-toggle:hover {
    background-color: rgba(200, 200, 200, 0.55);
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
}

.theme-toggle:active {
    transform: translateY(1px);
}

[data-theme="dark"] .theme-toggle {
    background-color: rgba(50, 50, 50, 0.5);
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(40, 40, 40, 0.7);
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle {
        background-color: rgba(50, 50, 50, 0.5);
    }
    :root:not([data-theme]) .theme-toggle:hover {
        background-color: rgba(40, 40, 40, 0.7);
        box-shadow: 0 4px 10px rgba(0,0,0,0.18);
    }
}

.theme-select {
    font-size: 0.9rem;
    padding: 0.25rem 0.4rem;
}

.theme-status {
    font-size: 0.85rem;
    color: var(--color-text-light);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none; /* purely informative */
}

.theme-status.show {
    opacity: 1;
}

.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap; /* added line */
}

.new-entry-link {
    /* Gray button style */
    display: inline-block;
    text-decoration: none;
    border: none;
    border-bottom: none;
    font-size: var(--font-size-sm);
    padding: 5px 10px;
    border-radius: 999px;
    background-color: #eeeeee; /* a bit less grey */
    color: var(--color-text-muted);
    box-shadow: none; /* no shadow on no-hover */
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 120ms ease, color 180ms ease;
    margin-top: 0.5rem;
}

.new-entry-link:hover {
    background-color: #cdcdcd;
    border-bottom: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
    color: var(--color-text);
}

.new-entry-link:active {
    transform: translateY(1px);
}

[data-theme="dark"] .new-entry-link {
    background-color: #3d3d3d; /* a bit less grey (lighter) in dark mode */
    color: var(--color-text-muted);
}

[data-theme="dark"] .new-entry-link:hover {
    background-color: #2b2b2b;
    color: var(--color-text);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .new-entry-link {
        background-color: #3d3d3d; /* a bit less grey in dark mode */
        color: var(--color-text-muted);
    }
    :root:not([data-theme]) .new-entry-link:hover {
        background-color: #2b2b2b;
        color: var(--color-text);
    }
}
