body, html {
    font-family: 'Noto Sans', Arial,Helvetica,sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    min-width: 320px;
    font-size: 12px;
    color: #19191a;
    line-height: 18px;
}

html {
    overflow-y: scroll;
}

#teacher-page, #app {qbackground: #f1f1f1;}

*, ::after, ::before {
    box-sizing: border-box;
}

.hide {
    display:none!important;
}
.invisible {
    visibility: hidden;
}
.show {display:block!important;}
.hide-text {
    text-indent: -9999px;
}
section {
    margin: 10px 0;
}

a {
    text-decoration: none;
    color: #666666;
    font-weight: 700;
}
b {
    font-weight: bold;
}
#header {
    margin: 0;
    padding: 20px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #093863;
    color: #ffffff;
    margin-bottom: 1px;
}
#brand {font-size: 36px;text-align:left; display: inline-block;}
#brand a {color: inherit;line-height: 36px; display: inline-block;}
.zero {color:#f91092 ;}
.three {color: #3fccd4;}
#log-in {
    float:right;
    display: inline-block;
    top: 8px;
    position: relative;
}
#log-in .my-account {
    display: inline-block;
    margin-left: 0;}
#log-in .my-account span {display: inline-block;color: #ffffff;}

#solved {display: inline-block;
         top: -9px;
         position: relative;
         left: 20px;
}    
h1 {
    margin: 0;
    padding: 15px 10px;
    background: #093863;
    color: #ffffff;
    text-align: center;
}
h2 {
    margin: 0 0 10px 0;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: bold;
    background: #d3eaff;
    border-bottom: 1px solid #f1f1f1;
}

#qchallenge h2 {margin: -20px -20px 0px -20px;}

/* menu */
#menu-top {margin-top:-1px;}
.carousel-menu {
    padding: 0;
    position: relative;
    color: #fff;
    text-align: center;
}

.carousel-menu .scroll-container.fixed-menu {
    transition: margin .2s ease-in-out 0s;
    z-index: 6;
    margin-top: 0;
    height: 29px;
}
.carousel-menu .scroll-container {
    background: #093863;
    width: 100%;
}
.scroll-container {
    cursor: move;
    cursor: -webkit-grab;
    cursor: -moz-grab;
    position: relative;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    overflow-y: hidden;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    overflow: -moz-scrollbars-none;
}

@media (min-width: 460px) {
    .scroll-container {
        overflow-x: hidden;
    }
}

.carousel-menu .scroll-container .scroll-inner {
    padding: 0;
}
.scroll-container .scroll-inner {
    display: inline-flex;
    margin: 0;
    padding: 5px 0;
    position: relative;
    white-space: nowrap;
    border-left: 1px solid #ffffff;
    border-top: 1px solid #ffffff;
}

.carousel-menu .scroll-container .scroll-inner li {
    height: 28px;
    text-align: center;
}
.scroll-container .scroll-inner li {
    display: table-cell;
    list-style: none;
    text-align: center;
    margin: 0;
    vertical-align: top;
}

.carousel-menu .scroll-container .scroll-inner li .menu-item {
    display: inline-block;
    padding: 5px 10px;
    color: inherit;
    position: relative;
    font-size: 12px;
    border-right: 1px solid #fff;
}

.carousel-menu .scroll-container .scroll-inner li .menu-item.selected {
    background: #00b5ea;
    font-weight: 700;
}

