/*!
* 熊熊拼图
* Copyright (c) 2012 Gerard Tyedmers, grrd@gmx.net
* Licensed under the MPL License
*/

html {
    height: 100%;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    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);
}
fieldset {
    padding: 0;
    margin: 0;
    border: none;
    display: grid;
}
header {
    margin-top: 5px;
    margin-bottom: 0;
}
.content {
    margin: 5px;
}
#game {
    transform: translateX(100vw);
    opacity: 0;
    visibility: hidden;
}
.swipe-in {
    animation-name: swipe-in;
    animation-fill-mode: forwards;
    animation-duration: 0.7s;
}

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

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

@keyframes swipe-out {
    0% {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    99% {
        transform: translateX(-100vw);
        opacity: 1;
        visibility: visible;
    }
    100% {
        transform: translateX(-100vw);
        opacity: 0;
        visibility: hidden;
    }
}
.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;
        visibility: visible;
    }
    99% {
        transform: translateX(100vw);
        opacity: 1;
        visibility: visible;
    }
    100% {
        transform: translateX(100vw);
        opacity: 0;
        visibility: hidden;
    }
}

.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;
        visibility: hidden;
    }
    1% {
        transform: translateX(-100vw);
        opacity: 1;
        visibility: visible;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
}
.top-right {
    position: absolute;
    top: 10px;
    right: 10px;
}
button {
    color: white;
    font-size: 0;
}

button > span {
    font-size: large;
    display: block;
}
button:focus {
    outline: none;
}
.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(#9999ff, #6666ff),
    linear-gradient(#e6e6ff, #6666ff 12px, #00004d 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    padding: 1px;
    height: 42px;
    width: 102px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
}
.button:active > .button-span {
    margin-top: 5px;
}
.button-span > img {
    margin-bottom: -3px;
}
.list-button, .mini-button, .close-button, .select-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;
    overflow: hidden;
}
.list-button, .select-button {
    text-align: center;
    padding: 1px 0 1px 0;
}
.list-button {
    display: inline-block;
    margin-left: 1px;
}
.list-button:first-child, .mini-buttonlist > .mini-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, .mini-buttonlist > .mini-button:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 1px 1px 1px 0;
    margin-left: 1px;
}
.select-button:first-child {
    border-top-right-radius: inherit;
    border-top-left-radius: inherit;
}
.select-button:last-child {
    border-bottom-right-radius: inherit;
    border-bottom-left-radius: inherit;
}
.select-button {
    width: 100%;
}
.list-button-33, .list-button-33-sel {
    width: calc(100% / 3);
    position: relative;
    overflow: visible;
}
.button-img {
    margin: 10px 20px 10px 20px;
    vertical-align: middle;
    pointer-events: none;
    width: calc(100% - 40px);
    max-height: calc(80vh - 200px);
}
.mini-button, .close-button {
    padding: 1px;
}
nav, .mini-buttonlist {
    margin: 5px 5px 10px 5px;
    background-color: #111;
    display: flex;
}
nav, .mini-buttonlist, .close-button, .xs, .dropdown, .select {
    border-radius: 10px;
    box-shadow: 0 0 0.5vmin 2px #111;
}
#navOff, #nav0 {
    width: min-content;
    margin-left: auto;
    margin-right: auto;
}
.dropdown {
    max-height: 0;
    transition: max-height 0.5s ease-out, opacity 0s 0.5s, visibility 0s 0.5s;
    overflow: hidden;
    background: #d5d5d5;
    opacity: 0;
    visibility: hidden;
}
.dropdown.show {
    max-height: 780px;
    transition: max-height 0.75s ease-in;
    opacity: 1;
    visibility: visible;
}

