body {
    background-color: #00eeff2b;
}

#gameLostImg,
#gameWonImg,
#gameWonImg2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    pointer-events: none;
}

#gameLostButton,
#gameWonButton,
#gameWonButton2 {
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 50px;
    font-size: 1.5em;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.8),
            rgba(0, 255, 0, 0.8),
            rgba(0, 0, 255, 0.8),
            rgba(255, 0, 0, 0.8),
            rgba(0, 255, 0, 0.8));
    border: 5px solid rgb(155, 155, 155);
    border-style: outset;
    border-radius: 15px;
    cursor: pointer;
    background-size: 400% 400%;
    animation: animateGradient 3s linear infinite;
    color: rgba(255, 255, 255, 0.767);
}

/* Animate gradient */
@keyframes animateGradient {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

#gameLostButton:hover,
#gameWonButton:hover,
#gameWonButton2:hover {
    /* slow down animation */
    animation-play-state: paused;
}

#gameLostText,
#gameWonText,
#gameWonText2 {
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    font-family: 'orbitron';
    color: rgb(255, 0, 0);
    text-shadow: 1px 1px 1px rgb(255, 255, 255);
    background-color: rgba(0, 0, 0, 0.883);
    border: 5px solid rgb(155, 155, 155);
    border-style: outset;
    border-radius: 15px;
    padding-left: 15px;
    padding-right: 15px;
    /* padding-top: 5px; */
    padding-bottom: 5px;
    pointer-events: none;
}

#minkKilled,
#timePerMink {
    pointer-events: visible;
}


#main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.small-text {
    font-size: 0.6em;
}

.info-text {
    margin-top: 0px;
    margin-bottom: 5px;
    font-size: 1.2em;
}

h1 {
    font-size: 3em;
    margin-top: 5px;
    margin-bottom: 15px;
}

#canvas {
    touch-action: manipulation;
    border: 10px solid rgb(240, 240, 240);
    border-style: inset;
    margin: 10px;
}

#game {
    width: min-content;
    background-color: rgb(192, 192, 192);
    border: 8px solid rgb(240, 240, 240);
    padding: 6px;
    border-style: outset;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#game_info {
    border: 10px solid white;
    background-color: rgb(192, 192, 192);
    border-style: inset;
    /* border-color: rgb(128, 128, 128); */
    width: 900px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 10px;

}

#start_button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 40px;
    font-size: 1.5em;
    margin: 20px;
    background-color: rgba(0, 255, 0, 0.5);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
    cursor: pointer;
}

#start_button:hover {
    background-color: rgba(0, 255, 0, 0.9);
}

#mink_left,
#timer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    text-align: center;
    user-select: none;
    margin: 20px;
    margin-left: 50px;
    margin-right: 50px;
    font-size: 2em;
    font-family: 'orbitron';
}

#time_number {
    color: red;
    width: 90px;
    text-align: left;
}

#mink_left_number {
    color: red;
    width: 90px;
    text-align: left;
}


@font-face {
    font-family: 'orbitron';
    font-style: normal;
    font-weight: 400;
    /* src: url(https://fonts.gstatic.com/s/orbitron/v31/yMJMMIlzdpvBhQQL_SC3X9yhF25-T1nyGy6BoWgz.woff2) format('woff2'); */
    src: url(fonts/orbitron.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'open-sans-extrabold';
    src: url(fonts/opensans-extrabold.ttf);
}


.hidden {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 2.5s, opacity 2.5s ease-in;
}

.visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 3s ease-in;
}

.slowvisible {
    visibility: visible;
    opacity: 1;
    transition: opacity 5s ease-in;
}

.slowervisible {
    visibility: visible;
    opacity: 1;
    transition: opacity 8s ease-in;
}

/* Scores button, modal and blur */
.scores-button {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgb(34, 177, 76);
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.06);
    z-index: 1200;
    transition: transform 0.12s ease, background 0.12s ease;
}

.scores-button:hover {
    transform: scale(1.06);
}

.scores-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(0px);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease, backdrop-filter 300ms ease;
}

.scores-overlay.scores-show {
    opacity: 1;
    backdrop-filter: blur(6px);
    pointer-events: auto;
}

.scores-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    padding: 15px 30px 30px 30px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1150;
    max-width: 800px;
    width: calc(100% - 64px);
    opacity: 0;
    pointer-events: none;
    transition: transform 260ms cubic-bezier(.2, .9, .2, 1), opacity 220ms ease;
    max-height: 80vh;
    overflow-y: auto;
}

.scores-modal.scores-show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.scores-close {
    position: absolute;
    right: 10px;
    top: 6px;
    border: none;
    background: transparent;
    font-size: 25px;
    cursor: pointer;
    color: #444;
}

.scores-content {
    color: #222;
    font-size: 0.95rem;
    margin-top: 12px;
}

#scoresTable {
    width: 100%;
}

#scoresTable table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#scoresTable th,
#scoresTable td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

#scoresTable th {
    background-color: #f0f0f0;
    font-weight: 600;
}

#scoresTable tr:hover {
    background-color: #f9f9f9;
}

/* prevent cell resizing when button text changes */
.seed-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 140px;
}
.seed-text {
    flex-shrink: 0;
    width: 80px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-copy-btn {
    padding: 4px 8px;
    font-size: 0.85rem;
    min-width: 70px;
    background: #1a85ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    margin-left: 10px;
}

.score-copy-btn:hover {
    background: #0d5dcc;
}

.score-copy-btn.copied {
    background: #22b14c;
}

/* helper initial hide/show classes used specifically for the scores modal */
.scores-show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Info button, pop-up box and blur */
.info-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgb(26, 133, 255);
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.06);
    z-index: 1200;
    transition: transform 0.12s ease, background 0.12s ease;
}

.info-button:hover {
    transform: scale(1.06);
}

.info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(0px);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease, backdrop-filter 300ms ease;
}

.info-overlay.info-show {
    opacity: 1;
    backdrop-filter: blur(6px);
    pointer-events: auto;
}

.info-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    padding: 15px 30px 30px 50px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1150;
    max-width: 600px;
    width: calc(100% - 64px);
    opacity: 0;
    pointer-events: none;
    transition: transform 260ms cubic-bezier(.2, .9, .2, 1), opacity 220ms ease;
}

.info-modal.info-show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.info-close {
    position: absolute;
    right: 10px;
    top: 6px;
    border: none;
    background: transparent;
    font-size: 25px;
    cursor: pointer;
    color: #444;
}

.info-content {
    color: #222;
    font-size: 1rem;
    line-height: 1.4;
    margin-top: 6px;
}

/* helper initial hide/show classes used specifically for the info modal */
.info-show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}