body {
    font: 14px sans-serif;
}

table {
    width: 100%;
    table-layout: fixed;
}

#game {
    background-color: gainsboro;
    padding: 1em;
    margin: 0 auto;
    background: rgb(206,219,233); /* Old browsers */
    background: -moz-linear-gradient(-45deg,  rgba(206,219,233,1) 0%, rgba(170,197,222,1) 17%, rgba(97,153,199,1) 50%, rgba(58,132,195,1) 51%, rgba(65,154,214,1) 59%, rgba(75,184,240,1) 71%, rgba(58,139,194,1) 84%, rgba(38,85,139,1) 100%); /* FF3.6-15 */
    background: -webkit-linear-gradient(-45deg,  rgba(206,219,233,1) 0%,rgba(170,197,222,1) 17%,rgba(97,153,199,1) 50%,rgba(58,132,195,1) 51%,rgba(65,154,214,1) 59%,rgba(75,184,240,1) 71%,rgba(58,139,194,1) 84%,rgba(38,85,139,1) 100%); /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(135deg,  rgba(206,219,233,1) 0%,rgba(170,197,222,1) 17%,rgba(97,153,199,1) 50%,rgba(58,132,195,1) 51%,rgba(65,154,214,1) 59%,rgba(75,184,240,1) 71%,rgba(58,139,194,1) 84%,rgba(38,85,139,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cedbe9', endColorstr='#26558b',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
    background-attachment: fixed;
}

#topbar {
    background-color: #c1c1c1;
    border-radius: 1em;
    margin-bottom: 1em;
    padding: 1em;
    background: rgb(255,255,255); /* Old browsers */
    background: -moz-linear-gradient(top,  rgba(255,255,255,0.8) 0%, rgba(241,241,241,0.8) 50%, rgba(225,225,225,0.8) 51%, rgba(246,246,246,0.8) 100%); /* FF3.6-15 */
    background: -webkit-linear-gradient(top,  rgba(255,255,255,0.8) 0%,rgba(241,241,241,0.8) 50%,rgba(225,225,225,0.8) 51%,rgba(246,246,246,0.8) 100%); /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(to bottom,  rgba(255,255,255,0.8) 0%,rgba(241,241,241,0.8) 50%,rgba(225,225,225,0.8) 51%,rgba(246,246,246,0.8) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */
}

#title {
    display: inline-block;
    font-size: 0.8em;
    font-weight: bold;
    width: 49%;
}

#controls {
    display: inline-block;
    text-align: right;
    width: 49%;
}

.game-control {
    display: inline-block;
    border: 1px solid gray;
    padding: 0 1em;
}

#flash {
    text-align: center;
    font-size: 0.7em;
    padding: 0;
    margin: 0;
}

