/**********************************************
*** GENERAL
**********************************************/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

body {
    /*background: #C9FFBF;  /* fallback for old browsers */
	/*background: -webkit-linear-gradient(to right, #FFAFBD, #C9FFBF);  /* Chrome 10-25, Safari 5.1-6 */
    /*background: linear-gradient(to right, #FFAFBD, #C9FFBF); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    background-image: url("img/svinka-pig-svetlyy-fon.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    font-family: Lato;
    font-weight: 300;
    position: relative;
    height: 100vh;
    color: #555;
}

h3, p, li {text-transform: uppercase;}

.wrapper {
    width: 1000px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255,255,255, 0.85);
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}


.player-0-panel,
.player-1-panel {
    width: 50%;
    float: left;
    height: 600px;
    padding: 100px;
    
}

.rules-panel {
    position: relative;
    left: -100px;
    top: -100px;
    width: 500px;
    height: 600px;
    line-height: 30px;
    background-color: #b0d3bf;
    padding: 50px;
}




/**********************************************
*** PLAYERS
**********************************************/

.player-name {
    font-size: 40px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 100;
    margin-top: 20px;
    margin-bottom: 10px;
    position: relative;
}

.player-score-0 {
    text-align: center;
    font-size: 80px;
    font-weight: 100;
    color: #EB4D4D;
    margin-bottom: 130px;
}

.player-score-1 {
    text-align: center;
    font-size: 80px;
    font-weight: 100;
    color: #2ecc71;
    margin-bottom: 130px;
}

.player-0-rolled-1 {
	text-align: center;
	margin-bottom: 10px;
}

.player-1-rolled-1 {
	text-align: center;
	margin-bottom: 10px;
}
.player-0-panel{ 
    background-color: rgba(255, 148, 166, 0.15); 
}
.player-1-panel{ 
    background-color: rgba(213, 241, 225, 0.1); 
}

.player-0-panel.active{ 
    background-color: rgba(253, 54, 87, 0.3); 
}
.player-1-panel.active { 
    background-color: rgba(46, 204, 113, 0.3);  
}
.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-0 {
    background-color: #EB4D4D;
    color: #fff;
    width: 40%;
    margin: 0 auto;
    padding: 12px;
    text-align: center;
}

.player-current-box-1 {
    background-color: #2ecc71;
    color: #fff;
    width: 40%;
    margin: 0 auto;
    padding: 12px;
    text-align: center;
}

.player-current-label {
    text-transform: uppercase;
    margin-bottom: 10px;
    font-size: 12px;
    color: #222;
}

.player-current-score {
    font-size: 30px;
}

button {
    position: absolute;
    width: 200px;
    left: 50%;
    transform: translateX(-50%);
    color: #555;
    background: none;
    border: none;
    font-family: Lato;
    font-size: 20px;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 300;
    transition: background-color 0.3s, color 0.3s;
}

button:hover { font-weight: 600; }
button:hover i { margin-right: 20px; }

button:focus {
    outline: none;
}

i {
    display: inline-block;
    margin-right: 15px;
    font-size: 32px;
    line-height: 1;
    vertical-align: text-top;
    margin-top: -4px;
    transition: margin 0.3s;
}

.color-0 {color: #EB4D4D;}
.color-1 {color: #2ecc71;}

.btn-new { position: absolute; top: 105px; width: 200px;  left: 50%;}
.btn-rules { top: 45px;}
.btn-roll { top: 413px;}
.btn-back { top: 467px;}
.btn-hold { top: 477px;}

.btn-rolled1 { 
    border: 2px solid #8ea397;
    width: 40px;
    margin: 4px auto;
    background-color: #b0d3bf;
    border-radius: 4px;
}

.dice {
    position: absolute;
    left: 50%;
    top: 178px;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background-image: url('img/dice/dice-2.svg');
    transition: background-image .2s; 
    animation: fadeInDice ease-in .5s ;
    animation-fill-mode: forwards;
}

.winner-0 { background-color: #f7f7f7; }
.winner .player-name { font-weight: 300; color: #EB4D4D; }

.winner-0 { background-color: rgba(255, 175, 189, 0.1) }
.winner-1 { background-color: rgba(46, 204, 113, 0.1) }
.winner-0 .player-name { font-weight: 300; color: #EB4D4D;}
.winner-1 .player-name { font-weight: 300; color: #2ecc71;}

.player-0-panel.active{
    border: 5px solid rgba(255, 175, 189, 0);
    animation: blink 7s ease-in infinite ;
}

.player-1-panel.active{
    border: 5px solid rgba(46, 204, 113, 0);
    animation: blink2 7s ease-in infinite ;
}

.pop-up{
    display: block;
    position: absolute;
    width: 400px;
    background-color: rgb(240, 240, 240);
    left: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    text-align: center;
    padding: 20px 0;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    opacity: .9;
}

.pop-up p{
    padding: 5px 0;
}


@keyframes blink {
    0% {border: 5px solid rgba(255, 175, 189, 0);}
    10% {border: 5px solid rgb(233, 0, 39, .5);}
    20% {border: 5px solid rgba(255, 175, 189, 0);}
    30% {border: 5px solid  rgb(233, 0, 39, .5);}
    40% {border: 5px solid rgba(255, 175, 189, 0);}

  }

@keyframes blink2 {
    0% {border: 5px solid rgba(46, 204, 113, 0);}
    10% {border: 5px solid rgba(46, 204, 113, 1);}
    20% {border: 5px solid rgba(46, 204, 113, 0);}
    30% {border: 5px solid rgba(46, 204, 113, 1);}
    40% {border: 5px solid rgba(46, 204, 113, 0);}

  }

  @keyframes fadeInDice{
      from{ opacity: 0;}
      to{opacity: 1;}
  }