@charset "UTF-8";
:root {
  --background-color: #333;
  /* --background-hearder-color: rgb(123, 50, 150); */
  --purple-color: rgb(94, 23, 235);
  --link-text-color: antiquewhite;
  /* 5e17eb - 94 23 235 */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100svh;
  min-width: 100dvw;
}

body {
  background-color: var(--background-color);
  /* font-family: 'Courier New', monospace; */
  font-family: Georgia, serif;
  /* font-family: Tahoma, Verdana, sans-serif; */
  font-size: small;
  color: var(--link-text-color);
  max-height: 100svh;
  max-width: 100dvw;
  overflow: hidden;
  line-height: 2;
}

h1 {
  color: var(--link-text-color);
}

header {
  align-content: flex-start;
  align-items: flex-end;
  background-color: black;
  display: flex;
  height: 7rem;
  justify-content: left;
  min-width: 100%;
}

header > img {
  color: var(--link-text-color);
  align-self: center;
  padding: 0 1rem;
}

/* Navbar */
nav {
  background-color: #000c;
  width: 100%;
}

.primary-navigation ul {
  display: flex;
  list-style: none;
  gap: .5rem;
}

.primary-navigation a {
  display: inline-block;
  color: var(--link-text-color);
  text-decoration: none;
  width: 100%;
}

.menu-nav-toggle {
  display: none;
}

.primary-navigation .active, nav a:hover {
  background-color: var(--background-color);
}


@media screen and (min-width:750px) {
  .primary-navigation ul {
    margin-left: 5rem;
    justify-content: flex-end;
  }
  
  .primary-navigation > ul > li:last-child {
    margin-left: auto;
    margin-right: .5rem;
  }
  
  .primary-navigation li {
    height: 32px;
  }
  
  .primary-navigation a {
    display: inline-block;
    height: 100%;
    padding: 8px 16px 4px 16px;
    text-align: center;
  }
  
  .primary-navigation .active, nav a:hover {
    border-radius: 10px 10px 0 0;
  }
}

@media screen and (max-width: 750px) {
  h1 {
    font-size:large ;
  }
  main {
    border: none;
  }
  nav {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 100svh;
  }
  .menu-nav-toggle[aria-expanded="true"] {
    background-image: url(images/closemenu.svg);
  }
  .menu-nav-toggle {
    display: block;
    color: #333;
    background-color: transparent;
    background-image: url(images/openmenu.svg);
    background-repeat: no-repeat;
    background-position: center;
    width: 2rem;
    aspect-ratio: 1;
    position: absolute;
    top: .5rem;
    right: .5rem;
    border: 0;
    z-index: 999;
  }
  .primary-navigation[data-visible="true"] {
    display: block;
  }
  .primary-navigation {
    display: none;
    padding-top: min(10vh, 3rem);
  }
  .primary-navigation ul {
    flex-direction: column;
  }
  .primary-navigation li {
    height: 34px;
    margin-bottom: .5rem;
    border-top: var(--link-text-color) solid 1px;
    border-bottom: var(--link-text-color) solid 1px;
  }
  .primary-navigation a {
    text-align: left;
    padding-left: 1rem;
    line-height: 32px;
    height: 32px;
    width: 100%;
  }
  header button {
    display: block;
  }
}

/* Main content */
main {
  border-left: 1px solid var(--link-text-color);
  border-right: 1px solid var(--link-text-color);
  display: flex;
  justify-content: center;
  height: calc(-7rem - 32px + 100svh);
  margin: 0 auto;
  max-width: 960px;
  width: 100%;
  min-height: 100%;
}

main > div > span {
  display: flex;
  background-color: #eee;
  margin-bottom: .5rem;
}

/* Form */
input[type=checkbox] {
  accent-color: var(--purple-color);
  margin-right: .2rem;
}

input[type=button] {
  background-color: var(--background-color);
  border: 1px solid;
  border-radius: 2px 10px;
  color: var(--link-text-color);
  cursor: pointer;
  margin: 4px 2px;
  padding: 12px 32px;
  text-decoration: none;
}

input[type=button]:hover {
  background-color: var(--purple-color);
}

input[type=button]:disabled {
  background-color: grey;
  cursor: default;
}

#container {
  align-items: center;
  display: flex;
  flex-flow: column;
  max-width: 960px;
  min-width: 370px;
  min-height: 100%;
  width: 100%;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
}

