html {
    display: flex;
    display: -webkit-flex;
    flex: 1;
    -webkit-flex: 1;
    width: 100%;
    height: 100%;
    -webkit-user-drag: none;
    margin: 0;
    padding: 0;
}

body {
    width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    background:
        /* Milky Way core glow */
        radial-gradient(ellipse 60% 20% at 50% 55%,
        rgba(180,200,255,0.18),
        rgba(120,140,220,0.12) 35%,
        rgba(60,80,160,0.06) 55%,
        transparent 70%),

        /* Milky Way dust clouds */
        radial-gradient(ellipse 50% 18% at 45% 60%,
        rgba(255,255,255,0.08),
        transparent 65%),
        radial-gradient(ellipse 55% 20% at 55% 50%,
        rgba(200,200,255,0.06),
        transparent 70%),

        /* dense tiny stars */
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6), transparent 40%),
        radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.5), transparent 40%),
        radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.55), transparent 40%),
        radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.6), transparent 40%),
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6), transparent 40%),
        radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.5), transparent 40%),
        radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.55), transparent 40%),
        radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.6), transparent 40%),
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6), transparent 40%),
        radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.5), transparent 40%),
        radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.55), transparent 40%),
        radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.6), transparent 40%),
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6), transparent 40%),
        radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.5), transparent 40%),
        radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.55), transparent 40%),
        radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,0.6), transparent 40%),    

        /* mid stars */
        radial-gradient(1.5px 1.5px at 20% 40%, rgba(255,255,255,0.75), transparent 45%),
        radial-gradient(1.5px 1.5px at 60% 10%, rgba(255,255,255,0.7), transparent 45%),
        radial-gradient(1.5px 1.5px at 80% 85%, rgba(255,255,255,0.7), transparent 45%),
        radial-gradient(1.5px 1.5px at 20% 40%, rgba(255,255,255,0.75), transparent 45%),
        radial-gradient(1.5px 1.5px at 60% 10%, rgba(255,255,255,0.7), transparent 45%),
        radial-gradient(1.5px 1.5px at 80% 85%, rgba(255,255,255,0.7), transparent 45%), 
        radial-gradient(1.5px 1.5px at 20% 40%, rgba(255,255,255,0.75), transparent 45%),
        radial-gradient(1.5px 1.5px at 60% 10%, rgba(255,255,255,0.7), transparent 45%),
        radial-gradient(1.5px 1.5px at 80% 85%, rgba(255,255,255,0.7), transparent 45%),
        radial-gradient(1.5px 1.5px at 20% 40%, rgba(255,255,255,0.75), transparent 45%),
        radial-gradient(1.5px 1.5px at 60% 10%, rgba(255,255,255,0.7), transparent 45%),
        radial-gradient(1.5px 1.5px at 80% 85%, rgba(255,255,255,0.7), transparent 45%),        

        /* bright stars */
        radial-gradient(2px 2px at 45% 55%, rgba(255,255,255,0.9), transparent 50%),
        radial-gradient(2px 2px at 15% 65%, rgba(255,255,255,0.85), transparent 50%),
        radial-gradient(2px 2px at 45% 55%, rgba(255,255,255,0.9), transparent 50%),
        radial-gradient(2px 2px at 15% 65%, rgba(255,255,255,0.85), transparent 50%), 
        radial-gradient(2px 2px at 45% 55%, rgba(255,255,255,0.9), transparent 50%),
        radial-gradient(2px 2px at 15% 65%, rgba(255,255,255,0.85), transparent 50%),
        radial-gradient(2px 2px at 45% 55%, rgba(255,255,255,0.9), transparent 50%),
        radial-gradient(2px 2px at 15% 65%, rgba(255,255,255,0.85), transparent 50%),        

        /* deep space gradient */
        linear-gradient(
        180deg,
        #02030f 0%,
        #040822 35%,
        #060c35 60%,
        #01020a 100%
    );

    background-repeat: repeat;
    background-size:
    cover,
    cover,
    cover,

    90px 90px,
    110px 110px,
    130px 130px,
    150px 150px,

    200px 200px,
    220px 220px,
    240px 240px,

    320px 320px,
    360px 360px,

    cover;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    color: white;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
    top: 0;
    left: 0;
    background-image: url("../img/cables.png");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    min-width: 320px;
    height: 100vh;
    box-sizing: border-box;
    
}


@font-face {
    font-family: "glitchFont";
    src: url("../font/KerX.ttf");
}

@font-face {
    font-family: "permanentMarker";
    src: url("../font/PermanentMarker.ttf");
}

