/**********************************************
*** GENERAL
**********************************************/
/* Basic color #EB4D4D */

* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

html,
body {
    background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(62, 20, 20, 0.4)), to(rgba(62, 20, 20, 0.4))), url(back.jpg);
    background-image: linear-gradient(rgba(62, 20, 20, 0.4), rgba(62, 20, 20, 0.4)), url(back.jpg);
    background-size: cover;
    background-position: center;
    font-family: Lato;
    font-weight: 300;
    position: relative;
    height: 100vh;
    color: #555;
    font-size: 20px;
}

.wrapper {
    width: 1000px;
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    background-color: #fff;
    -webkit-box-shadow: 0px 10px 50px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 10px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.player-0-panel,
.player-1-panel {
    width: 50%;
    float: left;
    height: 680px;
    padding: 100px;
}



/**********************************************
*** PLAYERS
**********************************************/

.player-name {
    font-size: 200%;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 100;
    margin-top: 20px;
    margin-bottom: 10px;
    position: relative;
}

.player-score {
    text-align: center;
    font-size: 400%;
    font-weight: 100;
    color: #EB4D4D;
    margin-bottom: 130px;
}

.active { background-color: #f7f7f7; }
.active .player-name { font-weight: 300; }

.active .player-name::after {
    content: "\2022";
    font-size: 47px;
    position: absolute;
    color: #EB4D4D;
    top: -7px;
    right: 10px;
}

.player-current-box {
    background-color: #EB4D4D;
    color: #fff;
    width: 40%;
    margin: 0 auto;
    padding: 12px;
    text-align: center;
}

.player-current-label {
    text-transform: uppercase;
    margin-bottom: 10px;
    font-size: 60%;
    color: #222;
}

.player-current-score {
    font-size: 150%;
}

button, .winning-score-display {
    position: absolute;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    color: #555;
    background: none;
    border: none;
    font-family: Lato;
    font-size: 100%;
    text-transform: uppercase;
    font-weight: 300;
}

button {
    width: 200px;
    cursor: pointer;
    -webkit-transition: background-color 0.3s, color 0.3s;
    transition: background-color 0.3s, color 0.3s;
}

button:hover { font-weight: 600; }
button:hover i { margin-right: 20px; }

button:focus {
    outline: none;
}

i {
    color: #EB4D4D;
    display: inline-block;
    margin-right: 15px;
    font-size: 160%;
    line-height: 1;
    vertical-align: text-top;
    margin-top: -4px;
    -webkit-transition: margin 0.3s;
    transition: margin 0.3s;
}

.btn-new { top: 45px;}
.btn-roll { top: 403px;}
.btn-hold { top: 467px;}

.btn-settings { bottom: 110px;}
.btn-help { bottom: 65px;}

/* winning score display */

.winning-score-display {
}

#winning-score {
    color: #EB4D4D;
}

.winning-score-display { bottom: 20px; }

/* dices */

.one-dice-panel {
    display: none;
    position: absolute;
    left: 50%;
    top: 178px;  /* 178px */
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    height: 100px;
    -webkit-box-shadow: 0px 10px 60px rgba(0, 0, 0, 0.10);
    box-shadow: 0px 10px 60px rgba(0, 0, 0, 0.10);
}

.two-dice-panel {
    display: none;
    position: absolute;
    left: 50%;
    top: 220px;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    height: 100px;
    width: 220px;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-delay: 0.1s;
    animation-delay: 0.1s;
    
}

.dice {
    height: 100%;
    -webkit-box-shadow: 0px 10px 60px rgba(0, 0, 0, 0.10);
    box-shadow: 0px 10px 60px rgba(0, 0, 0, 0.10);
}

.dice-0 {
    float: left;
}

.dice-1 {
    float: right;
}

.winner { background-color: #f7f7f7; }
.winner .player-name { font-weight: 300; color: #EB4D4D; }

/**********************************************
*** SETTINGS
**********************************************/
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    text-align: center;
    position: relative;
    background-color: #fefefe;
    margin: 14% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 50%; /* Could be more or less, depending on screen size */
    height: 400px;  /* was 400px */
    overflow-y: auto; /* enable vertical scroll if needed */
    
    -webkit-animation-name: modaltop;
    -webkit-animation-duration: 0.4s;
    animation-name: modaltop;
    animation-duration: 0.4s
}

/* The Close Button X */
#modal-settings-close,
#modal-help-close {
    position: absolute;
    right: 20px;
    top: 16px;
    cursor: pointer;
}
#modal-settings-close i,
#modal-help-close i {
    color: #EB4D4D;
    display: inline-block;
    margin: 0;
    font-size: 175%;
    line-height: 0;
    vertical-align: none;
    -webkit-transition: none;
    transition: none;
}
#modal-settings-close i:hover,
#modal-help-close i:hover {
    color: #bd1515;
}
.modal-label {
    clear: both;
    text-align: center;
    color: #555;
    background: none;
    border: none;
    font-size: 120%;
    text-transform: uppercase;
    font-weight: 600;
}

.input-panel {
    padding-top: 20px;  /* was 20px */
    padding-bottom: 20px;
    display: inline-block;
    text-align: center;
}

.input-group {
    padding-top: 20px;
}

.input-panel label {
    font-size: 100%;
}