.alert {
    border-radius: 1em;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.alert-active {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.player {
    background-color: #fff;
    transition: background-color 0.25s ease-in-out;
}

.player-active {
    background-color: #dff0d8;
}

.player-winner {
    color: #ed143d;
    background-color: #fff900
}

#tray {
    text-align: center;
    background-color: #c1c1c1;
    border-radius: 1em;
    padding-top: 1em;
    margin-bottom: 1em;
    background: rgb(226,226,226); /* Old browsers */
    background: -moz-linear-gradient(-45deg,  rgba(226,226,226,0.7) 0%, rgba(219,219,219,0.7) 50%, rgba(209,209,209,0.7) 51%, rgba(254,254,254,0.7) 100%); /* FF3.6-15 */
    background: -webkit-linear-gradient(-45deg,  rgba(226,226,226,0.7) 0%,rgba(219,219,219,0.7) 50%,rgba(209,209,209,0.7) 51%,rgba(254,254,254,0.7) 100%); /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(135deg,  rgba(226,226,226,0.7) 0%,rgba(219,219,219,0.7) 50%,rgba(209,209,209,0.7) 51%,rgba(254,254,254,0.7) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#fefefe',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}

#scoreboard {
    background-color: white;
    box-shadow: 3px 3px 3px #606060;
    width: 96%;
    font-size: 8px;
    margin: 2em auto;
}

.color-selector {
    text-align: center;
    height: 0;
    opacity: 0;
    transition: height 1s ease-in-out,
                opacity 0.25s ease-in-out;
}

.color-selector-active {
    height: 50px;
    opacity: 1;
    transition: height 0.5s ease-in-out,
                opacity 0.5s ease-in-out 0.5s;
}

.color-selector-button {
    position: relative;
    display: inline-block;
    border: 4px solid #fff;
    border-radius: 0.5em;
    width: 50px;
    height: 35px;
    margin: 0 0.5em;
    box-shadow: 3px 3px 3px #606060;
}

.card {
    position: relative;
    display: inline-block;
    vertical-align: top;
    opacity: 0.2;
    transition: opacity 0.25s ease-in-out;
    box-sizing: border-box;
    width: 25%;
    margin-bottom: 1em;
}

.card-active {
    opacity: 1;
}

.card-content {
    display: block;
    color: black !important;
    outline: 0 !important;
    text-decoration: none !important;
    text-align: center;
    box-shadow: 3px 3px 3px #606060;
    cursor: default;
    box-sizing: border-box;
    width: 55px;
    height: 70px;
    font-size: 10px;
    margin: 0.2em auto;
    background-color: black;
    border-radius: 15%;
}

.card-content-clickable {
    cursor: pointer;
}

.card-content-value {
    display: inline-block;
    border-radius: 10%;
    background-color: white;
    width: 75%;
    height: 80%;
    margin-top: 12%;
}

.card-content-value-icon {
    display: block;
    font-size: 1.5em;
    margin-top: 0.1em;
}

.card-content-value-number {
    display: block;
    font-weight: bold;
    font-size: 4em;
}

.card-content-value-word {
    display: block;
    font-weight: bold;
    font-size: 0.7em;
    margin-top: 5px;
}

.card-content-value-wild {
    display: block;
    font-weight: bold;
    color: white;
    background-color: black;
    font-size: 1.2em;
    margin-top: 5px;
}

.card-content-value-dummy {
    display: block;
    font-weight: bold;
    font-size: 1.2em;
    margin-top: 10px;
}

.card-blue {
    color: blue !important;
    background-color: blue;
}

.card-green {
    color: green !important;
    background-color: green;
}

.card-red {
    color: red !important;
    background-color: red;
}

.card-yellow {
    color: #d6d604 !important;
    background-color: #d6d604;
}

#description {
    text-align: center;
    font-size: 0.6em;
    color: #a1a1a1;
    margin: 1em;
    line-height: 1.5em;
}

#description > a {
    color: #a1a1a1 !important;
}

@media (min-width: 400px) {
    #scoreboard {
        font-size: 10px;
    }

    .card {
        width: 20%;
    }
}

@media (min-width: 500px) {
    #title {
        font-size: 1em;
    }

    #scoreboard {
        font-size: 12px;
    }

    .card-content {
        width: 75px;
        height: 95px;
        font-size: 14px;
    }
}

@media (min-width: 600px) {
    #scoreboard {
        font-size: 14px;
    }

    #flash {
        font-size: 1.2em;
    }

    .color-selector-active {
        height: 75px;
    }

    .color-selector-button {
        width: 75px;
        height: 50px;
    }

    .card-content {
        width: 95px;
        height: 121px;
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    #game {
        border-radius: 0 0 2em 2em;
        width: 90%;
    }

    .card {
        width: 16.666%;
    }

    .card-content {
        width: 95px;
        height: 121px;
    }

    #description {
        font-size: 0.8em;
    }
}

@media (min-width: 960px) {
    #game {
        width: 864px;
    }

    #scoreboard {
        font-size: 18px;
    }

    .card-content {
        width: 120px;
        height: 153px;
        font-size: 20px;
    }
}
