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

@font-face {
    font-family: "HL2";
    src: url("fonts/hl2.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    width: 100vw;
    height: 100vh;
    font-family: "Verdana";
    font-weight: 700;
    padding: 1rem;
    color: #fd0c;
    background-color: #30343f;
}

#overlay {
    /*display: flex;
    align-items: center;
    justify-content: center;*/
    width: 100%;
    height: 100%;
    position: relative;
    /*zoom: 2;*/
}

.left {
    position: absolute;
    bottom: 0;
    left: 0;
}

.right {
    position: absolute;
    bottom: 0;
    right: 0;
}

.panel {
    display: flex;
    flex-flow: row nowrap;
    align-items: flex-end;
    gap: 1rem;
    border-radius: 8px;
    background-color: #0004;
    min-height: 48px;
    min-width: 64px;
    padding: 0.5rem 1rem;
    transition: opacity 0.25s;
}

.panel.warning {
    animation: warning 0.75s ease-in-out;
    animation-iteration-count: infinite;
}

@keyframes warning {
    0% {
        background-color: #f002;
    }
    50% {
        background-color: #f006;
    }
    100% {
        background-color: #f002;
    }
}

#aux {
    opacity: 0;
    position: relative;
    flex-flow: column nowrap;
    align-items: flex-start;
    width: 100%;
    gap: 0.25rem;
    transition: opacity 0.15s;
}

#aux.hidden {
    opacity: 0;
}

#aux-mask {
    width: 100%;
    height: 8px;
    position: relative;

    mask-image: repeating-linear-gradient(
        to right,
        #fff 0%,
        #fff 7%,
        transparent 7%,
        transparent 10%
    );
}

#aux-fg,
#aux-bg {
    position: absolute;
    height: 100%;
    width: 100%;

    background-color: #fd0a;
}

#aux-fg {
    width: 0%;
    transition: width 0.15s;
}

#aux-bg {
    opacity: 0.5;
}

.row {
    display: flex;
    flex-flow: row nowrap;
    align-items: flex-end;
    gap: 1rem;
}

.col {
    display: flex;
    flex-flow: column nowrap;
    gap: 1rem;
}

.text-col {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-end;
    align-items: center;
}

.num {
    width: 3ch;
    position: relative;
    font-family: "HL2";
    font-weight: 500;
    font-size: 3.5rem;
    margin-bottom: -0.5rem;
}

.num::after {
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 0;
    content: attr(data-text);
    color: transparent;

    padding-right: 0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    margin-left: -0.5rem;

    text-shadow:
        0 0 4px #fd0,
        0 0 6px #fd0,
        0 0 8px #fd0,
        0 0 12px #fd0;

    mask-image: repeating-linear-gradient(
        to bottom,
        #fffa 0%,
        #fffa 3%,
        #fff 4.5%,
        #fffa 6%
    );

    opacity: 0;
    transition: opacity 2s;
}

.glowing::after {
    opacity: 1;
    transition: none;
}

.icon {
    font-family: "HL2";
    font-weight: 500;
    font-size: 3.5rem;
    line-height: 2rem;
}

#ammo-cap {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: -0.125rem;
}

/*#crosshair {
    user-select: none;
    font-family: "HL2";
    font-weight: 500;
    font-size: 2rem;
}*/

.red {
    filter: hue-rotate(-63deg) saturate(6);
}
