/* ==========================================================================
   CSS Diner — Light / Monochrome / Flat redesign
   No rounded corners, no gradients, no color — grayscale only.
   ========================================================================== */

:root {
  --white:       #ffffff;
  --grey-100:    #f7f7f7;
  --grey-200:    #eeeeee;
  --grey-300:    #dddddd;
  --grey-400:    #cccccc;
  --grey-500:    #999999;
  --grey-600:    #777777;
  --grey-700:    #555555;
  --grey-800:    #333333;
  --black:       #111111;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
}

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

html,body {
  margin: 0;
  padding: 0;
  overflow-y: hidden;
}

body {
  background: var(--white);
  position: relative;
}

body * {
  font-family: var(--font-main);
}

h1, h2, h3, h4, h5 {
  font-weight: 600;
}

header {
  padding: 12px 15px 11px 35px;
  color: var(--grey-600);
  text-align: left;
  border-bottom: 1px solid var(--grey-300);
}

.logo {
  cursor: default;
  transform: scale(.2);
  position: absolute;
  top: 12px;
  left: 10px;
  color: var(--grey-700);
}

.logo plate {
  z-index: 500;
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  opacity: .8;
  transition: all opacity .1s ease-out;
}

.logo:hover plate {
  opacity: 1;
  transform-origin: bottom;
  animation: strobeStart .5s ease-out, strobe 1s infinite;
  animation-delay: 0s, .5s;
}

.table-wrapper {
  margin-top: 10px;
  transform: rotateX(20deg);
  min-height: 142px;
  transform-origin: bottom;
  z-index: 9999;
  position: relative;
  margin: 10px auto 0 auto;
  width: 250px;
}

.table {
  transform-style: preserve-3d;
  outline: solid 1px transparent;
  margin: 0px auto 0px auto;
  min-height: 142px;
  padding: 15px 15px 22px 15px;
  display: inline-block;
  z-index: 999;
  position:relative;
  white-space: nowrap;
}

.table-surface {
  background: var(--grey-200);
  border-top: 1px solid var(--grey-400);
  position: absolute;
  height: 100%;
  bottom: 0;
  width: 100%;
}

.table plate {
  z-index: 99999;
}

.table-edge  {
  width: 250px;
  margin: 0 auto 10px auto;
  background: var(--grey-400);
  height: 15px;
  transform: rotateX(-40deg);
  transform-origin: top;
  z-index: 2;
}

.table-leg {
  width: 24px;
  height: 10px;
  background: var(--grey-600);
  position: absolute;
  top: 15px;
}

.table-leg:first-child {
  left: 20px;
}

.table-leg:last-child {
  right: 20px;
}

orange, apple, pickle, bento, plate {
  transition: transform ease-out .2s;
}

.pop {
  animation: pop .2s;
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(.3);
    transform-origin: center;
  }
  60% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.clean {
  animation: cleanme .2s 1;
  transform: translateY(-600px);
}

@keyframes cleanme {
  0% {   transform: translateY(0px) rotate3d(0,0,0,0deg); }
  100% { transform: translateY(-600px) rotate3d(0,0,0,0deg);}
}

bento, plate {
  display: inline-block;
  width: 100px;
  height: 100px;
  margin: 0 10px;
  position: relative;
}

plate {
  border: solid 2px var(--black);
  border-bottom: solid 5px var(--black);
  background: var(--white);
}

bento {
  height: 100px;
  background: var(--grey-800);
  position: relative;
  border: solid 2px var(--black);
  border-width: 20px 2px;
}

plate bento {
  height: 74px;
  width: 74px;
  position: absolute;
  top: -8px;
  left:4px;
}

plate bento apple,
plate bento orange {
  top: -36px !important;
}

bento:before {
  content:"";
  position: absolute;
  width: calc(100%);
  top: 0;
  left:0;
  border: solid 10px rgba(0,0,0,.25);
  border-width: 10px 0 0 0px;
}