.list-button:hover, .mini-button:hover, .close-button:hover, .select-button:hover, .list-button:focus, .mini-button:focus, .close-button:focus, .select-button:focus {
    background-image: linear-gradient(#555555, #383838), linear-gradient(#ccc, #555 10px, #222 100%);
}
.list-button:active, .mini-button:active, .close-button:active, .select-button:active {
    background-image: linear-gradient(#202020, #2c2c2c), linear-gradient(#222, #111 calc(100% - 10px), #aaa 100%);
}
.selected {
    background-image: linear-gradient(#9999ff, #6666ff),
    linear-gradient(#e6e6ff, #6666ff 12px, #00004d 100%);
}
.button:hover, .selected:hover, .button:focus, .selected:focus {
    background-image: linear-gradient(#b3b3ff, #7c7cff),
    linear-gradient(#ffffff, #7c7cff 12px, #000080 100%);
}
.button:active, .selected:active {
    background-image: linear-gradient(#6666ff, #9999ff),
    linear-gradient(#000080, #7c7cff calc(100% - 12px), #ffffff 100%);
}
.close-button {
    border-radius: 25px;
    width: 27px;
    height: 27px;
    margin: 5px 5px 10px 5px;
}
.close-popup {
    float: right;
    margin-top: -7px;
    margin-right: -7px;
}
.close-button img {
    margin: 2px;
}
#b_prev > img, #b_next > img {
    margin-top: 0;
}
.mini-button {
    width: 60px;
    height: 42px;
    padding: 1px 0 1px 0;
    display: inline-block;
    margin-left: 1px;
}
.list-button:active > img:first-child {
    margin-top: 12px;
    margin-bottom: 8px;
}
.list-button:active .medal {
    position: absolute; right: 5px; bottom: -7px;
}
.mini-button:active > img {
    margin-top: 7px;
    margin-bottom: 3px;
}
.mini-button:active > .bttxt {
    margin-top: 12px;
    margin-bottom: 8px;
}
#b_prev:active > img, #b_next:active > img {
    margin-top: 5px;
    margin-bottom: 3px;
}
.close-button:active > img {
    margin-top: 4px;
}
.mini-buttonlist {
    height: 42px;
}
.mini-img {
    margin: 5px 15px 5px 15px;
    max-height: calc(100% - 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-mini {
    width: 300px;
    min-height: 80px;
    box-shadow: 2px 2px 2vmin 2px #000;
    max-width: calc(100vw - 40px);
    margin-top: calc(50vh - 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-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 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: 30px;
}
.popup-footer {
    height: 50px;
    margin: 20px;
}
.popup-title {
    width: calc(100% - 40px);
    margin: 0 20px;
    padding: 8px 0 6px 0;
    text-align: center;
    font-size: 1.8em;
    color: white;
    text-shadow: 2px 2px 4px #000;
}
.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;
}
a:link {
    color: #7c7cff;
    font-weight: bold;
}
a:visited {
    color: #6666ff;
}
a:hover, a:focus {
    color: #9999ff;
    outline: none;
}
a:active {
    color: #9999ff;
}
.w25 {
    width: calc(25% - 4px);
}
[id^=bullets] {
    margin-top: 13px;
}
#img_help {height: 80px;border-top-left-radius: 10px; border-bottom-left-radius: 10px;margin-right: 10px;}
#select_theme {display: inline-block}
.icon {
    width: 20px;
    margin-right: 10px;
    margin-top: 20px;
    transition: transform 0.25s ease-in;
}
.rotate {
    transform: rotate(180deg);
    transition: transform 0.25s ease-in;
}
.txticon {
    float: left;
    height: 20px;
}


/* altes original-css */

canvas {border: 0; margin: 0; padding: 0;}
.myButton .ui-btn-inner{padding: 0;}
.ui-dialog .ui-header .ui-btn-icon-notext {display: none;}
div.ui-slider-switch {position: absolute; right: 0; width: 20%;}
div.game {margin: 0; padding: 0;}
div.container {position: absolute;}
a.bt_small {height: 35px; width: 55px;}
img.bt_small {margin-top: -5px; margin-left: -10px; height: 25px; width: 25px;}
a.popup {width: 310px; height: 80px; display: block; text-decoration: none; color: white;}
a.back {margin: 20px; overflow: hidden; position: absolute; right: 0;}
img.bt_diff {padding: 1px; height: 60px;}
img.popup {width: 50%; margin-top: 8px; margin-bottom: 6px;}
td.img {width: 20%; text-align: center; vertical-align: middle;}
td.text {width: 80%; padding-left: 10px; vertical-align: middle;}
div.alert { width:250px; height:80px; display:block; text-decoration:none; color:white; }
img.alert { width:50px; float:left; padding:10px; }
p.alert { margin-top:3px; }
.p10 {padding: 10px;}
.pt0 {padding-top: 0;}
.pt7 {padding-top: 7px;}
.pt10 {padding-top: 10px;}
.pt18 {padding-top: 18px;}
.tc {text-align: center;}
.fr {float: right;}
.fl {float: left;}
.db {display: block;}
.dn {display: none;}
.cb {clear: both;}
.w50 {width: 50px;}
.w60 {width: 60px;}
.w80 {width: 80%;}
.w100 {width: 100%;}
.grey {color: #999999;}
.medal {position: absolute; right: 5px; bottom: -5px; width: 20%; min-width: 25px;pointer-events: none;}
.locked {opacity: 0.3;}
.shadow {
    filter: drop-shadow( 2px 2px 2px #111);
}

@media (orientation: portrait) {
    #img_title {
        width: 100%;
        text-align: center;
        font-size: 2em;
        margin: 5px 0;
        color: white;
        text-shadow: 2px 2px 4px #000;
    }
    .lock {position: absolute; left: 10%; bottom: calc((100vw - 70px) / 9.8); width: 80%; min-width: 25px; pointer-events: none;}
    .list-button:active .lock {
        position: absolute; left: 10%; bottom: calc(((100vw - 70px) / 9.8) - 2px);
    }
    .own-img {height: calc((33vw - 50px) * 1.5); width: auto;}
}
@media (orientation: landscape) {
    #img_title {
        font-size: 2em;
        margin: 5px 0 5px 5px;
        color: white;
        text-shadow: 2px 2px 4px #000;
    }
    .lock {position: absolute; left: 25%; top: 0; bottom: 0; margin: auto; width: 50%; min-width: 25px; pointer-events: none; max-height: calc(80vh - 220px);}
    .list-button:active .lock {
        position: absolute; left: 25%; bottom: calc(((100vw - 70px) / 30) - 2px);
    }
    .own-img {height: calc((33vw - 50px) / 1.5); width: auto;}
}

/* Toggle-Button */
.tgl {
    opacity: 0;
    position: absolute;
}
.tgl, .tgl:after, .tgl:before, .tgl *, .tgl *:after, .tgl *:before, .tgl + .tgl-btn {
    box-sizing: border-box;
}
.tgl::-moz-selection, .tgl:after::-moz-selection, .tgl:before::-moz-selection, .tgl *::-moz-selection, .tgl *:after::-moz-selection, .tgl *:before::-moz-selection, .tgl + .tgl-btn::-moz-selection {
    background: none;
}
.tgl::selection, .tgl:after::selection, .tgl:before::selection, .tgl *::selection, .tgl *:after::selection, .tgl *:before::selection, .tgl + .tgl-btn::selection {
    background: none;
}
.tgl + .tgl-btn {
    outline: 0;
    display: block;
    width: 4em;
    height: 2em;
    position: relative;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.tgl + .tgl-btn:after, .tgl + .tgl-btn:before {
    position: relative;
    display: block;
    content: "";
    width: 50%;
    height: 100%;
}
.tgl + .tgl-btn:after {
    left: 0;
}
.tgl + .tgl-btn:before {
    display: none;
}
.tgl:checked + .tgl-btn:after {
    left: 50%;
}
/* Skewed */
.tgl-skewed + .tgl-btn {
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: all .2s ease;
    font-family: sans-serif;
    background: linear-gradient(#999, #555), linear-gradient(#ccc, #555 10px, #222 100%);

    border:  1px transparent;
    border-radius: 10px;
    box-shadow: 0 0 0.5vmin 2px #000;
    background-origin: border-box;
    background-clip: content-box, border-box;
    padding: 1px;
}
.tgl-skewed + .tgl-btn:after, .tgl-skewed + .tgl-btn:before {
    display: inline-block;
    transition: all .2s ease;
    width: 100%;
    text-align: center;
    position: absolute;
    line-height: 2em;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #500000;
}
.tgl-skewed + .tgl-btn:after {
    left: 100%;
    content: attr(data-tg-on);
}
.tgl-skewed + .tgl-btn:before {
    left: 0;
    content: attr(data-tg-off);
}
.tgl-skewed + .tgl-btn:active {
    background: linear-gradient(#999, #555), linear-gradient(#ccc, #555 10px, #222 100%);
}
.tgl-skewed + .tgl-btn:active:before {
    left: -10%;
}
.tgl-skewed:checked + .tgl-btn {
    background-image: linear-gradient(#9999ff, #6666ff),
    linear-gradient(#e6e6ff, #6666ff 12px, #00004d 100%);
}
.tgl-skewed:checked + .tgl-btn:before {
    left: -100%;
}
.tgl-skewed:checked + .tgl-btn:after {
    left: 0;
}
.tgl-skewed:checked + .tgl-btn:active:after {
    left: 10%;
}
.tgl-skewed:checked:hover + .tgl-btn, .tgl-skewed:checked:focus + .tgl-btn {
    background-image: linear-gradient(#b3b3ff, #7c7cff),
    linear-gradient(#ffffff, #7c7cff 12px, #000080 100%);
}
.tgl-skewed:not(:checked):hover + .tgl-btn, .tgl-skewed:not(:checked):focus + .tgl-btn {
    background: linear-gradient(#bbb, #666),
    linear-gradient(#ddd, #666 10px, #333 100%);
}

/* 游戏说明区域样式 */
.game-instructions {
    margin: 20px 10px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.1) 0%, rgba(255, 182, 193, 0.1) 100%);
    border: 1px solid rgb(117, 113, 115);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: white;
    text-shadow: 1px 1px 2px #000;
}

.instructions-title {
    color: #b38599;
    font-size: 1.4em;
    margin: 0 0 10px 0;
    text-align: center;
    text-shadow: 2px 2px 4px #000;
}

.instructions-content {
    font-size: 0.95em;
    line-height: 1.6;
}

.instructions-content p {
    margin: 8px 0;
}

.instructions-content ul {
    margin: 10px 0 10px 20px;
    padding: 0;
}

.instructions-content li {
    margin: 5px 0;
    list-style-type: disc;
}

.instructions-content strong {
    color: #FFB6C1;
}