/* form */
form {
    padding: 10px; 
    max-width: 600px;
    background: #ffffff;
    margin: 10px auto;
    border: 1px solid #ddd;}

.form-group {
    margin-bottom: 1rem;
}
.form-group-bottom {
    margin-bottom: 0;
}
.archive-group {
    border: none;
    text-align: center;
}
label {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

select.form-control[multiple], select.form-control[size] { height: 150px;}

.btn:not(:disabled):not(.disabled) {
    cursor: pointer;
}

.btn {
    display: inline-block;
    font-weight: bold;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    qfont-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.btn-primary {
    color: #340458;
    background-color: #b8ffe5;
    border-color: #b8ffe5;
}

.btn-primary:disabled {
    background: #fff;
    color: #ccc;
    border: 1px solid #ccc;
}

.btn-danger {
    color: #340458;
    background-color: #fcbebc;
    border-color: #fcbebc;
}
.btn-warning {
    color: #340458;
    background-color: #fff000;
    border-color: #fff000;
}

.btn-outline-danger {
    color: #340458;
    background-color: #ffffff;
    background-image: none;
    border-color: #fcbebc;
}

.btn-outline-info, .qhintarea {
    color: #093863;
    background-color: #ffffff;
    background-image: none;
    border-color: #093863;
    clear: both;
    display: inline-block;
    margin-bottom: 15px;
}

#csv-btn {margin: 0 10px;}
.hint {border: 1px solid #093863;padding:10px;}

.info-message {margin: 10px;}

.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

button {margin:0 0 10px 0;padding:7px; background: #ffffff; border-radius: 3px; border:1px solid #000000;}
button:hover {cursor:pointer; background: #ececec;}

.classes, .teachers, .pupils {display:flex;flex-wrap: wrap;}
/*.classes .class, .teachers .teacher, .pupils .pupil {flex: 1;margin-right: 10px;min-width: 320px; max-width:320px;width: 320px;margin-left:10px;background: #ececec;padding: 0 0 20px 0;margin-bottom: 20px; border: 1px solid #cccccc; border-radius: 0.25rem;}*/
.classes .class, .teachers .teacher, .pupils .pupil {flex: 1;min-width: 320px; max-width:320px;width: 320px; border-radius: 0.25rem;}
.delete-group {margin-top: -33px!important;border-top:0;text-align:center;}
.update-group {text-align:center;}
.class {border:1px solid #f1f1f1;}
.pupils .pupil, .class {margin: 20px 0 20px 20px}
.classes .class-name, .classes .teacher, .classes .pupil {padding:5px;}
.classes .class-name {background: #d5eff9;color: #17317f;border-radius: 0.25rem;}
.classes .teacher {background: #cccccc; color:#ffffff}
.teachers {margin: 10px 0;}
.teacher form {margin:10px;}

.classes table {margin: 0;    width: 100%;}
.classes td {border-color:#f1f1f1;}

.qdropdown-container {qdisplay:flex;}
.qdropdown-container span {qflex:1;text-align: right; padding-right: 10px;width:100px;display:inline-block;}
.qdropdown-container select {qflex: 4; padding-right: 10px;width: 200px;display:inline-block;}
.visible {display:block!important;}
/* coding stuff */

#teacher-page #qcontent {position: absolute; width: 100%; top: 0; left: 0; background: #ffffff; height: 1000px; z-index: 10;}
#close, #timer {cursor:pointer; position: absolute; top: 16px; right: 10px; z-index: 1000; display: inline-block; width: 45px; height: 20px;}
#timer {left:10px; width: 60px; background: #093863; color: #ffffff; padding: 2px 5px; text-align: center;cursor: inherit;}
#qcontent, #mc {display:block;}
qbody {margin: 0; padding:0;background: #F8F8F8;}
#qqqcontent div {margin: 0; padding:0;display:inline-block;}
canvas {width: 100%; position:absolute;top:0;left:0;padding-top:10px;}
#qcentre {display:block;max-width:1500px;text-align:center;margin:0 auto;}
#qcentre.factor-1 {max-width:850px;}
#qcentre.factor-2 {max-width:950px;}
#qcentre.factor-3 {max-width:1050px;}
#qcentre.factor-4 {max-width:1150px;}
#qchallenge {display:flex;}
#qcode h3 {font-size: 18px; padding: 0; margin: 20px 0;}
#qcode.mini {width:1150px;margin:0 auto;}
#qcode-wrap {flex:1;}
#qcode {margin:20px; padding:20px;font-size:18px;line-height: 22px; background:#fdfde5; max-width: 1500px; text-align:left;}
#qcode-tracker-wrap {margin:0 20px 10px 20px; padding: 20px; background:#fdfde5;}
#qcode-tracker-wrap h3 {text-align: left;
                        font-size: 20px;
                        margin-top: 0;}
#qcode-tracker {padding: 20px;font-family: 'courier new'; font-size:18px;line-height: 22px;background:#ffffff;border: 1px solid #333333; max-width: 1000px; text-align:left;}
#qcode table tr, #qcode table td, #qcode table th {padding: 0px 5px;text-align:center;}
#qcode table.left-align tr, #qcode table.left-align td, #qcode table.left-align th {text-align:left;}

.impacts td:nth-child(1), .impacts th:nth-child(1) { background-color: #e0f7fa;}
.impacts td:nth-child(2), .impacts th:nth-child(2) { background-color: #d5fcd5;}
.impacts td:nth-child(3), .impacts th:nth-child(3) { background-color: #fce4ec;}

#qcode table {margin: 2px auto;}
#qcode h2, #qlogic h2 {font-size:18px; }
#qlogic h2 {margin:-10px -10px 5px;}
.games-msg h2 {font-size:16px;}
#qcode p {margin: 0 0 10px 0;}
#qcode img {display:block; margin: 0 auto;border-radius: 5px;}
#qbuttons, #qtable, #qdrag, #qdrop, #qmultiplechoice {flex:2; position:relative;max-width:550px;padding-top:20px;}
#qdrop {max-width: inherit;margin-left:10px;}
#qtable, #qdrag, #qdrop {flex:1;} 
#qbuttons.factor-1 {max-width:100px;}
#qbuttons.factor-2 {max-width:250px;}
#qbuttons.factor-3 {max-width:350px;}
#qbuttons.factor-4 {max-width:450px;}
@media only screen and (max-width: 600px) {
    #qcode.mini {width:auto;}
    #qcentre {width:100%;}
    #qchallenge {qbackground:#f8f8f8;}
    #qchallenge, #qcode, #qbuttons, #qtable, #qmultiplechoice {display:block;margin-left:0; margin-right:0;}
    #qtable {padding-top:10px;}
    #qbuttons.factor-1 canvas {--width100: 50px; --mid:calc(100vw/2); --adj:calc(var(--mid) - var(--width100)); left: var(--adj);}
    #qbuttons.factor-2 canvas {--width200: 130px; --mid:calc(100vw/2); --adj:calc(var(--mid) - var(--width200)); left: var(--adj);}
    #qbuttons.factor-3 canvas {--width300: 180px; --mid:calc(100vw/2); --adj:calc(var(--mid) - var(--width300)); left: var(--adj);}
}

#qtable.max100 {max-width:100%;}
#qtable.games {font-size:16px;}
.games-msg {padding:20px; line-height: 22px; display:inline-block;text-align: left;background:#fdfde5;margin-bottom:10px;}
#qchallenge .games-msg h2 {margin-bottom: 20px;}
#qcontent #qsounds {display:none;}

#qmultiplechoice {background: #ffffff; padding: 20px 20px 0 20px;}
.mc-option {text-align:left; background: #f8f8f8; padding: 10px; border-radius: 10px;margin-bottom: 20px; font-size: 16px; border: 1px solid #cccccc; cursor:pointer;}
.mc-option.incorrect {border-color: red;}
.mc-option.correct {border-color: #32cd32;}
.mc-option:hover {background:#ececec}


/* minesweeper*/
.board {
    display: inline-block;
    margin: 20px;
}
.mcell {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    font-size: 20px;
    cursor: pointer;
    line-height:30px;

    /* Default color for unrevealed tiles */
    background-color: #ffffff;

    /* Default color for unrevealed tile text */
    color: #333333;
}
.revealed {
    /* Color for revealed tiles */
    background-color: #cccccc;

    /* Color for revealed tile text */
    color: #000000;
    font-weight:bold;
}
.mcell1 {color: #1f7ad5;}
.mcell2 {color: #418d39;}
.mcell3 {color: #ce2a27;}
.mcell4 {color: #7727a4;}
.mcell5 {color: #824747;}
.mcell6 {color: #16fbfb;}
.mcell7 {color: #000000;}
.mcell8 {color: #ececec;}

.mine {
    background-image: url(../img/classwork/year8/computational-thinking/bomb.jpg);
    background-size: 30px;
}
.flag {
    background-image: url(../img/classwork/year8/computational-thinking/flag.png);
    background-size: 30px;
}
.mine-count  {
    font-size: 16px;
    font-weight:bold;
}
.mine-count .flag {
    height: 30px;
    width: 30px;
    vertical-align: bottom;
    margin-top: 10px;}

.break {margin-top:10px;}

.qprogress {text-align:center;margin: 0px 85px 10px 85px;}
.qprogress .todo {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin: 10px 5px 0 0;
    text-align: center;
    padding-top: 5px;
    cursor: pointer;
    font-size: 12px;
}
.todo {
    background: #cccccc;
    border-radius: 15px;
}
.qprogress .done {
    background: green;
}
.qprogress .current, #back-to-tasks {
    text-decoration: underline;
    font-weight: bold;
}
#back-to-tasks {
    display: inline-block;
    vertical-align: top;
    margin: 15px 10px 0 0;
}

.qcircle {
    width: 20px; 
    height:20px;
    border-radius: 10px;
    display:inline-block; 
    margin:0 5px; 
    vertical-align: sub;
}

.qcommand {
    display:contents;  
}
.orange {color:#ff8c00;}
.yellow {color:#fdbc00;}
.green {color:green;}
.purple {color:purple;}
.sqlpurple {color:#eb80eb}
.blue {color:blue;font-weight:normal;}
.red, .red > * {color:red;}
.brown, .brown > * {color:#d38d47;}

.qinline-replace {display:contents; font-weight:bold;letter-spacing: 0em;}



/* qtable */
#qtable table {border-collapse: collapse; border-spacing: 0;margin-top:0}
#qtable input, #qtable input:focus { width: 65px; border: none; background:inherit; padding: 5px;text-align:center;outline: none;font-size:14px; word-spacing: 1.5px;}
#qqtable .small input, #qqtable .small input:focus { width: 50px;padding: 5px 3px;}
#qtable input.wide, #qtable input.wide:focus { width: 120px;}
#qtable td {padding: 0;text-align: center;}
#qtable span {padding: 5px 7px;font-size:16px; display:inline-block;}
#qtable input.incorrect {background: red;}
#qtable .btn {margin: 0 5px 10px 5px;}

#qchallenge.flex-col-reverse {flex-direction: column;}
.flex-col-reverse #qtable {max-width:100%;}
.flex-col-reverse #qtable.mega-cell input, .flex-col-reverse #qtable.mega-cell input:focus {width:750px;}
.flex-col-reverse #qtable.med-cell input, .flex-col-reverse #qtable.med-cell input:focus {width:300px;}
.flex-col-reverse #qcode-wrap {max-width:800px; margin: 0 auto 2px;}

/* qdragdrop*/
#qdrag, #qdrop {font-size: 18px;}
#qdrop .incorrect {border:1px solid red;}
#qdrop {  background: #ffffff; padding: 0 10px;}
#qdrop .btn {padding: 5px 7px;font-size:16px; display:inline-block;margin-bottom: 10px;}

.indent { width: 7%;  min-height: 33px;  padding: 0px;  border: 1px solid #ececec;  display:inline-block;  z-index:1;  overflow:visible;  box-sizing: border-box; }

.y4 {width:72%;}
#dragMain {
    width: 100%;
    min-height: 100px;
    padding: 0px;
    border: 1px solid #ececec;
    display:block;
    margin-bottom:10px;
    padding-bottom:40px;
    background: #ffffff;
}
#drag-drop {position:relative;background: #ffffff;margin: 20px auto; width:100%;display:inline-table;}
#drag-drop .y0.fill {width:100%;}
#drag-drop .y1.fill {width:93%;}
#drag-drop .y2.fill {width:86%;}
#drag-drop .y3.fill {width:79%;}

#drag-drop.dd-single .y0 {width:100%;}
#drag-drop.dd-mc .y1 {width:93%;}
.dd-mc .th .drag {justify-content: center;}
.dz.highlight {background:#fff000; color: #340458;}
.dz.fixed {background:#ffffff;}

#drag-drop .empty {width:0;border:none;}
#drag-drop tr {border:none; display:inline-flex; width:100%; padding:0;}
.drag {  display: flex; align-items: center; text-align: left; box-sizing: border-box;padding: 5px 5px;position:relative;z-index:20;width:100%;min-height:33px;background:#ffffff;cursor:pointer;border-top:1px solid #ffffff;border-bottom:1px solid #ececec;}
#qdrop .incorrect .drag {min-height:32px;}
p#drag-msg {background: #093863;color: #ffffff; padding: 10px;margin: 20px 0;}
.no-user-select, .question-explanation, #app #qcode {
    -webkit-user-select: none;  /* Safari */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* IE10+/Edge */
    user-select: none;          /* Standard */
}
table {user-select: text;}

#teacher-page .question-explanation {
    qdisplay: block;
    -webkit-user-select: text;  /* Safari */
    -moz-user-select: text;     /* Firefox */
    -ms-user-select: text;      /* IE10+/Edge */
    user-select: text;          /* Standard */
}

.drag {
    touch-action: none;
}

/* teacher page*/
.ui-timepicker-div dl dd {
    margin: 0 10px 10px 15%;
}

table {
    border-collapse: collapse;
    margin:10px auto;
    font-size: inherit;
}
table tr, table td, table th {border: 1px solid #cccccc; padding: 5px 10px; text-align: left;background:#ffffff;}
tfoot td {text-align: center;}
.th-quiz {cursor: pointer;}
.col, .scheduled-quiz .qprogress .col {
    display: inline-block;
    width: 17px;
    height: 17px;
    background: #cccccc;
    border-radius: 15px;
    margin: 0 5px 0 0;
    text-align: center;
    font-size: 8px;
    color: #ffffff;
}

.col-0, .scheduled-quiz .qprogress .col-0 {background: #cccccc;}
.col-1 {background: #32CD32;}
.col-2 {background: #FF8C00;}
.col-3 {background: #FF0000;}
.col-4 {background: #000000;}
.col-5 {background: #a027ff;cursor:pointer;}
.scheduled-quiz .qprogress .col-1,.scheduled-quiz .qprogress .col-2, .scheduled-quiz .qprogress .col-3, .scheduled-quiz .qprogress .col-4 {background: #32CD32;}


.show-results .col.to-complete, .scheduled-quiz .qprogress .col.to-complete {border-radius: 0;background: #cccccc;}
.show-results .col-0, .scheduled-quiz .qprogress .col-0 {background: #cccccc;}
.show-results .col-1, .scheduled-quiz .qprogress .col-1 {background: #32CD32;}
.show-results .col-2, .col-2.to-complete, .scheduled-quiz .qprogress .col-2, .scheduled-quiz .qprogress .col-2.to-complete, .scheduled-quiz .qprogress .col-4.to-complete {background: #32CD32;}
.show-results .col-3, .scheduled-quiz .qprogress .col-3 {background: #32CD32;}
.show-results .col-4, .scheduled-quiz .qprogress .col-4 {background: #32CD32;}

.scheduled-quiz .qprogress.test .col, .test-results .col {padding:0;}
#qcontent .test-results .col {padding:5px;}
.scheduled-quiz .qprogress.test .col-2, .test-results .col-2 {background: #FF8C00;}
.scheduled-quiz .qprogress.test .col-3, .test-results .col-3 {background: #FF0000;}
.scheduled-quiz .qprogress.test .col-4, .test-results .col-4 {background: #000000;}
.test-results-format .col-1,.test-results-format .col-2,.test-results-format .col-3,.test-results-format .col-4 {padding: 0px 3px; color: #ffffff; margin-top: 5px; display: inline-block;}
.scheduled-quiz .qprogress.qv .col.pen, .scheduled-quiz .qprogress.qv .col.ext, .scheduled-quiz .qprogress.qv .col.cw,.scheduled-quiz .qprogress .total-test {top:-5px;}
.scheduled-quiz .qprogress .total{top:-3px;}
.scheduled-quiz .qprogress.test .up {position:relative;top:-5px;}
.scheduled-quiz .qprogress.test  {margin-bottom:5px;}
.hide-test-button b {background: inherit;}
.col.pen, .scheduled-quiz .qprogress .col.pen,
.col.ext, .scheduled-quiz .qprogress .col.ext {
    font-size: 0;
    width: 14px;
    height: 20px;
    margin: -5px 5px 0 0;
    background-position-y: 0px;
    background-size: 14px;
}

.scheduled-quiz .qprogress .col.pen,
.scheduled-quiz .qprogress .col.ext { background-position-y: 4px;}

.state-scheduled {background:#FF8C00!important; color:#ffffff;}
.state-done {background:#32CD32!important; color:#ffffff;}
.state-live {background:#32CD32!important; color:#ffffff;}
.state-open {background:#FF8C00!important; color:#ffffff;}
.state-late {background: #FF0000!important;}

#scheduled-quizzes { margin: 10px 0;}
.scheduled-quiz span {display: block;font-weight: normal;}
.scheduled-quiz .state {display: inline-block; margin: 0 10px; padding: 0 5px;border: 1px solid #cccccc; border-radius: 0.25rem;color:#ffffff;}
.scheduled-quiz .state-none {border:none;}
.scheduled-quiz {display: block; margin-bottom: 10px; color:inherit;background: #ffffff;padding: 10px; border: 1px solid #cccccc; border-radius: 0.25rem;}
.scheduled-quiz:hover {background:#ececec;}

.scheduled-quiz .qprogress {display: block;margin: 5px 5px 0 0; vertical-align: middle;text-align:left;}

#teacher-page #scheduled-quizzes .scheduled-quiz {margin: 10px;}
#retry {
    display: inline-block;
    text-indent: 20px;
    width: 20px;
    height: 20px;
    background-image: url(../img/retry.png);
    background-size: 20px;
    cursor:pointer;
    margin-left: 10px;
}

.col.cw, .scheduled-quiz .qprogress .col.cw {
    font-size: 0;
    width: 20px;
    height: 21px;
    margin: -5px 5px 0 0;
    background-position-y: 6px;
    background-size: 19px;
}

.scheduled-quiz .qprogress col.cw { background-position-y: 4px;}

.qprogress .cw, .scheduled-quiz .qprogress .cw, #class-quizzes .cw{
    display: inline-block;
    width: 25px;
    height: 25px;
    margin: 10px 5px 0 0;
    background: inherit;
    background-image: url(../img/classwork.png);
    background-repeat: no-repeat;
    background-position-y: 2px;
    background-size: 25px;
    qcursor:pointer;
    position: relative;
    padding: 5px 5px 5px 0;
    border-radius: 0;
    font-size: 0;
}

#class-quizzes .cw {
    position: initial;
    background-size: 75%;
    background-position-y: 4px;
    margin-right: 0;
    padding-right: 0;
    width: 25px;
    font-size: 0;
    margin-top: 0;
    height: 19px;
}

.qprogress .pen, .scheduled-quiz .qprogress .pen, #class-quizzes .pen, 
.qprogress .ext, .scheduled-quiz .qprogress .ext, #class-quizzes .ext{
    display: inline-block;
    width: 25px;
    height: 30px;
    margin: 10px 5px 0 0;
    text-align: center;
    font-size: 12px;
    qcolor: #ffffff;
    background: inherit;
    background-image: url(../img/pen.png);
    background-repeat: no-repeat;
    background-position-y: 1px;
    background-size: 25px;
    qcursor:pointer;
    position: relative;
    padding: 5px 5px 5px 0;
    border-radius: 0;
}

.qprogress .ext, .scheduled-quiz .qprogress .ext, #class-quizzes .ext {background-image: url(../img/ext.png);}
/* pupils can see these - setting to green */
.pen, .scheduled-quiz .qprogress .pen, #scheduled-quizzes .scheduled-quiz .qprogress .col--1 {background-image: url(../img/pen.png);}
#scheduled-quizzes .scheduled-quiz .qprogress .pen.col-1 {background-image: url(../img/pen-1.png);}
#scheduled-quizzes .scheduled-quiz .qprogress .pen.col-2 {background-image: url(../img/pen-1.png);}
#scheduled-quizzes .scheduled-quiz .qprogress .pen.col-3 {background-image: url(../img/pen-1.png);}
#scheduled-quizzes .scheduled-quiz .qprogress .pen.col-4 {background-image: url(../img/pen-1.png);}
#scheduled-quizzes .scheduled-quiz .qprogress .pen.col-5,
#scheduled-quizzes .scheduled-quiz .qprogress .ext.col-5 {background-image: url(../img/pen-5.png);}

.qprogress .pen.col--1, .scheduled-quiz .qprogress .pen.col--1, #class-quizzes .pen.col--1, #class-quizzes .pen.ai0 {background-image: url(../img/pen--1.png); color: #333333;cursor:pointer;}
.qprogress .pen.col-1, .scheduled-quiz .qprogress .pen.col-1, #class-quizzes .pen.col-1 {background-image: url(../img/pen-1.png); color: #333333;cursor:pointer;}
.qprogress .pen.col-2, .scheduled-quiz .qprogress .pen.col-2, #class-quizzes .pen.col-2 {background-image: url(../img/pen-2.png); color: #333333;cursor:pointer;}
.qprogress .pen.col-3, .scheduled-quiz .qprogress .pen.col-3, #class-quizzes .pen.col-3 {background-image: url(../img/pen-3.png); color: #333333;cursor:pointer;}
.qprogress .pen.col-4, .scheduled-quiz .qprogress .pen.col-4, #class-quizzes .pen.col-4 {background-image: url(../img/pen-4.png); color: #333333;cursor:pointer;}
.qprogress .pen.col-5, .scheduled-quiz .qprogress .pen.col-5, #class-quizzes .pen.col-5,
.qprogress .ext.col-5, .scheduled-quiz .qprogress .ext.col-5, #class-quizzes .ext.col-5 {background-image: url(../img/pen-5.png); color: #333333;cursor:pointer;}

#class-quizzes .pen, #class-quizzes .ext {
    position: initial;
    background-size: 75%;
    background-position-y: 3px;
    margin-right: 0;
    padding-right: 0;
    width: 18px;
    font-size: 0;
    margin-top: 0;
    height: 19px;
}
#qextra {
    display: block;
    max-width: 1000px;
    text-align: left;
    margin: 0 auto;
    background: #ffffff;
    padding: 10px;
    font-size: 16px;
    font-family: "courier new";
}

.scheduled-quiz .total {
    display: inline-block;
    padding: 0 5px;
    position: relative;
}

.scheduled-quiz .qprogress .total-test {
    display: inline-block;
    padding: 0 5px;
    margin-left: 10px;
    background:  #f91092;
    color: #ffffff;
    position: relative;
    top: -4px;
}

.scheduled-quiz .pathway {
    display: inline-block;
    padding: 0 5px;
    background:  #3fccd4;
    color: #ffffff;
    position: relative;
    top:-4px;
}


.hide-cell {
    display: none;
}

/*app*/
/* status bar */
#status-bar {
    position: relative;
    top: 0;
    width: 100%;
    min-height: 15px;;
    text-align: center;
    color: red;
    padding: 10px 0;
    z-index: 101;
    background: #ffffff;
    border:1px solid red;
}
#error-icon {
    position: absolute;
    left: 15px;
    top: 12px;
}
#status-bar p {
    padding: 0;
    margin: 3px 0 2px
}
#scheduled-quizzes .unit {
    margin: 10px;
    padding: 12px 10px 1px;
    border-radius: 3px;
}
#scheduled-quizzes .unit h3 {margin-top:2px;cursor:pointer;}
/* content pages */
.content-page {padding-bottom: 0;background: #ffffff;}
.content-page p {
    padding: 5px 10px 0;
}

/* arrow */
#scheduled-quizzes .unit .arrow {
    margin-right: 6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333;
    transition: transform 0.3s;
    float: right;
    margin-top: 8px;
    cursor: pointer;
}

#scheduled-quizzes .unit.closed .arrow {
    transform: rotate(180deg);
}

#scheduled-quizzes .unit.closed a {
    display: none;
}

/* score bar*/
.score-bar {
    position: relative;
    float:right;
    height: 15px;
    width: 100px;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    margin: 3px 10px 3px 0;
}

.score-bar-fill {
    height: 100%;
    width: 0;
    background: red; /* will be updated dynamically */
    transition: width 0.4s, background-color 0.4s;
}

.score-bar-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    color: #000;
}

/* content page*/
.content-page a {
    color: #093863;
}

.content-page h2 { 
    background: #f1f1f1;
    color: inherit;
    font-weight: bold;
}


/* footer */
#outer-footer {
    background: #282828;
    border-top: 1px solid #717171;
    color: #FFFFFF;
    text-align:center;
}
#inner-footer {
    background:inherit;
    font-size:13px;
    padding: 0;
}
#inner-footer p {padding-bottom:20px; margin:0;}
#inner-footer ul {text-align: center; margin-bottom: 15px;}
#inner-footer li {display:inline-block;margin: 10px 0; padding: 0 10px;border-right:1px solid #ffffff;}
#inner-footer li.last {border:none;}
#inner-footer a {color: #ffffff;}

/* table scroll*/
th.unit {
    text-align: center;
    border-radius: 0;
    padding: inherit;
}
.table-scroll {
    position: relative;
    width: 100%;
    max-width: 99%;
    margin: 10px auto;
    z-index: 1;
    overflow: auto;
    height: 100vh;
    border: 1px solid #cccccc;
}
.table-scroll table {
    width: 100%;
    qmin-width: 2000px;
    margin: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.table-scroll thead th {
    position: -webkit-sticky;
    position: sticky;
    top: 30px;
    background: #ececec;
    z-index: 1;
}
.table-scroll thead tr:first-child th {
    top: 0;
}
/* safari and ios need the tfoot itself to be position:sticky also */
.table-scroll tfoot,
.table-scroll tfoot th,
.table-scroll tfoot td {
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    z-index: 4;
}

.table-scroll th:first-child {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 2;
    width: 200px;
}

.table-scroll thead th:first-child,
.table-scroll tfoot th:first-child {
    z-index: 5;
}

.table-scroll th:nth-of-type(2){
    position: -webkit-sticky;
    position: sticky;
    left: 200px;
    z-index: 2;
}

.table-scroll thead th:nth-of-type(2),
.table-scroll tfoot th:nth-of-type(2) {
    z-index: 5;
    left:200px;
}
/* remove surname from mobile devices for scrolling*/
@media only screen and (max-width: 600px) {
    .table-scroll th:first-child {
        display:none
    }
    .table-scroll th:nth-of-type(2){
        left:0px;
    }
    .table-scroll thead th:nth-of-type(2),
    .table-scroll tfoot th:nth-of-type(2) {
        left:0px;
    }
}

/* profile */
#profile { border: 1px solid #093863;margin:10px;padding:10px 10px 7px;}
#profile-img{position:relative;display:inline-flex; width:150px; height:100px;padding: 0 20px;}
#next-pic, #previous-pic {cursor:pointer;display:inline-block;position:absolute;top:40px; width:18px; height: 18px; background:goldenrod; border-radius:18px;text-align:center;}
#previous-pic {left:-5px}
#next-pic {right:5px}
#profile-links{display:inline-block;vertical-align: top; margin-top: 0px;}
#profile-links ul {padding: 0 10px;margin:0}
#profile-links a {display:block;margin-bottom: 10px;}
#profile-links a:hover {color: #093863;}
#profile-links a:last-child {margin-bottom: 2px;}
#welcome {font-weight: bold; padding-bottom: 5px; display: inline-block; color:#093863;}
#profile-links #my-account-touch-screen{color:#666666;}
#profile-links #my-account-touch-screen.selected, #profile-links #my-account-touch-screen:active  {color:#f91092;}

#trophy.bebras-trophy {float:none; margin:0;}
#bebras-achievement {font-weight: bold; font-size:24px;}
#trophy {
    display: inline-block;
    vertical-align: top;
    margin-top: 0px;
    position: relative;
    float: right;
    margin-right: 20px;
}
#my-trophy {
    padding: 0 10px;
    display: inline-block;
    background-image: url(../img/trophy-gold.png);
    background-repeat: no-repeat;
    background-position: 20px 2px;
    width: 100px;
    height: 100px;
    background-size: 63%;
    border: 1px solid gold;
    border-radius: 50px;
}
#my-trophy.trophy-bronze {
    background-image: url(../img/trophy-bronze.png);
    background-position-y: -10px;
    border-color: goldenrod;
}
#my-trophy.trophy-silver {
    background-image: url(../img/trophy-silver.png);
    background-position-y: -2px;
    border-color: silver;
}

#my-trophy.trophy-blank {
    background: url(../img/trophy-blank.png) no-repeat 22px 11px;
    background-size: 55%;
    border-color: #000000;
}

#percentage {
    position: absolute;
    bottom: 7px;
    left: 40px;
}

/* solutions */
.toggle-hint-btn::before {
    content: "Show hint";
}
.toggle-explanation-btn::before, .logic-show-btn::before, .assembly-show-btn::before {
    content: "Show solution";
}
.toggle-pseudo-btn::before {
    content: "Show in pseudo code";
}
.code-save-btn::before, .logic-save-btn::before {
    content: "Save";
}

.code-ai-submit-btn.loading {
    position: relative;
    pointer-events: none;
}
.code-ai-submit-btn::before {
    content: "AI Submit";
}
.code-ai-submit-btn.loading::before {
    content: "Marking";
}
.code-ai-submit-btn.loading::after {
    content: "⏳";
    display: inline-block;
    margin-left: 6px;
    animation: spinEmoji 1s linear infinite;
}
@keyframes spinEmoji {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.aquarium-reset-btn::before, .othello-reset-btn::before, .dab-reset-btn::before, .code-reset-btn::before, .logic-reset-btn::before {
    content: "Reset";
}
.feedback-save-btn::before {
    content: "Save feedback";
}
.toggle-hint-btn, .toggle-explanation-btn, .toggle-pseudo-btn, .code-save-btn, .code-reset-btn, .logic-show-btn, .logic-save-btn, .logic-reset-btn, .code-ai-submit-btn {margin-right:10px;margin-bottom: 15px;font-size:1em;}
.question-explanation, .question-pseudo {display:none;qwidth: 1195px;margin-bottom: 10px; background:#ffffff;padding: 20px; border:1px solid #000000;}
.hint {display:none;width: 100%;}

.toggle-pseudo-btn {background: #fee496;display:none;}
.question-pseudo .orange {color: #000000; text-transform: uppercase;}

.ext-save-btn {display: block; margin: 0 auto; max-width: 530px; }

/* Defining keyframes for a bouncing animation */
@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}
.btn:active {
    animation: bounce 1s infinite; 
    /* Bouncing animation lasting 2 seconds, repeating infinitely */
}
#tsolution {margin-left: 10px;}

.qtextarea {overflow: scroll;clear:both;margin-bottom: 15px;}
.qtextarea::-webkit-scrollbar {
    display: none;
}


#qcode textarea.qtext-textarea {
    font-size:16px;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 29px,
        #ececec 29px,
        #ececec 30px
        );
    background-repeat: repeat;
    background-size: auto 30px; /* horizontal lines repeat every 30px */
    background-attachment: local;
    white-space: pre-wrap; 
}
#qcode textarea:focus {qborder: none;outline: none;}

#qcode .obj {background: #fff000;
    padding: 20px;
    margin: -20px -20px 0px -20px;}
#qcode .obj1 {background: #ffc7c7; padding: 10px;}
#qcode .obj2 {background: #ffdec7; padding: 10px;}
#qcode .obj3 {background: #fff5c7; padding: 10px;}
#qcode .obj4 {background: #ebffc7; padding: 10px;}
#qcode .obj5 {background: #c7ffca; padding: 10px;}
#qcode .obj6 {background: #c7fff7; padding: 10px;}
#qcode .obj7 {background: #c7e3ff; padding: 10px;}
#qcode a { text-decoration: underline; color: #093863;}

.obj::before {content: "Objective"; font-weight: bold;}
.code-block {padding:10px; background: #fbf7f3; margin-top:-1px; border: 1px solid #000000;}
#qcode .code-block a {color:#3fccd4;}
#qcode .highlight {background:#fff000; color: #340458;}
.smt {padding: 10px; border: 1px solid #000000; background: #ffffff;margin-top: -1px;}

/*mr men back to front*/
.btf {
    display: inline-block;
    transform: scale(-1, 1);
    -moz-transform: scale(-1, 1);
    -webkit-transform: scale(-1, 1);
    -o-transform: scale(-1, 1);
    -ms-transform: scale(-1, 1);
    transform: scale(-1, 1);
}

#fav-bar, #help-bar {margin:8px 0;}
.scheduled-quiz .qprogress .col.fav, .fav, .help {
    padding: 5px 0px 0px!important;
    display: inline-block;
    background: url(../img/star.png) no-repeat;
    width: 140px;
    height: 27px;
    background-size: 25px;
    cursor: pointer;
    font-size: 14px;
    margin-left: -50px;
}
.help {
    background-image: url(../img/help.png); 
    width: 80px;
    background-size: 15px;
}

.scheduled-quiz .qprogress .col.fav {
    margin-left: 0;
    width: 16px;
    height: 17px;
    background-size:100%;
}

.scheduled-quiz .qprogress .col.help {
    width: 17px;
    padding: 3px;
}
#scheduled-quizzes .scheduled-quiz .qprogress .col.fav-1, .fav-1, .qprogress .col-1.fav-1 {
    background-image: url(../img/goldstar.png);
    background-color: inherit;
    top: 3px !important;
    color: #ffffff;
} 
.scheduled-quiz .qprogress .col.fav-1 {
    padding-top:2px;
}
.fav-1 {color:#000000;}
.help-1 {
    background-image: url(../img/help-red.png);
    background-color: inherit;
    top: -1px !important;
} 
.show-results .col-1.help-1, .show-results .col-1.fav-1 {
    top: 1px !important;
}

.show-results .fav-1 {
    width: 33px;
    background-image: url(../img/goldstar.png);
    background-position-y: -3px;
    background-position-x: 1px;
    background-size: 95%;
    text-indent: 0;
    color:#ffffff;
}
.qprogress .fav-1.help-1 {width:30px;background:#a027ff;}
.scheduled-quiz .qprogress .fav-1.help-1 {padding-top:2px!important;}

#scheduled-quizzes .col-1.fav-1 {
    padding-top:3px !important;
}

#scheduled-quizzes .pen.help-1 {    
    padding-top: 4px !important;
    top: -2px !important;
}

.show-results .help-1, .show-results .pen.help-1 {
    background: #a027ff;
    color: #ffffff;
    border-radius: 30px;
    width: 30px;
}
#scheduled-quizzes .scheduled-quiz .qprogress .col.help-1 {
    background: #a027ff;
    color: #ffffff;
    border-radius: 30px;
    height:17px;
}


/* arrow btns */
#arrow-btns {
    padding: 5px 0 0;
}
#arrow-btns .arrow {
    width: 50px;
    height: 50px;
    display:inline-block;
    background: url(../img/arrow-btn.png) no-repeat;
    background-size: 100%;
    cursor: pointer;
}
#arrow-btns #arrow-down {
    transform: rotate(90deg);
}
#arrow-btns #arrow-left {
    transform: rotate(180deg);
}
#arrow-btns #arrow-up {
    transform: rotate(270deg);
}

/* careers */
.company { padding: 10px; border-bottom: 1px solid #cccccc;width:100%;display:flex;flex-wrap: wrap;}
.clogo {display:inline-block;width:100px; margin-right: 50px; padding:5px;background: inherit; background: url(../img/companies.png)  no-repeat 0px 0px; width: 100px;height: 30px; background-size:108px 1087px;}
.cname {font-size: 14px;font-weight: bold; display:inline-block;flex:2; color: #333333; padding:5px;}
.cindustry {display:inline-block;flex:3;color: #333333; padding:5px;}
.clink {display:inline-block;width:100px; padding:5px;}
.clogo-microsoft {background-position: 0px 1px;}
.clogo-accenture {background-position: 0px -26px;}
.clogo-cognizant {background-position: 0px -60px;}
.clogo-infosys {background-position: 0px -90px;}
.clogo-tcs {background-position: 0px -122px;}
.clogo-sap {background-position: 0px -155px;}
.clogo-capgemini {background-position: 0px -186px;}
.clogo-ibm {background-position: 0px -214px;}
.clogo-oracle {background-position: 0px -240px; height:28px;}
.clogo-deloite {background-position: 0px -260px;}
.clogo-dxc {background-position: 0px -290px;}
.clogo-apple {background-position: 0px -325px; height:65px;}
.clogo-alphabet {background-position: 0px -390px;}
.clogo-amazon {background-position: 0px -420px;}
.clogo-disney {background-position: 0px -457px; height: 40px}
.clogo-facebook {background-position: 0px -502px;height:55px}
.clogo-paypal {background-position: 0px -570px;}
.clogo-netflix {background-position: 0px -600px;}
.clogo-ebay {background-position: 0px -630px;}
.clogo-sky {background-position: 0px -660px;}
.clogo-pwc {background-position: 0px -695px;height:43px}
.clogo-kpmg {background-position: 0px -740px;}
.clogo-goldman {background-position: 0px -778px;height:35px}
.clogo-jpmorgan {background-position: 0px -815px;}
.clogo-king {background-position: 0px -850px;}
.clogo-skyscanner {background-position: 0px -880px;}
.clogo-Nestle {background-position: 0px -913px;height:40px}
.clogo-unilever {background-position: 0px -963px;height:50px}
.clogo-lockheed {background-position: 0px -1025px;}

@media (max-width: 460px) {
    .company, .clogo {display: block;}
    .cname {display: none;}
    .clink {float:right;}
}


/* classwork */
#cw {
    font-family: arial;
    font-size:16px;
    margin:-20px;
    border-bottom: 1px solid #000;
}

#cw h1,#cw h2,#cw h3 {font-size:18px;}

#cw h1 {
    margin: 0;
    padding: 0;
    background: inherit;
    color: #19191a;
    text-align: left;
}
#cw h2 {
    margin: 0;
    padding: 0;
    font-weight: bold;
    background: inherit;
    border-bottom: none;
    color: #19191a;
}

#cw h3 {
    margin: 0;
    padding: 0;
    color: #19191a;
}

#lesson .lhc {background: #cccccc;}
#lesson .mc {background: #eeeeee;}
#cw .wrapper, #cw.wrapper {display:flex;border:1px solid #000000; border-bottom:none;}
#cw .lhc {flex:1; padding:10px;border-right:1px solid #000000;}
#cw .mc {flex:3; padding:10px;}
#cw .row {border:1px solid #000000;border-bottom:none;padding: 10px;}
#cw .label {font-size: 14px;font-weight:bold;}
#cw .date {color: #5a5a5a;font-size: 10px;}
#cw .sub-title {color:red;}
#cw #notes .formula {font-style: italic;background: greenyellow; text-align:center;padding:5px;}
#cw #keywords, #cw  #notes {margin:0;}
#cw #headings #keywords, #cw #headings #notes {padding-bottom:0;}
#cw #notes {text-align:center;}
#cw #notes p, #cw #notes li {text-align:left;}
#cw p {margin:0;}
#cw #keywords p,#cw #notes p, #cw #notes img, #cw h4 {margin-bottom:10px;}
#cw .section {border-top:dashed 1px black;border-bottom:none;}
#cw img {width: 100%;display:block;margin:0 auto;max-width:600px;}
#cw .highlight {background:#fff000; color: #340458; display:inline-block;padding:5px;margin-top:10px;margin-right:10px;margin-bottom: 0 !important;}
#cw #notes ul, #lesson #notes ol {text-align:left; list-style-position: inside;}
#cw #summary ol {padding: 10px 20px 0}
#cw #summary p {padding-top:10px;}

@media only screen and (max-width: 600px) {
    #cw .wrapper, #cw#summary {
        display:block;
        border-left:none;
        border-right:none;
    }
    #cw .row {border: none;border-top: 1px solid #000000;}
    #cw .lhc {border-right: none;border-bottom:1px solid #000000;}
    #cw #headings #keywords {display:none;}
    #cw .section .lhc {border:none;}
    #cw h4 {display:none;}

    #qprogress.invisible {height:35px;}
    #qchallenge .pupil-name {text-align:left;}
}

/* tests */
.sortable th:hover {cursor: pointer;}
.sortable .center, .table-center th, .table-center td {text-align: center;}
.table-center {text-align: center;}

/* rubric */
#qrubric {width:100%; font-size: 14px; text-align:center;padding: 30px 10px;}
.rubric th {font-weight: bold;text-align:center;}
.rb:hover, .rubric .rb-click {cursor:pointer;}
.pupil-name  {font-size:18px; text-align:center; font-weight: bold;background: #85f5fb; padding: 10px; margin: 10px 0;}
#qcode .pupil-name {margin: 15px -20px 21px -20px}
.rubric th, .rubric td {width: 15%;}
.rubric .selected {background: #89e1fb;}
.rb .col-1, .scheduled-quiz .qprogress.rb .col-1 {background: #FF0000;}
.rb .col-2, .scheduled-quiz .qprogress.rb .col-2 {background: #FF8C00;}
.rb .col-3, .scheduled-quiz .qprogress.rb .col-3 {background: #32CD32;}
.rb .col-4, .scheduled-quiz .qprogress.rb .col-4 {background: #001bff}
.rb .col-5, .scheduled-quiz .qprogress.rb .col-5 {background: #ff00fa;}

.p {
    color: #fff;
    padding: 2px 4px;
    font-family: sans-serif;
    font-size: 14px;
    border-radius: 2px;
}
.p3 {background: #FF0000;}
.p4 {background: #FF8C00;}
.p5 {background: #ffeb3b; color: #000000;}
.p6 {background: #32CD32;}
.p7 {background: #001bff;}
.p8 {background: #8f00ff;}
.p9 {background: #ff00fa;}

.last-updated, .feedback-timestamp {font-weight:normal; text-align: right;  display: block;  font-size: 14px;}
.feedback-timestamp {margin-top:-15px;margin-bottom:10px;}
.feedback-save-btn {font-size: 16px; margin-bottom: 20px;}
#qchallenge .feedback-textarea {background: #ffffff;
                                border: 1px solid red;
                                width: 100%;
                                height: 200px;
                                line-height: 20px;
                                margin: 20px 0;
                                padding: 10px;
                                color:red; font-size: 16px;}
#qchallenge .feedback-textarea:focus {border: 1px solid red;}

/* celebration */
.confetti {
    position: relative;
    width: 100%;
    min-height: 100px;
    overflow: hidden;
    z-index: 1000;
    background: goldenrod;
    color: #ffffff;
    margin-top: 10px;
    text-align: center;
}
.confetti-piece {
    position: absolute;
    width: 10px;
    height: 30px;
    background: #ffd300;
    top: 0;
    opacity: 0;
}
.confetti-piece:nth-child(1) {
    left: 7%;
    -webkit-transform: rotate(-40deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 182ms;
    -webkit-animation-duration: 1116ms;
}
.confetti-piece:nth-child(2) {
    left: 14%;
    -webkit-transform: rotate(4deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 161ms;
    -webkit-animation-duration: 1076ms;
}
.confetti-piece:nth-child(3) {
    left: 21%;
    -webkit-transform: rotate(-51deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 481ms;
    -webkit-animation-duration: 1103ms;
}
.confetti-piece:nth-child(4) {
    left: 28%;
    -webkit-transform: rotate(61deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 334ms;
    -webkit-animation-duration: 708ms;
}
.confetti-piece:nth-child(5) {
    left: 35%;
    -webkit-transform: rotate(-52deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 302ms;
    -webkit-animation-duration: 776ms;
}
.confetti-piece:nth-child(6) {
    left: 42%;
    -webkit-transform: rotate(38deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 180ms;
    -webkit-animation-duration: 1168ms;
}
.confetti-piece:nth-child(7) {
    left: 49%;
    -webkit-transform: rotate(11deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 395ms;
    -webkit-animation-duration: 1200ms;
}
.confetti-piece:nth-child(8) {
    left: 56%;
    -webkit-transform: rotate(49deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 14ms;
    -webkit-animation-duration: 887ms;
}
.confetti-piece:nth-child(9) {
    left: 63%;
    -webkit-transform: rotate(-72deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 149ms;
    -webkit-animation-duration: 805ms;
}
.confetti-piece:nth-child(10) {
    left: 70%;
    -webkit-transform: rotate(10deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 351ms;
    -webkit-animation-duration: 1059ms;
}
.confetti-piece:nth-child(11) {
    left: 77%;
    -webkit-transform: rotate(4deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 307ms;
    -webkit-animation-duration: 1132ms;
}
.confetti-piece:nth-child(12) {
    left: 84%;
    -webkit-transform: rotate(42deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 464ms;
    -webkit-animation-duration: 776ms;
}
.confetti-piece:nth-child(13) {
    left: 91%;
    -webkit-transform: rotate(-72deg);
    -webkit-animation: makeItRain 1000ms infinite ease-out;
    -webkit-animation-delay: 429ms;
    -webkit-animation-duration: 818ms;
}
.confetti-piece:nth-child(odd) {
    background: #7431e8;
}
.confetti-piece:nth-child(even) {
    z-index: 1;
}
.confetti-piece:nth-child(4n) {
    width: 5px;
    height: 12px;
    -webkit-animation-duration: 2000ms;
}
.confetti-piece:nth-child(3n) {
    width: 3px;
    height: 10px;
    -webkit-animation-duration: 2500ms;
    -webkit-animation-delay: 1000ms;
}
.confetti-piece:nth-child(4n-7) {
    background: red;
}
@-webkit-keyframes makeItRain {
    from {opacity: 0;}
    50% {opacity: 1;}
    to {-webkit-transform: translateY(350px);}
}
.celebrate {font-size:30px; padding: 12px 12px 0 12px;line-height: 43px;}
.thanks {padding:12px;}

/*tents game*/
.tent-board {
    display: inline-grid;
    margin: 20px auto;
    gap: 1px;
    background-color: black;
}
.tent-cell {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    background-color: white;
}
.tree {
    background-image: url(../img/classwork/year8/computational-thinking/tree.png);
    background-size: 30px;
    color: white;
}
.tent {
    background-image: url(../img/classwork/year8/computational-thinking/tent.png);
    background-size: 30px;
    color: white;
}
.no-tent {
    background-image: url(../img/classwork/year8/computational-thinking/grass.png);
    background-size: 30px;
}
.tent-error {
    background-image: url(../img/classwork/year8/computational-thinking/tent-error.png);
    background-size: 30px;
}
.tent-header {
    font-weight: bold;
    background-color: #ddd;
}
.tent-header.tent-red {
    color: red;
}
.tent-header.tent-green {
    color: #4bcc2b;
}
.game-error {
    color: red;
}
.game-success {
    color: green;
}
.game-draw {
    color: orange;
}

/* nonograms */
.nonograms-grid {
    display: inline-grid;
    gap: 2px;
}
.nono-cell {
    min-width: 30px;
    min-height: 30px;
    border: 1px solid black;
    text-align: center;
    line-height: 30px;
    font-size: 14px;
    cursor: pointer;
    background: #ffffff;
}
.nono-cell.hints {
    background-color: #ffffff;
    font-weight: bold;
    padding: 0 10px;
}
.hint-completed {
    color: #4bcc2b;
}
.hint-partial {
    color: orange;
}
.nono-cell.filled {
    background-color: #f91092;
}
.nono-cell.filled-error {
    background-color: #ff0000;
}
.nono-cell.empty {
    background-color: white;
}
.nono-cell.not-filled {
    background-color: #c4f6f9;
}
.hint-container {
    display: flex;
    flex-direction: row;
    justify-content: end;
    height:100%;
}
.hint-container-top {
    flex-direction: column;
}
.hint-number {
    padding: 0 5px;
}

/* dots and boxes */

#dab-svg, #othello-svg {
    margin-top: 0;
    margin-bottom:20px;
    width: 100%;
    height: auto;
    touch-action: manipulation;
    max-height: 80vh;
    max-width: 80vw;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.dab-dot { fill: black; r: 5; pointer-events: none; }
.dab-line { stroke: #eee; stroke-width: 6; cursor: pointer; }
.dab-line.dab-claimed.dab-player1 { stroke: #f91092; stroke-width: 8; cursor: default; }
.dab-line.dab-claimed.dab-player2 { stroke: #3fccd4; stroke-width: 8; cursor: default; }
.dab-box-label {
    font-size: 16px;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    user-select: none;
    font-family: "Courier New", monospace;
}
#score { margin-top: 10px; }

/* othello */
.othello-cell {
    fill: #389925; /* dark green background */
    stroke: #145214; /* darker green grid lines */
    stroke-width: 1.5;
    cursor: pointer;
}
.othello-disc {
    pointer-events: none;
}
.othello-disc.othello-player {
    fill: #f91092;
}
.othello-disc.othello-ai {
    fill: #3fccd4;
}

#game-message {margin-bottom:10px;}

.ogo {
    background: #111;
    border-radius: 3px;
}

/* aquarium */
#aquarium-grid-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.aquarium-cell {
    box-sizing: border-box;
    border-top: 1px solid #aaa;
    border-left: 1px solid #aaa;
    border-bottom: 0;
    border-right: 0;
    background-color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
}

.aquarium-cell.marked {
    background-color: pink;
}

#aquarium-grid {
    display: grid;
    grid-template-columns: repeat(6, 40px);
    grid-template-rows: repeat(6, 40px);
    border: 2px solid #333;
}

.aquarium-cell {
    width: 40px;
    height: 40px;
    border: 1px solid #aaa;
    background-color: white;
    cursor: pointer;
}

.aquarium-cell.aquarium-filled {
    background-color: #3498db; /* water color */
}

.aquarium-cell.aquarium-marked {
    background-color: #ccc; /* unfilled */
}

#aquarium-grid-wrapper #col-hints {
    display: grid;
    grid-auto-flow: column;
    justify-content: start;
    margin-left: 40px; /* space for row hints */
}

#aquarium-grid-wrapper #row-hints-and-grid {
    display: flex;
}

#aquarium-grid-wrapper #row-hints {
    display: grid;
    grid-auto-rows: 40px;
    justify-items: center;
    align-items: center;
    width: 40px;
    font-weight: bold;
}

#aquarium-grid-wrapper #row-hints div,
#aquarium-grid-wrapper #col-hints div {
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    color: black; /* default */
    user-select: none;
}

#aquarium-grid-wrapper #row-hints div.correct,
#aquarium-grid-wrapper #col-hints div.correct {
    color: green;
    font-weight: bolder;
}

#aquarium-grid-wrapper #row-hints div.exceeded,
#aquarium-grid-wrapper #col-hints div.exceeded {
    color: red;
    font-weight: bolder;
}

/* akariGame */
#akari-grid{display:inline-grid;--cell-size:40px;margin-bottom:15px;}
.cell{width:var(--cell-size);height:var(--cell-size);display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #ddd;position:relative;font-weight:600}

/* Bulb */
#akari-grid .cell.bulb::after {
    content: ""; 
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;   
    height: 20px;
    transform: translate(-50%, -50%); 
    background-image: url('../img/classwork/year8/computational-thinking/lightbulb-yellow.svg');
    background-size: contain; 
    background-repeat: no-repeat;
}

/* Lit cells */
#akari-grid .cell.lit{background:linear-gradient(0deg, rgba(255,250,200,0.9), rgba(255,250,200,0.6));}

/* Black walls */
#akari-grid .cell.black{background:#222;color:#fff}
#akari-grid .cell.black.number{font-size:16px}

/* Forbidden bulbs */
#akari-grid .cell.forbidden:after{background-image: url('../img/classwork/year8/computational-thinking/lightbulb-red.svg');}

/* No-bulb (red cross) */
#akari-grid .cell.no-bulb::after {
    content: "✖"; 
    color:red; 
    position:absolute;
    font-size:20px;
    top:50%; left:50%; 
    transform:translate(-50%, -50%);
}


/* year leaderboard */
#year-leaderboard {margin: 10px 0;}
#year-leaderboard .highlight td {background: #fff000; color: #340458;}
.year-100 .c-c {display:none;}

/* games */
#game {background: #3fccd4; padding-bottom:10px;}
#game-container {display: inline-block;
                 background: #fff;
                 width: 200px;
                 border-radius: 3px;}
#game-container h2 {background:#f91092; border-radius: 3px 3px 0 0;}
#game-mod-div, #game-mod-div input {text-align:center;}
#game-mod-div #question {font-weight:bold;}
#game-mod-div #time {color:red;}
#game-mod-div #score {color:green;}
#game-mod-div input {width: 50px; height: 40px;}

/* logic gates*/
/* Overall container */
#qlogic {width:100%; min-width: 800px; font-size: 16px;background:#fdfde5;; padding:10px;}

#logic {
    width: 100%;
    height: 600px; /* Fixed height */
    display: flex;
    border: 2px solid #cccccc;
    box-sizing: border-box;
    margin: 20px 0 10px;
}

/* Toolbox styling */
#toolbox {
    width: 20%;
    background-color: #f9f9f9;
    border-right: 2px solid #aaa;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column; /* Stack items vertically */
    gap: 10px; /* Optional: Add spacing between items */
    justify-content: center; /* Center blocks horizontally */
    align-items: center; /* Center blocks vertically */
    box-sizing: border-box;
    overflow-y: auto;
}

/* Panel styling */
.panel {
    width: 80%;
    background-color: #e0e0e0;
    position: relative;
    overflow: hidden;
}

/* Tool items */
.tool-item {
    width: 100px;
    height: 62px;
    background: transparent url(../img/classwork/gcse/lg-and.png) no-repeat -10px -9px;
    background-size: 120%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    position: relative;
}

.block-label {font-size: 16px; font-weight: bold;}

.lg-or {
    background-image:url(../img/classwork/gcse/lg-or.png);
}

.lg-not {
    background-image:url(../img/classwork/gcse/lg-not.png);
}

.lg-xor {
    background-image:url(../img/classwork/gcse/lg-xor.png);
}

.lg-nand {
    background-image:url(../img/classwork/gcse/lg-nand.png);
}

.lg-nor {
    background-image:url(../img/classwork/gcse/lg-nor.png);
}

.lg-input, .lg-output {
    border: 1px solid #000;
    background: #ffffff;
}

.lg-input[data-state="1"] {
    background-color: #3fccd4;
}

.lg-output[data-state="1"] {
    background-color: #f91092; 
}

/* Connectors styling */
.connector {
    width: 10px;
    height: 10px;
    background-color: black; /* Back to black */
    position: absolute;
}

/* Input connectors for AND/OR/XOR */
.input-connector-1 {
    left: -9px;
    top: 11px;
}

.input-connector-2 {
    left: -9px;
    bottom: 11px;
}

/* Input connector for NOT */
.single-input-connector {
    left: -9px;
    top: 50%;
    transform: translateY(-50%);
}

/* Output connector for all blocks */
.output-connector {
    right: -9px;
    top: 50%;
    transform: translateY(-50%);
}

/* Hover effect for toolbox when an item is dropped over it */
#toolbox.droppable {
    background-color: #f8d7da; /* Light red background to indicate delete */
}

/* Highlight the inner line on hover */
.inner-line:hover {
    stroke: red;
    cursor: pointer;
}


/* boolean algebra*/
#qbooleanalgebra {margin-bottom: 10px;padding: 10px 10px 1px;}

#qlogic .boolean-algebra-mini #boolean-editor {
    height: 10px;
    margin: 10px;
    display: inline-block;
    width: 200px;
    padding: 0;
    min-width: 200px;
    min-height: 52px;
    vertical-align: bottom;
    background: #ffffff;
}

button .overline {    background: #fff;
                      padding: 1px;
                      border: 8px solid #ffffff;
                      border-radius: 3px;
                      color: #333333}
button .overline.level-1::before {top:-3px}

#insertNot, #removeNot, #insertXOR {
    margin: 10px;
    padding: 5px;
    font-size: 16px;
    cursor: pointer;
    background: #333333;
    color: #ffffff;
    border:1px solid #333333;
    border-radius: 3px;
}
#removeNot {background: red;border-color:red;}
#boolean-editor {
    width: 100%;
    height: 372px;
    border: 1px solid #ccc;
    padding: 10px;
    font-family: monospace;
    font-size: 18px;
    overflow-y: auto;
    line-height: 50px;
    background: #ffffff;
}
#boolean-editor[contenteditable="true"] {
    outline: none;
}

#qlogic #question, #qlogic #finalAnswer {
    width: 100%;
    height: 50px;
    border: 1px solid #ccc;
    padding-top: 5px;
    font-family: monospace;
    font-size: 18px;
    overflow-y: auto;
    line-height: 50px;
    margin: 10px 0;
    overflow:hidden;
    background: #f1f1f1;
}
.overline {
    display: inline-block;
    position: relative;
}
.overline.level-1::before {
    content: "";
    position: absolute;
    top: 13px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: black;
}
#notes .overline.level-1::before {top:2px}
.overline.level-2::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: black;
}
#notes .overline.level-2::before {top:-2px}
.overline.level-3::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: black;
}
.overline.level-4::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: black;
}

.boolean-error {border-color:red!important;}
.boolean-success {border-color:#4bcc2b!important;}

#copy-python, #copy-config {cursor:pointer;}
#python-code, #config-code {display:none;}

/* assembler */
#qassembler {flex: 1; font-size:16px; margin-top:20px;}
#assembly-input, #assembly-output {width: 100%; min-height: 300px; font-size:16px;}
#qassembler .btn {
    padding: 5px 7px;
    font-size: 16px;
    display: inline-block;
    margin: 10px 10px 15px;}

#assembly-commands {margin-top:40px;}
#assembly-commands h3 {text-align: center;}
#qcode #assembly-commands td {text-align: left;}
#assembly-commands tr > td:first-child {min-width:260px}

/* date picker for GCSE students */
#daily h2 {margin:0;}
#code-a-day-div {background: #f91092; padding: 10px 0;}
#code-a-day-div .ui-datepicker-inline {margin: 0 auto;}
#ui-datepicker-div {z-index: 6 !important;}
.ui-datepicker-calendar .ui-state-done .ui-state-default {background: #32CD32;color:#ffffff;}
.ui-datepicker-calendar .ui-state-tried  .ui-state-default {background: #000000;color:#ffffff;}
.ui-datepicker-calendar .ui-state-help  .ui-state-default {background: #f91092;color:#ffffff;}
#streak-msg {text-align: center;
             color: #ffffff;
             padding: 10px;
             font-size: 14px;
             background: #282828;
             margin: 0 auto;
             width: 204px;
             margin-bottom: 10px;
             border-radius: 3px;}
.ui-icon-calendar {
    margin: auto;  
    display: block;
    width: 20px;
    height: 20px;
    border: none;
    background-color: transparent;cursor:pointer;
    background: url(../img/calendar-icon.png) no-repeat;
    background-size: 18px;}

td .ui-icon-calendar {
    display: inline-block;
    margin-left: 5px;
}

/* skulpt */
#skulpt {clear:both;}
#sk-editor, #text-area {
    border: 1px solid #000;
    width: 100%; min-height: 300px; white-space: pre;
    line-height: 30px;
    padding-left: 5px;
    padding-top: 0px;
    background-color: white;
    background-image: repeating-linear-gradient(to bottom, transparent, transparent 29px, #ececec 29px, #ececec 30px), /* 5 vertical lines spaced every 40px */ linear-gradient(to right, #ececec 1px, transparent 1px), linear-gradient(to right, #ececec 1px, transparent 1px), linear-gradient(to right, #ececec 1px, transparent 1px), linear-gradient(to right, #ececec 1px, transparent 1px), linear-gradient(to right, #ececec 1px, transparent 1px);
    background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-position: 0 0, /* horizontal lines */ 43px 0, /* vertical lines at 40px intervals */ 86px 0, 129px 0, 172px 0, 215px 0;
    background-size: auto 30px, /* horizontal lines repeat every 30px */ 1px 100%, /* vertical lines 1px wide full height */ 1px 100%, 1px 100%, 1px 100%, 1px 100%;
    background-attachment: local;
    overflow: auto;
    white-space: pre;
    font-size: 18px;
    margin-top:15px;
}
#sk-editor:focus {
    outline: none;
    overflow-y: auto;
}
#sk-output {font-family: 'courier new'; font-weight:normal; background-color: #ffffff; white-space: pre-wrap; border: 1px solid #000000; padding: 10px; height: 125px; overflow-y: auto; margin-top: 10px; margin-bottom: 15px;}
.sk-button-row { margin-top: 10px; }
.sk-button-row .btn-outline-info {margin-bottom: 0;}
#sk-inputBox {
    margin-top: 10px; font-family: monospace;
    font-size: 16px; padding: 4px; width: 100%;display: inline-block; position: absolute; left: -9999px;
}

#sk-editor-wrapper {
    display: flex;
    qalign-items: flex-start; 
}

#sk-line-numbers {
    padding: 5px;
    text-align: right;
    user-select: none;
    color: #888;
    border-right: 1px solid #ccc;
    line-height: 30px;
    margin-top: 15px;
    min-height: 300px;
    overflow: hidden;
    font-size: 16px;
    min-width: 30px;

    qbackground-image:
        repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 29px,
        #ececec 29px,
        #ececec 30px
        );
    background-color: #ffffff;
    background-repeat: repeat;
    background-size: auto 30px;
    background-attachment: local;

    border: 1px solid #000;
    border-right: none;
    text-align: center;
}

#sk-editor {
    font-family: 'courier new';
    padding: 5px;
    outline: none;
    white-space: pre;
    flex: 1;
    border-left: 1px solid #f91092;
}


/*help*/
#help-title {
    background:#a027ff;
    color: #ffffff;
}

#bebras-title {
    background:#ff2765;
    color: #ffffff;
}
#bebras-csv-btn {margin-left:10px;}



/* flashcards */
.card-container {
    width: 320px;
    height: 500px;
    margin: 40px auto;
    perspective: 1000px;
    font-family: Arial,Helvetica,sans-serif;
    position: relative;
}

.flashcard {
    width: 100%;
    height: 100%;
    border: 2px solid #ccc;
    border-radius: 10px;
    position: relative; /* for absolute header */
    cursor: grab;
    user-select: none;
    perspective: 1000px;
    transition: transform 0.3s, border-color 0.3s;
}

.flip-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.3s;
    transform-style: preserve-3d;
    position: relative;
}

.flashcard .front,
.flashcard .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    white-space: pre-line;
}

.flashcard .back {
    transform: rotateY(180deg);
}

.flip-inner.flipped {
    transform: rotateY(180deg);
}

/* header overlay */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    font-weight: bold;
    font-size: 1.5em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.flashcard.got-it #cardHeader,
.flashcard.study-again #cardHeader {
    opacity: 1;
}

.flashcard.got-it {
    border-color: #31ad77;
}
#flashcard.got-it .header {
    background: #31ad77;
    color: #ffffff;
}

.flashcard.study-again {
    border-color: #f9bd87;
}
#flashcard.study-again .header {
    background: #f9bd87;
    color: #ffffff;
}
#flash-complete {display:none; text-align:center; margin-top:20px;color:green; font-size: 16px;}
#card-progress {font-size: 16px;
                margin-top: 20px;}

#flash-complete #restartBtn {    clear: both;
                                 display: block;
                                 margin: 20px auto;}

.level-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Colours by difficulty */
.level-easy {
    background-color: #4CAF50; /* green */
}

.level-medium {
    background-color: #FFA500; /* orange */
}

.level-hard {
    background-color: #E53935; /* red */
}

/* aqa download*/

#aqa-spec {
    margin: 0 10px;
    color: red;
    text-decoration: underline}

/* toggle switch*/
.toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-family: sans-serif;
    user-select: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4caf50;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.points {
    text-align: right;
    color:#fa7cc7;background:#340458;
    font-weight:bold;
    display: inline-block;
    float: right;
    padding: 8px;
}
.points-a {;font-weight:bold;background: #fa7cc7;color:#330c5a;}

.h2-p {margin:-20px;}

.img-wrap {
    position: relative;
}

.img-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;  /* image still clickable */
    background-image:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.1) 0 1px, transparent 1px 5px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.1) 0 1px, transparent 1px 5px);
    z-index: 10;
}

#qcode[data-type='competition'] p {text-align:center;}
#bebras-username, #bebras-password {user-select: text;}

#savingMessage {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 25px;
    background: #ffd;
    border: 1px solid #cc0;
    border-radius: 6px;
    z-index: 99999;

    opacity: 0;
    transition: opacity 0.3s ease 1s;
    pointer-events: none;
}
#savingMessage.show {
    opacity: 1;
}

sub {font-size: x-small;}

.turtle img {
    float:left;
    padding: 8px;
    max-width: 50px;
}
.turtle b, .turtle a {
    margin: 4px 0 0px 4px;
    display: inline-block;
}
#qcode .turtle {margin-bottom:20px;}

embed {margin: 0 auto; display: block;}
@media only screen and (max-width: 860px) {
    embed {
        width: 100%;
        height: 62vh;
    }
}

/* pygame */
.graphics  { font-family: sans-serif; display: flex; gap: 20px; justify-content: center;}
.graphics canvas { border: 1px solid black; cursor: crosshair; position: relative; padding-top: 0;}
.graphics .panel { width: 220px;
                 background: #ececec;
                 margin-bottom: 70px;
                 padding: 0 10px;}
.graphics .panel input,
.graphics .panel select,
.graphics .panel textarea {
    width: 100%;       /* fill available cell */
    max-width: 100%;   /* prevent overflowing */
    box-sizing: border-box; /* include padding/border in width */
}

.graphics label { display: block; margin-top: 6px; }
.graphics .hidden { display: none; }
.graphics .coordpoints { border: 1px solid #ccc; padding: 5px; min-height: 100px; overflow-y: auto; font-size: 12px; }
.graphics #shapeList {
    list-style: none;
    padding: 0;
}

.graphics .shape-row {
    display: grid;
    grid-template-columns: 1fr 24px 24px;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    cursor: pointer;
}

.graphics .shape-row.selected {
    background-color: #d0e7ff;
}

.graphics .shape-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.graphics .shape-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.graphics .form-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 6px;
    qalign-items: center;
    margin-bottom: 6px;
}

.graphics .form-row label {
    text-align: right;
}

.graphics textarea {
    font-family: monospace;
    font-size: 0.85em;
    resize: vertical;
}

.graphics #pointsInput {
    font-family: monospace;
    font-size: 0.85em;
    resize: vertical;
}

.graphics .button-row {
    display: flex;
    justify-content: flex-end; /* float buttons to the right */
    gap: 5px;                  /* space between buttons */
    margin-bottom: 10px;       /* keeps gap below buttons for next header */
    margin-top: 10px;
}
.graphics .btn-primary {margin-bottom: 15px;}

@media only screen and (max-width: 900px) {
    .graphics {flex-direction: column;}
    .graphics .panel,#pygame-left {width: 500px; margin: 0 auto;}
}

.iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio; adjust as needed */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cc {background: #ffffff;
     padding: 20px;
     border: 1px solid #000000;}
b.cc {padding: 10px; display:block;}

.widget-19 .question-explanation, .widget-19 b, 
.widget-2 b, 
.widget-12 .question-explanation,
#dragMain, #drag-drop, 
#assembly-commands tr > td:first-child,
#assembly-commands b,
.cc, .bcc {
    font-family: 'courier new'; font-weight:normal;}

/* sound library */
#sound-library {max-height: 500px; border: 1px solid #000000; overflow-y: scroll; background:#ffffff; border-top:none;}
#sound-library ul { list-style: none; padding-left: 1em; }
#sound-library li { margin: 4px 0; }
#sound-library button { margin: 2px 0px; padding: 3px 5px 5px;}
#sound-library a { margin-left: 4px; }

/* Collapsible folder */
.folder > span {
    cursor: pointer;
    user-select: none;
}
.folder ul {
    display: none;
    margin-left: 1em;
}

/* Show expanded folder */
.folder.open > ul {
    display: block;
}