.editor {
  position: relative;
  text-align: left;
  width: 90%;
  margin: 0 auto;
  border: solid 2px var(--black);
  overflow: hidden;
}

.editor-pane {
  float: left;
  width: 50%;
}

.editor-pane:last-child {
  border-left: solid 1px var(--grey-300);
}

.editor * {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 150%;
  padding: 0;
  margin: 0;
}

.editor .input-header {
  text-align: left;
  padding: 10px 15px;
  background: var(--grey-100);
  border-top: solid 1px var(--grey-300);
  border-bottom: solid 1px var(--grey-300);
  color: var(--grey-700);
  font-family: var(--font-main);
}

.markup {
  line-height: 150%;
  font-family: var(--font-mono);
  z-index: 1;
}

.editor .file-window {
  padding: 10px 10px 10px 46px;
  position: relative;
  min-height: 432px;
}

.editor .css-view {
  background: var(--grey-100);
  color: var(--grey-500);
}

.editor .file-name {
  float: right;
  opacity: .6;
}

.editor .line-numbers {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-mono);
  padding: 10px 10px;
  height: 100%;
  line-height: 150%;
  text-align: right;
}

.css-view .line-numbers {
  color: var(--grey-500);
  background: var(--grey-200);
  border-right: solid 1px var(--grey-300);
}

.html-view .line-numbers {
  color: var(--grey-500);
  border-right: solid 1px var(--grey-300);
}

.html-view .file-window {
  background: var(--grey-100);
}

.editor input {
  font-family: var(--font-mono);
  color: var(--black);
  border: none;
  width: calc(100% - 44px);
  background: none;
}

.editor input.input-strobe {
  background: var(--grey-200);
  -webkit-animation: input .5s infinite;
  -moz-animation: input .5s infinite;
}

@-webkit-keyframes input {
  50% { background:none ; }
}

@-moz-keyframes input {
  50% { background:none ; }
}

.editor input:focus {
  outline: none;
}

.result {
  padding: 10px 0;
  color: var(--grey-500);
  margin: 0 auto;
  text-align: center;
  font-size: 30px;
}

apple {
  background: var(--black);
  border-color: var(--black);
}

orange {
  background: var(--white);
  border-color: var(--black);
  border-style: solid;
}

pickle {
  background: var(--grey-600);
  border-color: var(--black);
}

orange,apple,pickle {
  display: inline-block;
  margin: 0 10px;
  height: 60px;
}

carrot {
  background: var(--grey-200);
  width: 60px;
  height: 60px;
  display: inline-block;
  border-style: solid;
  border-color: var(--black);
  border-width: 2px;
  margin: 20px 10px;
}

orange,apple {
  border-style: solid;
  border-width: 2px 4px 15px 4px;
  height: 60px;
  width: 60px;
  position: relative;
  margin: 20px 10px;
}

orange.small,
apple.small {
  height: 30px;
  width: 30px;
  border-width: 2px 4px 8px 4px;
  margin: 30px 10px;
}

pickle {
  width: 25px;
  display: inline-block;
  position: relative;
  border: solid 2px var(--black);
  border-width: 2px 2px 9px 2px;
  margin: 20px 10px;
}

pickle.small {
  height: 40px;
  width: 18px;
  border-width: 1px 2px 6px 2px;
  margin: 30px 10px;
}

orange:before {
  content: "";
  display: block;
  position: absolute;
  border: solid 1px var(--black);
  height: 30%;
  width: 30%;
  top: 0px;
  left: calc(50% - 15%);
}

apple:before {
  content: "";
  display: block;
  position: absolute;
  background: var(--grey-600);
  height: 30%;
  width: 30%;
  top: 0px;
  left: calc(50% - 15%);
}

/*FRUITS ON A PLATTER*/

bento orange,
bento apple,
plate orange,
plate apple
 {
  left: calc(50% - 30px);
  margin: 0;
  position: absolute;
}

plate > apple:last-child,
plate > orange:last-child,
bento > apple:last-child,
bento > orange:last-child
{
  top: calc(50% - 35px);
}