@font-face {
    font-family: "vcr";
    src: url("../font/Vcr.ttf");
}

#countdownTimer {
    display: inline-flex;
    flex-direction: row;
    position: absolute;
    top: 2%;
    right: 0;
    width: 50%;
    transform: translate(0, -2%);
    height: 16px;
    text-align: center;
    font-size: 15px;
    white-space: nowrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    color: #ffffff;
    margin: 1vh 3vw 1vh 3vw;
}

#canvasContainer {
    display: flex;
    display: -webkit-flex;
    position: relative; 
    width: 100%; 
    height: 100%;
    background-color: #5f00ad;
    image-rendering: crisp-edges;
    -webkit-image-rendering: crisp-edges;
    outline: #5f00ad solid 2vw;
    -webkit-border-radius: 0.3vw;
    border: 10px solid black;
    border-radius: 0.3vw;
    border-image: linear-gradient(to right, #000000, #000000) 1;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    touch-action: none;
    box-shadow: 
        inset 0 0 0 20px #ffffff, 
        0 0 50px 15px #00d9ff55,
        inset 0 0 0 21px #ffffff,
        0 0 15px 2px #00f7ff,
        0 0 40px 20px #00f7ff;
}

#canvasDiv {
    display: flex;
    display: -webkit-flex;
    position: absolute;
    top: 45px;
    left: 42%;
    margin: 0 5%;
    width: 50%;
    height: 88%;
    min-height: 550px;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#canvasVid, #canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 80%;
    display: block;
    -webkit-box-shadow: 0 0 0 5px black,
    #aa69ff 0 0 1vw;
    box-shadow: 0 0 0 5px black,
    #aa69ff 0 0 1vw;
    image-rendering: crisp-edges;
    -webkit-image-rendering: crisp-edges;
    max-width: -webkit-calc(100vh * (4/3));
    max-width: calc(100vh * (4/3));
    max-height: 100vh;
    aspect-ratio: 4 / 3;
    touch-action: none;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#canvasVid {
    background-color: black;
}

#canvas {
    background-color: black;

}

#logo {
    display: inline-block;
    position: absolute;
    top: 20%;
    left: 90.6%;
    transform: translate(-90.6%, -20%);
    margin: 0.3% 1%;
    width: 48.5%;
    height: 70.5%;
    opacity: 0;
    border: #0055c4 .1vw solid;
    -webkit-box-shadow: #ff00ff 0 0 50px;
    box-shadow: #ff00ff 0 0 50px;
    background-color: transparent;
    background-image: url("../img/logo.gif");
    background-size: 130% 100%;
    background-repeat: no-repeat;
    background-position: center center;
    -webkit-animation: none;
    animation: none;
    z-index: 100;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#vcr {
    display: inline-flex;
    flex-direction: row;
    position: absolute;
    align-items: center;
    align-content: center;
    justify-content: center;
    top: 80%;
    right: 0;
    width: 100%;
    height: 20%;
    z-index: 100000000;
    margin-right: -5px;
}

#vcrStatus {
    display: inline-block;
    position: absolute;
    bottom: 30%;
    left: 33%;
    color: #33ff00;
}

#vcrStatus2 {
    display: inline-block;
    position: absolute;
    bottom: 30%;
    left: 58.5%;
    color: #33ff00;
}

#vhs {
    display: inline-block;
    position: absolute;
    bottom: 65%;
    left: 23%;
    width: 53%;
    height: 35%;
    color: #000000;
    background-image: url("../img/vhs.png");
    background-size: 100% 95%;
    background-repeat: no-repeat;
    opacity: 1;
    border: 1px solid black;
}

#vhsLabel {
    display: inline-flex;
    display: -webkit-inline-flex;
    position: absolute;
    bottom: 28%;
    left: 20.1%;
    width: 70%;
    height: 50%;
    font-family: "permanentMarker";
    font-size: 100%;
    text-align: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-align-content: center;
    align-content: center;
    color: #003cff;
    opacity: 1;
}

input {
    z-index: 1000;
}

input[type="range"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #ffffff;
    -webkit-box-shadow: 0 0 8px #45caff;
    box-shadow: 0 0 8px #45caff;
    height: 100%;
    width: 100%;
    min-width: 155px;
    margin: 0 !important;
}