#buttonwrap {
  display: flex;
  flex-flow: row;
  margin-bottom: .5rem;
}

#question {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 2fr 1fr;
  justify-content: center;
  margin-bottom: .5rem;
  padding: 0.5rem;
  width: 100%;
  min-width: 370px;
  max-width: 500px;
  color: black;
  line-height: 1;
}

#question > p {
  grid-column: 1;
  grid-row: 1;
  text-align: center;
}

#question > label {
  justify-self: start;
}

#question > input {
  grid-column: 1;
  justify-self: end;
}

.correct {
  background-color: lightgreen;
}

.wrong {
  background-color: lightcoral;
}

/* Footer */
footer {
  background-color: black;
  bottom: 0;
  color: var(--link-text-color);
  height: 32px;
  left: 0;
  padding-top: 0.5rem;
  position: fixed;
  text-align: center;
  width: 100vw;
}

@media screen and (max-width: 960px) {
  main {
    border: none;
  }
}

@media screen and (max-width: 375px) {
  main {
    justify-content: flex-start;
  }
}

/* Sudoku Grid */
.sudoku {
  text-align: center;
}

#sudoku input[type=text]{
  border: none;
  width: 2rem;
  aspect-ratio: 1;
  font-size: 1.5rem;
  text-align: center;
  color: var(--purple-color);
  margin: 1px;
}

#sudoku input[type=text]:focus {
  background-color: lightblue;
}

#sudoku input[type=text]:read-only {
  color: darkgrey;
}

#sudoku input:nth-of-type(9n-3) {
  margin-right: 5px;
}

#sudoku input:nth-of-type(9n-6) {
  margin-right: 5px;
}

#sudoku input:nth-of-type(-n+27):nth-of-type(n+19) {
  margin-bottom: 5px;
}

#sudoku input:nth-of-type(-n+54):nth-of-type(n+46) {
  margin-bottom: 5px;
}

//-----------------
// ARC
//-----------------

.arc-area-controls,
.arc-sub-controls {
  grid-column-start: 1;
  grid-column-end: 4;
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.arc-area {
  background: #0e0e19;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  width: fit-content;
}

.arc-level-area {
  display: grid;
  grid-template-columns: auto auto auto;
}

.arc-subsection {
  margin-top: 16px;
  margin-right: 12px;
  min-width: fit-content;
  flex-grow: 1;
  text-align: center;
}

.arc-reset-btn {
  padding: 2px 8px;
  height: 2rem;
  font-size: 12px;
  cursor: pointer;
}

.arc-done-btn {
  padding: 2px 8px;
  height: 2rem;
  font-size: 12px;
  cursor: pointer;
}

.arc-image-row {
  display: flex;
  flex-flow: column;
  gap: 12px;
  margin: 8px auto 0 auto;
  width: fit-content;
}

.arc-image-card {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.arc-image-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.arc-image-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: background-color 0.15s ease;
}

/* Minus (left side) */
.arc-image-card.arc-hover-minus::before {
  background:
    linear-gradient(
      to right,
      rgba(220, 60, 60, 0.35) 0%,
      rgba(220, 60, 60, 0.35) 50%,
      transparent 50%,
      transparent 100%
    );
  border-radius: 10px 0 0 10px;
}

/* Plus (right side) */
.arc-image-card.arc-hover-plus::before {
  background:
    linear-gradient(
      to right,
      transparent 0%,
      transparent 50%,
      rgba(60, 180, 90, 0.35) 50%,
      rgba(60, 180, 90, 0.35) 100%
    );
  border-radius: 0 10px 10px 0;
}

.arc-image-card::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  font-weight: bold;
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* − symbol */
.arc-image-card.arc-hover-minus::after {
  content: '−';
  left: 10%;
  opacity: 0.9;
}

/* + symbol */
.arc-image-card.arc-hover-plus::after {
  content: '+';
  right: 10%;
  opacity: 0.9;
}

.arc-image-card.zero {
  filter: grayscale(1) brightness(0.6);
}

.arc-image-card.zero .counter {
  opacity: 0.6;
}

.arc-counter {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.1rem;
}

.arc-reset-btn,
.arc-done-btn {
	background-color: #5F16EF;
	border: none;
	color: white;
	padding: 5px 8px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	/* font-size: 16px; */
	margin: 4px 2px;
	cursor: pointer;
}