/* Site top / general */

body {
    font-family: 'Lato', sans-serif;
    background-color: #b8b8b8;
}

h1 {
    margin-top: 30px;
    margin-left: 5%;
    margin-right: 5%;
    margin-bottom: 24px;
    color: white;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 40px;
    font-weight: normal;
    color: #4c4c4c;
}

@media screen and (min-width: 650px) {
    h1 {
        margin-top: 60px;
        margin-bottom: 30px;
        font-size: 78px;
    }
}

header {
    padding-bottom: 40px;
}

@media screen and (min-width: 650px) {
    header {
    }
}

.page-container {
    background-color: white;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 30px;
    padding-right: 30px;
}

@media screen and (min-width: 650px) {
    .page-container {
        box-sizing: border-box;
        width: 630px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (min-width: 900px) {
    .page-container {
        width: 860px;
        padding-top: 25px;
        padding-bottom: 25px;
        padding-left: 40px;
        padding-right: 40px;
    }
}

header h2 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 20px;
}

@media screen and (min-width: 650px) {
    header h2 {
        margin-bottom: 42px;
        font-size: 29px;
    }
}

strong {
    font-weight: bold;
}

.loading-icon {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.07);
    display: none;
    z-index: 100;
}

.loading-icon > div {
    position: fixed;
    left: 50%;
    top: 50%;
    padding: 5px;
    padding-bottom: 3px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.4);
    z-index: 110;
}

.loading-icon img {
}

.popup-backdrop {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.47);
    z-index: 10;
    display: none;
}

.message-error,
.message-info {
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
}

.message-error {
    color: red;
}

.message-info {
    color: green;
}

.page-intro {
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    margin-bottom: 60px;
}

@media screen and (min-width: 550px) {
    .page-intro {
        margin-top: 40px
    }
}

@media screen and (min-width: 900px) {
    .page-intro {
        margin-top:  60px;
    }
}

.page-intro p {
    margin-left: auto;
    margin-right: auto;
}

@media screen and (min-width: 650px) {
    .page-intro p {
        max-width: 500px;
    }
}

@media screen and (min-width: 900px) {
    .page-intro p {
        max-width: 540px;
    }
}

.page-intro p:first-child {
    margin-bottom: 2.5em;
}

.page-divider {
    width: 70%;
    max-width: 350px;
    border-bottom: 1px solid #b8b8b8;
    margin-top: 2em;
    margin-bottom: 2em;
    margin-left: auto;
    margin-right: auto;
}

.page-divider.top-line {
    margin-bottom: 2.8em;
}

.page-divider.bottom-line {
    margin-top: 0;
}

.donate-button {
    text-align: right;
    padding-top: 9px;
    padding-right: 7px;
    margin-bottom: -15px;
}

.donate-button input[type=image] {
    border: none;
    box-shadow: none;
    opacity: 0.7;
}

.donate-button input[type=image]:hover {
    opacity: 1.0;
}


/* Form control styles */

input,
select,
button,
a.button,
textarea {
    box-sizing: border-box;
    padding: 0.43em 0.86em;
    line-height: 143%;
    border: 1px solid #ccc;
    border-radius: 0.29em;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    text-decoration: none;
    font-family: inherit;
    font-size: 100%;
}

input[type=button],
input[type=submit],
a.button,
button {
    cursor: pointer;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
    display: inline-block;
    color: #333;
    background-color: #fff;
    transition: background-color 0.1s;
    padding-top: 0.22em;
    padding-bottom: 0.22em;
}

input[type=button]:hover,
input[type=submit]:hover,
a.button:hover,
button:hover {
    background-color: #e6e6e6;
}

input[type=button]:focus,
input[type=submit]:focus,
a.button:focus,
button:focus  {
    border-color: #7c9ed5;
}

input[type=text],
input[type=password],
select,
textarea {
    color: #666;
    padding: 0.14em 0.43em;
}

input:focus,
select:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: 0 0 4px rgba(102,175,233,.6);
}

input:disabled,
select:disabled,
input:disabled:hover,
select:disabled:hover {
    background-color: #ececec;
    cursor: default;
    color: #666;
}


