.room-container {
    margin: 0 auto;
    display: flex;
    width: 100%;
    max-width: 1000px;
}

.gamelist{
    display: table;
    table-layout: fixed;
    margin: 1em 1em;
    width: 70%;
}

.gameheader {
    background-color: rgb(0, 100, 0);
    font-weight: bold;
    color: white;
    display: flex;
}

.gamerow{
    font-size: 18px;
    display: flex;
    justify-content: center;
    margin: 2px 0;
}

.gamecell {
    /*display: table-cell;*/
    width: 100%;
    /*height: 2em;*/
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;}

.gamerow:nth-of-type(odd) {
    background-color: #fff ;
}

.gamerow:nth-of-type(even) {
    background-color: #eee ;
}

.gamerow:hover {
    background-color: #999999;
    cursor: pointer;
}


.room-container .side-panel{
    margin: 1em 1em;
    width: 30%;
}

.room-container .tab-bar{
    background-color: aliceblue;
}

.room-container .tab-container{
    overflow-y: hidden;
}

.room-container .userlist-tab{
    display: table;
    table-layout: fixed;
    width: 100%;
}

.room-container .chat-tab{
    display: none;
}


.room-container .board {
    display: block;
    width: 100%;
    height: 20em;
    /*border: solid;*/
    background-color: aliceblue;
    overflow-y: scroll;
}

.at-username {
    color: green;
}

.invite-selector {
    border: 1px solid;
    background-color: white;
    display: none;
    z-index: 1;
    box-shadow: #3070a0;
}

.invite-accept {
    color: #036;
    cursor: pointer;
}

.userheader{
    background-color: rgb(10, 100, 10);
    font-weight: bold;
    color: white;
    display: flex;
}

.userrow{
    font-size: 18px;
    display: flex;
    justify-content: center;
    margin: 2px 0;
    /*text-align: right;*/
}

.usercell{
    display: table-cell;
    width: 100%;
    /*height: 2em;*/
    vertical-align: middle;
    overflow: hidden;
    /*text-overflow: ellipsis;*/
    white-space: nowrap;
    margin: 1px;
    font-size: 14px;
}

.username{
    cursor: hand;
}

.username a{
    text-decoration: none;
}

.userrow:nth-of-type(odd) {
    background-color: #fff ;
}

.userrow:nth-of-type(even) {
    background-color: #eee ;
}

.userrow:hover {
    background-color: #999999;
    /*cursor: hand;*/
}

.sumrow {
    border-top: 1px solid;
}

.roomheader {
    margin: 1em auto;
    text-align: center;
}

#login{
    /*border:solid gray 1px;*/
    max-width: 800px;
    padding: 0 1em;
    margin: 3em auto 1em auto;
    font-size: 20px;
}

#login button {
    margin: 3em auto;
    display: block;

}



#table {
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

#menus {
    width: 200px;
    max-height: 690px;
    top: 0; bottom: 0; left: 1px; right: 0;
    background-color: #deeefe;
    position: relative;
}

.game-canvas{
    margin:0 0;
    /*height:690px;*/
    position: relative;
    overflow: hidden;
}

#menus button {
    display: inline-block;
    margin:  3px auto;
}

#menus .game-msg {
    display: block;
    width: 100%;
    height: 20em;
    background-color: aliceblue;
    overflow-y: scroll;
}

#menus .game-msg-input {
    width: 70%;
}

#menus .game-msg-send {
    display: inline;
    border: 0;
    padding: 0;
    margin: 0;
}

.UI span {
    background-color: yellow;
    color: red;
}

.jiesuan {
    color: white;
    max-height: 100%;
    min-height: 60%;
    overflow-y: scroll;
}

.jiesuan .payoff {
    margin: 2em auto;
}

.jiesuan td {
    color: white;
    text-align: right;
}

.tablesec {
    padding: 5px 0 5px 0;
    margin-top: 1px;
    border-bottom: #999999 1px solid;
    text-align: center;
}

.direction {
    min-width: 6em;
    overflow: hidden;
}

.like-a-button-link {
    margin: 10px 3px 10px 3px;
    display: inline-block;
    text-decoration-line: underline;
    color: blue;
    cursor: pointer;
    font-weight: bold;
}

.like-a-button-link:hover{
    background-color: aliceblue;
}

.header {
    width : 100%;
    background-color: darkgreen;
    color: silver;
    margin-top: 0;
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3px 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header li {
    list-style-type: none;
    background-color: darkgreen;
    width: 100%;
    text-align: center;
    padding: 3px 0;
}


.header li:hover{
    background-color: #303030;
}

.header li:active{
    background-color: #303030;
}

.header img {
    height: 24px;
}

.header a {
    text-decoration: none;
    cursor: pointer;
    color: silver;
}

.header .community {
    position: relative;
}

.header .menu-comm{
    position: absolute;
    display: none;
    text-align: center;
}

.header:hover .menu-comm{
    display: block;
}

.header .user {
    position: relative;
    display: none;
}

.header .menu-user{
    display: none;
    position: absolute;
    margin: 3px 0;
    padding: 3px 0;
    background-color: darkgreen;
    width: 100%;
}

.user:hover .menu-user{
    display:none;
}


.hvy-res {
    font-weight: bold
}

.hidden {
    display: none;
}

.timer {
    color: red;
}

.tab-bar {
    display: flex;
    justify-content: space-evenly;
}

.tab-label {
    display: inline-block;
    margin: 0 0 -1px;
    /*padding: 15px 25px;*/
    font-weight: 300;
    font-size: 16px;
    text-align: center;
    color: blue;
    border: 1px solid transparent;
}


.tab-label:hover {
    color: #789;
    cursor: pointer;
    background-color: #a7dbd8;
}

/*manual set class active*/
.tab-label.active-label {
    background-color: #a7dbd8;
}


.tab-user-page {
    display: block;
    overflow: auto;
}

.tab-score-page{
    display: none;
    overflow-y: scroll;
}

.tab-setting-page{
    display: none;
    overflow: auto;
}

.tab-chat-page{
    display: none;
    overflow: auto;
}

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    text-align: center;
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.red-notification {
    background-color: #fa3e3e;
    border-radius: 5px;
    color: white;

    padding: 1px 3px;
    font-size: 10px;

    position: absolute; /* Position the badge within the relatively positioned button */
    top: 0;
    right: 0;
}


@media screen and (max-width: 850px) {
    #table {
        display: block;
    }

    #menus {
        width: 100%;
        height: auto;
        font-size: 20px;
    }

    #menus button {
        display: inline-block;
        font-size: 20px;
    }

    .header-container {
        width:100%;
        flex-direction: column;
    }
    .room-container {
	width: 100%;
	flex-direction: column;
	align-items: center;
    }

    .gamelist {
	margin: 1em 0;
	width: 100%;
    }

    .room-container .side-panel {
        margin: 1em 0;
        width: 100%;
    }
}

.fadeout {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 2s, opacity 2s linear;
}