input[type="range"]::-webkit-slider-runnable-track {
    background-color: #ff004c;
    border: #ff75ed solid 1px;
    height: 90%;
    width: 100%;
    -webkit-border-radius: 0;
    border-radius: 0;
    min-width: 15px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 2vw;
    height: 1.1vw;
    min-width: 20px;
    min-height: 10px;
    background: 
        -webkit-linear-gradient(to right, #dd009b 2px, transparent 4px) 0 0,
        -webkit-linear-gradient(to right, #8c00dd 5px, transparent 2px) calc(50% - 19px) 0,
        -webkit-linear-gradient(to right, #d600dd 5px, transparent 2px) calc(50% - 11px) 0,
        -webkit-linear-gradient(to left, #8c00dd 2px, transparent 4px) 100% 0,
        -webkit-linear-gradient(to bottom, #ffffff, #94009988);
    background: 
        linear-gradient(to right, #dd009b 2px, transparent 4px) 0 0,
        linear-gradient(to right, #8c00dd 5px, transparent 2px) calc(50% - 19px) 0,
        linear-gradient(to right, #d600dd 5px, transparent 2px) calc(50% - 11px) 0,
        linear-gradient(to left, #8c00dd 2px, transparent 4px) 100% 0,
        linear-gradient(to bottom, #ffffff, #94009988);
    border: 2px solid #fa68ff;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    -webkit-box-shadow: 0 0 15px #94009988;
    box-shadow: 0 0 15px #94009988;
    outline: 2px solid #ca00a988;
}

#schizoKnob::-webkit-slider-runnable-track {
    background-color: #00ff40;
}

#schizoKnob::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 34px;
    height: 19px;
    background: 
        -webkit-linear-gradient(to right, #4fffa7 2px, transparent 4px) 0 0,
        -webkit-linear-gradient(to right, #00ff80 5px, transparent 2px) calc(50% - 19px) 0,
        -webkit-linear-gradient(to right, #009991 5px, transparent 2px) calc(50% - 11px) 0,
        -webkit-linear-gradient(to left, #009991 2px, transparent 4px) 100% 0,
        -webkit-linear-gradient(to bottom, #006eff, #003cff);
    background: 
        linear-gradient(to right, #4fffa7 2px, transparent 4px) 0 0,
        linear-gradient(to right, #00ff80 5px, transparent 2px) calc(50% - 19px) 0,
        linear-gradient(to right, #009991 5px, transparent 2px) calc(50% - 11px) 0,
        linear-gradient(to left, #009991 2px, transparent 4px) 100% 0,
        linear-gradient(to bottom, #006eff, #003cff);
    border: 2px solid #00ff80;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    -webkit-box-shadow: 0 0 15px #00ff80;
    box-shadow: 0 0 15px #00ff80;
    outline: 3px solid #0073b6;
}

input[type="file"] {
    border: #ff00ff solid 1px;
    color: #00adc4;
}

input:hover {
    -webkit-box-shadow: #00ff62 0 0 15px;
    box-shadow: #00ff62 0 0 15px;
}

input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #ffffff;
    border-radius: 3px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Unchecked - empty with blue border */
input[type="checkbox"]:not(:checked) {
    background-color: transparent;
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(0, 162, 255, 0.5);
}

input[type="checkbox"]:checked {
    background-color: #d400ff !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 15px #d400ff !important;
}

input[type="checkbox"]:hover {
    border-color: #000000;
    box-shadow: 0 0 12px #d400ff;
}

input[type="checkbox"]:checked:hover {
    background-color: #d400ff !important;
    box-shadow: 0 0 18px #d400ff !important;
}

button {
    -webkit-align-items: center;
    align-items: center;
    text-align: center;
    height: 3.5%;
    min-height: 18px;
    text-decoration: none;
    color: #000000;
    background-color: #008cff;
    border: 2px solid #ffffff;
    margin-top: 1px;
    -webkit-box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: #008cff;
    -webkit-box-shadow: #0051ff 0 0 15px;
    box-shadow: #0051ff 0 0 8px;
}

#fileInput:hover {
    -webkit-box-shadow: #0051ff 0 0 8px;
    box-shadow: #0051ff 0 0 8px;
}

#loadImage::-webkit-file-upload-button,
#fileInput::-webkit-file-upload-button,
#file-input::-webkit-file-upload-button {
    display: flex;
    display: -webkit-flex;
    position: relative;
    width: 100%;
    height: auto;
    min-height: 10px;
    line-height: 10px;
    background-color: #240961;
    color: white;
    border: none;
    text-align: center;
}

#glitchKnobContainer {
    display: flex;
    display: -webkit-flex;
    position: absolute;
    -webkit-flex-direction: row;
    flex-direction: row;
    top: 0;
    right: 0;
    margin-left: 0;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    width: 100%;
    height: 98%;
    border: #ffffff 5px solid;
    background-color: #00ff9588;
    background-image: url("../img/cb.png");
    background-repeat: no-repeat;
    background-size: cover;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-content: center;
    align-content: center;
    filter: invert(100%) hue-rotate(210deg) saturate(150%) drop-shadow(0 0 1px #00f7ff);
}

#glitchKnob1,
#glitchKnob2,
#glitchKnob3 {
    display: inline-block;
    position: relative;
    top: 0;
    left: 0;
    margin: 10px 10px 10px 10px;
    width: 7vw;
    height: 7vw;
    min-width: 80px;
    min-height: 80px;
    background-color: #bbff00;
    background-image: url("../img/knob6.png");
    background-repeat: no-repeat;
    background-size: 100%;
    -webkit-transform-origin: center center;
    transform-origin: center center;
    border: 1vw solid;
    box-shadow: 0 0 0 .2vw #faae00;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    z-index: 1;
    touch-action: none;
}

#glitchKnob1 {
    box-shadow: 0 0 0 .2vw #faae00, #fbff0075 0 0 15px 15px;
    border-color: #00a2ff;
}

#glitchKnob2,
#glitchKnob3 {
    box-shadow: 0 0 0 .2vw #faae00, #00ff8075 0 0 15px 15px;
    border-color: #00ff55;
}

.knob-container {
    display: inline-flex;
    display: -webkit-inline-flex;
    position: relative;
    top: 50%;
    right: 100%;
    -webkit-transform: translate(100%, -50%);
    transform: translate(100%, -50%);
    margin: 0;
    height: 20%;
    width: 100%;
    -webkit-align-items: center;
    align-items: center;
    color: #000000;
    font-weight: bold;
    z-index: 100;
}

#schizoPower {
    display: inline-block;
    position: relative;
    top: 0;
    left: 0;
}

#schizoKnob {
    height: 8%;
    min-height: 10px;
    width: 80%;
}

label {
    font-size: -webkit-calc(0.5vw + 0.5vh + 5px);
    font-size: calc(0.5vw + 0.5vh + 5px);
}

span {
    font-size: -webkit-calc(0.5vw + 0.5vh + 1px);
    font-size: calc(0.5vw + 0.5vh + 1px);
    white-space: nowrap;
}

#videoLength {
    white-space: nowrap;
    width: 40%;
    width: 70%;
    resize: none;
}

#videoLengthDisplay {
    margin-left: 2px;
}

#vid {
    display: inline-block;
    position: relative;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: -1;
}

.container {
    display: block;
    position: relative;
    top: 0;
    left: 0;
    height: 5%;
    width: 100%;
    margin-top: 0;
    padding-bottom: 2px;
    color: black;
    background-color: #009443;
    border-left: 2vh solid #252525;
    border-right: 2vh solid #252525;
}

.input-container {
    display: flex;
    display: -webkit-flex;
    -webkit-align-items: center;
    align-items: center;
    flex-direction: row;
    margin-top: 5px;
    height: auto;
    min-height: auto;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    width: auto;
    min-width: auto;
    max-width: none;
    position: relative;
}

.input-container::before {
    display: none;
}

#videoLength {
    white-space: nowrap;
    width: 40%;
    height: auto;
    border: 1px solid #ff00ff;
}

#videoLengthDisplay {
    margin-left: 2px;
}

/* ============================================
   COMPACT DARK MIXER CONTAINER
   ============================================ */

#mixerAll {
    position: relative;
    top: 11%;
    left: 40px; 
    max-width: 534px;
    width: 40%;
    min-height: 528px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    filter: saturate(150%);
    margin: 0;
    border-radius: 5px;
    z-index: 1;
}

#mixerAll::before {
    content: "";
    position: absolute;
    
    top: -60px; 
    bottom: -60px;    
    
    left: -20px;
    right: -20px;
    
    background: #00f7ff;
    z-index: -1;
    border-radius: 10px;
    
    box-shadow: 
        0 0 15px 2px #00f7ff,
        0 0 40px 20px #ffffff55,
        inset 0 0 0 10px #000000;
    background-color: #000;
}

#wrapsContainer {
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


#wrapContainer {
    display: inline-flex;
    width: 100%;
    height: auto;
    min-height: 258px;
    position: relative;
    top: 0;
    left: 0;
    align-items: center;
    align-content: center;
    justify-content: center;
    text-align: center;
}

#wrap2 {
    display: inline-flex;
    flex-direction: column;
    width: 100%;
    min-height: 258px;
    position: relative;
    top: 0;
    left: 0;
    text-align: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-align-content: center;
    align-content: center;
    z-index: 1;
    white-space: nowrap;
    padding: 0;
}

#loading {
    display: flex;
    flex-direction: row;
    width: auto;
    height: auto;
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: 1.25vw;
    margin-bottom: -1vh;
}

#loading label {
    z-index: 100;
}

