﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
    margin: 0;
    padding: 10px 10px 60px;
    box-sizing: border-box;
    overflow: hidden;
    overflow-y: auto;
    background-color: white;
}

main {
    width: min(100%, 480px);
    margin: 0 auto;
}

.word-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

body.dark-theme {

        background-color: white;
        color: white;
    }

.dark {
    background-color: white;
}

#timer {
    text-align: center;
    font-size: 14px;
    max-width: 480px;
    font-family: "Noto Sans Mono", monospace;
    font-weight: bold;
    display: none;
}



.header {
    width: min(100%, 480px);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    clear: both;
}

.definity {
    font-size: 40px;
    font-weight: bold;
    font-family: 'Baloo Bhai 2', sans-serif;
    padding-bottom: 0;
    margin: 0;
    flex: 0 0 auto;
}

.newgame {
    padding-top: 0;
    color: green;
    font-weight: bold;
    font-family: 'Baloo Bhai 2', sans-serif;
    font-size: 14px;
    text-align: right;
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding-right: 0px;
    padding-left: 0;
}

.settingsbtn {
    padding-top: 2px;
    float: none;
    /* float: left; this is for when the new game button is visible*/
    margin-left: 0;
    color: gray;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.newgamebtn {
    background-color: green;
    color: white;
    box-shadow: 2px 2px 2px silver;
    width: 100px;
    height: 30px;
    text-align: center;
    border-radius: 4px;
    padding-top: 5px;
    float: right;
    display: none;

}

.gap {
    clear:both;
}

#confetti-canvas{
    top: 0;
    left: 0;
    position: absolute;
    height:100%;
    width: 100%;
    z-index: -1;
}

.letter {
    width: clamp(26px, calc((100vw - 82px) / 9), 36px);
    height: clamp(30px, calc((100vw - 82px) / 9 + 2px), 38px);
    max-width: 36px;
    max-height: 38px;
    margin-right: 5px;
    border: solid 1px black;
    font-family: 'Baloo Bhai 2', sans-serif;
    font-size: 20px;
    text-align: center;
    padding-top: 4px;
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 4px;
    background-color: white;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
    transform-style: preserve-3d;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
    flex: 0 0 auto;
}

.space {
    width: clamp(8px, 2vw, 10px);
    height: clamp(26px, 7.8vw, 40px);
    margin-right: 5px;
    border: none;
    font-family: 'Baloo Bhai 2', sans-serif;
    font-size: clamp(16px, 5vw, 20px);
    text-align: center;
    padding-top: 3px;
    float: none;
    display: inline-block;
    color: white;
    flex: 0 0 auto;
}

.word {

}

.definition {
    padding-top: 10px;
    clear: both;
    font-family: 'Baloo Bhai 2', sans-serif;
    font-size: 16px;
}

.block {

}
.breaker {

    padding-top:20px;
}

.keyboard{
    margin: auto;
    width: 100%
}

.key {
    width: 32px;
    height: 42px;
    margin-right: 5px;
    border: solid 1px;
    font-family: 'Baloo Bhai 2', sans-serif;
    font-size: 20px;
    text-align: center;
    padding-top: 6px;
    float: left;
    background-color: silver;
    border-radius: 4px;
    box-shadow: 2px 2px 2px silver;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
    cursor: pointer;
    transition: transform 80ms ease, box-shadow 80ms ease, filter 80ms ease;
}

.key:active,
.key.pressed {
    transform: translateY(1px);
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.25);
    filter: brightness(0.98);
}

.keyboardOuter {
    max-width: 480px;
}

.keyboardRow1 {
    clear: both;
    padding-top:10px;
    margin-left: auto;
    margin-right: auto;
   
    width: 370px;
}

.keyboardRow2 {
    clear: both;
    padding-top: 10px;
    margin: auto;
    width: 333px;
}

.keyboardRow3 {
    clear: both;
    padding-top: 10px;
    margin: auto;
    width: 259px;
}

.guesses {
    font-family: 'Baloo Bhai 2', sans-serif;
    height: 40px;
    padding-top: 10px;
    padding-bottom: 30px;
    color: blue;
    text-align: center;
    max-width: 480px;
    font-size: 18px;
    line-height: 1;
    transform-origin: center;
}

.guesses .broken-heart {
    display: inline-block;
    transform-origin: center;
}