/* Forms */

.form-table {
}

.form-table > tbody > tr > td, 
.form-table > tbody > tr > th {
    padding-top: 0.4em;
    padding-bottom: 0.3em;
    vertical-align: top;
}


.form-table > tbody > tr > th {
    text-align: left;
    padding-right: 1em;
    padding-top: 0.7em;
}

.form-table > tbody > tr > td > input[type=checkbox] {
    display: inline-block;
    height: 1.3em;
    margin-left: 0;
}

.form-table span.static-value {
    display: inline-block;
    padding-top: 0.33em;
}

.field-note {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.9em;
    color: #909090;
    padding-top: 0.25em;
    padding-bottom: 0.3em;
    line-height: 125%;
    font-style: italic;
}

.checkbox-list {
    margin-top: 0.1em;
}

.checkbox-list td {
    vertical-align: top;
}

.checkbox-list td:nth-child(1) {
    padding-top: 0.15em;
    padding-right: 0.3em;
}

.checkbox-list input {
    margin-left: 0;
}

.checkbox-list label {
    line-height: 150%;
}


/* Grid layouts */

@media screen and (min-width: 500px) {
    .small-items-grid {
        width: 100%;
        overflow: hidden;
    }
}

.small-items-grid .grid-cell {
    margin-bottom: 20px;
    padding-top: 3.2%;
    padding-bottom: 3.2%;
}

@media screen and (min-width: 500px) {
    .small-items-grid .grid-cell {
        margin-bottom: 20px;
        width: 46%;
        float: left;
    }

    .small-items-grid .grid-cell:nth-child(odd) {
        clear: left;
        padding-right: 7.5%;
    }
}

@media screen and (min-width: 900px) {
    .small-items-grid .grid-cell {
        width: 29%;
    }

    .small-items-grid .grid-cell:nth-child(odd) {
        clear: inherit;
        padding-right: inherit;
    }

    .small-items-grid .grid-cell:nth-child(3n+1) {
        clear: left;
    }

    .small-items-grid .grid-cell:nth-child(3n+1),
    .small-items-grid .grid-cell:nth-child(3n+2) {
        padding-right: 6.4%;
    }
}

.grid-cell img {
    display: block;
    width: 100%;
    height: auto;
}

/* Content styles */

a {
    color: #c04916;
}

h2,
h3 {
    font-family: 'Playfair Display', serif;
    margin-top: 1.0em;
    margin-bottom: 0.6em;
    line-height: 125%;
}

h2 {
    font-size: 27px;
}

h3 {
    font-size: 20px;
}

p {
    line-height: 140%;
    margin-top: 1em;
    margin-bottom: 1em;
}

p.more-link {
    text-align: center;
}


/* Fancy icons */

.css-icon-outer {
    width: 100%;
    padding-bottom: 75%;
    position: relative;
}

.css-icon-inner {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.grid-cell .css-icon-inner img {
    display: block;
    margin-top: 12%;
    width: 55%;
    margin-left: auto;
    margin-right: auto;
}

.noisemaker-icon {
    box-sizing: border-box;
    border: 2px solid #bbb; 
    background-color: #ececec;
    border-radius: 7px;
}


/* Music page */

iframe.music {
    margin-top: 1em;
    margin-bottom: 1em;
}


/* Hex quiz page */

.hex-quiz {
    background-color: #BDD5F8;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 39px;
}

div.correct-quiz {
    background-color: #BDF8BE;
}

div.incorrect-quiz {
    background-color: #F8BDBD;
}

.hex-quiz .question {
    font-size: 70px;
    vertical-align: middle;
}

.hex-quiz .question strong {
}

.hex-quiz .prompt {
    font-size: 25px;
}

.hex-quiz .feedback {
    font-size: 30px;
    height: 45px;
    line-height: 45px;
}

.hex-quiz .correct {
    color: green;
}

.hex-quiz .incorrect {
    color: red;
}

.hex-quiz #Answer {
    font-size: 50px;
    text-align: center;
}

