
html, body {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    background-color: whitesmoke;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    user-select: none;
    margin: 0;}

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



#gameAppHeader {
    display: flex;
    background-color: white;
    border-bottom: 1px solid lightgray;
    padding: 5px 0 5px 0;
    margin: 0;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Nav Buttons */
.headerNavButtonWrapper {
    display: block;
    padding: 0 5px 0 5px;
}

.headerNavButton {
    display: block;
    aspect-ratio: 1 / 1;
    width: 36px;
    height: 36px;
}

.headerNavButton svg {
    background-color: #f5f5f5;
    border: 1px solid #a5a5a5;
    border-radius: 5px;
    object-fit: cover;
    width: 100%;
    height: 100%;
    padding: 5px;
    cursor: pointer;
}

/* Header Title/Subtitle */
#gameAppHeaderHeadline {
    display: grid;
    align-items: center;
    height: fit-content;
}

#gameAppHeaderHeadlineTitle {
    font-weight: bold;
    font-size: 1.2em;
    text-align: center;
    height: fit-content;
}

#gameAppHeaderHeadlineSubtitle {
    font-weight: normal;
    font-size: 0.7em;
    text-align: center;
    height: fit-content;
}


#dailyPuzzlePage {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background-color: whitesmoke;    /* TODO: Make variable */
    margin: 0;
    padding: 0;

    visibility: hidden;
    opacity: 0;
}

#dailyPuzzlePage.visible {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s linear 0s, opacity 0.5s ease-in;
}

#dailyPuzzlePageWrapper {
    max-width: 400px;
}

#dailyPuzzlePageLogoBlock {
    display: flex;
    flex-direction: column;
    justify-self: center;
    align-items: center;
    padding-top: 17vh;
    padding-bottom: 3vh;
}

#dailyPuzzlePageLogoBlockIcon
{
    aspect-ratio: 1 / 1;
    width: 75px;
}

#dailyPuzzlePageLogoBlockTitle {
    font-size: 1.2rem;
    font-weight: bold;
    display: none;
}

#dailyPuzzlePageTitle {
    text-align: center;
    font-weight: bolder;
    font-size: 2.0rem;
}

#dailyPuzzlePageSubtitle {
    text-align: center;
    font-weight: normal;
    font-size: 1.6rem;
    margin: 0 20px 0 20px;
}

#dailyPuzzlePageSubtitleEmphasis {
    font-weight: bolder;
}

#dailyPuzzlePageButtonContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin: 40px 0 20px 0;
}

@media ( min-width: 768px ) {
    #dailyPuzzlePageButtonContainer {
        flex-direction: row;
        justify-content: center;
    }
}

#playButton {
    background-color: black;
    border-radius: 15px;
    padding-top: 5px;
    padding-bottom: 5px;
    margin: 0 15px;
    color: white;
    font-size: 1.4rem;
    width: 135px;
    cursor: pointer;
}

#helpButton {
    background-color: white;
    border-radius: 15px;
    padding: 5px 30px 5px 30px;
    color: black;
    font-size: 1.4rem;
    width: 135px;
    cursor: pointer;
    border: 0 solid transparent;
    outline: 2px solid black;
}

#statsButton {
    background-color: white;
    border-radius: 15px;
    padding: 5px 30px 5px 30px;
    color: black;
    font-size: 1.4em;
    width: 135px;
    cursor: pointer;
    border: 0 solid transparent;
    outline: 2px solid black;
}

#dailyPuzzlePagePuzzleDate {
    text-align: center;
    font-weight: normal;
    font-size: 1.0rem;
    margin: 5px;
}

#dailyPuzzlePagePuzzleNum {
    text-align: center;
    font-weight: normal;
    font-size: 1.0rem;
}

/* Game Timer */
#gameCanvasPage_GameTimer {
    display: grid;
    width: 100%;
    padding: 5px 0 5px 0;
}

#gameCanvasPage_GameTimerNumber {
    display: grid;
    place-items: center;
    font-size: 1.4em;
}