#upperLevel {
    display: block;
    position: relative;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    text-align: left;
    box-shadow:
        inset 0 0 24px rgba(119, 0, 255, 0.25), 
        inset 0 1px 6px rgba(0, 217, 255, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(255, 255, 255, 0.15) !important;
    background-color: #000000;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%) !important;
    background-color: rgb(81, 0, 128);
    border-left: 2vh solid #252525;
    border-right: 2vh solid #252525;
    border-top: 2vh solid #252525;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#wrap2 input {
    margin-bottom: 0;
}

#mixer {
    display: grid;
    grid-template-columns: repeat(8, minmax(42px, 1fr));  /* 8 columns, min 52px each */
    grid-auto-rows: auto;
    gap: 0px 5px;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 0 0;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: stretch;
    justify-items: center;
    /* Force dark background */
    overflow-y: hidden;
    background-color: purple;
    border-left: 2vh solid #252525;
    border-right: 2vh solid #252525;
    border-bottom: 2vh solid #252525;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#mixer br {
    display: none;
}

/* ============================================
   COMPACT DARK CHANNEL STRIPS
   ============================================ */
#mixer .input-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    min-width: 20px;
    width: 50%;
    max-width: 100%;
    height: 27vh;
    min-height: 188px;
    padding: 0 1vw 0 1vw; 
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%) !important;
    border: 2px solid #00d9ff !important;
    outline: 1px solid #ffffff !important;
    border-radius: 5px;
    box-shadow: 
        inset 0 1px 2px rgba(0, 217, 255, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(255, 255, 255, 0.15) !important;
    position: relative;
    overflow: visible;
    transition: all 0.15s ease;
}

