html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: arial;
}

* {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-tap-callout: none;
  box-sizing: border-box;
}

.main {
  -webkit-user-select: none;
}

.screen {
  width: 100%;
  display: flex;
}

.screen, .background, .tint {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.background {
  background-color: #517086;
}

body {
  display: flex;
  padding: 10px;
  background-size: cover;
}

.box {
  margin: 0 20px 20px 20px;
  border-radius: 10px;
  background: white;
  padding: 20px;
  position: relative;
  box-shadow: 5px 5px 30px rgba(0,0,0,0.3);
}

.main {
  flex-grow: 1;
  margin: 80px 0 40px 0;
}

.map * {
  -webkit-user-select: none;
  -webkit-user-callout: none;;
}

.main svg {
  width: 100%;
  height: 100%;
}

.sidebar {
  flex-grow: 0;
  flex-shrink: 0;
  width: 350px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  display: flex;
  padding-top: 100px;
}

.map {
  width: 100%;
  height: 100%;
}

.control-panel {
  position: absolute;
  top: 20px;
  left: calc(50% - 300px);
  width: 600px;
  display: flex;
  padding: 10px;
  font-size: 20px;
  align-items: center;
}

.instructions {
  display: none;
  flex-grow: 1;
  font-size: 15px;
  margin-left: 5px;
  color: #999;
}

.progress {
  color: #999;
  font-size: 15px;
}

.progress, .time {
  margin: 0 10px;
}

.message {
  flex-grow: 1;
}

.mini-flag {
  height: 80%;
}


button {
  border: 0;
  outline: 0;
  border-radius: 20px;
  padding: 10px 20px;
  background-color: #00d2ef;
  color: white;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s;
}

.buttons button {
  flex-shrink: 0;
  margin: 0 0px 20px 10px;
}

button:active, button:hover {
  background-color: #24b8cc;
}

.restart {
  min-width: 120px;
  flex-grow: 0;
}

.hint {
  position: absolute;
  height: 30px;
  line-height: 30px;
  top: calc(50% - 20px);
  left: calc(50% - 50px);
  background: rgba(200, 0, 0, 0.8);
  color: white;
  padding: 0 20px;
  border-radius: 15px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}

.time {
  color: #00d2ef;
  flex-grow: 0;
}

.poster {
  background-color: #ddd;
  height: auto;
  width: calc(100% - 40px);
  flex-grow: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  margin-left: 20px;
  z-index: 1; /* hide corners of fact box */
}

.facts {
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch; /* smooth scrolling */
  font-size: 13px;
  padding-top: 25px;
  padding-bottom: 10px;
  margin-top: -10px;
}
.fact-header {
}
.fact-header .name {
  font-weight: bold;
}
.full-text {
}

.fact-header .flag {
  height: 70px;
  width: auto;
  border: 1px solid black;
  float: left;
  margin-right: 10px;
  margin-bottom: 20px;
}
.summary {
  font-weight: bold;
  clear: both;
}
.capital, .population {
  margin-top: 5px;
  margin-left: 130px;
  font-size: 10px;
  padding-left: 20px;
  background-size: auto 12px;
  background-position: left top;
  background-repeat: no-repeat;
}
.capital {
  background-image: url('assets/capital.png');
}
.population {
  background-image: url('assets/population.png');
}
.site-url {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 12px;
  padding-right: 200px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  color: white;
}
.site-url a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
}
a:hover, a:active {
  text-decoration: underline;
}
.overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000a;
  justify-content: center;
  align-items: center;
  z-index: 2;
}
.name-input {
  font-size: 18px;
  padding: 9px;
  border-radius: 5px;
  outline: 0;
  min-width: 220px;
  border: 0px solid #ccc;
  margin: 20px 0;
  background-color: #eee;
}
.dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 50px;
  border-radius: 20px;
  background-color: white;
  margin-bottom: 200px;
}
.register-score .buttons {
  text-align: center;
}
.final-time {
  font-size: 40px;
  margin-top: 20px;
}
.score-info {
  color: #999;
  font-size: 12px;
}
.score-table {
  width: 100%;
  font-size: 12px;
}
.score-table th {
  text-align: left;
}
.score-table td:nth-child(2) {
  width: 80%;
}
.high-scores {
  overflow: scroll;
  -webkit-overflow-scrolling: touch;
}
.skip-score {
  background: #bbb;
}
.credit {
  margin: 20px 0 10px;
  color: #999;
}
.no-highscore {
  font-style: italic;
  font-size: 15px;
}

.hide-sidebar .sidebar {
  display: none;
}

.sidebar-toggle {
  position: absolute;
  top: 70px;
  right: 40px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  padding: 0;
  background: url('assets/right.svg') center center no-repeat;
  background-size: contain;
}

.hide-sidebar .sidebar-toggle {
  background-image: url('assets/left.svg');
}

.debug {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 600px;
  height: 400px;
  background: #0005;
  border-radius: 5px;
  color: white;
  font-size: 20px;
  overflow-y: scroll;
  padding: 10px 20px;
}
