:root {
    --primary-bg-color: #1a1a1a;
    --primary-btn-color: #4d4d4d;
    --primary-txt-color: #afafaf;
    --highlight-color: #e91e63;
}

@property --gather-progress {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 0%;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(45deg);
    }
}

@keyframes spin-full {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}

html, body {
    min-width: 460px;
    height: 100vh;
    margin: 0;
    padding: 0;
    background-color: var(--primary-bg-color);
}

#passTileWrapper {
    position: relative;
    display: grid;
    height: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    justify-items: center;
    gap: .5rem;
    overflow: hidden;
}

#passTileWrapper.passGenerating {
    cursor: wait;
}

#passTileWrapper.passGenerating .passTile {
    pointer-events: none;
}

#passTileWrapper.passGenerating #passRefreshBtn {
    pointer-events: none;
}

#passTileWrapper.passGenerating #passRefreshBtn > svg {
    animation: spin-full 1s ease-in-out infinite;
}

#passCopyIcon {
    position: fixed;
    width: 4rem;
    fill: #e00;
    opacity: 0;
    pointer-events: none;
    z-index: 9;
}

#passCopyIcon.animateCopy {
    animation: fadeOut .5s ease-out forwards;
}

.passTile {
    width: 100%;
    /* border-radius: 1rem; */
    font-size: 1.5rem;
    font-family: monospace;
    text-align: center;
    word-wrap: break-word;
    color: var(--primary-txt-color);
    /* background: linear-gradient(to right, #121212 var(--gather-progress), transparent var(--gather-progress)); */
    transition: --gather-progress .25s ease-out;
}

.passSlot {
    display: inline-block;
    width: 95%;
    margin: .5rem 0;
    line-height: 4rem;
    text-align: center;
    user-select: none;
    border-radius: 100vw;
    background: linear-gradient(to right, #263238 var(--gather-progress), transparent var(--gather-progress));
    transition: color .25s ease-in-out, font-size .25s linear;
}

.passSlot:hover {
    cursor: pointer;
    color: var(--highlight-color);
    font-size: 1.4rem;
}

.passSlot:active {
    font-size: 1.5rem;
}

#passRefreshBtn {
    width: 15rem;
    border: none;
    border-radius: 100vw;
    corner-shape: squircle;
    background-color: transparent;
    fill: var(--primary-btn-color);
    outline: none;
    transition: width .25s ease-in-out;
}

#passRefreshBtn:active {
    width: 12rem;
}

#passRefreshBtn > svg {
    vertical-align: middle;
    transform: rotate(0deg);
    transition: transform .5s ease-in-out, fill .25s ease-in-out;
}

#passRefreshBtn > svg:hover {
    cursor: pointer;
    fill: #727272;
    animation: spin .5s ease-in-out infinite alternate;
}

#passRefreshBtn > svg:active {
    animation-play-state: paused;
}

@media (max-width: 1400px) {
    #passTileWrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: 1fr;
        overflow-y: auto;
    }
    #passRefreshBtn {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    #passTileWrapper {
        grid-template-columns: 1fr;
    }

    .passTile {
        grid-column: span 2;
    }
}