plate .small,
bento .small {
  left: calc(50% - 15px);
  margin-left:0;
  margin-right:0;
}

plate > .small:only-child,
bento > .small:only-child {
  position: absolute;
  top: calc(50% - 15px);
  margin:0;
}

plate > pickle:only-child,
bento > pickle:only-child {
  top: calc(50% - 40px);
  left: calc(50% - 10px);
  z-index: 99999;
  margin: 0;
  position: absolute;
}

plate > pickle.small:only-child,
bento > pickle.small:only-child {
  top: calc(50% - 22px);
  left: calc(50% - 8px);
  z-index: 99999;
}

.shake {
  animation: shake .1s 5;
}

@keyframes shake {
  0%   { transform: translateX(0); }
  25% {  transform: translateX(-5px); }
  50% {  transform: translateX(0); }
  75% {  transform: translateX(5px); }
}

.strobe {
  transform-origin: bottom;
  animation: strobeStart .5s ease-out, strobe 1s infinite;
  animation-delay: 0s, .5s;
}

@keyframes strobeStart {
  0% {
    transform:  skew(0deg,0deg) scaleY(1) ;
    animation-timing-function: ease-in;
   }
  40% {
    transform:  skew(0deg,0deg) scaleY(.9);
    animation-timing-function: ease-out;
  }
  100% { transform:   skew(4deg,0deg) scaleX(1); }
}

@keyframes strobe {
  0% { transform:   skew(4deg,0deg) scaleX(1); }
  10% { transform:  skew(1deg,0deg) scaleY(.9) ; }
  50% { transform:  skew(-4deg,0deg) scaleX(1); }
  60% { transform:  skew(-1deg,0deg) scaleY(.9) ; }
  100% {transform: skew(4deg,0deg) scaleX(1); }
}

.enter-button {
  background: var(--white);
  display: block;
  padding: 2px 10px 2px 10px;
  color: var(--black);
  border: solid 2px var(--black);
  position: absolute;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  top: 7px;
  right: 7px;
  z-index: 999999;
}

.enterhit {
  -webkit-animation: enterhit .1s 1;
  animation: enterhit .1s 1;
}

@-webkit-keyframes enterhit {
  50% {
    background: var(--black);
    color: var(--white);
  }
}
@keyframes enterhit {
  50% {
    background: var(--black);
    color: var(--white);
  }
}

.plus {
  color: var(--grey-600);
  padding: 0px 4px;
  font-size: 40px;
  display: none;
}

[data-hovered] {
  box-shadow: 0 0 0 3px var(--black);
}

plate [data-hovered] {
  box-shadow: 0 0 0 3px var(--black);
}

.helper {
  position: absolute;
  background: var(--black);
  padding: 10px 15px 12px 15px;
  z-index: 1000;
  font-size: 16px;
  color: var(--white);
  display: none;
  transform: rotateX(20deg);
  outline: solid 1px transparent;
  word-wrap: nowrap;
  white-space: nowrap;
  font-family: var(--font-mono);
}

plate:before {
  content: "";
  display: block;
  position: absolute;
  left: calc(50% - 32px);
  top: calc(50% - 32px);
  height: 65px;
  width: 65px;
  border-top: solid 3px var(--grey-400);
  opacity: .6;
}

#fancy:after {
  content: "";
  display: block;
  position: absolute;
  left: calc(50% - 47px);
  top: calc(50% - 44px);
  height: 68px;
  width: 74px;
  border: dashed 3px var(--black);
  opacity: .7;
}

orange {
  z-index: 1000;
}

.display-help {
  font-size: 15px;
  margin: 30px auto 0 auto;
  color: var(--grey-800);
}

.display-help .selector-name {
  font-size: 18px;
  margin: 0 0 4px 0 ;
}

.display-help .title {
  font-size: 18px;
  margin: 0 0 15px 0;
  font-weight: 300;
  opacity: .8;
}

