/*! modified:
 * concrete.css v3.0.0 | MIT License | github.com/louismerlin/concrete.css
 */

/* @import url('https://fonts.googleapis.com/css2?family=Varela+Round:ital,wght@0,400;0,700;1,400;1,700&display=swap');

* {
  font-family: "Varela Round", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
} */

:root {
  --fg: #ffe;
  --bg: #112;
  --shade: #889;
  --radius: 4px;
}

@media (prefers-color-scheme: light) {
  :root {
    --fg: #112;
    --bg: #ffe;
    --shade: #889;
  }
}

html {
  font-size: 1.25rem;
  box-sizing: border-box;
}

*, ::after, ::before {
  box-sizing: inherit;
  text-decoration-thickness: .1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Helvetica, Arial, sans-serif;
  padding: 1em;
}

footer {
  text-align: center;
  padding: 2em 0px;
}

html, body, #app {
  min-height: 100%;
  height: 100%;
}

#app {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1em;
}

a {
  color: var(--fg);
}

figure {
  margin: 0;
}

figcaption {
  text-align: right;
  font-size: 0.8em;
  border-bottom: .2rem solid var(--fg);
  padding-bottom: .2rem;
}

img, canvas {
  max-width: 100%;
  height: auto;
}

main section + section {
  padding: 2rem 0;
}

body header,
body main,
body footer {
  margin: 0px auto;
  padding-left: 10px;
  padding-right: 10px;
  width: 100%;
}

body main {
  max-width: 100%;
  width: 800px;
  flex-grow: 1;
}

body > header {
  padding-top: 8rem;
  padding-bottom: 8rem;
  font-size: 1.2em;
}

h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.17em; }
h4 { font-size: 1.00em; }
h5 { font-size: 0.83em; }
h6 { font-size: 0.67em; }

footer img.me {
  width: 2em;
  margin: 0.5em 0.5em;
  border-radius: 2em;
  vertical-align: middle;
}

footer a.preserve {
  white-space: nowrap;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
  padding: .2rem .5rem;
  font-size: 1rem;
  font-weight: normal;
  margin-bottom: .5rem;
  background: var(--fg);
  color: var(--bg);
  border: .1rem solid var(--fg);
  border-radius: var(--radius);
  cursor: pointer;
}

ul {
  list-style: square;
}

nav {
  margin: 0.5em 0;
}

nav ul {
  padding: 0;
  list-style: none;
}

nav ul li {
  margin: 0 .2rem;
  display: inline-block;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header nav > * {
  margin: 0px;
}

fieldset {
  border: .1rem solid var(--fg);
}

label, legend {
  display: block;
  font-weight: bold;
  margin-bottom: .4rem;
}

input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="url"],
input,
textarea,
select {
  appearance: none;
  box-shadow: none;
  box-sizing: inherit;
  padding: .5rem .5rem;
  width: 100%;
  font-size: 1rem;
  color: var(--fg);
  background-color: var(--bg);
  border: .1rem solid var(--fg);
  border-radius: var(--radius);
  font-family: Helvetica, Arial, sans-serif;
}

button:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled,
input[type="submit"]:disabled,
input:disabled,
textarea[readonly]{
  cursor: not-allowed;
  background: var(--shade);
  border: 2px solid var(--shade);
}

/**
 * Set margin for form elements.
 */

fieldset, input, select, textarea {
  margin: 0 0 .8rem 0;
}

input::placeholder,
textarea::placeholder {
  color: var(--fg);
  font-style: italic;
  opacity: 1;
}

table {
  width: 100%;
  border-spacing: 0;
}

td, th {
  padding: .4rem;
}

td:first-child, th:first-child {
  padding-left: 0;
}

td:last-child, th:last-child {
  padding-right: 0;
}

th {
  border-bottom: .1rem solid var(--fg);
  text-align: left;
}

td {
  border-bottom: .05rem solid var(--fg);
}

blockquote, pre {
  margin-left: 0;
  margin-right: 0;
  padding: .5rem .8rem;
  border-left: .1rem solid var(--fg);
  overflow-y: hidden;
}

pre {
  border: .05rem dotted var(--fg);
  border-left: .1rem solid var(--fg);
}

pre > code {
  white-space: pre;
  display: block;
  font-size: .8rem;
}

progress {
  -moz-appearance: none;
  -webkit-appearance: none;
  display: block;
  height: .5rem;
  overflow: hidden;
  padding: 0;
  width: 100%;
  background: var(--bg);
  color: var(--fg);
  border: .1rem solid var(--fg);
  border-radius: var(--border-radius);
}