.hex-quiz #Submit {
    margin-top: 20px;
    font-size: 24px;
    border-radius: 9px;
    padding-left: 30px;
    padding-right: 30px;
}

.hex-quiz-stats {
    text-align: center;
}


/* Footer */

footer {
    margin-top: 20px;
    text-align: center;
    margin-bottom: 40px;
}

footer img {
    width: 25px;
    vertical-align: middle;
    margin-left: 12px;
    display: inline-block;
    margin-top: -2px;
}


/* Shader fun page */

.shader-fun-page div,
.shader-fun-page p,
.shader-fun-page h2 {
    text-align: center;
}

.shader-fun-page div {
    margin-top: 35px;
    margin-bottom: 35px;
}

.shader-fun-page img {
    display: block;
    max-width: 100%;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.3);
}

.shadertoy-grid {
}

.shadertoy-grid a {
    display: inline-block;
    width: 100%;
    padding-left: 0%;
    padding-right: 0%;
    padding-bottom: 7%;
    box-sizing: border-box;
}

.shadertoy-grid img {
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

.shadertoy-grid span {
    display: block;
    padding-top: 0.5em;
}

@media screen and (min-width: 500px) {
    .shadertoy-grid a {
        width: 49%;
        padding-left: 2%;
        padding-right: 2%;
        padding-bottom: 5%;
    }
}



/* Battleships */

.battleships {
    text-align: center; 
}

.battleships .button-row {
    margin-bottom: 0.2em;
}

.battleships .button-row input[type=button] {
    margin-bottom: 0.5em;
    margin-left: 0.3em;
    margin-right: 0.3em;
    font-size: 18px;
    font-family: Verdana, Helvetica, sans-serif;
}

@media screen and (min-width: 650px) {
    .battleships .button-row input[type=button] {
        font-size: 13px;
    }
}

.size-buttons {
    margin-bottom: 1em;
}

.size-buttons .current-size {
    background-color: #efefef;
}

.battleships .puzzle-outer {
    width: 100%;
    padding-top: 100%;
    height: 0;
    position: relative;
}

.battleships table.puzzle {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    bottom: 0px;
}

@media screen and (min-width: 650px) {
    .battleships .puzzle-outer {
        padding-top: 0;
        position: static;
        height: auto;
    }

    .battleships table.puzzle {
        width: auto;
        margin-left: auto;
        margin-right: auto;
        position: relative;
        left: -11px;
    }
}

.battleships table.puzzle td {
    border: 1px solid #aaa;
}

.battleships table.puzzle th,
.battleships table.puzzle td {
    vertical-align: middle;
}

.battleships .width-6 {
    left: -4%;
}

.battleships .width-6 th {
    font-size: 6vw;
}

.battleships .width-6 th, 
.battleships .width-6 td {
    width: 14.29%;
    height: 14.29%;
}

.battleships .width-7 {
    left: -3.4%;
}

.battleships .width-7 th {
    font-size: 6vw;
}

.battleships .width-7 th, 
.battleships .width-7 td {
    width: 12.5%;
    height: 12.5%;
}

.battleships .width-8 {
    left: -5.5%;
}

.battleships .width-8 th {
    font-size: 5vw;
}

.battleships .width-8 th, 
.battleships .width-8 td {
    width: 11.11%;
    height: 11.11%;
}

@media screen and (min-width: 650px) {
    .battleships table.puzzle td,
    .battleships table.puzzle th {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }
}

.battleships table.puzzle td.error > i {
    background-color: red;
}

.battleships table.puzzle th.clickable {
    cursor: pointer;
}

.battleships table.puzzle tr:first-child th {
    border-bottom: 3px solid black;
}

.battleships table.puzzle tr:first-child th:first-child {
    border-bottom: none;
}

.battleships table.puzzle tr th {
    border-right: 3px solid black;
}

.battleships th.complete {
    text-decoration: line-through;
    color: #cacaca;
}

.battleships th.wrong {
    color: #ff0000;
    font-weight: bold;
}

.battleships table.puzzle tr:first-child th {
    border-right: none;
}

.battleships table.puzzle tr:last-child td {
    border-bottom: 3px solid black;
}

.battleships table.puzzle tr td:last-child {
    border-right: 3px solid black;
}

table.puzzle td.debug2 {
    border: 1px solid yellow;
}

table.puzzle td.debug {
    border: 1px solid #d8380a;
}

.battleships i {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.battleships .ship-list {
    margin-top: 20px;
    margin-bottom: 10px;
    word-spacing: 5px;
    line-height: 173%;
}

.battleships .ship-list i {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: white;
}

i.blank {
}

i.water,
i.sub,
i.middle,
i.unknown,
i.cap-left,
i.cap-top,
i.cap-right,
i.cap-bottom {
    background-color: rgb(179, 212, 224);
    position: relative;
}

i.water.revealed,
i.sub.revealed,
i.middle.revealed,
i.unknown.revealed,
i.cap-left.revealed,
i.cap-top.revealed,
i.cap-right.revealed,
i.cap-bottom.revealed {
    background-color: rgb(127, 179, 197);
    cursor: default;
}

.solved i.water,
.solved i.sub,
.solved i.middle,
.solved i.unknown,
.solved i.cap-left,
.solved i.cap-top,
.solved i.cap-right,
.solved i.cap-bottom {
    background-color: #72ffa2;
    cursor: default;
}

i.sub:after,
i.middle:after,
i.unknown:after,
i.cap-left:after,
i.cap-top:after,
i.cap-right:after,
i.cap-bottom:after {
    content: '';
    position: absolute;
    left: 3%;
    top: 3%;
    right: 3%;
    bottom: 3%;
    background-color: #2f2f2f;
}

i.sub.found:after,
i.middle.found:after,
i.cap-left.found:after,
i.cap-right.found:after {
    background-color: #ccc;
}

i.sub:after {
    border-radius: 50%;
}

i.middle:after {
}

i.unknown:after {
    content: '';
    color: white;
    font-weight: bold;
    border-radius: 25%;
    vertical-align: middle;
    line-height: 150%;
    font-size: 19px;
}

i.cap-left:after {
    border-radius: 50% 0% 0% 50%;
}

i.cap-top:after {
    border-radius: 50% 50% 0% 0%;
}

i.cap-right:after {
    border-radius: 0% 50% 50% 0%;
}

i.cap-bottom:after {
    border-radius: 0% 0% 50% 50%;
}

.puzzle-status {
    font-style: italic;
    margin-top: 0.7em;
    margin-bottom: 0.9em;
    font-size: 19px;
}

@media screen and (min-width: 650px) {
    .puzzle-status {
        font-size: 16px;
    }
}

.puzzle-status.info {
    color: green;
}

.puzzle-status.error {
    color: red;
}

#BtnSettings {
    display: inline-block;
    vertical-align: middle;
    color: #4e4e4e;
    cursor: pointer;
    height: 47px;
}

#BtnSettings:hover,
#BtnSettings:active {
    color: #000000;
}

