/* 静态资源地址 */
@staticUrl: "http://ost.4dage.com/art/artHYC/static";

.style-loop(@i: 1) when (@i<11) {
    .style-@{i} {
        background-image: url("@{staticUrl}/images/styles/@{i}.png");

        &.active {
            background-image: url("@{staticUrl}/images/styles/@{i}-active.png");
        }
    }

    .style-loop((@i+1));
}

.style-flag-loop(@i: 1) when (@i<11) {
    .style-@{i} {
        background-image: url("@{staticUrl}/images/styles-flag/@{i}.png");
    }

    .style-flag-loop((@i+1));
}


*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: 0;
    -webkit-tap-highlight-color: transparent;
}

.clearfix::after {
    content: " ";
    visibility: hidden;
    display: block;
    font-size: 0;
    line-height: 0;
    height: 0;
    clear: both;
}

html,
body {
    width: 100%;
    height: 100%;
}

html {
    -webkit-text-size-adjust: none;
    -webkit-font-smoothing: antialiased;
}

body {
    font-size: 14px !important;
}

.animated {
    display: block !important;
}

.app-mask {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.4);

    &.white {
        background-color: rgba(0, 0, 0, 0)
    }
}

.app-alert {
    display: none;
    animation-duration: .3s;
    animation-delay: .3s;
    position: fixed;
    width: 80vw;
    left: 50%;
    top: 25%;
    margin-left: -40vw;
    border-radius: 12px;
    z-index: 101;
    background: #fff no-repeat center 10%;
    background-size: 20%;

    &.timeout {
        background-image: url("@{staticUrl}/images/icon/used-timeout.png");
    }

    &.stop {
        background-image: url("@{staticUrl}/images/icon/used-stop.png");
    }

    &.used {
        background-image: url("@{staticUrl}/images/icon/used.png");
    }

    &.error {
        background-image: url("@{staticUrl}/images/icon/error.png");
    }

    &.fail {
        background-image: url("@{staticUrl}/images/icon/fail.png");
    }

    &.timeout,
    &.stop,
    &.used {
        .btns {
            a:last-child {
                color: #3EAFFF;
            }
        }
    }

    &.error,
    &.fail {
        .btns {
            a:last-child {
                color: #F5615F;
            }
        }
    }


    .tips {
        margin-top: 30%;
        margin-bottom: 5%;
        text-align: center;
        color: #888;
        line-height: 1.5;
        font-size: 16px;
    }

    .btns {
        width: 100%;
        font-size: 0;
        border: solid 1px #efefef;
        background: #fff;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;

        a {
            display: inline-block;
            width: 50%;
            padding: 5%;
            color: #666;
            text-decoration: none;
            text-align: center;
            font-size: 16px;
            border-right: solid 1px #efefef;
        }
    }
}

.app-view {
    display: none;
    padding: 16px;
    animation-duration: .3s;
    animation-delay: .3s;
    position: fixed;
    width: 86vw;
    height: 36vh;
    left: 50%;
    top: 35%;
    margin-left: -43vw;
    margin-top: -18vh;
    background-color: #fff;
    border-radius: 12px;
    z-index: 101;

    &.vertical{
        width: 32vh;
		height: 53vh;
		top: 25%;
		margin-left: -16vh;
        .tip {
            top: 53vh;
            .close {
                bottom: 10vh;
            }
        }
    }

    .img,
    img {
        width: 100%;
        height: 100%;
    }

    .tip {
        position: absolute;
        top: 36vh;
        left: 0;
        height: 40vh;
        line-height: 40vh;
        width: 100%;
        background: url("@{staticUrl}/images/icon/touch-save.png") no-repeat center 5%;
        background-size: 20%;
        text-align: center;
        color: #fff;

        >div {
            display: inline-block;
            line-height: 1.5;
            font-size: 16px;
        }

        .close {
            width: 26px;
            height: 26px;
            position: absolute;
            left: 50%;
            margin-left: -13px;
            bottom: 5vh;
            background: url("@{staticUrl}/images/icon/touch-close.png") no-repeat center center;
            background-size: 100% 100%;
        }
    }
}

.app-action-tips {
    animation-duration: .3s;
    animation-delay: .3s;
    display: none;
    position: fixed;
    width: 66vw;
    height: 28vh;
    left: 50%;
    top: 40%;
    margin-left: -33vw;
    margin-top: -14vh;
    z-index: 101;

    .content {
        display: none;
        position: relative;
        width: 100%;
        height: 100%;
        color: #fff;
        background-color: rgba(0, 0, 0, 0.7);
        border-radius: 12px;
        background-repeat: no-repeat;
        background-position: 50% 25%;

        .tips {
            font-size: 18px;
            position: absolute;
            left: 0;
            bottom: 15%;
            width: 100%;
            text-align: center;
        }

        &.face-1 {
            background-image: url("@{staticUrl}/images/icon/face-1.png");
            background-size: 30%;

            .tips {
                font-size: 16px;
                bottom: 10%;
            }
        }

        &.face-2 {
            background-image: url("@{staticUrl}/images/icon/face-2.png");
            background-size: 30%;
        }

        &.face-3 {
            background-image: url("@{staticUrl}/images/icon/face-3.png");
            background-size: 30%;
        }

        &.face-4 {
            background-image: url("@{staticUrl}/images/icon/face-4.png");
            background-size: 30%;
        }

        &.loading {
            background-color: rgba(255, 255, 255, 0.9);

            .tips {
                font-size: 15px;
                color: #999999;
            }

            .lds-spinner {
                position: absolute;
                left: 50%;
                top: 30%;
                transform: translate(-50%, -30%)
            }
        }

        &.loading-switch {
            .tips {
                font-size: 15px;
                color: #ffff;
            }

            .lds-spinner {
                position: absolute;
                left: 50%;
                top: 30%;
                transform: translate(-50%, -30%)
            }
        }
    }
}