/* Dark fader track - INCREASED HEIGHT */
#mixer .input-container:has(input[type="range"].vertical)::before {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 150px;
    background: linear-gradient(180deg, #0a0a15 0%, #1f1f3a 50%, #0a0a15 100%);
    border-radius: 3px;
    border: 1px solid #00d9ff55;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 0;
    pointer-events: none;
}

#mixer .input-container:not(:has(input[type="range"]))::before {
    display: none !important;
}

/* Meter marks on dark track */
#mixer .input-container:has(input[type="range"].vertical)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 150px;
    background: repeating-linear-gradient(
        180deg,
        transparent 0px,
        transparent 19px,
        #00d9ff59 19px,
        #00d9ff59 20px
    );
    z-index: 0;
    pointer-events: none;
}

#mixer .input-container:not(:has(input[type="range"]))::after {
    display: none;
}

/* ============================================
   COMPACT DARK LABELS
   ============================================ */
#mixer .input-container span:not([id$="Display"]) {
    font-size: 10px;
    font-weight: bold;
    color: #00d9ff !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: -8vh;
    padding: 0 2px;
    order: -2;
    display: block !important;
    visibility: visible !important;
    width: 100%;
    max-height: 10px;
    overflow: hidden;
    text-shadow: 0 0 5px rgba(0, 217, 255, 0.6) !important;
    background: none !important;
}

/* ============================================
   COMPACT DARK VALUE DISPLAYS
   ============================================ */
#mixer .input-container span[id$="Display"]{
    font-size: 10px;
    color: #ffffff;
    margin-bottom: 0;
    margin-top: -10px;
    padding: 2px 4px;
    order: 12;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: rgba(10, 10, 21, 0.95);
    border-radius: 3px;
    border: 1px solid #00ff88;
    min-width: 48px;
    text-align: center;
    white-space: nowrap;
    text-align: center;
    display: block;
    position: relative;
    bottom: 0;
    left: 0;
    visibility: visible;
    opacity: 1;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5), 
        inset 0 1px 2px rgba(0, 255, 136, 0.25);
}

/* ============================================
   FORCE ALL SLIDERS VERTICAL
   ============================================ */
#mixer input[type="range"],
#mixer .input-container input[type="range"] {
    transform: rotate(-90deg) !important;
    width: 120px !important;
    height: 14px !important;
    margin: 0px 0 !important;
    position: relative;
    z-index: 1;
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    order: 0;
}

