html {
    height: 100%;
    user-select: none;
}

body {
    background: linear-gradient(#444, #222);
    min-width: 100vw;
    margin: 0;
    position:fixed;
    overflow:hidden;
    font-family: Arial, sans-serif;
    font-size: large;
    color: white;
    text-shadow: 1px 1px 2px #000;
}

.page {
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(#444, #222);
}

.content {
    margin: 5px;
}

#iGame {
    transform: translateX(100vw);
    opacity: 0;
}

.swipe-in {
     animation-name: swipe-in;
     animation-fill-mode: forwards;
     animation-duration: 0.7s;
 }

@keyframes swipe-in {
    0% {
        transform: translateX(100vw);
        opacity: 0;
    }
    1% {
        transform: translateX(100vw);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.swipe-out {
    animation-name: swipe-out;
    animation-fill-mode: forwards;
    animation-duration: 0.7s;
}

@keyframes swipe-out {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    99% {
        transform: translateX(-100vw);
        opacity: 1;
    }
    100% {
        transform: translateX(-100vw);
        opacity: 0;
    }
}
.swipe-in-left {
    animation-name: swipe-in-left;
    animation-fill-mode: forwards;
    animation-duration: 0.7s;
}

@keyframes swipe-in-left {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    99% {
        transform: translateX(100vw);
        opacity: 1;
    }
    100% {
        transform: translateX(100vw);
        opacity: 0;
    }
}

.swipe-out-right {
    animation-name: swipe-out-right;
    animation-fill-mode: forwards;
    animation-duration: 0.7s;
}

@keyframes swipe-out-right {
    0% {
        transform: translateX(-100vw);
        opacity: 0;
    }
    1% {
        transform: translateX(-100vw);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.grid-container {
    display: grid;
    grid-template-columns: auto auto auto;
    margin: 5px auto;
    width: calc(100vmin - 10px);
}
.grid-item, .list-button, .mini-button, .close-button {
    border: 1px transparent;
    background-image: linear-gradient(#444,#2d2d2d), linear-gradient(#999, #444 10px, #111 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    cursor: pointer;
}
.grid-item, .mini-button, .close-button {
    box-shadow: 0 0 0.5vmin 2px #111;
    border-radius: 10px;
    padding: 1px;
    margin: 5px;
}
nav {
    margin: 5px;
    border-radius:10px;
    box-shadow: 0 0 0.5vmin 2px #111;
    background-color: #111;
}
.grid-item {
    height: calc(33vmin - 18px);
    border-radius: 2vmin;
    background-image: linear-gradient(#444,#2d2d2d), linear-gradient(#999, #444 2vmin, #111 100%);
}
.grid-item:hover, .list-button:hover, .mini-button:hover, .close-button:hover {
    background-image: linear-gradient(#555555, #383838), linear-gradient(#ccc, #555 10px, #222 100%);
}
.grid-item:active, .list-button:active, .mini-button:active, .close-button:active {
    background-image: linear-gradient(#202020, #2c2c2c), linear-gradient(#222, #111 calc(100% - 10px), #aaa 100%);
}
.grid-item:active > img{
    margin-top: 0.1em;
}
.mini-button:active > img{
    margin-top: 7px;
}
.svg-xo {
    animation: 1s xoFadeIn;
    animation-fill-mode: forwards;
}
@keyframes xoFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
.svg-xo-dimmed {
    animation: 1s xoDimm;
    animation-fill-mode: forwards;
}
@keyframes xoDimm {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.4;
    }
}
.svg-xo-highlight {
    animation: 1s xoHighlight;
    animation-fill-mode: forwards;
}
@keyframes xoHighlight {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

#iMessage {
    position: absolute;
    top: 10px;
    left: 10px;

}

.popup {
    display: block;
    left: 0;
    right: 0;
    margin: auto;
    border: 1px transparent;
    border-radius: 15px;
    box-shadow: 3px 3px 3vmin 3px #000;
    background-image: linear-gradient(#333, #444 35%, #222 100%), linear-gradient(#bbb, #444 10%, #111 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    padding: 2px;
    width: 400px;
    max-width: calc(100vw - 40px);
}
.popup-init {
    visibility: hidden;
    opacity: 0;
}
.popup-show {
    animation: 1s fadeIn;
    animation-fill-mode: forwards;
}
.popup-show > div:first-child {
    animation: 1s zoomIn;
    animation-fill-mode: forwards;
}
.popup-show-draw {
    animation: 2s fadeInDraw;
    animation-fill-mode: forwards;
}
.popup-show-draw > div:first-child {
    animation: 2s zoomInDraw;
    animation-fill-mode: forwards;
}
.popup-show-slow {
    /*visibility: visible;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;*/
    animation: 3s fadeInSlow;
    animation-fill-mode: forwards;
}
.popup-show-slow > div:first-child {
    animation: 3s zoomInSlow;
    animation-fill-mode: forwards;
}
.popup-hide {
    animation: 1s fadeOut;
    animation-fill-mode: forwards;
}
.popup-hide > div:first-child {
    animation: 1s zoomOut;
    animation-fill-mode: forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        visibility: visible;
        opacity: 1;
    }
}
@keyframes zoomIn {
    0% {
        transform: scale(0.75);
    }
    100% {
        transform: scale(1);
    }
}
@keyframes fadeInSlow {
    0% {
        opacity: 0;
    }
    66% {
        opacity: 0;
    }
    100% {
         visibility: visible;
         opacity: 1;
     }
}
@keyframes zoomInSlow {
    0% {
    }
    66% {
        transform: scale(0.75);
    }
    100% {
        transform: scale(1);
    }
}
@keyframes fadeInDraw {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0;
    }
    100% {
        visibility: visible;
        opacity: 1;
    }
}
@keyframes zoomInDraw {
    0% {
    }
    50% {
        transform: scale(0.75);
    }
    100% {
        transform: scale(1);
    }
}
@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        visibility: hidden;
        opacity: 0;
    }
}
@keyframes zoomOut {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(0.75);
    }
}
.popup-head {
    height: 50px;
    margin: 10px;
}
.popup-body {
    margin: 20px;
}
.popup-content {
    margin-bottom: 20px;
}
.popup-footer {
    height: 50px;
    margin: 20px;
}
#iPopupScore > div:first-child {
    position:absolute;
    top: 123px;
}
.overflow {
    display: block;
    position:absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto 0 auto;
    padding-top: 20px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}
@supports (-webkit-overflow-scrolling: touch) {
    .overflow {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }
}
@supports not (-webkit-overflow-scrolling: touch) {
    .overflow {
        overflow-y: auto;
    }
}
.buffer {
    height: 40px;
}

.button {
    float: right;
    border: 1px transparent;
    border-radius: 10px;
    box-shadow: 0 0 0.5vmin 2px #000;
    text-shadow: 1px 1px 2px #500000;
    background-image: linear-gradient(#ff0142, #830110), linear-gradient(#ffbabc, #e33a33 12px, #55010a 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    padding: 1px;
    height: 40px;
    width: 100px;
    margin: 5px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
}
.button:hover {
    background-image: linear-gradient(#ff2162, #931120), linear-gradient(#ffcacc, #f34a43 12px, #65111a 100%);
}
.button:active {
    background-image: linear-gradient(#830110, #de0139), linear-gradient(#55010a, #e33a33 calc(100% - 12px), #ffbabc 100%);;
}
.button-span {
    margin-top: 8px;
}
.button-span:active {
    margin-top: 10px;
}
.button-span > img {
    margin-bottom: -3px;
}
.mini-button {
    border-radius: 10px;
    width: 60px;
    height: 40px;
    float: right;
}
.mini-buttonlist {
    height: 60px;
}
.mini-img {
    margin: 5px 15px 5px 15px;
    max-height: calc(100% - 10px);
}
.close-button {
    border-radius: 20px;
    width: 20px;
    height: 20px;
    position: absolute;
    top: 5px;
    right: 5px;
}
.text-img {
    height: 20px;
    margin-top: 3px;
    margin-bottom: -3px;
}

/* unvisited link */
a:link {
    color: #ee1149;
}
a:visited {
    color: #de0139;
}
a:hover {
    color: #ff2162;
}
a:active {
    color: #ff2162;
}
.w60 {
    width: 60px;
}
.w25 {
    width: calc(25% - 4px);
}
table {
    border-collapse: collapse;
    width: 100%;
}
#tLinks tr {
    height: 65px;
}

@media (orientation: landscape) {
    .list-button {
        display: inline-block;
        width: calc(25vw - 6.5px);
        text-align: center;
        padding: 1px 0 1px 0;
        margin-left: 1px;
    }
    .list-button:first-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
        padding: 1px 0 1px 1px;
        margin-left: 0;
    }
    .list-button:last-child {
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
        padding: 1px 1px 1px 0;
    }
    .list-button > div {
        margin-top: 20px;
        margin-bottom: 20px;
        pointer-events: none;
    }
    .button-img {
        max-width: calc(100% - 40px);
        margin-top: 20px;
        pointer-events: none;
    }
    nav {
        display: flex;
    }
    .list-button:active > .button-img {
        margin-top: 22px;
    }
    .list-button:active > div {
        margin-bottom: 18px;
    }
}

@media (orientation: portrait) {
    .grid-container {
        margin-top: 40px;
    }
    .list-button {
        max-height: calc(23vh - 17px - 5.5vw);
        padding: 1px 0 1px 0;
        display: flex;
        align-items: center;
    }
    .list-button:first-child {
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        padding: 1px 1px 1px 1px;
    }
    .list-button:last-child {
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }
    .list-button > div {
        display: inline;
        pointer-events: none;
    }
    .button-img {
        margin: 20px;
        pointer-events: none;
        max-height: calc(23vh - 47px - 5.5vw);
    }
    .list-button:active > .button-img {
        margin-top: 22px;
        margin-bottom: 18px;
    }
    .list-button:active > div {
        padding-top: 4px;
    }
}

/* animated svg */

.title1 {
    stroke: #b9c1cF;
    fill: none;
    stroke-width: 3px;
    font: 3.8em/1 "Times New Roman", Times, serif;
    text-shadow: none;
}

.text {
    fill: none;
    stroke-width: 3px;
    stroke-linejoin: round;
    stroke-dasharray: 70 330;
    stroke-dashoffset: 0;
    animation: stroke 6s infinite linear;
    font: 3.8em/1 "Times New Roman", Times, serif;
    text-shadow: none;
}
.text:nth-child(5n + 1) {
    stroke: #ff0142;
    animation-delay: -1.2s;
}
.text:nth-child(5n + 2) {
    stroke: #b9c1cF;
    animation-delay: -2.4s;
}
.text:nth-child(5n + 3) {
    stroke: #fff;
    animation-delay: -3.6s;
}
.text:nth-child(5n + 4) {
    stroke: #ce0134;
    animation-delay: -4.8s;
}
.text:nth-child(5n + 5) {
    stroke: #99a1aF;
    animation-delay: -6s;
}
@keyframes stroke {
    100% {
        stroke-dashoffset: -400px;
    }
}
