.nunito-sans-title {
  font-family: "Nunito Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 900;
  font-style: normal;
  font-variation-settings:
    "wdth" 100,
    "YTLC" 500;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    background-color: darkgray;
    padding: 20px 5%;
    font-family: "Nunito Sans", sans-serif;
}

h1 {
    color: red;
    text-shadow: -1px 0  #fff, 0 1px  #fff, 1px 0  #fff, 0 -1px  #fff;
    font-weight: 900;
    font-style: normal;
    font-size: 300%;
    text-align: center;
}


.operation {
   background-image: url('/public/battle_bw.jpeg');
   padding: 10px;
}

.combat {
    padding: 10px;
    background-size: 100vw 100vh;
    background-repeat: no-repeat;
}


.DayPM {
    background-image: url('/public/day-pm.jpeg');
}

.DayAM {
   background-image: url('/public/day-am.jpeg');
   color: #eea;
}

.Dusk {
   background-image: url('/public/dusk.jpeg');
   color: white;
}

.Night {
   background-image: url('/public/night.jpeg');
    color: white;
}

form header {
    margin: 0 0 20px 0;
}
form header div {
    font-size: 90%;
    color: #999;
}
form header h2 {
    margin: 0 0 5px 0;
}
form > div {
    clear: both;
    overflow: hidden;
    padding: 1px;
    margin: 0 0 10px 0;
}
fieldset {
    border: thin solid black;
}

form > div > fieldset > div > div {
    margin: 0 0 5px 0;
}
form > div > label{
	  width: 25%;
    float: left;
    padding-right: 10px;
}
form > div > div,
form > div > fieldset > div {
    width: 75%;
    float: right;
}
form > div > fieldset label {
	  font-size: 90%;
}

input[type=text],
input[type=email],
input[type=url],
input[type=password],
textarea {
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
input[type=text],
input[type=number],
input[type=email],
input[type=url],
input[type=password] {
    width: 50%;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=url]:focus,
input[type=password]:focus,
textarea:focus {
    outline: 0;
    border-color: #4697e4;
}

button  {
    margin: .5em;
    width: 90%;
    padding: 0.8rem;
    background: #4697e4;
    color: white;
    border-radius: 0.2rem;
    cursor: pointer;
    border: none;
}

button.next {
    background: #f00;
}

/* Game list */
.game-list {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}

.game-list-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    margin: 0.4em 0;
    border-radius: 0.3rem;
    overflow: hidden;
}

.game-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: #333;
}

.game-link:hover {
    background: rgba(70, 151, 228, 0.15);
}

.game-name {
    font-weight: 700;
    font-size: 1.1em;
}

.game-info {
    font-size: 0.85em;
    color: #666;
    margin-top: 0.2em;
}

.delete-form {
    margin: 0;
    padding: 0;
}

.delete-btn {
    width: auto;
    margin: 0;
    padding: 0.8rem 1rem;
    background: transparent;
    color: #999;
    font-size: 1.3em;
    border: none;
    border-radius: 0;
    cursor: pointer;
}

.delete-btn:hover {
    background: #e44;
    color: white;
}

.no-games {
    text-align: center;
    color: #666;
    padding: 2em 0;
    font-style: italic;
}

.back-link {
    text-decoration: none;
}

/*
 Accordion CSS for the main interaction
*/
.accordion > input[type="checkbox"] {
  position: absolute;
  left: -100vw;
}

.accordion .content {
  overflow-y: hidden;
  height: 0;
  transition: height 0.3s ease;
}

.accordion > input[type="checkbox"]:checked ~ .content {
  height: auto;
  overflow: visible;
}

.accordion label {
  display: block;
}

.accordion > input[type="checkbox"]:checked ~ .content {
  padding: 15px;
  border: 1px solid #e8e8e8;
  border-top: 0;
}

.accordion .handle {
  margin: 0;
}

.accordion > .handle > label {
  cursor: pointer;
  padding: 15px;
}

.accordion label:hover,
.accordion label:focus {
  background: rgba(200, 200,200, .50) ;
}

.accordion .handle label:before {
    content: "\25b6";
    display: inline-block;
    margin-right: 10px;
    font-size: .48em;
    line-height: 1em;
    vertical-align: middle;
}

.accordion > input[type="checkbox"]:checked ~ .handle label:before {
    content: "\25bc";
}

/* Modal boxes for rules */
.battle-cycle {
    position: relative;
}

input#modal[type="checkbox"] {
	display:none;
}
input#modal[type="checkbox"]:checked ~ .modal,
input#modal[type="checkbox"]:checked ~ .modal-background {
	display: block;
}

.modal-label {
	  box-sizing: border-box;
    display: block;
    position: absolute;
    top: 0;
    right:0;
    width: 1.5em;
    text-align: center;
    border-radius: 1.5em;
    padding: 2px;
    background-color: #375d91;
    color: #f9f9f9;
    font-weight: bold;
    cursor: pointer;
}

.Night .modal-label {
    color: #375d91;
    background-color: #f9f9f9;
}

.Dusk .modal-label {
    color: #375d91;
    background-color: #f9f9f9;
}

.modal-background {
	width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    z-index: 9998;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    display: none;
    width: 50vw;
    height: 50vh;
    border-radius: 5px;
    background-color: #fff;
    box-sizing: border-box;
    z-index: 9999;
    overflow: auto;
    color: black;
}

.modal-content {
    padding: .5em;
    font-size: 80%;
}

.modal-header {
	  background-color: #f9f9f9;
    border-bottom: 1px solid #dddddd;
    box-sizing: border-box;
    position: sticky;
    top: 0;
}
.modal-header h3 {
	  margin: 0;
    box-sizing: border-box;
    padding-left: 10px;
    color: #4d4d4d;
    font-size: .8em;
    display: inline-block;
}
.modal-header label {
	  box-sizing: border-box;
    border-left: 1px solid #dddddd;
    float: right;
    line-height: 50px;
    padding: 0 15px 0 15px;
    cursor: pointer;
}
.modal-header label:hover img {
	opacity: 0.6;
}


@media (max-width: 600px) {
    body {
        padding: 10px 3%;
    }
    h1 {
        font-size: 200%;
    }

    form > div {
        margin: 0 0 15px 0;
    }
    form > div > label,
    legend {
	      width: 100%;
        float: none;
        margin: 0 0 5px 0;
    }
    form > div > div,
    form > div > fieldset > div {
        width: 100%;
        float: none;
    }
    input[type=text],
    input[type=email],
    input[type=url],
    input[type=password],
    input[type=number],
    textarea,
    select {
        width: 100%;
    }

    .modal {
        width: 80vw;
    }
}

@media (600px < width < 1200px) {
    form > div > label{
  	    text-align: right;
    }

    button {
        width: 40%;
    }
}


@media (width >= 1200px) {
    form > div > label {
  	    text-align: right;
    }

    button {
        width: 20%;
    }
}

.command-points-results {
    margin: 1em 0;
}

.cp-summary {
    display: flex;
    gap: 2em;
    margin: 1em 0;
}

.cp-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75em 1.5em;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.cp-label {
    font-weight: bold;
    margin-bottom: 0.25em;
}

.cp-value {
    font-size: 2em;
    font-weight: 900;
}
