html {
    margin: 0;
    padding: 0;
    font-family: 'Raleway','Century Gothic', sans-serif;
    background-image: linear-gradient(to bottom, #9b4f4f, #703939);
}

body {
    padding: 0;
    margin: 0 auto;
    text-align: center;
    color: #ccbdbd;
}

@keyframes flipover {
    0% {
        top: -10px;
        transform: scaleX(0.001);
    }

    100% {
        top: 0;
        transform: scaleX(1);
    }
}

@keyframes accordion {
    0% {
        transform: scaleX(0.9);
    }

    100% {
        transform: scaleX(1);
    }
}

@keyframes contract {
    0% {
        transform: scaleY(0.9);
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes expand {
    0% {
        transform: scaleY(1.1);
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes slideright {
    0% {
        left: -80px;
        transform: scaleX(0.001);
    }

    100% {
        left: 0;
        transform: scaleX(1);
    }
}

@keyframes slidedown {
    0% {
        top: -80px;
        transform: scaleY(0.001);
    }

    100% {
        top: 0;
        transform: scaleY(1);
    }
}

@keyframes glow {
    0% {
        margin-top: -76px;
        transform: scale(1);
        box-shadow: 0 0 15px -5px rgba(135, 65, 65, 0.5);
    }
    50% {
        margin-top: -86px;
        transform: scale(1.1);
        box-shadow:0 0 15px 5px rgba(135, 65, 65, 0.5);
    }
    100% {
        margin-top: -76px;
        transform: scale(1);
        box-shadow: 0 0 15px -15px rgba(135, 65, 65, 0.5);
    }
}

.flipover {
    animation: flipover 0.5s 1;
}

.contract {
    animation: contract 0.5s 1;
}

.expand {
    animation: expand 0.5s 1;
}

.board {
    min-height: 100%;
}

.board .inner {
    width: 800px;
    max-width: 100%;
    padding: 20px 0 10px 0;
    margin: auto;
}

.board.desktop {
    padding-top: 65px;
}

.board.desktop .inner {
    width: 535px;
}

.board.desktop .nav-buttons {
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    z-index: 88888;
    width: 100%;
    max-width: 100%;
}

.board.desktop .nav-buttons .in {
    width: 510px;
    max-width: 96%;
    padding: 10px 2%;
    margin: auto;
    position: relative;
    z-index: 88888;
}

.board.desktop .nav-buttons .toggle,
.board.mobile.portrait .nav-buttons .toggle {
    width: 60px;
    height: 25px;
}
.board.desktop .nav-buttons .toggle label,
.board.mobile.portrait .nav-buttons .toggle label {
    height: 25px;
}

.board.mobile.landscape .nav-buttons .toggle {
    height: 60px;
    width: 25px;
}
.board.mobile.landscape .nav-buttons .toggle label {
    height: 60px;
}

.board.desktop .nav-buttons .in:after {
    content: "";
    display: block;
    clear: both;
}

.board.desktop .nav-buttons .in button.new,
.board.mobile.portrait .nav-buttons .in button.new {
    float: right;
}

.board.desktop .nav-buttons .in button.back,
.board.mobile.portrait .nav-buttons .in button.back {
    float: left;
    position: static;
}

.board.desktop .nav-buttons .in button.new,
.board.mobile.portrait .nav-buttons .in button.new {
    float: right;
}

.board.desktop .nav-buttons .in button.back,
.board.mobile.portrait .nav-buttons .in button.back {
    position: static;
    float: left;
}

.board.desktop .nav-buttons input:checked + label:after,
.board.mobile.portrait .nav-buttons input:checked + label:after {
    float: right;
    margin: 0;
}

.board.mobile.landscape .nav-buttons input:checked + label:after {
    margin: 35px 0 0;
}

.board.desktop .nav-buttons .in .toggle:before,
.board.mobile.portrait .nav-buttons .in .toggle:before {
    top: 4px;
    left: -25px;
}

.board.desktop .nav-buttons .in .toggle:after,
.board.mobile.portrait .nav-buttons .in .toggle:after {
    bottom: 4px;
    right: -25px;
}

.board.mobile.landscape .nav-buttons .in .toggle:before,
.board.mobile.landscape .nav-buttons .in .toggle:after {
    left: 4px;
}

.board.mobile.landscape .nav-buttons .in .toggle:before {
    top: -25px;
}

.board.mobile.landscape .nav-buttons .in .toggle:after {
    bottom: -25px;
}

/* dark */
.board.dark {
    background-image: linear-gradient(to top, #0f0c0c, #251e1e);
}

.board.dark .cd.f {
    background-color: #412020;
    border-color: #2e2626;
    background-image: repeating-linear-gradient(55deg, transparent, transparent 18px, #4b3e3e 19px, transparent 20px), repeating-linear-gradient(-55deg, transparent, transparent 18px, #161212 19px, transparent 20px), linear-gradient(to bottom, #221c1c, #4d3e3e);
}

.board.dark .closet {
    background-color: #151111;
}

.board.dark.mobile .nav-buttons .in,
.board.dark.desktop .nav-buttons {
    background-color: #302727;
}

.board.dark .nav-buttons button {
    background-color: #0f0c0c;
    color: #999999;
}

.board.dark .cd.s,
.board.dark .cd.c {
    color: #999999;
    background-color: #181818;
    background-image: linear-gradient(to bottom, #272727, #373737);
    border-color: #414141;
}

.board.dark .cd.h,
.board.dark .cd.d {
    color: #ee5555;
    background-color: #640000;
    background-image: linear-gradient(to bottom, #580000, #741212);
    border-color: #740808;
}

/* light */
.board.light {
    background-image: linear-gradient(to top, #ce9d9d, #e9e3e3);
    color: #4b0707;
}

.board.light .cd.f {
    background-color: #999999;
    border-color: #e9dbdb;
    background-image: repeating-linear-gradient(55deg, transparent, transparent 18px, #ffffff 19px, transparent 20px), repeating-linear-gradient(-55deg, transparent, transparent 18px, #cccccc 19px, transparent 20px), linear-gradient(to bottom, #d3c2c2, #f0e4e4);
}

.board.light .closet {
    background-color: #f6e5e5;
}

.board.light.mobile .nav-buttons .in,
.board.light.desktop .nav-buttons {
    background-color: #dcc0c0;
}

.board.light .nav-buttons button {
    background-color: #e6dbdb;
    color: #000000;
}

.board.light .cd.s,
.board.light .cd.c {
    color: #080808;
    background-color: #ffffff;
    background-image: linear-gradient(to bottom, #ffffff, #a7a7a7);
    border-color: #9c9c9c;
}

.board.light .cd.h,
.board.light .cd.d {
    color: #9e0000;
    background-color: #fde3e3;
    background-image: linear-gradient(to bottom, #ffe5e5, #ff8787);
    border-color: #ff6c6c;
}

/* end of colors */
h1 {
    padding: 100px 0 25px;
    font-weight: 200;
    font-size: 3em;
    margin: 0;
}

.won button {
    color: #eeeeee;
    background-color: #cc0000;
}
.won button:hover {
    color: #cccccc;
    background-color: maroon;
}

button {
    border: 0;
    padding: 10px 20px;
    font-weight: bold;
    font-family: 'Raleway', 'Century Gothic', sans-serif;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
}

.start-container button {
    background-color: #333333;
    color: #eeeeee;
    min-width: 200px;
    margin: 0 auto 20px;
}

button.resumer {
    background-color: #d6b6b6;
    color: #190101;
}

button:hover {
    background-color: #cc0000;
}

.nav-buttons {
    position: fixed;
    bottom: 0;
    top: 0;
    max-width: 100%;
    width: 800px;
    text-align: center;
}

.nav-buttons .in {
    z-index: 200000;
    width: 9%;
    padding: 10px;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
}

.board.mobile.portrait .nav-buttons {
    top: auto;
    width: auto;
    left: 0;
    right: 0;
}

.board.mobile.portrait .nav-buttons .in {
    width: auto;
    position: relative;
}

.nav-buttons .in:after {
    clear: both;
    content: "";
    display: block;
}

.nav-buttons .toggle {
    display: block;
    border-radius: 30px;
    width: 25px;
    height: 60px;
    position: absolute;
    margin: auto;
    background: rgba(135, 64, 74, 0.49);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.nav-buttons .toggle:before,
.nav-buttons .toggle:after {
    content: "";
    display: block;
    position: absolute;
    border-radius: 20px;
    height: 15px;
    width: 15px;
}

.nav-buttons .toggle:before {
    background: #ffffff;
}

.nav-buttons .toggle:after {
    background: #000000;
}

.nav-buttons input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.nav-buttons label {
    display: block;
    cursor: pointer;
}

.nav-buttons label:after {
    content: "";
    display: block;
    background: #853f3f;
    height: 25px;
    width: 25px;
    border-radius: 15px;
}

.nav-buttons button {
    font-weight: bold;
    padding: 10px 0;
    width: 50px;
}

.nav-buttons .back {
    position: absolute;
    bottom: 15px;
    margin: auto;
    left: 0;
    right: 0;
}

.numd {
    text-align: center;
    opacity: 0.4;
}

.numd.len10 .icon {
    width: 6px;
    height: 6px;
    margin: 2px;
}

.numd.len9 .icon {
    width: 6px;
    height: 6px;
    margin: 2px;
}

.numd.len8 .icon {
    width: 8px;
    height: 8px;
    margin: 2px;
}

.numd.len7 .icon {
    width: 8px;
    height: 8px;
    margin: 2px;
}

.numd.len6 .icon {
    width: 8px;
    height: 8px;
    margin: 7px 2px 1px;
}

.numd.len5 .icon {
    width: 8px;
    height: 8px;
    margin: 7px 2px 1px;
}

.numd.len4 .icon {
    width: 10px;
    height: 10px;
    margin: 2px;
}

.numd.len3 .icon {
    width: 8px;
    height: 8px;
    margin: 4px auto 0;
    display: block;
}

.numd.len2 .icon {
    width: 15px;
    height: 15px;
    margin: 9px 0px 1px 3px;
}

.numd.len1 .icon {
    width: 25px;
    height: 25px;
    margin: 7px auto 0;
}

.icon {
    display: inline-block;
    width: 15px;
    height: 15px;
}

.icon span {
    display: block;
}

.icon.diamond {
    transform: scaleX(0.7);
}

.icon.diamond span {
    width: 70%;
    height: 70%;
    margin-top: 21%;
    margin-left: 14%;
    transform: rotate(45deg);
}

.icon.heart .a,
.icon.heart .b {
    border-radius: 50%;
    width: 50%;
    height: 52%;
    margin-top: 14%;
}

.icon.heart .a {
    float: left;
}

.icon.heart .b {
    float: right;
}

.icon.heart .c {
    clear: both;
    transform: rotate(45deg);
    width: 52%;
    height: 52%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    top: -28%;
}

.icon.spade .a,
.icon.spade .b {
    border-radius: 50%;
    width: 43%;
    height: 50%;
    margin-top: 14%;
}

.icon.spade .c {
    transform: rotate(45deg);
    width: 55%;
    height: 55%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 27%;
    margin-bottom: -44%;
}

.icon.spade .a {
    float: left;
}

.icon.spade .b {
    float: right;
}

.icon.spade .d {
    margin: 0 auto 0;
    width: 13%;
    height: 78%;
}

.icon.club .a,
.icon.club .b,
.icon.club .c {
    border-radius: 50%;
    width: 46%;
    height: 44%;
}

.icon.club .a {
    margin: 8% auto -13%;
}

.icon.club .b {
    float: left;
}

.icon.club .c {
    float: right;
}

.icon.club .d {
    margin: 0 auto 0;
    width: 15%;
    height: 70%;
}

.cd {
    overflow: hidden;
    font-weight: bold;
    padding: 3px;
    text-align: right;
    border: 5px solid #222222;
    margin: 5px;
    float: left;
    width: 40px;
    height: 60px;
    z-index: 999;
    cursor: pointer;
    position: relative;
    border-radius: 3px;
    user-select: none;
}

.cd * {
    pointer-events: none;
}

.icon.spade span,
.icon.club span {
    background: #999999;
}

.icon.heart span,
.icon.diamond span {
    background: #ee5555;
}

.cd p {
    float: left;
    padding: 0 0 5px;
}

.cd p,
.cd h2 {
    margin: 0;
    line-height: 1;
}

.cd h2 {
    text-align: center;
    padding: 6px 0 0;
    font-size: 1.9em;
    font-weight: bold;
}

.cd hr {
    opacity: 0.5;
    margin: 0;
    border-width: 1px 0 0 0;
    border-style: solid;
    clear: both;
}

.cd i {
    display: inline-block;
    margin: 3px;
    height: 0;
    width: 0;
    border: 2px solid;
    border-radius: 50%;
}

.stack {
    padding-top: 70px;
    min-height: 70px;
    float: left;
    transform-origin: 0 0;
    background-size: 52px 74px;
    background-repeat: no-repeat;
    background-position: center 10px;
}

.board.dark .stack {
  background-image: linear-gradient(#312727, #221c1c);
}
.board.light .stack {
  background-image: linear-gradient(#e6dada, #e5d9d9);
}

.board.mobile.landscape .stack {
    width: 9.5%;
}

.board.desktop .stack,
.board.mobile.portrait .stack {
    width: 14.2%;
}

.board.desktop .stacks,
.board.mobile.portrait .stacks {
    clear: both;
    padding: 5px;
}

.stack .cd {
    margin-bottom: 0;
    margin-left: 9px;
    margin-top: -50px;
    box-shadow: 0px -3px 4px 1px rgba(0,0,0,0.25);
    transition: margin-top 0.5s;
}

.stack .cd.f {
    margin-top: -60px;
}

.stack.len8 .cd.f {
    margin-top: -65px;
}

.stack.len9 .cd.f {
    margin-top: -67px;
}

.stack.len10 .cd.f,
.stack.len11 .cd.f,
.stack.len12 .cd.f,
.stack.len13 .cd.f,
.stack.len14 .cd.f,
.stack.len15 .cd.f,
.stack.len16 .cd.f {
    margin-top: -70px;
}

.cd.f+.cd.a {
    margin-top: -64px;
}

.stack .cd.f:first-child,
.stack .cd.a:first-child {
    margin-top: -60px
}

.board.mobile.landscape .refuse-pile {
    width: 9%;
    padding-top: 88px;
    padding-left: 1%;
    padding-bottom: 0;
    float: left;
    transform-origin: 0 0;
}

.board.mobile.landscape .refuse-pile .cd.f {
    float: left;
    margin-top: -77px;
    box-shadow: -3px -2px 4px -2px rgba(0,0,0,0.5);
}

.board.desktop .refuse-pile .cd.slide,
.board.mobile.portrait .refuse-pile .cd.slide {
    animation: slideright 0.5s 1;
}

.board.mobile.landscape .refuse-pile .cd.slide {
    animation: slidedown 0.5s 1;
}

.board.desktop .refuse-pile.accordion,
.board.mobile.portrait .refuse-pile.accordion {
    animation: accordion 0.5s 1;
    transform-origin: 0 0;
}

.board.desktop .refuse-pile,
.board.mobile.portrait .refuse-pile {
    width: 185px;
    float: left;
    padding-top: 50px;
    padding-left: 2%;
}

.board.desktop .refuse-pile .cd,
.board.desktop .refuse-pile .cd.f,
.board.mobile.portrait .refuse-pile .cd,
.board.mobile.portrait .refuse-pile .cd.f {
    margin-top: -50px;
    margin-bottom: 0;
}

.board.desktop .refuse-pile .cd,
.board.mobile.portrait .refuse-pile .cd {
    float: right;
}

.board.desktop .refuse-pile.all .cd.f,
.board.mobile.portrait .refuse-pile.all .cd.f {
    margin-left: -53.6px;
}

.board.desktop .refuse-pile .cd,
.board.mobile.portrait .refuse-pile .cd {
    margin-right: 0;
    margin-top: -50px;
    box-shadow: 0px 0px 4px 1px rgba(0,0,0,0.5);
}

.closet {
    float: right;
    text-align: left;
    border-radius: 2px;
    width: 57px;
    height: 0px;
    padding: 81px 4px 5px;
    margin: 0 0 5px 0;
}

.board.mobile.landscape .closets-area {
    width: 10%;
    float: right;
    margin-right: 13%;
}

.board.desktop .closets-area,
.board.mobile.portrait .closets-area {
    margin-right: 2%;
}

.board.desktop .closet,
.board.mobile.portrait .closet {
    margin: 0 5px 0 0;
}

.closet .cd.glow {
    animation: glow 0.5s 1;
}
.closet .cd {
    margin: -76px 0 0;
}

.closet .cd:last-of-type {
    box-shadow: 0px 0px 4px 1px rgba(0,0,0,0.5);
}

.closet > .icon {
    pointer-events: none;
    text-align: center;
    height: 36px;
    position: absolute;
    width: 35px;
    line-height: 40px;
    margin: -58px 0 0 12px;
    font-size: 40px;
    opacity: 0.5;
}

.clear:after {
    content: "";
    display: block;
    clear: both;
}

.board.desktop .refuse-pile .cd.f,
.board.mobile.portrait .refuse-pile .cd.f {
    float: left;
}

.board.desktop .refuse-pile.len24 .cd.f,
.board.mobile.portrait .refuse-pile.len24 .cd.f {
    margin-left: -53.2px;
}

.board.desktop .refuse-pile.len23 .cd.f,
.board.mobile.portrait .refuse-pile.len23 .cd.f {
    margin-left: -53.1px;
}

.board.desktop .refuse-pile.len22 .cd.f,
.board.mobile.portrait .refuse-pile.len22 .cd.f {
    margin-left: -53px;
}

.board.desktop .refuse-pile.len21 .cd.f,
.board.mobile.portrait .refuse-pile.len21 .cd.f {
    margin-left: -52.9px;
}

.board.desktop .refuse-pile.len20 .cd.f,
.board.mobile.portrait .refuse-pile.len20 .cd.f {
    margin-left: -52.7px;
}

.board.desktop .refuse-pile.len19 .cd.f,
.board.mobile.portrait .refuse-pile.len19 .cd.f {
    margin-left: -52.5px;
}

.board.desktop .refuse-pile.len18 .cd.f,
.board.mobile.portrait .refuse-pile.len18 .cd.f {
    margin-left: -52.4px;
}

.board.desktop .refuse-pile.len17 .cd.f,
.board.mobile.portrait .refuse-pile.len17 .cd.f {
    margin-left: -52px;
}

.board.desktop .refuse-pile.len16 .cd.f,
.board.mobile.portrait .refuse-pile.len16 .cd.f {
    margin-left: -51.7px;
}

.board.desktop .refuse-pile.len15 .cd.f,
.board.mobile.portrait .refuse-pile.len15 .cd.f {
    margin-left: -51.5px;
}

.board.desktop .refuse-pile.len14 .cd.f,
.board.mobile.portrait .refuse-pile.len14 .cd.f {
    margin-left: -51px;
}

.board.desktop .refuse-pile.len13 .cd.f,
.board.mobile.portrait .refuse-pile.len13 .cd.f {
    margin-left: -50.7px;
}

.board.desktop .refuse-pile.len12 .cd.f,
.board.mobile.portrait .refuse-pile.len12 .cd.f {
    margin-left: -50px;
}

.board.desktop .refuse-pile.len11 .cd.f,
.board.mobile.portrait .refuse-pile.len11 .cd.f {
    margin-left: -49.7px;
}

.board.desktop .refuse-pile.len10 .cd.f,
.board.mobile.portrait .refuse-pile.len10 .cd.f {
    margin-left: -49px;
}

.board.desktop .refuse-pile.len9 .cd.f,
.board.mobile.portrait .refuse-pile.len9 .cd.f {
    margin-left: -48px;
}

.board.desktop .refuse-pile.len8 .cd.f,
.board.mobile.portrait .refuse-pile.len8 .cd.f {
    margin-left: -46px;
}

.board.desktop .refuse-pile.len7 .cd.f,
.board.mobile.portrait .refuse-pile.len7 .cd.f {
    margin-left: -44px;
}

.board.desktop .refuse-pile.len6 .cd.f,
.board.mobile.portrait .refuse-pile.len6 .cd.f {
    margin-left: -41px;
}

.board.desktop .refuse-pile.len5 .cd.f,
.board.mobile.portrait .refuse-pile.len5 .cd.f {
    margin-left: -37px;
}

.board.desktop .refuse-pile.len4 .cd.f,
.board.mobile.portrait .refuse-pile.len4 .cd.f {
    margin-left: -28px;
}

.board.desktop .refuse-pile.len3 .cd.f,
.board.mobile.portrait .refuse-pile.len3 .cd.f {
    margin-left: 4px;
}

.board.desktop .refuse-pile.len2 .cd.f,
.board.mobile.portrait .refuse-pile.len2 .cd.f {
    margin-left: 4px;
}

.board.desktop .refuse-pile .cd.f:first-child,
.board.mobile.portrait .refuse-pile .cd.f:first-child {
    margin-left: 0;
}

@media (max-width: 505px) {
    .closets-area {
        clear: both;
    }
}