#BtnSettings svg {
    width: 37px;
    height: 37px;
}

@media screen and (min-width: 650px) {
    #BtnSettings {
        height: 30px;
    }

    #BtnSettings svg {
        width: 27px;
        height: 27px;
    }
}

.settings-popup-outer {
    position: absolute;
    width: 100%;
    left: 0;
    display: none;
}

.settings-popup {
    display: block;
    position: relative;
    z-index: 20;
    width: 90%;
    max-width: 477px;
    box-sizing: border-box;
    padding: 30px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 0 18px 4px #00000066;
    margin-left: auto;
    margin-right: auto;
}

.settings-popup h2 {
    margin-top: 0;
    text-align: center;
}

.popup-close {
    position: absolute;
    top: -39px;
    right: 0px;
    color: #e4e4e4;
    text-align: right;
    padding-right: 6px;
    width: 100%;
    overflow: visible;
    cursor: pointer;
    display: block;
    border: none;
    font-size: 30px;
    text-decoration: none;
}

.popup-close:hover,
.popup-close:active {
    color: #FFF;
}

.settings-popup th {
}

@media screen and (min-width: 400px) {
    .settings-popup th {
        white-space: nowrap;
    }
}


#Checkpoints {
    white-space: nowrap;
    line-height: 40px;
    display: inline-block;
    margin-bottom: 0.5em;
    vertical-align: middle;
}