#mixer #volume1,
#mixer #volume2,
#mixer #animationSpeed,
#mixer #glitchIntensity,
#mixer #glitchSpeed,
#mixer #meltingIntensity,
#mixer #scale,
#mixer #schizoKnob,
#mixer #hueInput,
#mixer #brightnessInput,
#mixer #contrastInput,
#mixer #masterLevel
{
    transform: rotate(-90deg) !important;
    width: 120px !important;
    height: 14px !important;
    margin: 50px 0 0 0 !important;
    z-index: 10 !important;
}

#mixer input[type="range"]::-webkit-slider-runnable-track {
    background: transparent !important;
    height: 100%;
    border: none;
}

#mixer input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 20px;
    border: 2px solid #00ffff !important;
    border-radius: 3px;
    box-shadow: 
        0 0 8px rgba(132, 0, 255, 0.8),
        inset 0 1px 2px rgba(255, 255, 255, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.5) !important;
    cursor: pointer;
    margin-top: -3px;
    background:
    repeating-linear-gradient(
      to right,
      rgb(255, 255, 255) 0px,
      rgb(255, 0, 255) 2px,
        #8400ff 2px,
      #210099 5px
    );
}

#mixer input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 1),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.5) !important;
    border-color: #66ffff !important;
        background:
    repeating-linear-gradient(
      to right,
      rgb(0, 0, 0) 0px,
      rgb(0, 217, 255) 2px,
        #009991 2px,
      #009991 5px)
}

#mixer input[type="range"]::-webkit-slider-thumb:active {
    box-shadow: 
        0 0 10px rgb(212, 0, 255),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.5) !important;
    border-color: #c766ff !important;
}

/* ============================================
   COMPACT CHECKBOXES
   ============================================ */
#mixer .input-container input[type="checkbox"] {
    margin: 6px 0;
    order: 5;
    width: 15px;
    height: 15px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

#mixer .input-container:has(input[type="checkbox"]) {
    min-height: 55px;
    padding: 6px 4px;
    justify-content: center;
}

#mixer .input-container:has(input[type="checkbox"]) span:not([id$="Display"]) {
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
    font-size: 6px;
}

/* ============================================
   DARK HOVER EFFECTS
   ============================================ */
#mixer .input-container:hover {
    border-color: #00ffff !important;
    box-shadow: 
        inset 0 1px 2px rgba(0, 255, 255, 0.35),
        0 3px 8px rgba(0, 217, 255, 0.5),
        0 0 15px rgba(0, 255, 255, 0.25) !important;
    /* transform: translateY(-1px); */
}

#mixer .input-container:has(input:focus) {
    border-color: #ffff00 !important;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 0, 0.3),
        0 3px 10px rgba(255, 255, 0, 0.5),
        0 0 18px rgba(255, 255, 0, 0.25) !important;
}

/* ============================================
   MULTI-LABEL CONTROLS
   ============================================ */
#mixer .input-container:has(span + span + input[type="checkbox"]) {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap;
    min-height: 65px;
    justify-content: center;
    gap: 3px;
}

#mixer .input-container:has(span + span + input[type="checkbox"]) span {
    font-size: 6px;
    margin: 2px 0;
    line-height: 1.15;
}

/* ============================================
   SCAN LINES
   ============================================ */
#mixer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 217, 255, 0.02) 2px,
        rgba(0, 217, 255, 0.02) 4px
    );
    pointer-events: none;
    z-index: 999;
    border-radius: 5px;
}

/* ============================================
   OTHER CONTROLS
   ============================================ */
.controls {
    display: flex;
    display: -webkit-flex;
    position: relative;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: left;
    align-items: left;
    bottom: 46%;
    left: 9%;
    height: 5%;
    width: 100%;
    z-index: 1;
}

.controls > div {
    margin-bottom: 0px;
}

#textInput, #videoLength {
    background-color: #ffffff;
    color: #000000;
    width: 50%;
    height: 15px;
    margin: 0;
}

textarea {
    display: inline-block;
    position: relative;
    top: 0;
    left: 0;
    height: 2.5%;
    width: 70%;
    resize: none;
}

#colorPicker {
    height: 4vh;
    width: 4vh;
    border: none;
}

#kg {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    text-align: center;
    display: inline;
    margin: 10px;
}

#playSong {
    display: none;
    position: relative;
    top: 0;
    right: 0;
}

.box {
    -webkit-box-shadow: #00eeff 0 0 15px;
    box-shadow: #00eeff 0 0 15px;
}

#playButton,
#playButton2,
#stopButton {
    display: inline-block;
    position: relative;
    top: 1%;
}

#exportButton {
    display: inline-block;
    position: relative;
    top: 0;
    left: 0;
}

#mixer #opacityWarp1, #mixer #opacityWarp2 {
    width: 100% !important;
    height: 14px !important;
    margin: 7vh 0 0 0 !important;
    z-index: 10 !important;
}