.display-help .syntax {
  font-size: 22px;
  margin: 0;
  padding: 0;
  font-weight: 500;
  opacity: .9;
  margin-bottom: 18px;
  background: var(--grey-100);
  display: inline-block;
  padding: 5px 8px;
  border-bottom: solid 2px var(--grey-300);
  font-family: var(--font-mono);
}

.display-help .hint {
  margin-bottom: 20px;
  line-height: 150%;
}

.display-help .examples-title {
  margin: 45px 0 10px 0;
  padding: 0;
}

.display-help .hint,
.display-help .example {
  color: var(--grey-700);
  font-size: 15px;
}

.display-help .example {
  border-bottom: solid 1px var(--grey-300);
  padding: 10px 0 12px 0;
  line-height: 170%;
}

.display-help .example:last-child {
  border: none;
}

.display-help strong,
.display-help tag {
  color: var(--black);
  background: var(--grey-200);
  padding: 3px 6px 3px 6px;
  margin: 0px 2px;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: normal;
}

.display-help .example strong:first-of-type {
  margin-left: 0px;
}

.display-help .selector-wrapper {
  color: var(--grey-600);
}

.display-help .selector {
  display: none;
  background: var(--grey-200);
  margin: 5px 0 10px 0;
  padding: 14px 20px 14px 20px;
  font-size: 24px;
  border: solid 1px var(--grey-300);
  font-family: var(--font-mono);
  color: var(--grey-700);
  position: relative;
}

.display-help .selector:before {
  content: "試試看";
  color: var(--grey-500);
  position: absolute;
  font-size: 15px;
  font-weight: normal;
  top: 8px;
  left: -70px;
  padding: 10px;
}

board {
  display: none;
}

/* Fancy orange stacking */

plate apple,
plate orange {
  position: absolute;
}

plate apple:last-child,
plate orange:last-child {
  z-index: 300;
}

plate apple:nth-last-child(2),
plate orange:nth-last-child(2) {
  top: -25px;
  z-index: 400;
}

plate apple:nth-last-child(3),
plate orange:nth-last-child(3)
{
  top: -65px;
  z-index: 500;
}

plate apple:nth-last-child(4),
plate orange:nth-last-child(4)
{
  top: -105px;
  z-index: 600;
}

.teach-wrapper {
  border-right: solid 1px var(--grey-300);
  border-left: solid 1px var(--grey-300);
  font-size: 12px;
  top: 0px;
  right: 0px;
  bottom: 0px;
  text-align: left;
  margin: 0;
  padding: 27px 20px 20px 20px;
  color: var(--grey-500);
}

.markup * {
  font-family: var(--font-mono);
  cursor: default;
}

.game-wrapper {
  -webkit-perspective: 400px;
  transform: translate3d(0,0,0);
  perspective: 400px;
  text-align: center;
  position: relative;
  padding-top: 15px;
  margin-bottom: 50px;
}

.level-header {
  font-size: 24px;
  margin: 0;
  padding: 0 0 10px 0;
  color: var(--grey-700);
}

.level-header.completed .checkmark {
  opacity: 1;
  border: solid 3px var(--black);
  border-width: 0 4px 4px 0;
}

.level-header .checkmark {
  position: relative;
  display: inline-block;
  margin-left: 8px;
  width: 12px;
  height: 20px;
  border: solid 3px var(--black);
  border-width: 0 4px 4px 0;
  opacity: .2;
  top: -3px;
  transform: rotate(40deg);
}

.level-progress {
  width: 100%;
  background: var(--grey-300);
}

.level-progress .progress {
  background: var(--black);
  width: 10%;
  height: 2px;
  position: relative;
}

.level-progress .progress:after {
  content:"";
  position: absolute;
  right: -6px;
  top: -3px;
  height: 4px;
  width: 4px;
  border: solid 2px var(--white);
  background: var(--black);
}

.order {
  color: var(--black);
  font-size: 42px;
  margin: 0;
  font-weight: 600;
  text-align: center;
  padding: 20px 30px;
}

.info-wrapper {
  display: none;
}