/* Game Board */
#gameCanvasPage_GameBoard {
    display: grid;
    width: fit-content;
    margin: 0 auto;
}

.gameBoardCell {
    display: grid;
    border: 0 solid transparent;
    margin: 0;
    place-items: center;
    width:  36px;
    height: 36px;
}

.gameBoardCellHighlightBox {
    margin: auto;
    width:  32px;
    height: 32px;
    border: 2px solid #cccccc;
}

@media ( min-height: 750px ) {
    .gameBoardCell {
        width:  48px;
        height: 48px;
    }

    .gameBoardCellHighlightBox {
        width: 44px;
        height: 44px;
    }
}

.gameBoardCellHighlight_Valid   { background-color: palegreen; }
.gameBoardCellHighlight_Invalid { background-color: salmon;    }

/* These are currently unused. Do we need these styles anymore? */
/* .gameBoardCellBoundary { border: 2px solid transparent; }  // This one was for when we displayed border cells invisible so they could show bad placement red box */
/* .gameBoardCellEmpty    { border: 2px solid #cccccc;   }    // I combined this one into the highlight box class since we are no longer using the one above */

/* Tetromino Tray */
#gameCanvasPage_TetrominoTrayWrapper {
    border-top: 1px solid #bababa;
    margin: 12px 4px 0 4px;
    padding-top: 8px;
}

.trayContainerRow {
    display: grid;
    grid-template-columns: repeat( 4, 1fr );
    width: fit-content;
    height: fit-content;
    margin: 0 auto;
}

.trayContainer {
    display: grid;
    padding: 2px;
    margin: 2px;
    border: 2px solid #d6d6d6;
    place-items: center;
    border-radius: 6px;
    width:  84px;
    height: 84px;
    touch-action: none;
}

.trayContainerTable {
    display: grid;
    width: min-content;
    height: min-content;
    border-collapse: collapse;
    gap: 0;
    padding: 0;
}

.trayContainerTableCell {
    display: grid;
    border:  0;
    margin:  0;
    padding: 0;
    width:  18px;
    height: 18px;
}