#mixer #freq1, #mixer #freq2 {
    width: 100%;
    height: 14px;
    margin: 0 0 12.8vh 0 !important;
    padding: 0;
    z-index: 10 !important;
}

#mixer #freqDisplay1,
#mixer #freqDisplay2 {
    position: relative;
    top: 70%;
    left: 0;
    width: 3vw;
    min-width: 30px;
    padding: 3px 6px;
    height: 10px;
    background-color: #000 !important;
    text-align: center;
    color: #fff;
    font-family: "Courier New", monospace;
    border: 1px solid #00ff88 !important;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mixer {
    margin-top: 10px;
}

.vid-length {
    height: 50px;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotateX(-10deg) rotateY(0deg) rotateZ(-10deg);
        transform: rotateX(-10deg) rotateY(0deg) rotateZ(-10deg);
    }
    100% {
        -webkit-transform: rotateX(10deg) rotateY(.1deg) rotateZ(10deg);
        transform: rotateX(10deg) rotateY(.1deg) rotateZ(10deg);
    }
}

@keyframes spin {
    0% {
        -webkit-transform: rotateX(-10deg) rotateY(0deg) rotateZ(-10deg);
        transform: rotateX(-10deg) rotateY(0deg) rotateZ(-10deg);
    }
    100% {
        -webkit-transform: rotateX(10deg) rotateY(.1deg) rotateZ(10deg);
        transform: rotateX(10deg) rotateY(.1deg) rotateZ(10deg);
    }
}

@-webkit-keyframes glitch {
    0% { -webkit-transform: translate(0); transform: translate(0); }
    10% { -webkit-transform: translate(-.1px, .1px); transform: translate(-.1px, .1px); }
    20% { -webkit-transform: translate(.1px, -.1px); transform: translate(.1px, -.1px); }
    30% { -webkit-transform: translate(-.1px, .1px); transform: translate(-.1px, .1px); }
    40% { -webkit-transform: translate(.1px, -.1px); transform: translate(.1px, -.1px); }
    50% { -webkit-transform: translate(-.1px, .1px); transform: translate(-.1px, .1px); }
    60% { -webkit-transform: translate(.1px, -.1px); transform: translate(.1px, -.1px); }
    70% { -webkit-transform: translate(-.1px, .1px); transform: translate(-.1px, .1px); }
    80% { -webkit-transform: translate(.1px, -.1px); transform: translate(.1px, -.1px); }
    90% { -webkit-transform: translate(-1px, 1px); transform: translate(-1px, 1px); }
    100% { -webkit-transform: translate(0); transform: translate(0); }
}

@keyframes glitch {
    0% { -webkit-transform: translate(0); transform: translate(0); }
    10% { -webkit-transform: translate(-.1px, .1px); transform: translate(-.1px, .1px); }
    20% { -webkit-transform: translate(.1px, -.1px); transform: translate(.1px, -.1px); }
    30% { -webkit-transform: translate(-.1px, .1px); transform: translate(-.1px, .1px); }
    40% { -webkit-transform: translate(.1px, -.1px); transform: translate(.1px, -.1px); }
    50% { -webkit-transform: translate(-.1px, .1px); transform: translate(-.1px, .1px); }
    60% { -webkit-transform: translate(.1px, -.1px); transform: translate(.1px, -.1px); }
    70% { -webkit-transform: translate(-.1px, .1px); transform: translate(-.1px, .1px); }
    80% { -webkit-transform: translate(.1px, -.1px); transform: translate(.1px, -.1px); }
    90% { -webkit-transform: translate(-1px, 1px); transform: translate(-1px, 1px); }
    100% { -webkit-transform: translate(0); transform: translate(0); }
}

@-webkit-keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 100%; }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 100%; }
}

@-webkit-keyframes fadeOut {
    0% { opacity: 100%; }
    100% { opacity: 0; }
}

@keyframes fadeOut {
    0% { opacity: 100%; }
    100% { opacity: 0; }
}

#canvasContainer:fullscreen,
#canvasContainer:-webkit-full-screen,
#canvasContainer:-moz-full-screen,
#canvasContainer:-ms-fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
    width: auto;
    height: auto;
    margin: 0;
    display: -webkit-flex;
    -webkit-align-items: center;
    -webkit-justify-content: center;
    background-color: black;
    padding: 0;
    outline: none;
    background-image: none;
    -webkit-border-radius: 0;
    border-radius: 0;
}