.markup {
  line-height: 150%;
}

.markup * {
  color: var(--grey-500);
}

.markup .enhance {
  color: var(--black);
}

.markup div {
  padding-left: 20px;
}

.markup > div {
  padding-left: 0px;
}

.left-col {
  width: calc(100% - 375px);
  text-align: center;
  overflow-x: visible;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  background: var(--white);
}

.right-col {
  position: fixed;
  width: 375px;
  right: 0;
  top: 0;
  bottom: 0;
  background: var(--grey-100);
  border-left: solid 1px var(--grey-300);
  z-index: 1;
}

.level-menu {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow-y: hidden;
  transition: all .15s ease-in-out;
  background: var(--white);
  left: 500px;
  padding: 0;
  width: 100%;
}

.menu-open .level-menu {
  left: 0;
}

.levels {
  padding-bottom: 150px;
}

.level-menu h2 {
  font-size: 20px;
  color: var(--black);
  opacity: .7;
  font-weight: 600;
  margin: 0;
  padding: 23px 0 14px 16px;
}

.right-col {
  overflow: hidden;
}

.right-col .help-wrapper {
  padding: 20px;
  height: 100%;
  background: var(--white);
}

.level-menu .levels a {
  display: block;
  cursor: pointer;
  padding: 5px 12px 5px 22px;
  color: var(--grey-600);
}

.level-menu .level-syntax {
  position: relative;
  display: inline-block;
  font-family: var(--font-mono);
}

.level-menu .levels a.completed .checkmark {
  opacity: 1;
  border: solid 3px var(--black);
  border-width: 0 3px 3px 0;
}

.level-menu .levels a .checkmark {
  position: relative;
  display: inline-block;
  margin-right: 14px;
  width: 8px;
  height: 13px;
  border: solid 3px var(--black);
  border-width: 0 3px 3px 0;
  opacity: .2;
  top: -1px;
  transform: rotate(40deg);
}

.level-menu .levels a.current {
  font-weight: bold;
  color: var(--black);
  background: var(--grey-200);
}

.level-menu .levels a:hover {
  background: var(--grey-100);
}

.level-menu .level-number {
  opacity: .7;
  min-width: 24px;
  display: inline-block;
}

.level-menu-toggle-wrapper {
  position: absolute;
  top: 20px;
  right: 20px;
  height: 30px;
  padding: 4px 2px;
  opacity: .6;
  transition: linear all .05s;
  cursor: pointer;
}

.level-menu-toggle-wrapper:hover {
  opacity: 1;
}

.level-menu-toggle {
  height: 2px;
  width: 27px;
  background: var(--black);
  transition: all .15s ease-out;
  cursor: pointer;
  position: relative;
  top: 10px;
}

.menu-open .level-menu-toggle {
  background: rgba(0,0,0,0);
}

.level-menu-toggle:before, .level-menu-toggle:after {
  position: absolute;
  content: "";
  width: 100%;
  height: 2px;
  background: var(--black);
  transition: all .1s ease-out;
}

.level-menu-toggle:before {
  top: -10px;
  transform-origin: left;
}

.menu-open .level-menu-toggle:before {
  top: -9px;
  transform: rotate(45deg);
}

.level-menu-toggle:after {
  top: 10px;
  transform-origin: left;
}

.menu-open .level-menu-toggle:after {
  top: 10px;
  transform: rotate(-45deg);
}

.note {
  padding: 20px;
  width: 600px;
  color: var(--grey-700);
  background: var(--white);
  border: solid 2px var(--black);
  text-align: left;
  margin: 20px auto 20px auto;
  display: none;
}

.note h3 {
  color: var(--black);
  margin: 0px 0px 5px 0px;
  padding: 0px;
}

.note a {
  color: var(--black);
  background: var(--grey-200);
  font-weight: bold;
  text-decoration: none;
  padding: 2px 4px;
}

.note .note-toggle:hover {
  color: var(--black);
  background: var(--grey-300);
}

