body {
	/* http://lea.verou.me/css3patterns/#carbon-fibre */
	background:
	radial-gradient(black 15%, transparent 16%) 0 0,
	radial-gradient(black 15%, transparent 16%) 8px 8px,
	radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px,
	radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px;
	background-color:#282828;
	background-size:16px 16px;	
	font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;

}

.container {
  position: relative;
	background: white;
	border-radius: 2em;
	margin: auto;
	margin-top: 2em;
	padding: 2em;
	border: 5px solid gray;
  overflow: hidden;
}
h1 {
	color: #555;
}

h2 {
	color: #999;
	font-style: italic;
	font-size: 1.5em;
	margin-top: -0.8em;
	font-weight: 300;
}

td {
  width: 40px;
  height: 40px;
  background-color: #eee;
  text-align: center;
  border-radius: 10px;
  border: 2px solid #ccc;
  font-weight: 900;
}
td:hover {
  background-color: #441;
  color: white;
  cursor: pointer;
  transition: background-color 200ms;
}
td.scored {
  transition: background-color 400ms;
}
td.given {
  -webkit-animation: tada 1s 1; 
}
td.p0 {
  background-color: #995;
}
td.p1 {
  background-color: #d52;
}

span.log-score {
  text-decoration: underline; 
  font-weight: 900;  
}
span.p0 {
  color: #995;
}

span.p1 {
  color: #d52;
}

#players {
  margin-bottom: 3em;
}

#players li {
  list-style: none;
  height: 1.5em;
  font-size: 2em;
  background-color: #ddd;
  margin-bottom: 5px;
  padding: 1em 0.5em 0 0.5em;
  border-left: 5px solid #555;
}
#players li span {
  float: right;
  color: #1d1ddd;
}
#players li:first-child {
  border-left: 5px solid #995;
  transition: border-left 400ms;
}

#players li.selected:first-child {
  border-left: 15px solid #995;
  transition: border-left 400ms;
}

#players li:nth-child(2) {
  border-left: 5px solid #d52;
  transition: border-left 400ms;  
}

#players li.selected:nth-child(2) {
  border-left: 15px solid #d52;
  transition: border-left 400ms;  
}

#log {
  font-size: 0.8em;
  color: #555;
}

#modal {
  /*visibility: hidden;*/
  background-color: rgba(0,0,0,0.75);
  position: absolute;
  left: 0px;
  top: 0px;
  width:100%;
  height:100%;
  z-index: 1;  
}

#modal div {
  position: relative;
  border-radius: 25px;
  width:300px;
  margin: 100px auto;
  background-color: #fff;
  border: 5px solid gray;
  padding:2em 3em;
}
#modal h2 {
  margin: .5em 0 0 0;
}

#modal .close {
  position: absolute;
  right: -10px;
  top: -10px;
  display: block;
  border-radius: 14px;
  background-color: #aaa;
  border: 3px solid gray;
  padding: 1px 6px;
  color: white;
  font-weight: 900;
}

#modal .close:hover {
  background-color: #ddd;
  color: #aaa;
  text-decoration: none;
}

.pull-right {
  float: right;
}

#rules-tab {
  background: #999;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjOWU5ZTllIj48L3JlY3Q+CjxwYXRoIGQ9Ik0wIDVMNSAwWk02IDRMNCA2Wk0tMSAxTDEgLTFaIiBzdHJva2U9IiM4ODgiIHN0cm9rZS13aWR0aD0iMSI+PC9wYXRoPgo8L3N2Zz4=");  
  color: white;
  position: absolute;
  right: 0;
  bottom: -1.7em;
  width: 6em;
  height: 1.5em;
  text-align: center;
  font-size: 1.2em;
  padding-top: .25em;
  border-radius: 0 0 10px 10px;
  cursor: pointer;
}

#rules-tray {
  position: absolute;
  background-color: #aaa;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjOWU5ZTllIj48L3JlY3Q+CjxwYXRoIGQ9Ik0wIDVMNSAwWk02IDRMNCA2Wk0tMSAxTDEgLTFaIiBzdHJva2U9IiM4ODgiIHN0cm9rZS13aWR0aD0iMSI+PC9wYXRoPgo8L3N2Zz4=");  
  width: 89%;
  top: 0px;
  padding: 20px;
  border-radius: 0 0 0 10px;
  height: 300px;
  margin-top: -340px;
  color: white;
}

#rules-tray h2 {
  font-size: 1.7rem;
  color: white;
}

#rules-tray h2 span {
  font-size: .7em;
  color: #aaa;
}

#rules-tray ul {
  padding-top: 1em;
}

#rules-tray li {
  margin: 7px 0;
}
blockquote {
  background-color: gray;
  border-radius: 5px;
  padding: 2em;
}
blockquote p {
  font-size: 1em;
}


@-webkit-keyframes tada {
  0% {-webkit-transform: scale(1);} 
  10%, 20% {-webkit-transform: scale(0.9) rotate(-3deg);}
  30%, 50%, 70%, 90% {-webkit-transform: scale(1.12) rotate(3deg);}
  40%, 60%, 80% {-webkit-transform: scale(1.12) rotate(-3deg);}
  100% {-webkit-transform: scale(1) rotate(0);}
}