/* Layout */

:root {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    background: #111;
    color: #eee;
  }
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}

footer {
  margin: 16px 0;
  color: #555;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}
@media (prefers-color-scheme: dark) {
  footer {
    color: #aaa;
  }
}
footer > * {
  margin: 10px 0;
}
footer a {
  color: inherit;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
footer .brand {
  color: rgb(210, 0, 210);
  font-weight: bold;
}
footer .links {
  display: flex;
  gap: 16px;
}

/* Simple pages (privacy, contact, errors, ...) */

.narrow {
  max-width: 480px;
  margin: auto;
}

/* Home page */

.home section {
  max-width: 600px;
  margin: 16px auto;
}
.home h1, .home h2, .home p {
  margin-top: 16px;
  margin-bottom: 16px;
}
.home .header {
  text-align: center;
}
.home h1 {
  font-size: 3em;
  font-weight: normal;
}
.home .fancy {
  font-weight: bold;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: linear-gradient(to right, #a31aff, #e44cff);
}
.home .questions h2 {
  font-weight: normal;
}
.home .warning {
  padding: 0.5em;
  margin: 0.5em 0;
  border-radius: 0.5em;
  background: rgba(255, 0, 0, 0.245);
  border: 1px solid rgba(255, 0, 0, 0.604);
  font-weight: bold;
}

.upload {
  position: relative;
  padding: 1em 0;
  width: 100%;
  height: 100px;
  box-sizing: border-box;
  color: #555;
  border: 0.25em dashed currentColor;
  border-radius: 0.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}
@media (prefers-color-scheme: dark) {
  .upload {
    color: #aaa;
  }
}
.upload.dropping {
  color: #55a;
}
.upload:focus-within {
  outline: 2px solid #55a;
}
.upload.uploading {
  cursor: auto;
}
.upload-label {
  font-size: 1.25em;
  margin-bottom: 8px;
}
.upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.progress-outer {
  width: 200px;
  height: 8px;
  border: 1px solid black;
  background-color: black;
}
.progress-inner {
  width: 0;
  height: 100%;
  background-color: white;
}
@media (prefers-color-scheme: dark) {
  .progress-outer {
    border-color: white;
  }
}

.uploaded-project {
  color: black;
  margin: 1em 0;
  padding: 0.5em;
  background: rgb(113, 255, 113);
  border: 1px solid rgb(46, 216, 46);
  border-radius: 0.5em;
}
.uploaded-project a {
  color: blue;
}
.uploaded-project a:active {
  color: red;
}

/* Project page */

.details {
  max-width: 480px;
  margin: auto;
}

.project-title {
  display: block;
  font: inherit;
  font-size: 2em;
  background: none;
  padding: 0;
  margin: 1rem 0;
  border: none;
  width: 100%;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-description {
  display: block;
  font: inherit;
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  min-height: 100px;
  padding: 0.5em;
  border-radius: 0.5em;
  margin: 1em 0;
  box-sizing: border-box;
  border: 1px solid #b9d6ff;
  background-color: #dbebff;
}
@media (prefers-color-scheme: dark) {
  .project-description {
    border-color: #2063c1;
    background-color: #184677;
  }
}

.report summary {
  cursor: pointer;
}
.report textarea {
  width: 100%;
  height: 100px;
  box-sizing: border-box;
}

/* Project player */

.player {
  margin: 1em auto;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 480px;
  /* 360px stage + 48px controls */
  height: 408px;
}
.player > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.player.loading .sc-root {
  visibility: hidden;
}

.sc-canvas {
  border-radius: 0.5em;
  box-shadow: 0 0 0 1px #aaa;
}
@media (prefers-color-scheme: dark) {
  .sc-canvas {
    box-shadow: 0 0 0 1px #555;
  }
}
.player.fullscreen .sc-canvas {
  box-shadow: none;
  border-radius: 0;
}

.flag-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  margin: 0;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  color: green;
  font-size: 72px;
  cursor: pointer;
}
.flag-icon {
  width: 80px;
  height: 80px;
  padding: 16px;
  border-radius: 100%;
  background: rgba(255, 255, 255, 0.75);
  border: 3px solid hsla(0, 100%, 100%, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.player-loading, .player-error {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: black;
  color: white;
  flex-direction: column;
}
.loading-bar-outer {
  width: 200px;
  height: 10px;
  position: relative;
  border: 1px solid white;
}
.loading-bar-inner {
  height: 100%;
  width: 0;
  background: white;
}
.error-title {
  font-size: 2em;
  margin: 0;
}
.error-details {
  font-family: monospace;
}

.control-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  width: 2rem;
  height: 2rem;
  padding: 0.375rem;
  margin: 0.5rem 0;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  border: 0;
  border-radius: 4px;
}
.control-button:hover {
  background: rgba(128, 0, 128, 0.2);
}
.control-button.active {
  background: rgba(128, 0, 128, 0.4);
}
.turbo-indicator {
  display: flex;
  align-items: center;
  padding: 0.25rem;
  user-select: none;
  -webkit-user-select: none;
}
.turbo-icon {
  margin: 0.25rem;
}
.turbo-label {
  font-size: 0.625rem;
  font-weight: bold;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: hsla(38, 100%, 55%, 1);
  white-space: nowrap;
}
.turbo-indicator[hidden] {
  display: none;
}
.fullscreen-button {
  background: white !important;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Admin */

.admin-report textarea {
  width: 500px;
  height: 100px;
  box-sizing: border-box;
}
.admin-report.dismissed {
  text-decoration: line-through;
  opacity: 0.5;
}