#canvasContainer:fullscreen #canvas, 
#canvasContainer:fullscreen #canvasVid,
#canvasContainer:-webkit-full-screen #canvas,
#canvasContainer:-webkit-full-screen #canvasVid,
#canvasContainer:-moz-full-screen #canvas,
#canvasContainer:-moz-full-screen #canvasVid,
#canvasContainer:-ms-fullscreen #canvas,
#canvasContainer:-ms-fullscreen #canvasVid {
    position: relative;
    aspect-ratio: 4 / 3;

    height: auto;
    width: auto;

    max-height: 100vh;
    max-width: calc(100vh * (4 / 3));

    background: black;
    -webkit-box-shadow: none;
    box-shadow: none;
}

#extraWarps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 8px;
    align-items: center;
    justify-items: center;
    position: relative;
    align-content: center;
    top: 0;
    right: 0;
    background-color: #e4e4e4;
    width: auto;
    min-width: 200px;
    height: auto;
    padding: 4px 2px;
    margin: 2px 5px 2px 5px;
    border-radius: 10px;
    border: solid 3px white;
}

#extraWarps div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    align-content: center;
    margin: 0;
    line-height: 1;
    margin: 0 12px 0 12px;
    padding: 0;

}

#extraWarps input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0 0.1vw 0 0.1vw;
}

#btnsHome {
    display: flex;
    position: relative;
    top: 0;
    left: 0;
    height: auto;
    width: 100%;
    text-align: left;
    padding-bottom: 2px;
    padding-top: 2px;
    margin: 0;
}

.fourBtns {
    font-size: 0.7rem;
    margin-bottom: 2px;
    padding: 2px 5px;
    max-width: 20%;
    min-width: 20%; 
    background-color: #008cff;
    cursor: pointer;
    border: 1px solid white;
}

#adView {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    align-content: center;
    width: 90%; 
    max-width: 500px;
    min-width: 300px;
    height: 90px; 
    max-height: 80px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    background: #f0f0f0 url("../img/hdead3.png") center center / cover no-repeat;
    cursor: pointer;
}


@media screen and (max-width: 768px) {
    #mixer {
        grid-template-columns: repeat(7, 1fr) !important;  /* 7 columns on mobile instead of 8 */
        gap: 3px 3px !important;
        padding: 2px 3px !important;
    }
    
    #mixer .input-container {
        min-width: 40px !important;
        padding: 4px 2px !important;
        min-height: 180px !important;
    }
    
    #mixer .input-container span:not([id$="Display"]) {
        font-size: 8px !important;
        margin-bottom: 18px !important;
    }
    
    #mixer .input-container span[id$="Display"] {
        font-size: 8px !important;
        padding: 4px 2px !important;
    }
}

/* Extra small phones */
@media screen and (max-width: 480px) {
    #mixer {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

input[type="file"] {
    display: none;
}

/* Style the label to look like a button */
.custom-file-upload {
    border: 1px solid #ccc;
    display: inline-block;
    padding: 15px 12px;
    width: 4%;
    height: auto;
    min-height: 9px;
    max-height: 9px;
    line-height: 9px;
    cursor: pointer;
    background-color: #8c00ff;
    color: white;
    text-align: center;
    text-decoration: none;
    margin: 0;
}

.custom-file-upload:hover {
    -webkit-box-shadow: #8c00ff 0 0 15px;
    box-shadow: #8c00ff 0 0 8px;
}

#clearImage {
    display: inline-flex;
    flex-direction: column;
    position: relative;
    padding: 11px 2px;
    width: 50%;
    max-width: 50px;
    min-width: 50px;
    top: 0;
    left: 0;
    align-items: center;
    align-content: center;
    justify-content: center;
    transform: translateY(-1px);
}

@media (max-height: 700px) {
#mixerAll {
    position: relative;
    bottom: 1vh;
    left: 1.5vw; 
    max-width: 532px;
    width: 40%;
    min-height: 528px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    filter: saturate(150%);
    margin: 0 1%;
    border-radius: 5px;
    z-index: 1;
}

#mixerAll::before {
    content: "";
    position: absolute;
    
    top: -70px; 
    bottom: -70px;    
    
    left: -20px;
    right: -20px;
    
    background: #00f7ff;
    z-index: -1;
    border-radius: 10px;
    
    box-shadow: 
        0 0 15px 2px #00f7ff,
        0 0 40px 20px #ffffff55,
        inset 0 0 0 10px #000000;  
    background-color: #000;
}

#mixer #freq1, #mixer #freq2 {
    width: 100%;
    height: 14px;
    margin: 0 0 88px 0 !important;
    padding: 0;
    z-index: 10 !important;
}
}

