:root {
    /* Aligned with the MudBlazor docs dark palette (success / warning / error). */
    --gt-green: #3dcb6c;
    --gt-yellow: #ffb545;
    --gt-red: #ff3f5f;
}

h1:focus {
    outline: none;
}

/* --- Guess board --------------------------------------------------------- */

.gt-board {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gt-row {
    width: 100%;
}

.gt-bar-track {
    position: relative;
    height: 34px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--mud-palette-background-gray, #151521);
    border: 1px solid var(--mud-palette-lines-default, #33323e);
}

.gt-bar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    opacity: 0.85;
}

.gt-bar-green { background: var(--gt-green); }
.gt-bar-yellow { background: var(--gt-yellow); }
.gt-bar-red { background: var(--gt-red); }

.gt-bar-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

    .gt-bar-content .gt-name {
        max-width: 40%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
        /* white reads on every bar colour and on the empty (dark) track;
           the shadow keeps it legible on the bright yellow bar */
        color: #fff;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
    }

    .gt-bar-content .gt-sep {
        flex: 0 0 auto;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.5);
    }

    .gt-bar-content .gt-word {
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gt-bar-content .gt-rank {
        font-variant-numeric: tabular-nums;
        opacity: 0.9;
    }

.gt-row-system .gt-bar-content {
    font-style: italic;
}

.gt-code-big {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.1;
    color: var(--mud-palette-primary, #7e6fff);
}

/* --- Blazor error UI --------------------------------------------------------- */

#blazor-error-ui {
    color-scheme: light only;
    background: #ffab00;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }
