* {
    padding: 0 auto;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    font-size: 14px;
}

button:focus {
    outline: none;
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.btn {
    -webkit-transition: all .25s ease-in-out;
    -moz-transition: all .25s ease-in-out;
    transition: all .25s ease-in-out;
}

.btn:active {
    -webkit-transform: scale(.9);
    -moz-transform: scale(.9);
    transform: scale(.9);
}

.panel-trigger {
    position: fixed;
    display: none;
    width: 40px;
    height: 40px;
    left: -20px;
    top: 50%;
    background: #ddd url("./icon.png") no-repeat center center / cover;
    border-radius: 20px;
    z-index: 99;
}

.panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #ceebfd;
    display: none;
}

.self-rank {
    position: relative;
    padding-left: 100px;
    background-color: #4fc0fc;
    padding-top: 10px;
    padding-bottom: 10px;
}

.self-rank .rank {
    position: absolute;
    left: 5px;
    top: 0;
    line-height: 80px;
    height: 70px;
    color: #fff;
    width: 30px;
    text-align: center;
    background-image: url(./icon_rank.png);
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: center center;
}

.self-rank .avatar {
    position: absolute;
    left: 40px;
    top: 10px;
    height: 50px;
    width: 50px;
    border-radius: 25px;
    background-color: #4d83e5;
}

.self-rank .name {
    color: #fff;
    line-height: 25px;
}

.self-rank .score {
    color: #fff;
    line-height: 25px;
}

.rank-container {
    position: relative;
}

.rank-container::before {
    content: "";
    display: block;
    width: 100%;
    height: 200px;
    position: absolute;
    left: 0;
    top: -100px;
    z-index: -1;
    background-color: #4d83e5;
    border-radius: 20px;
}

.rank-container::after {
    content: "";
    display: block;
    width: 100%;
    height: 200px;
    position: absolute;
    left: 0;
    bottom: -100px;
    z-index: -1;
    background-color: #4d83e5;
    border-radius: 20px;
}

.switch-tab {
    text-align: center;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8));
    background-repeat: no-repeat;
    background-size: 2px 20px;
    background-position: center center;
}

.switch-tab .switch-item {
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    width: 100px;
    height: 40px;
    margin: 0 10px;
    opacity: .8;
}

.switch-tab .switch-item.tab-active {
    opacity: 1;
    border-bottom: 2px solid #fff;
}

.rank-content {
    width: 90%;
    margin: 10px auto 0;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.rank-item {
    position: relative;
    padding-left: 90px;
    background-color: #4fc0fc;
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 1px 2px #333;
}

.rank-item .rank {
    position: absolute;
    left: 5px;
    top: 0;
    line-height: 90px;
    height: 80px;
    color: #fff;
    width: 30px;
    text-align: center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: center center;
}

.rank-content .rank-item:nth-child(1) {
    -webkit-animation: fadeInLeft .25s ease-in-out;
    -moz-animation: fadeInLeft .25s ease-in-out;
    animation: fadeInLeft .25s ease-in-out;
}

.rank-content .rank-item:nth-child(1) .rank {
    background-image: url(./rank1.png);
}

.rank-content .rank-item:nth-child(2) {
    -webkit-animation: fadeInLeft .45s ease-in-out;
    -moz-animation: fadeInLeft .45s ease-in-out;
    animation: fadeInLeft .45s ease-in-out;
}

.rank-content .rank-item:nth-child(2) .rank {
    background-image: url(./rank2.png);
}

.rank-content .rank-item:nth-child(3) {
    -webkit-animation: fadeInLeft .65s ease-in-out;
    -moz-animation: fadeInLeft .65s ease-in-out;
    animation: fadeInLeft .65s ease-in-out;
}

.rank-content .rank-item:nth-child(3) .rank {
    background-image: url(./rank3.png);
}

.rank-content .rank-item:nth-child(n+4) {
    -webkit-animation: fadeInLeft .85s ease-in-out;
    -moz-animation: fadeInLeft .85s ease-in-out;
    animation: fadeInLeft .85s ease-in-out;
}

.rank-item .avatar {
    position: absolute;
    left: 40px;
    top: 20px;
    height: 40px;
    width: 40px;
    border-radius: 20px;
    box-shadow: 0 2px 10px #4d83e5;
    background-color: #4d83e5;
}

.rank-item .name {
    color: #fff;
    line-height: 20px;
}

.rank-item .score {
    color: #fff;
    line-height: 20px;
}

.rank-item .btn-play {
    position: absolute;
    right: 10px;
    top: 22px;
    height: 34px;
    width: 60px;
    color: #fff;
    border: none;
    border-radius: 6px;
    background-color: #1ecbc9;
    box-shadow: 0 1px 1px #333;
}

.rank-bottom {
    text-align: center;
    margin-top: 10px;
}

.rank-bottom button {
    width: 68px;
    height: 36px;
    background-color: #1ecbc9;
    border: none;
    color: #fff;
    border-radius: 6px;
    margin: 0 5px;
    box-shadow: 0 1px 1px #333;
}

.connected-trigger {
    position: absolute;
    bottom: 100px;
    left: 0;
    background-color: #3dd202;
    border: none;
    color: #fff;
    height: 26px;
    border-top-right-radius: 13px;
    border-bottom-right-radius: 13px;
}

.connected-trigger::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: #3dd202;
    border-radius: 15px;
    position: absolute;
    right: -15px;
    top: -2px;
    z-index: -1;
}

.games-container {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 90%;
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    background-color: #4fc0fc;
    border-radius: 10px;
    box-shadow: 0 2px 2px #333;
    padding-top: 40px;
    padding-bottom: 16px;
    display: none;
}

.games-container .btn-close {
    width: 26px;
    height: 26px;
    background-color: transparent;
    border: none;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACLklEQVRoQ8Wa0VHDMAxApQnoKGwAI8AE0AmgG5QNugHdoGzAsUFXYQJzCnHPSWxHkiUnn20Sv3euJVkuQuEKIewA4BMAHgHggIjn0r0en4cQaOxXADgi4kdpDMx9McJ/A8B98v2+l0QCH4c/I+I+x7oQKMDHZ90lMvBViYnACry7RAW+KHETYMK7STDgsxKDgBDeXEIAv5BAJbyZhAJ+IkECFwB4agiF6oXdAB9xDyQQGuDVM2EAT2P/kAAlC0oarRd7JozgfynJxkXcTcIUHvGahlF3CWt4+snME5mbhAf8QmDMCeYSXvBZAWsJAHgYq8qWIPG/YBGv85dkq1FjiRZwerYIX5yBOKJhiNVKVOFXBTaeiVV4lsBGEix4tkBnCTa8SKCThAheLOAsIYZXCThJqODVAsYSavhWgdi30cb49Dl2Kc7OxDUqo9pmPoRKolhKlASc4ONwYgmRgDO8SoIt0AleLMES6AwvklgV2AieLVEV2BieJVHb0FjEeUpSdwaJohidSucDVvB0OEJnDG59p9z5gBl83MMa7uwWMzFvq5jDO2xPJxJpY8sN3lMithbd4b0kqLnbDd5FwqC9rqrnjRb20F4/AcCbMlar4A1n4jmuATrEfhFKNMEbSAzRKI1CEgkT+AaJWyid5wGOhCm8QiKfB5IX1SRc4AUS9Uy8IuEKz5DIFnS1ajSdiS7wFQlZNZq86Dj+3eY9d7ggjFqi28c8QadFJ0T8Kj38B0s6mP5rprFUAAAAAElFTkSuQmCC');
    background-repeat: no-repeat;
    background-size: 90% auto;
    background-position: center center;
    position: absolute;
    top: 5px;
    right: 10px;
}

.games-content {
    overflow-y: scroll;
    text-align: center;
    width: 90%;
    margin: 0 auto;
    background-color: #4d83e5;
    border-radius: 10px;
}

.games-content .game-icon {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    margin: 10px 10px 0;
}

.horizontal .connected-trigger {
    bottom: 10px;
}

.horizontal .self-container {
    width: 100px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.horizontal .self-rank {
    padding-left: 0;
    padding-top: 70px;
    text-align: center;
    height: 100%;
}

.horizontal .rank-container {
    margin-left: 120px;
}

.horizontal .rank-bottom {
    position: fixed;
    top: 120px;
    left: 0;
    width: 100px;
}

.horizontal .rank-bottom button {
    margin-top: 10px;
}

@-webkit-keyframes fadeInLeft {
    0% {
        -webkit-transform: translateX(-120%);
        -moz-transform: translateX(-120%);
        transform: translateX(-120%);
    }
    100% {
        -webkit-transform: translateX(0);
        -moz-transform: translateX(0);
        transform: translateX(0);
    }
}

@-moz-keyframes fadeInLeft {
    0% {
        -webkit-transform: translateX(-120%);
        -moz-transform: translateX(-120%);
        transform: translateX(-120%);
    }
    100% {
        -webkit-transform: translateX(0);
        -moz-transform: translateX(0);
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    0% {
        -webkit-transform: translateX(-120%);
        -moz-transform: translateX(-120%);
        transform: translateX(-120%);
    }
    100% {
        -webkit-transform: translateX(0);
        -moz-transform: translateX(0);
        transform: translateX(0);
    }
}