.trayContainerHighlight_Occupied    { background-color: #ffffff; }
.trayContainerHighlight_Unoccupied  { background-color: #f0f8ff; }
.trayContainerHighlight_Attempted   { background-color: #e6f3ff; }

/* Tetrominoes */
.tetrominoCell {
    display: grid;
    height: 36px;
    width: 36px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.2em;
    color: black;
    font-weight: bolder;
    padding: 0;
    margin: 0;
    place-items: center;
    touch-action: none;
}

@media ( min-height: 750px ) {
    .tetrominoCell {
        width:  48px;
        height: 48px;
        font-size: 1.6em;
    }
}

.tetrominoCellHighlight {
    opacity: 0.75;
}

.tetrominoType_O { background-color: #B6E2DD; }
.tetrominoType_I { background-color: #C8DDBB; }
.tetrominoType_S { background-color: #E9E5AF; }
.tetrominoType_Z { background-color: #FBDF9D; }
.tetrominoType_L { background-color: #FBC99D; }
.tetrominoType_J { background-color: #FBB39D; }
.tetrominoType_T { background-color: #FBA09D; }

.tetrominoCellBorder_None {
    /* top | right | bottom | left */
    border-width: 0 0 0 0;
    border-color: transparent transparent transparent transparent;
    border-style: solid;
    border-radius: 0 0 0 0;
}

.tetrominoCellBorder_CapB {
    /* top | right | bottom | left */
    border-width: 0 2px 2px 2px;
    border-color: transparent gray gray gray;
    border-style: solid;
    border-radius: 0 0 4px 4px;
}

.tetrominoCellBorder_CapL {
    /* top | right | bottom | left */
    border-width: 2px 0 2px 2px;
    border-color: gray transparent gray gray;
    border-style: solid;
    border-radius: 4px 0 0 4px;
}

.tetrominoCellBorder_CapT {
    /* top | right | bottom | left */
    border-width: 2px 2px 0 2px;
    border-color: gray gray transparent gray;
    border-style: solid;
    border-radius: 4px 4px 0 0;
}

.tetrominoCellBorder_CapR {
    /* top | right | bottom | left */
    border-width: 2px 2px 2px 0;
    border-color: gray gray gray transparent;
    border-style: solid;
    border-radius: 0 4px 4px 0;
}

.tetrominoCellBorder_CornerBL {
    /* top | right | bottom | left */
    border-width: 0 0 2px 2px;
    border-color: transparent transparent gray gray;
    border-style: solid;
    border-radius: 0 0 0 4px;
}

.tetrominoCellBorder_CornerTR {
    /* top | right | bottom | left */
    border-width: 2px 2px 0 0;
    border-color: gray gray transparent transparent;
    border-style: solid;
    border-radius: 0 4px 0 0;
}

.tetrominoCellBorder_CornerBR {
    /* top | right | bottom | left */
    border-width: 0 2px 2px 0;
    border-color: transparent gray gray transparent;
    border-style: solid;
    border-radius: 0 0 4px 0;
}

.tetrominoCellBorder_CornerTL {
    /* top | right | bottom | left */
    border-width: 2px 0 0 2px;
    border-color: gray transparent transparent gray;
    border-style: solid;
    border-radius: 4px 0 0 0;
}

.tetrominoCellBorder_OneSideT {
    /* top | right | bottom | left */
    border-width: 2px 0 0 0;
    border-color: gray transparent transparent transparent;
    border-style: solid;
    border-radius: 0 0 0 0;
}

.tetrominoCellBorder_OneSideR {
    /* top | right | bottom | left */
    border-width: 0 2px 0 0;
    border-color: transparent gray transparent transparent;
    border-style: solid;
    border-radius: 0 0 0 0;
}

.tetrominoCellBorder_OneSideB {
    /* top | right | bottom | left */
    border-width: 0 0 2px 0;
    border-color: transparent transparent gray transparent;
    border-style: solid;
    border-radius: 0 0 0 0;
}

.tetrominoCellBorder_OneSideL {
    /* top | right | bottom | left */
    border-width: 0 0 0 2px;
    border-color: transparent transparent transparent gray;
    border-style: solid;
    border-radius: 0 0 0 0;
}

.tetrominoCellBorder_ParallelV {
    /* top | right | bottom | left */
    border-width: 0 2px 0 2px;
    border-color: transparent gray transparent gray;
    border-style: solid;
    border-radius: 0 0 0 0;
}

.tetrominoCellBorder_ParallelH {
    /* top | right | bottom | left */
    border-width: 2px 0 2px 0;
    border-color: gray transparent gray transparent;
    border-style: solid;
    border-radius: 0 0 0 0;
}

.tetrominoCellBorder_Box {
    /* top | right | bottom | left */
    border-width: 2px 2px 2px 2px;
    border-color: gray gray gray gray;
    border-style: solid;
    border-radius: 4px 4px 4px 4px;
}

.tetromino_WinAnimation { animation: cycleColors 6s infinite normal; }

@keyframes cycleColors {
    0%   { background-color: #FFADAD; }
    10%  { background-color: #FFD6A5; }
    20%  { background-color: #FDFFB6; }
    30%  { background-color: #CAFFBF; }
    40%  { background-color: #96E8FF; }
    50%  { background-color: #A0C4FF; }
    60%  { background-color: #BDB2FF; }
    70%  { background-color: #DEBCFF; }
    80%  { background-color: #FFC6FF; }
    90%  { background-color: #FFA7DC; }
    100% { background-color: #FFADAD; }
}



#gameStatsPage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0;
    width: 100%;
    background-color: whitesmoke;       /* TODO: make variable */
}

#winInfoDisplay {
    margin-left: auto;
    margin-right: auto;
    padding: 10px 15px;
    width: 100%;
    max-width: 400px;
}

#winStatsScreenHeader {
    text-align: center;
    font-weight: bold;
    font-size: 1.8em;
    padding-bottom: 15px;
}

.sectionDisplayLabel {
    font-weight: bold;
    font-size: 1.2em;
}

#currentPuzzleInfo {
    width: 100%;
    margin-bottom: 10px;
}

#currentPuzzleEarnedStars {
    display: flex;
    justify-content: center;
}

#currentPuzzleEarnedStars svg {
    width: 30px;
    height: 30px;
}

#currentPuzzleSolveTime {
    display: flex;
    justify-content: center;
    font-weight: bold;
    font-size: 1.4em;
}

#currentPuzzleSolveTimeLabel {
    display: flex;
    justify-content: center;
    font-size: 1.2em;
    font-weight: normal;
    margin-top: 10px;
}

#currentPuzzleNum {
    display: flex;
    justify-content: center;
    font-weight: normal;
    font-size: 0.9em;
}

#currentPuzzleDate {
    display: flex;
    justify-content: center;
    font-weight: normal;
    font-size: 0.9em;
}

#summaryStatsDisplay {
    width: 100%;
    margin-bottom: 10px;
}

#statsPanel {
    display: grid;
    grid-template-columns: repeat( 4, 1fr );
    width: 100%;
    height: fit-content;
    justify-content: space-evenly;
    margin: 10px 0;
    padding: 0;
}

.statsPanelElement {
    display: grid;
    padding: 0 10px 0 10px;
    vertical-align: top;
    text-align: center;
    align-items: center;
}

.statsPanelMetric {
    font-size: 1.4em;
    font-weight: bold;
}

.statsPanelLabel {
    font-size: 1.0em;
    font-weight: normal;
}

#winDistributionDisplay {
    width: 100%;
}

#winDistributionGraphContainer {
    display: grid;
    grid-template-columns: 1fr 4fr;
    width: 100%;
    height: fit-content;
    margin: 15px 0 15px 0;
}

.winDistributionBucketLabel {
    text-align: center;
    padding-bottom: 10px;
    width: 6em;
    font-weight: bold;
    font-size: 1.0em;
}

.winDistributionBarGraph {
    display: grid;
    grid-template-columns: auto auto;
    height: fit-content;
    width: max-content;
}

.winDistributionBar {
    display: grid;
    border: 1px solid black;
}

.winDistributionBarOther {
    background-color: silver;
}

.winDistributionBarCurrent {
    background-color: lightgreen;
}

.winDistributionValueLabel {
    display: grid;
    font-size: 1.0em;
    font-weight: bold;
    text-align: center;
    padding-left: 10px;
}

#shareButtonContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#shareButton {
    display: flex;
    align-items: center;
    outline: none;
    background-color: forestgreen;
    border: 1px solid black;
    border-radius: 12px;
    width: 120px;
    height: 50px;
    padding: 0 15px;
    font-weight: normal;
    font-size: large;
    color: white;
    cursor: pointer;
}

#shareButton svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
}



#helpPage {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: white;
}

#helpPageWrapper {
    display: grid;
    grid-auto-rows: min-content;
    height: 100vh;
    max-width: 400px;
    justify-content: center;
    padding: 10px;
}

#helpPageBody {
    font-size: 1.2em;
    font-weight: normal;
    align-text: left;
}

#helpPageBody p {
    margin: 0 0 1.2em 0;
}

#helpPageFooter {
    font-size: 1.0em;
    color: #555555;
    font-weight: normal;
    margin: 0;
    padding-top: 120px;
    align-text: left;
}

#helpPageFooter hr {
    border: none;
    height: 1px;
    background-color: #999999;
}

#toasterMessage {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translate( -50%, -50% );
    z-index: 1000;
}

.toast {
    text-align: center;
    padding: 15px;
    margin-bottom: 10px;
    color: black;
    background-color: linen;
    border-radius: 5px;
    border: 1px solid black;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    transform: translateY( 20px );
    box-shadow: 0 4px 8px rgba( 0, 0, 0, 0.2 );
}

.toast.show {
    opacity: 1;
    transform: translateY( 0 );
}

.toast.success {
    background-color: #4CAF50; /* Green */
}

.toast.error {
    background-color: #F44336; /* Red */
}