.guesses .broken-heart.pulse {
    animation: heartPulse 520ms ease-in-out;
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    20% {
        transform: scale(1.45);
    }
    45% {
        transform: scale(1.85);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#emitter {
    visibility: hidden;
    background-color: #222;
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    top: 40%;
    left: 0%;
}

.dot-container {
    position: absolute;
    left: 0;
    top: 0;
    overflow: visible;
    z-index: 5000;
    pointer-events: none;
}

.dot {
    position: absolute;
    pointer-events: none; /*performance optimization*/
}

.footer {
    clear: both;
    text-align: center;
    width: 100%;
    font-size: 9px;
    font-family: 'Baloo Bhai 2', sans-serif;
    color: gray;
    padding-top: 30px;
    max-width: 480px;
}

.confetti {
    max-width: 640px;
    width: 100%;
   
    display: block;
    margin: 0 auto;
    position: absolute;
    top: 0px;
    left: 0;
    user-select: none;
    z-index:-1;
}

.popup {
    padding: 20px 30px 30px 30px;
    font-family: 'Baloo Bhai 2', sans-serif;
    width: 300px;
    margin: auto;
    height: 470px;
    position: absolute;
    top: 100px;
    left: 50px;
    background-color: white;
    box-shadow: 2px 2px 2px silver;
    box-shadow: 2px 2px 2px silver;
    display: none;
    border: 1px solid gray;
    border-radius: 15px;
    z-index: 2;
}
.blur {
    height: 100%;
    width: 100%;
    z-index: 1;
    display: none;
    opacity: 0.8;
    background-color: #fff;
    position: absolute;
    top: 0;
    left: 0;
}

@font-face {
    font-family: 'icons';
    src: url('../font/icons.eot?95540970');
    src: url('../font/icons.eot?95540970#iefix') format('embedded-opentype'), url('../font/icons.woff?95540970') format('woff'), url('../font/icons.ttf?95540970') format('truetype'), url('../font/icons.svg?95540970#icons') format('svg');
    font-weight: normal;
    font-style: normal;
}

.button {
    color: white;
    box-shadow: 2px 2px 2px silver;
    text-align: center;
    border-radius: 4px;
    font-weight: bold;
    padding-top: 5px;
    padding-left: 20px;
    padding-right: 20px;

}

#save {
    background-color: green;
}

#close {
    background-color: gray;
}

.demo-icon {
    font-family: "icons";
    font-style: normal;
    font-weight: normal;
    speak: never;
    display: inline-block;
    text-decoration: inherit;
    width: 1em;
    margin-right: .2em;
    text-align: center;
    /* opacity: .8; */
    /* For safety - reset parent styles, that can break glyph codes*/
    font-variant: normal;
    text-transform: none;
    /* fix buttons height, for twitter bootstrap */
    line-height: 1em;
    /* Animation center compensation - margins should be symmetric */
    /* remove if not needed */
    margin-left: .2em;
    /* You can be more comfortable with increased icons size */
    /* font-size: 120%; */
    /* Font smoothing. That was taken from TWBS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Uncomment for 3D effect */
    /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}


@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }

    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

.apply-shake {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

.definitionword {

    text-decoration-line: underline;
}
.settingoption {
    padding-top: 15px;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: black;
    color: white;
}

body.dark-mode .definity {
    color: white;
}

body.dark-mode .settingsbtn {
    color: lightgray;
}

body.dark-mode .letter {
    background-color: black;
    border: solid 1px white;
    color: black;
}

body.dark-mode .definition {
    color: white;
}

body.dark-mode .key {
    background-color: #333;
    border: solid 1px white;
    box-shadow: 2px 2px 2px #555;
    color: white;
}

body.dark-mode .keyboard {
    color: white;
}

body.dark-mode .guesses {
    color: white !important;
}

body.dark-mode .popup {
    background-color: #222;
    border: 1px solid #555;
    color: white;
}

body.dark-mode .button {
    color: white;
    box-shadow: 2px 2px 2px #555;
}

body.dark-mode .button:hover {
    opacity: 0.8;
}

body.dark-mode .footer {
    color: gray;
}

body.dark-mode input[type="radio"],
body.dark-mode input[type="checkbox"] {
    accent-color: #4CAF50;
}

body.dark-mode a,
body.dark-mode #clearstats {
    color: #6DB3FF !important;
}

body.dark-mode a:hover,
body.dark-mode #clearstats:hover {
    color: #9FD3FF !important;
}