.note-toggle {
  background: var(--white);
  color: var(--black);
  border: solid 1px var(--black);
  padding: 8px 15px 10px 15px;
  text-decoration: none;
  display: inline-block;
}

.note-toggle:hover {
  background: var(--black);
  color: var(--white);
}

.note pre {
  background: var(--grey-100);
  border: solid 1px var(--grey-300);
  padding: 10px;
  font-family: var(--font-mono);
  margin: 0;
  font-size: 14px;
}

.note h4 {
  font-size: 15px;
  margin: 0 0 5px 0;
  padding: 0;
}

/* Winner screen */

.winner {
  font-size: 28px;
  color: var(--black);
  display: inline-block;
  padding: 5px 20px 0px  20px;
  margin: 0;
  font-weight: 400;
}

.winner strong {
  font-size: 38px;
}

/* Previous and next level navigation */

.level-nav {
  position: absolute;
  right: 60px;
  top: 20px;
  line-height: 0;
}

.level-nav a {
  padding: 5px;
  position: relative;
  height: 30px;
  width: 30px;
  display: inline-block;
  opacity: .4;
  transition: opacity .2s .ease-out;
}

.level-nav a:hover {
  opacity: .8;
}

.level-nav a:after {
  content: "";
  height: 18px;
  width: 18px;
  position: absolute;
  border: solid 2px var(--black);
  border-width: 2px 2px 0 0;
  transform-origin: center center;
  top: 6px;
  box-sizing: border-box;
}

.level-nav .previous:after {
  transform: rotate(-135deg);
  right: 2px;
}

.level-nav .next:after {
  transform: rotate(45deg);
  left: 2px;
}

.level-nav a.link-jiggle {
  animation: linkJiggle .2s ease-out;
}

@keyframes linkJiggle {
  0% {
    transform: scale(1);
  }
  10% {
    transform: scaleX(.87) scaleY(.8);
  }
  40% {
    transform: scale(1.13);
  }
}

/* Tag treatment for the level helpers & examples */

tag {
  padding: 0 3px;
  color: var(--grey-700);
  font-size: 13px;
  font-weight: bold;
}

tag:before {
  content: "<";
}

tag:after {
  content: ">";
}

.nametags {
  z-index: 1;
  width: 100%;
  position: absolute;
  bottom: 0;
}

.nametag {
  font-family: var(--font-main);
  font-weight: 600;
  position: absolute;
  bottom: -14px;
  color: var(--black);
  width: 80px;
  font-size: 14px;
  border: solid 1px var(--black);
  z-index: 9999;
  padding: 6px 0 6px 0;
  background-color: var(--white);
  text-align: center;
  animation: slide .4s ease-out;
}

@keyframes slide {
  0% {
    transform: translateY(-20px);
    animation-timing-function: ease-out;
  }
  50% {
    transform: translateY(2px);
    animation-timing-function: ease-in;
  }
  100% {
    transform: translateY(0px);
  }
}

/* Overrides for the custom scrollbar plugin */

.mCSB_scrollTools .mCSB_draggerRail,
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
  border-radius: 0;
}

.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{
  background-color: var(--grey-600); background-color: rgba(0,0,0,0.3);
}

.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar{
  background-color: var(--grey-700); background-color: rgba(0,0,0,0.5);
}
.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar,
.mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar{
  background-color: var(--black); background-color: rgba(0,0,0,.6);
}

.mCSB_inside > .mCSB_container{ margin-right: 0; }

.mCustomScrollBox {
 overflow: visible !important;
}

.mCSB_container {
  overflow: visible !important;
}

.reset-progress {
  display: block;
  text-align: center;
  text-decoration: none;
  position: relative;
  top: -20px;
  border: solid 2px var(--black);
  box-sizing: border-box;
  width: calc(100% - 40px);
  color: var(--black);
  margin:  0 auto;
  padding: 9px 0 11px 0;
  font-weight: 600;
}

.reset-progress:hover {
  background: var(--black);
  color: var(--white);
}
