﻿#numbersGameCanvas { position: relative; width: 100%; margin-bottom: 35px; }
#matchPhrase { display: none; clear: both; text-align: center; padding: 7px 12px; margin-bottom: 10px; font-size: 14px; border-radius: 8px; color: #766BFF; color: var(--input-button-background-color); background-color: rgba(118, 107, 255, 0.1); }
    #numbersGameCanvas svg.match-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
table.numbers-table { width: 100%; table-layout: fixed; clear: both; box-sizing: border-box; box-shadow: 0 1px 7px rgba(0, 0, 0, 0.14); box-shadow: 0 1px 7px var(--section-box-shadow-color); background-color: #FFF; background-color: var(--section-background-color); border-spacing: 0; border-collapse: collapse; border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); }
    table.numbers-table tr { transition: all .25s ease-in-out; opacity: 1.0; }
        table.numbers-table tr.collapse-row { opacity: 0; }
        table.numbers-table tr.new-row { animation: rowSlideIn 0.35s ease-out forwards; }
    table.numbers-table td { text-align: center; vertical-align: middle; font-weight: bold; font-size: clamp(16px, 6.0vw, 35px); color: #34363E; color: var(--side-bar-text-color); border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); }
        table.numbers-table td.hoverable { cursor: pointer; transition: all .2s ease-in-out; user-select: none; }
            /*table.numbers-table td.hoverable:hover { background-color: rgba(61, 81, 105, 0.2); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22); }*/
            table.numbers-table td.hoverable:active, table.numbers-table td.hoverable.selected { box-shadow: none !important; }
            table.numbers-table td.hoverable.selected { background-color: var(--numbers-matchup-selected-bg); }
            table.numbers-table td.hoverable.shake { animation: shake 0.5s ease-in-out; }

#totalPoints { float: left; display: block; padding-bottom: 10px; font-size: 18px; text-align: center; }
    #totalPoints::before { content: "Score"; display: block; clear: both; margin-bottom: 2px; opacity: 0.7; font-size: 14px; font-weight: normal; }
    #totalPoints .points { display: inline-block; }
    .updated-flash { animation: popOut 0.4s ease-in-out; }

#highScore { float: right; display: block; padding-bottom: 10px; font-size: 18px; text-align: center; }
    #highScore::before { content: ""; display: inline-block; background-image: url(../../Assets/icons/highscore.png); background-position: center center; background-repeat: no-repeat; background-size: 24px; width: 24px; height: 24px; margin-right: 5px; margin-top: -2px; }
    #highScore .points { display: inline-block; }

#gameNumber { display: block; clear: both; text-align: center; padding-bottom: 4px; font-size: 13px; opacity: 0.6; }

#numbersCleared { display: block; clear: both; text-align: center; padding-bottom: 10px; }
    #numbersCleared::before { content: "Numbers Cleared"; display: block; clear: both; margin-bottom: 2px; opacity: 0.7; font-size: 14px; font-weight: normal; }
    #numbersCleared span { display: inline-block; user-select: none; padding-left: 7px; padding-right: 7px; font-size: 18px; opacity: 1.0; }
        #numbersCleared span.cleared { opacity: 0.4; text-decoration: line-through; }

#buttons-holder { display: block; clear: both; text-align: center; }
    #buttons-holder #addNewRow { display: inline-block; position: relative; cursor: pointer; width: 50px; height: 50px; text-align: center; background: #766BFF; background: var(--input-button-background-color); border: 1px solid #766BFF; border: 1px solid var(--input-button-border-color); text-decoration: none; box-sizing: border-box; border-radius: 50px; transition: all .2s ease-in-out; }
        #buttons-holder #addNewRow span { user-select: none; position: absolute; top: -5px; right: -5px; width: 20px; font-size: 14px; height: 20px; text-align: center; border-radius: 50px; color: #34363E; color: var(--side-bar-text-color); box-sizing: border-box; box-shadow: 0 1px 7px rgba(0, 0, 0, 0.14); box-shadow: 0 1px 7px var(--section-box-shadow-color); background-color: #FFF; background-color: var(--section-background-color); border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); }
        #buttons-holder #addNewRow::after { content: "+"; display: block; font-size: 30px; line-height: 45px; font-weight: 600; color: #FFF; color: var(--input-button-text-color); }
        #buttons-holder #addNewRow:hover { background-color: #4D5577; background-color: var(--input-button-hover-background-color); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22); }
        #buttons-holder #addNewRow:active { background-color: #4D5577; background-color: var(--input-button-active-background-color); transform: scale(0.95); box-shadow: none; }
        #buttons-holder #addNewRow.disabled { cursor: default; background: #BFBFBF; border: 1px solid #BFBFBF; transform: none !important; box-shadow: none !important; }
        #buttons-holder #addNewRow.pulse { animation: buttonPulse 1.2s ease-in-out infinite; }

#page-help-btn { display: none !important; }
#newGame { float: right; }
#muteBtn { float: right; }
#helpBtn { float: left; }
#helpBtn::before { content: "?"; display: inline-flex; align-items: center; margin-top: -2px; justify-content: center; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 9px; font-weight: bold; margin-right: 4px; vertical-align: middle; }
#newGame::before { content: "↺"; display: inline-block; margin-right: 4px; margin-top: -2px; font-size: 14px; vertical-align: middle; }
#muteBtn::before { content: "\266A"; display: inline-block; margin-right: 4px; margin-top: -2px; font-size: 12px; vertical-align: middle; }
#muteBtn.muted::before { content: "\2205"; font-size: 13px; }
#backFromHelpBtn::before, #backToGameBtn::before { content: "\2190"; display: inline-block; margin-right: 4px; margin-top: -2px; font-size: 14px; vertical-align: middle; }
#muteBtn.muted { opacity: 0.45; }
#newGame, #muteBtn, #helpBtn, #highScoresBtn, #backToGameBtn, #backFromHelpBtn { cursor: pointer; display: inline-block; color: #34363E; color: var(--body-text-color); padding: 5px 10px; text-decoration: none; margin-right: 3px; margin-left: 3px; font-size: 12px; border-radius: 15px; background-color: transparent; transition: all .2s ease-in-out; box-shadow: rgba(0, 0, 0, 0.0) 0 0 0; }
    #newGame:hover, #muteBtn:hover, #helpBtn:hover, #highScoresBtn:hover, #backToGameBtn:hover, #backFromHelpBtn:hover { text-decoration: none; background-color: rgba(0, 0, 0, 0.1); background-color: var(--link-hover-background-color); box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px !important; }
    #newGame:active, #muteBtn:active, #helpBtn:active, #highScoresBtn:active, #backToGameBtn:active, #backFromHelpBtn:active { transform: scale(0.9); }

.help-content { max-width: 560px; margin: 0 auto; }
.help-section { margin-bottom: 22px; }
.help-section-title { font-size: 15px; font-weight: bold; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #EEE; border-bottom: 1px solid var(--top-search-border-color); }
.help-section p { font-size: 14px; margin: 0 0 8px; }
.help-pairs { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
    .help-pair { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; font-weight: bold; }
    .hp { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; border-radius: 4px; background-color: rgba(118, 107, 255, 0.12); color: #766BFF; color: var(--input-button-background-color); border: 1px solid rgba(118, 107, 255, 0.3); }
.help-example { margin: 14px 0; }
    .help-example-label { font-size: 13px; font-weight: bold; margin-bottom: 5px; opacity: 0.8; }
    .help-example-desc { font-size: 13px; opacity: 0.65; margin: 5px 0 0; }
.help-grid { display: inline-flex; flex-direction: column; border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); border-radius: 4px; overflow: hidden; }
    .help-row { display: flex; }
    .hc { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 15px; border: 1px solid #EEE; border: 1px solid var(--top-search-border-color); box-sizing: border-box; color: #34363E; color: var(--side-bar-text-color); }
    .hc.hc-match { background-color: rgba(118, 107, 255, 0.22); color: #766BFF; color: var(--input-button-background-color); }
    .hc.hc-path { background-color: rgba(118, 107, 255, 0.06); }
    .hc.hc-other { opacity: 0.5; }
.help-score-table { border-collapse: collapse; width: 100%; max-width: 320px; margin: 8px 0; }
    .help-score-table td { padding: 5px 8px; border-bottom: 1px solid #EEE; border-bottom: 1px solid var(--top-search-border-color); font-size: 14px; }
    .help-score-pts { font-weight: bold; color: #766BFF; color: var(--input-button-background-color); text-align: right; }

#game-completed-holder { text-align: center; padding: 20px; }

#final-points-total { font-weight: bold; display: block; clear: both; padding-bottom: 20px; font-size: 45px; }
    #final-points-total::before { content: "Final Score"; display: block; clear: both; margin-bottom: 2px; opacity: 0.7; font-size: 14px; font-weight: normal; }
#current-points-total { font-weight: bold; display: block; clear: both; padding-bottom: 20px; font-size: 45px; }
    #current-points-total::before { content: "Current Score"; display: block; clear: both; margin-bottom: 2px; opacity: 0.7; font-size: 14px; font-weight: normal; }

#startNextGame { cursor: pointer; text-align: center; font-size: 14px; font-weight: 700; min-width: 85px; color: #FFF; color: var(--input-button-text-color); height: 50px; background: linear-gradient(to right, #5aaafc 0%, #404768 100%) !important; border: none !important; text-decoration: none; padding: 7px 30px; line-height: 17px; box-sizing: border-box; border-radius: 50px; transition: all .2s ease-in-out; text-shadow: 1px 1px rgba(0, 0, 0, 0.5); }
    #startNextGame:hover { background-color: #6E79F9; background-color: var(--input-button-hover-background-color); }
    #startNextGame:active { background-color: #6E79F9; background-color: var(--input-button-active-background-color); transform: scale(0.9); }

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(118, 107, 255, 0.6); }
    50% { box-shadow: 0 0 0 10px rgba(118, 107, 255, 0); }
}

@keyframes popOut { 
    0% { transform: scale(1); font-weight: bold; }
    25% { transform: scale(1.2); font-weight: bold; }
    50% { transform: scale(1.7); font-weight: bold; }
    75% { transform: scale(1.2); font-weight: normal; }
    100% { transform: scale(1); font-weight: normal; }
}

@keyframes shake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

@keyframes rowSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.match-popup { position: absolute; left: 50%; top: 35%; transform: translateX(-50%); pointer-events: none; font-weight: bold; font-size: 22px; color: #766BFF; color: var(--input-button-background-color); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); white-space: nowrap; z-index: 10; animation: matchPopup 1.2s ease-out forwards; }
    .match-popup span { font-size: 16px; opacity: 0.85; }

@keyframes matchPopup {
    0%   { opacity: 0; transform: translateX(-50%) translateY(0); }
    15%  { opacity: 1; }
    65%  { opacity: 1; transform: translateX(-50%) translateY(-35px); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-55px); }
}

.match-line {
    stroke: #0094FF;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    fill: none;
    animation: matchLineDraw 0.9s ease-in-out forwards;
}

@keyframes matchLineDraw {
    0%   { stroke-dashoffset: 2000; opacity: 1; }
    45%  { stroke-dashoffset: 0;    opacity: 1; }
    75%  { stroke-dashoffset: 0;    opacity: 1; }
    100% { stroke-dashoffset: 0;    opacity: 0; }
}