.app-main {
    width: 100%;
    height: 55vh;

    .ads-swiper {

        height: 4.5rem;

        .swiper-slide {
            text-align: center;
            font-size: 18px;
            background: #fff;
            /* Center slide text vertically */
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            -webkit-align-items: center;
            align-items: center;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .swiper-pagination-bullet-active {
            background: #fff;
        }
    }

    .nav-menu {

        box-shadow: 0 0.03rem 10px #efefef;

        ul {
            padding: 0.3rem 0;
            list-style: none;
            font-size: 0;
        }

        li {
            display: inline-block;
            width: 50%;
            font-size: 12px;
            text-align: center;

            &:first-child {
                border-right: solid 1px #DFDFDF;
            }

            a {
                display: inline-block;
                width: 1.3rem;
                height: 1.52rem;
                background-repeat: no-repeat;
                background-position: center center;
                background-size: contain;
            }

            a.btn-pic-take {
                background-image: url("@{staticUrl}/images/btn-pic-take.png");
            }

            a.btn-pic-list {
                background-image: url("@{staticUrl}/images/btn-pic-list.png");
            }
        }
    }

}

.app-switch {
    width: 100%;
    height: 45vh;

    .swt-style {
        padding-top: 10%;

        a {
            float: left;
            width: 2.5rem;
            height: 0.7rem;
            background-repeat: no-repeat;
            background-position: center center;
            background-size: contain;

            &:last-child {
                float: right;
            }

            &.switch {
                margin-left: 0.14rem;
                background-image: url("@{staticUrl}/images/switch.png");
            }

            &.logo {
                margin-right: 0.1rem;
                background-image: url("@{staticUrl}/images/logo.png");
            }
        }
    }

    .stl-swiper {
         height: 70%;

        .swiper-slide {
            text-align: center;
            font-size: 18px;
            /* Center slide text vertically */
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            -webkit-align-items: center;
            align-items: center;
            background-repeat: no-repeat;
            background-position: center center;
            background-size: contain;

        }

        .style-loop()
    }
}

.my-pic-list {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 10;

    header {
        padding-top: 0.16rem;
        padding-left: 0.27rem;
        padding-right: 0.27rem;
        position: absolute;
        left: 0;
        top: 0;
        height: 1.2rem;
        width: 100%;

        .home-nav {
            background-image: url("@{staticUrl}/images/mypic.png");
            background-repeat: no-repeat;
            background-position: center right;
            background-size: auto 100%;

            .btn-back {
                display: block;
                width: 1.12rem;
                height: 0.68rem;
                background-image: url("@{staticUrl}/images/back.png");
                background-repeat: no-repeat;
                background-position: center center;
                background-size: 100% 100%;
            }
        }

        .tips {
            font-size: 10px;
            text-align: right;
            color: #00b3ec;
        }
    }

    article {
        position: absolute;
        left: 0;
        top: 1.21rem;
        bottom: 0;
        width: 100%;
        ul {
            list-style: none;
        }
    }

    .pic-swiper {
        width: 100%;
        height: 100%;
        padding-left: 0.27rem;
        padding-right: 0.27rem;

        .swiper-slide {
            height: 2.52rem;
            text-align: center;
            background: #fff;
            /* Center slide text vertically */
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            -webkit-align-items: center;
            align-items: center;
            background-repeat: no-repeat;
            background-position: center center;
            background-size: contain;
            border-bottom: solid 1px #e9e9e9;
            padding-top: 0.21rem;
            padding-bottom: 0.21rem;

            .img {
                width: 40%;
                height: 100%;
                &.vertical{
                    padding: 0 8%;
                }

                img {
                    width: 100%;
                    height: 100%;
                }
            }

            .info {
                width: 60%;
                height: 100%;
            }

            .time {
                margin-top: 12%;
                color: #686868;
                font-weight: 500;
                font-size: 14px;
                text-align: center;

            }

            .style {
                margin-top: 2%;
                height: 0.7rem;
                background-position: center center;
                background-size: auto 100%;
                background-repeat: no-repeat;
            }

            .style-flag-loop()
        }

        .swiper-scrollbar {
            right: 0px !important;
            width: 4px !important;
        }

        .swiper-scrollbar-drag {
            background: rgba(0, 0, 0, .3) !important;
        }
    }
}

.lds-spinner {
    color: official;
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
}

.lds-spinner div {
    transform-origin: 32px 32px;
    animation: lds-spinner 1.2s linear infinite;
}

.lds-spinner div:after {
    content: " ";
    display: block;
    position: absolute;
    top: 3px;
    left: 29px;
    width: 5px;
    height: 14px;
    border-radius: 20%;
    background: #999999;
}

.lds-spinner div:nth-child(1) {
    transform: rotate(0deg);
    animation-delay: -1.1s;
}

.lds-spinner div:nth-child(2) {
    transform: rotate(30deg);
    animation-delay: -1s;
}

.lds-spinner div:nth-child(3) {
    transform: rotate(60deg);
    animation-delay: -0.9s;
}

.lds-spinner div:nth-child(4) {
    transform: rotate(90deg);
    animation-delay: -0.8s;
}

.lds-spinner div:nth-child(5) {
    transform: rotate(120deg);
    animation-delay: -0.7s;
}

.lds-spinner div:nth-child(6) {
    transform: rotate(150deg);
    animation-delay: -0.6s;
}

.lds-spinner div:nth-child(7) {
    transform: rotate(180deg);
    animation-delay: -0.5s;
}

.lds-spinner div:nth-child(8) {
    transform: rotate(210deg);
    animation-delay: -0.4s;
}

.lds-spinner div:nth-child(9) {
    transform: rotate(240deg);
    animation-delay: -0.3s;
}

.lds-spinner div:nth-child(10) {
    transform: rotate(270deg);
    animation-delay: -0.2s;
}

.lds-spinner div:nth-child(11) {
    transform: rotate(300deg);
    animation-delay: -0.1s;
}

.lds-spinner div:nth-child(12) {
    transform: rotate(330deg);
    animation-delay: 0s;
}

@keyframes lds-spinner {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

// @media only screen
// and (min-device-width: 320px)
// and (max-device-width: 568px)
// and (-webkit-min-device-pixel-ratio: 2) {
//     .app-main {
//         .nav-menu {
//             ul {
//                 padding: 0.15rem 0;
//             }
//         }
//     }
// }

@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3){ 
    .app-main {
        height: 58vh;
        .nav-menu {
            ul {
                padding: 1.2rem 0;
            }
        }
    }
    .app-switch {
        height: 42vh;
    }
}

@media only screen and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2){ 
    .app-main {
        height: auto;
        .nav-menu {
            ul {
                padding: 0.15rem 0;
            }
            li{
                a{
                    width: 1rem;
                    height: 1.3rem;
                }
            }
        }
    }
    .app-switch {
        height: 3.5rem;
        .swt-style {
            padding-top: 2%;
            a {
                width: 1.5rem;
                height: 0.5rem;
            }
        }
    }
}

@media only screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2){ 
    .app-main {
        height: auto;
        .nav-menu {
            ul {
                padding: 0.5rem 0;
            }
            li{
                a{
                    width: 1.5rem;
                    height: 2rem;
                }
            }
        }
    }
    .app-switch {
        height: 4.5rem;
        .swt-style {
            padding-top: 5%;
        }
    }
}

@media screen and (max-width:320px) {
    .app-main {
        .nav-menu {
            ul {
                padding: 0.15rem 0;
            }
        }
    }
}