progress::-webkit-progress-bar {
  background-color: var(--bg);
}

progress::-webkit-progress-value {
  background-color: var(--fg);
}

progress::-moz-progress-bar {
  background-color: var(--fg);
}

hr {
  border: .05rem solid var(--fg);
}

.warning {
  border-color: red;
}

/* layout */

.spread {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

/* special */

i.icon, inline-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  vertical-align: middle;
  margin: 0px 0.25em;
}

i.icon > svg {
  width: 1em;
  height: 1em;
  margin-top: -0.125em;
}

button i.icon > svg {
  width: 1.5em;
  height: 1.5em;
  margin: 0px;
}

row-group {
  display: flex;
  justify-content: end;
  align-items: stretch;
  gap: 1em;
}

row-group > * {
  margin: 0;
}

[data-notification-text] {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

[data-notification-text]::before {
  content: "";
  visibility: visible;
  opacity: 1;
  position: absolute;
}

[data-notification-text].notify::before {
  content: attr(data-notification-text);
  background-color: rgba(0,0,0,0.3);
  color: var(--fg);
  padding: 0.25em;
  transition: visibility 0s 2s, opacity 1s 1s linear, display 0s 0s;
  visibility: hidden;
  opacity: 0;
  margin: 0px;
  margin-top: -3.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 8em;
  border-radius: var(--radius);
}

.error {
  background-color: #782828;
  padding: 0.5em 1em;
  border-radius: var(--radius);
}

.clickable {
  cursor: pointer;
}

.modal {
  position: fixed;
  z-index: 1;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0,0,0,0.5);
}

.modal > * {
  min-width: 50%;
  max-width: 90%;
  max-height: 90%;
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1em;
  border-radius: var(--radius);
}

/*** application specific ***/

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1em;
  border-bottom: .1rem solid var(--fg);
}

.tab-button {
  background: transparent;
  color: var(--fg);
  border: none;
  border-bottom: .2rem solid transparent;
  border-radius: 0;
  padding: .5rem 1rem;
  margin: 0;
  cursor: pointer;
  font-size: 1rem;
}

.tab-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
  border-bottom-color: var(--fg);
  font-weight: bold;
}

.videos-section h3 {
  text-align: center;
}

.videos-list {
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
}

.video-item {
  width: 320px;
  height: 280px;
}

.video-item .clickable-area {
  cursor: pointer;
}

.video-item .video-title {
  cursor: pointer;
  flex: 1;
}

.video-item .video-controls {
  flex: 0;
}

.video-item.viewed {
  opacity: 0.6;
}

.setting-group h3 {
  margin-top: 3em;
  border-bottom: 1px solid var(--fg);
}

/* Modal styles */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.9) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 9999 !important;
  padding: 10px !important;
  box-sizing: border-box !important;
}

.modal-content {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  background: #000 !important;
  border-radius: var(--radius) !important;
  overflow: hidden !important;
}

.modal-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 10000 !important;
  background: rgba(0, 0, 0, 0.7) !important;
  border: none !important;
  color: white !important;
  padding: 8px !important;
  border-radius: var(--radius) !important;
  cursor: pointer !important;
  width: 40px !important;
  height: 40px !important;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.9) !important;
}

#youtube-player {
  width: 100% !important;
  height: 100% !important;
  border-radius: var(--radius) !important;
  border: none !important;
}

#youtube-player iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

/*** loading spinner ***/

.spin {
  animation: spin 1s linear infinite;
}

.loading {
  display: flex;
  flex-direction: column;
  gap: 2em;
  justify-content: center;
  align-items: center;
  height: 100%;
  margin: 1em;
}

.loading > div:first-child {
  animation: spin 0.33s linear infinite;
  width: 2em;
  height: 2em;
  border-radius: 24px;
  border: 3px solid transparent;
  border-left: 3px solid silver;
  border-right: 3px solid silver;
}

.loading[data-size="small"] {
  margin: 0;
  height: 100%;
}

.loading[data-size="small"] > div:first-child {
  width: 1.5em;
  height: 1.5em;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* mobile tweaks */

@media (max-width: 500px) {
  ul.log action-buttons inline-icon {
    padding: 0.1em;
  }

  body {
    padding: 0.1em;
  }

  header {
    padding: 0px !important;
  }

  nav ul li {
    margin: 0;
  }
}

@media (max-width: 900px) {
  header {
    padding: 0px !important;
  }
}