#Checkpoints a {
    display: inline-block;
    margin-right: 0.5em;
    width: 1.5em;
    height: 1.5em;
    line-height: 1.4em;
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid #cccccc;
    color: #333;
    transition-property: background-color, border-color, color;
    transition-duration: 0.25s;
    font-size: 20px;
}

@media screen and (min-width: 650px) {
    #Checkpoints a {
        font-size: 13px;
    }
}

#Checkpoints a:hover {
    background-color: #e6e6e6;
}

#Checkpoints a.current {
    background-color: #c7c7c7;
    border-color: #888484;
    color: black;
    position: relative;
    border-width: 2px;
}

#Checkpoints a.current:hover {
    background-color: #d4d4d4;
}

#Checkpoints a.current:after {
    content: '×';
    color: #c73030;
    position: absolute;
    display: block;
    left: 0px;
    top: -2px;
    text-indent: 0px;
    width: 100%;
    text-align: center;
    font-size: 190%;
    text-shadow: 1px 1px 2px black;
    opacity: 0;
    transition-property: opacity;
    transition-duration: 0.25s;
}

#Checkpoints a.current:hover:after {
    opacity: 0.9;
}

#Checkpoints a.current.no-hover-icon:hover:after {
    opacity: 0.0;
}

@media screen and (min-width: 450px) {
    .pics-horizontal {
        display: table;
        margin-left: auto;
        margin-right: auto;
    }

    .pics-horizontal div {
        display: table-cell;
        vertical-align: middle;
    }
}


/* HN comment search */

.comment-results {
    background-color: #f5f5ee;
    padding-left: 1em;
    padding-right: 1em;
    padding-bottom: 16px;
    border-top: 16px solid #fe6508;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 12px;
}

.comment {
    margin-top: 1em;
    margin-bottom: 1em;
}

.header {
    color: #828282;
    font-size: 8pt;
}

.comment-results a {
    color: black;
}

.header > a {
    color: #828282;
}

.body {
    margin-top: 1em;
    margin-bottom: 2em;
    line-height: 130%;
}


/* Ad crap */ 

ins.adsbygoogle {
}

.top-plug-container {
    padding-left: 20px;
    padding-right: 20px;
    width: 95%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid white;
    border-radius: 6px;
    background-color: #cccccc;
}

.top-plug-container p {
    color: #2d2d2d;
}

.top-plug-container a {
    display: inline-block;
    text-decoration: none;
    border: 1px solid white;
    padding-top: 0.3em;
    padding-bottom: 0.3em;
    padding-left: 1em;
    padding-right: 1em;
    border-radius: 6px;
    color: white;
    background-color: #4193b1;
    font-weight: normal;
    margin-top: 0.7em;
    transition: background-color 0.2s;
}

.top-plug-container a:hover {
    background-color: #50a9ca;
}

@media screen and (min-width: 650px) {
    .top-plug-container {
    }
}

@media screen and (min-width: 900px) {
    .top-plug-container {
    }
}


/* How to pay */

.pay-page h2 {
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.page-intro.pay-page p:first-child {
    margin-bottom: 1em;
}

.donate-list {
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    width: 100%;
    max-width: 540px;
}

.donate-list tr {
}

.donate-list td {
    vertical-align: middle;
    padding-top: 0.4em;
    padding-bottom: 0.4em;
}

.donate-list td input[type=image] {
    border: none;
    padding: 0;
}

.donate-list td input[type=button] {
    background-color: #000000;
    border: none;
    color: white;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    font-weight: bold;
    border-radius: 0.5em;
    text-align: center;
    width: 100%;
    transform: scale(1.0);
}

.donate-list td input[type=button]:hover {
    transform: scale(1.05);
}

.donate-list td:first-child {
    padding-right: 1em;
    padding-left: 2em;
    width: 5em;
}

.donate-list td:last-child {
}

.thanks-page p {
    text-align: center;
}
