#game-view {
    width: 700px;
    margin: 0 auto;
}

#share {
    color: #888;
    margin-bottom: 2em;
    font-size: 0.8em;
    padding-bottom: 1em;
    border-bottom: 1px #EEE solid;
    font-family: system, -apple-system, BlinkMacSystemFont,
        "Helvetica Neue", "Lucida Grande";
}

#share .url {
    color: #888;
}

#status-line { text-align: center; margin-bottom: 1em; }
.red .status-text { color: #D13030; }
.blue .status-text { color: #4183CC; }
.win .status-text { font-size: 2em; }
#status-line #status {
    display: inline-block;
    font-weight: bold;
}

#remaining { float: left; }
#remaining .red-remaining { color: #D13030; }
#remaining .blue-remaining { color: #4183CC; }

#button-line {
    margin-bottom: 1em;
}

.clear { clear: both; }

#end-turn-btn {
    border: 1px #DDD solid;
    border-radius: 5px 5px 5px 5px;
    -moz-border-radius: 5px 5px 5px 5px;
    -webkit-border-radius: 5px 5px 5px 5px;
    padding: 5px;
    float: right;
    background: #EEE;
    margin: 0 1em 0 0;
    cursor: pointer;
}

#mode-toggle {
    text-align: right;
    margin: 2em 5px 2em 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

#mode-toggle a {
    margin-right: auto;
    margin-left: 5px;
}

#mode-toggle button {
    padding: 5px;
    border: 1px #DDD solid;
    background: #EEE;
    cursor: pointer;
}

#mode-toggle button.gear {
    border: none;
    padding: 0;
    background-color: transparent;
    margin: 2px 8px 0;
}

#mode-toggle button.codemaster {
    border-left: none;
    border-radius: 0 5px 5px 0;
    -moz-border-radius:  0 5px 5px 0;
    -webkit-border-radius: 0 5px 5px 0;
}

#mode-toggle button.player {
    border-radius: 5px 0 0 5px;
    -moz-border-radius: 5px 0 0 5px;
    -webkit-border-radius: 5px 0 0 5px;
}

#mode-toggle.player-selected button.player,
#mode-toggle.codemaster-selected button.codemaster {
    cursor: auto;
    color: #999;
}

#next-game-btn {
    margin-left: 10px;
}

.player .board .hidden-word { cursor: pointer; }

.board .neutral.revealed { background: #000000; }

.cell {
    width: 130px;
    height: 130px;
    box-sizing: border-box;
    margin: 5px;
    display: inline-block;
    text-align: center;
    background: #E8E8E8;
    z-index: 1;
    position: relative;
    vertical-align: middle;
    display: inline-block;
    position: relative;
}

/* https://stackoverflow.com/a/1997397/3846032 */
.cell img {
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
}

.cell.expander:hover {
    transform: scale(2);
    transition: all 75ms linear;
    z-index: 2;
    opacity: 1.0;
}
/* Undo hover settings for mobile */
@media (hover: none) {
    .cell:hover {
        transform: none;
        z-index: none;
    }
}

.board .imgcell.revealed { opacity: .6; }

.overlay {
    position: absolute;
    /* https://stackoverflow.com/questions/9738984/css-hover-passes-through-elements-to-activate-hover-on-covered-element */
    pointer-events: none;
}
.overlay.codemaster { opacity: 1; }
.overlay.player { opacity: 0 }

.codemaster .red.hidden-word { color: #D13030; }
.codemaster .blue.hidden-word { color: #4183CC; }
.codemaster .black.hidden-word { background: #CCC; }
.codemaster .cell { font-weight: bold; }

.board .red.revealed { background: #D13030; color: #FFF; }
.board .blue.revealed { background: #4183CC; color: #FFF; }
.board .black.revealed { background: #000000; color: #FFF; }

#remaining span {
    display: inline-block;
    padding: 3px 5px;
}

.color-blind #status {
    padding: 3px 5px;
}

.color-blind .blue-remaining, .color-blind #status-line.blue #status {
    border: 2px solid #4183cc;
}

.color-blind .red-remaining, .color-blind #status-line.red #status {
    border: 2px dashed #d13030;
}

.color-blind .codemaster .red.hidden-word, .color-blind .red.revealed {
    outline: 2px dashed #d13030;
    border: 1px solid white;
}

.color-blind .codemaster .blue.hidden-word, .color-blind .blue.revealed {
    outline: 2px solid #4183cc;
    border: 1px solid white;
}

.color-blind .revealed .word {
    text-decoration: underline;
}

.settings {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    background-color: white;
    text-align: center;
}

.close-settings {
    position: fixed;
    top: 32px;
    right: 32px;
    cursor: pointer;
}

.settings-content {
    width: 320px;
    margin: 80px auto;
}

.settings h2 {
    font-size: 1.5em;
    letter-spacing: 0.1em;
    margin: 5em 0 2em;
}

.toggle-set {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1em;
}

.toggle {
    display: flex;
    height: 32px;
    width: 50px;
    border-radius: 16px;
    background-color: #eee;
    cursor: pointer;
}

.switch {
    height: 32px;
    width: 32px;
    border-radius: 16px;
    box-sizing: border-box;
    border: 1px solid #bbb;
    background-color: white;
}

.toggle.active {
    background-color: #34BE5B;
    justify-content: flex-end;
}

.toggle-state {
    font-weight: bold;
}

#coffee {
  margin-top: 2em;
  text-align: right;
  font-size: 0.8em;
  color: #CCC;
}
#coffee a { color: #CCC; }
.color-blind #coffee {
  color: #000;
  font-weight: bold;
}