.input-panel input, select {
    width: 40%;
    height: 25px;
    border: none;
    border-bottom: 1px dotted #bfbfbf;
    text-align: center;
    font-size: 100%;
    background: none;
    outline: none;
}

.input-panel select {
    text-align-last: center;
}

.btn-save {
    display: inline-block;
    position: absolute;
    bottom: 65px;
}

.btn-cancel {
    display: inline-block;
    position: absolute;
    bottom: 25px;
}


.help-content {
    margin-top: 20px;
    text-align: left;
    font-size: 95%;
}

.help-list {
    margin-left: 30px;
}

.btn-close {
    margin-top: 30px;
    margin-bottom: 20px;
}

/**********************************************
*** ANIMATIONS
**********************************************/

@-webkit-keyframes modaltop {
    from {top: -300px; opacity: 0} 
    to {top: 0; opacity: 1}
}

@keyframes modaltop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

@-webkit-keyframes normalSpin {
    from {
        -webkit-transform-origin: center;
        transform-origin: center;
        -webkit-transform:rotate(0deg);
        transform:rotate(0deg);
    }
    to {
        -webkit-transform-origin: center;
        transform-origin: center;
        -webkit-transform:rotate(360deg);
        transform:rotate(360deg);
    }
}

@keyframes normalSpin {
    from {
        -webkit-transform-origin: center;
        transform-origin: center;
        -webkit-transform:rotate(0deg);
        transform:rotate(0deg);
    }
    to {
        -webkit-transform-origin: center;
        transform-origin: center;
        -webkit-transform:rotate(360deg);
        transform:rotate(360deg);
    }
}

@-webkit-keyframes superSpin {
    from {
        -webkit-transform-origin: center;
        transform-origin: center;
        -webkit-transform:rotate(0deg);
        transform:rotate(0deg);
    }
    to {
        -webkit-transform-origin: center;
        transform-origin: center;
        -webkit-transform:rotate(2000deg);
        transform:rotate(2000deg);
    }
}

@keyframes superSpin {
    from {
        -webkit-transform-origin: center;
        transform-origin: center;
        -webkit-transform:rotate(0deg);
        transform:rotate(0deg);
    }
    to {
        -webkit-transform-origin: center;
        transform-origin: center;
        -webkit-transform:rotate(2000deg);
        transform:rotate(2000deg);
    }
}

@-webkit-keyframes spin {
    from { 
        -webkit-transform-origin: center; 
        transform-origin: center;
        -webkit-transform:rotate(0deg);
        transform:rotate(0deg);
    }
    to { 
        -webkit-transform-origin: center; 
        transform-origin: center;
        -webkit-transform:rotate(-200deg);
        transform:rotate(-200deg);
    }
}

@keyframes spin {
    from { 
        -webkit-transform-origin: center; 
        transform-origin: center;
        -webkit-transform:rotate(0deg);
        transform:rotate(0deg);
    }
    to { 
        -webkit-transform-origin: center; 
        transform-origin: center;
        -webkit-transform:rotate(-200deg);
        transform:rotate(-200deg);
    }
}

@-webkit-keyframes rotateOut {
  from {
    -webkit-transform-origin: center;
    transform-origin: center;
  }

  to {
    -webkit-transform-origin: center;
    transform-origin: center;
    -webkit-transform: rotate3d(0, 0, 1, -200deg);
    transform: rotate3d(0, 0, 1, -200deg);
  }
}

@keyframes rotateOut {
  from {
    -webkit-transform-origin: center;
    transform-origin: center;
  }

  to {
    -webkit-transform-origin: center;
    transform-origin: center;
    -webkit-transform: rotate3d(0, 0, 1, 200deg);
    transform: rotate3d(0, 0, 1, 200deg);
  }
}

@-webkit-keyframes fadeOut {
    from {opacity: 1;}
    to {opacity: 0;}
}

@keyframes fadeOut {
    from {opacity: 1;}
    to {opacity: 0;}
}

@-webkit-keyframes waitFadeOut {
    0% {opacity: 1;}
    50% {opacity: 1;}
    100% {opacity: 0;}
}

@keyframes waitFadeOut {
    0% {opacity: 1;}
    50% {opacity: 1;}
    100% {opacity: 0;}
}

/**********************************************
*** ANIMATION CLASSES
**********************************************/

.js-rotateout-animation {
    -webkit-animation: rotateOut 1s, fadeOut 1s;
    animation: rotateOut 1s, fadeOut 1s;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

.js-spin-animation {
    left: 45%; /* must include to be centered */
    -webkit-animation: spin 1s, fadeOut 1s;
    animation: spin 1s, fadeOut 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

.js-normal-spin-animation {
    left: 45%; /* must include to be centered */
    -webkit-animation: normalSpin .2s;
    animation: normalSpin .2s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

.js-fadeout {
    -webkit-animation: fadeOut 1s;
    animation: fadeOut 1s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

.js-win-animation {
    -webkit-animation: fadeOut 2s, superSpin 2s;
    animation: fadeOut 2s, superSpin 2s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

/* text message */
.js-text-animation {
    position: absolute;
    display: none;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 100%;
    top: 85px;
    color: #f07b7b;
    font-size: 100%;
    text-align: center;
}

/* wait fade out class */
.js-wait-fadeout {
    -webkit-animation: waitFadeOut 2s;
    animation: waitFadeOut 2s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}