*{
    font-family:'Lato',sans-serif;
}
body{
    background:#222;
    color:#999;
    padding:0;
    margin:0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}
.barras {
    position: absolute;
    top: 30%;
    width: 560px;
}
.centro{
    text-align:center;
    margin-top: 3vh;
}
.colder {
    max-width: 100%;
    min-width: 50%;
    z-index: 10;
    position: relative;
}
.titulo {
    font-size: 2em;
    font-family: sans-serif;
    font-weight: bold;
    font-variant: small-caps;
}
#circle{
    background:#000;
}
.invertir {
    filter: invert(1);
}
.invert {
    background:#eee;
}
.invert > * {
    filter: invert(1);
}
.invert #circle{
    background:#fff;
}
input[type=text]{
    vertical-align:middle;
    height:30px;
    line-height:30px;
    font-size:20px;
    text-align: center;
}
button{
    vertical-align:middle;
    cursor:pointer;
    height:40px;
    line-height:30px;
    font-size:20px;
}
#inversion{
    width:30px;
    text-align:center;
}
.inputLine,.inputLine1 {
    width: 90%;
    max-width: 480px;
    text-align: center;
    margin: 10px auto;
}
.inputLine input{
    width: 50%;
    max-width: 480px;
    text-align: center;
    margin: 0 auto;
    background: #333;
    border: 1px solid #000;
    color: #aaa;
    font-size: 1.3em;
    border-top-left-radius: 0.7em;
    border-bottom-left-radius: 0.7em;
}
.inputLine input[type=checkbox],.inputLine1 input[type=checkbox]{
    display: inline-block;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
    transform: scale(2);
}
.inputLine1 input{
    width: 70%;
    max-width: 480px;
    text-align: center;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #000;
    color: #000;
    font-size: 1.6em;
    border-top-left-radius: 0.7em;
    border-bottom-left-radius: 0.7em;
    font-weight: bold;
}
.invert .inputLine input{
    background: #fff;
    color: #666;
}
.invert {
    filter: invert(1);
}
.round-left {
    border-top-left-radius: 0.7em!important;
    border-bottom-left-radius: 0.7em!important;
}
.round-right {
    border-top-right-radius: 0.7em!important;
    border-bottom-right-radius: 0.7em!important;
}
.toggle {
    padding: 2px 5px;
    width: 10%;
    background: #222;
    border: none;
    color: #fff;
    font-weight: bold;
    border-radius: 0%;
    height: 1.7em;
}
.toggli {
    padding: 2px 5px;
    width: 10%;
    background: #000;
    border: none;
    color: #fff;
    font-weight: bold;
    border-radius: 0%;
    height: 1.7em;
}
.toggln {
    padding: 2px 5px;
    width: 10%;
    background: #000;
    border: none;
    color: #fff;
    font-weight: bold;
    border-radius: 0%;
    height: 1.7em;
}
.toggle:hover,.toggli:hover,.toggln:hover {
    background: #ddd;
    color: #000;
    box-shadow: inset 0px 0px 5px #000;
}
.toggle:active,.toggli:active,.toggln:active {
    background: #eee;
    color: #000;
    box-shadow: none;	
}
.opciones {
    margin: 20px auto;
}
.inputLine input.full{
    width: 93%;
}
input[type=checkbox],label{
    cursor: pointer;	
}
.footer {
    width:300px;
    text-align:center;
    margin:0 auto;
    padding:10px;
    color:#555;
    font-size: 12px;
}
.footer a {
    color:#777;
    text-decoration:none;
}


/* PLAY & STOP - MANECILLA DEL RELOJ */
.playButton {
    /* padding: 8px 20px; */
    width: 40px;
    background: #00AAFF;
    color: #fff;
    border: none;
    border-radius: 6px;
    /* font-size: 1.1em; */
    cursor: pointer;
    /* margin: 10px 5px; */
    transition: background 0.3s;
}

.playButton:hover {
    background: #0088CC;
}

.playButton:active {
    background: #006699;
}

input[type=range] {
    width: 150px;
    margin: 0 10px;
    vertical-align: middle;
}

input[type=number] {
    width: 60px;
    text-align: center;
    margin: 0 10px;
    vertical-align: middle;
    padding: 2px 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Remove spinner buttons for a cleaner look */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
}

.escalar {
    font-size: 1.3em;
    transform: scale(1.4);	
}

/* SQUARES VISUALIZATION */
.square-container-container {
    max-width: 80%;
    width: min-content;
    max-height: 40vh;
    height: min-content;
    overflow-x: auto;
    overflow-y: auto;
    margin: 20px auto;
    justify-content: center;
}
.square-container {
    display: flex;
    align-items: flex-end;
    margin: 20px;
}

.clave-column {
    display: flex;
    flex-direction: column-reverse; /* Change back to column-reverse */
    align-items: center;
    margin: 0 1px;
}

.square {
    width: 20px;
    height: 20px;
    border: 2px solid;
    margin: 2px;
    transition: all 0.2s ease;
}

.square.bottom-square {
    background-color: #FF5733 !important; /* Orange-redish color */
    border-color: #FF5733 !important;
}

.square.highlighted {
    opacity: 1 !important;
    border-color: #FFFFFF !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.column-number, .column-figure {
    order: -1; /* This forces these elements to appear at the bottom */
    margin-top: 6px;
    color: #bbb;
}
.invert .column-number, .invert .column-figure {
    color: #333;
}

.column-number {
    font-size: 14px;
}

.column-figure {
    margin: 0;
    font-size: 32px;
    line-height: 30px;
}

/* Tempo setting elements */
#tempoSlider {
    width: 40%;
    margin: 0;
}

#tempoValue {
    display: inline-block;
    min-width: 40px;
    font-size: 0.9em;
    color: #aaa;
}
.invert #tempoValue {
    color: #666;
}
#tempoType {
    border: none;
    background: none;
    color: #999;
    cursor: pointer;
    font-weight: bold;
}

/* Bottom square styling */
.square.bottom-square {
    background-color: #FF5733 !important; /* Orange-redish color */
    border-color: #FF5733 !important;
}

/* When highlighted, maintain the special border */
.square.bottom-square.highlighted {
    border-color: #FFFFFF !important;
    background-color: #FF7755 !important; /* Slightly lighter when highlighted */
}



@media (orientation: portrait) {
    body{
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .barras {
        top: 10%;
        width: 100%;
    }
    .square-container-container {
        max-width: 80vw;
    }
}

/* CR-DRAW.JS */
.canvas-container {
    display: inline-block;
    margin: 0;
    position: relative;
}
.canvas-title {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
}
.canvas-clave {
    width: 200px;
    height: 200px;
    margin: 0 auto;
}
.smallt {
    height: 28px;
    font-size: 0.9em;
    line-height: 100%;
}

/* Manual Info Modal Styles */
.manual-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff!important;
    color: #333!important;
}
.manual-content a {
    color: #933;
    text-decoration: none;
}
.manual-content a:visited {
    color: #633;
}
.manual-content a:hover {
    color: #944;
    text-decoration: underline;
}
.manual-section {
    margin: 30px 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
}
.manual-toc {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.element-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}
.element-card h3 {
    margin-top: 0;
}

input.peque {
    background-color: #eee!important;
    color: #333!important;
    font-size: 1em;
    height: 24px;
}
@media (max-width: 600px) {
    .manual-content {
        padding: 10px;
    }
}