:root {
    --alf-green: #38288A;
    --alf-beige: #dfdfdf00;
    --fundamental-color: #1b1b1b;
    --black-shadow: 2px 2px 10px rgba(0, 0, 0, 0.116);
    --white-shadow: inset 0px 0px 20px #444444; 
    --border-color: #303030;
    --blue: #38288A;
    --gray: #b6b6b6;
}

html,
body,
input,
textarea,
button,
select {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    border: 0;
    padding: 0;
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    color: rgb(255, 255, 255);
    font-weight: bold;
    -webkit-user-select: none;
    user-select: none;
}

body {
    box-sizing: border-box;
    background: var(--fundamental-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    overscroll-behavior-y: none;
}

.container {
    display: flex;
    box-sizing: border-box;
    border: 2px solid var(--border-color);
    box-shadow: var(---black-shadow);
    margin: 0.5vw;
    background: var(--alf-beige);
    border-radius: 3.2vw;
}

.desktop-only,
.mobile-only{
    display:none;
}

#terminal-container {
    box-sizing: border-box;
    position: relative;
    background: rgba(0, 0, 0, 0);
    border: 1px solid var(--border-color);
    width: 83vw;
    height: 14vw;
    margin: 1vw;
    padding: 1.3vw;
    padding-left: 2vw;
    border-radius: 3vw;
    box-shadow: var(--black-shadow);
}

#terminal-clear-button{
    top: 0vw;
    right: 2vw;
}

#terminal-lock-button{
    top: 0vw;
    right: 5vw;
}

#terminal-container button {
    position: absolute;
    background-color: rgba(75, 75, 75, 0);
    border-radius: 1vw;
    font-size: 3vw;
    cursor: pointer;
    border: none;
    color: #e6e5e5;
    text-align: center;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.3s;
}

#terminal-container button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#terminal-log{
    overflow: hidden;
    font-weight: normal;
    font-family: monospace;
    font-size: 1.4vw;
    display: flex;
    flex-direction: column-reverse; 
}

#hack-spacer {
    display: grid;
    background: var(--alf-green);
    width: 84vw;
    margin: 1vw;
    height: 6vw;
}

#user-container {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    overscroll-behavior-y: none;
}

#mobile-button,
#mobile-joystick,
#desktop-axis,
#desktop-button {
    width: 27vw;
    height: 27vw;

}

#mobile-joystick {
    justify-content: center;
    align-items: center;
    box-shadow: var(--black-shadow);
}

#mobile-button {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 2vw;
    box-shadow: var(--black-shadow);
}

#joystick-background {
    border-radius: 1vw;
    background-image: url('axes_mobile.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* background-size: cover; */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24vw;
    height: 24vw;
    border-radius: 12vw;
}

.joystick {
    background-image: url('joystick_ball.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 21px 33px 48px 2px rgba(0,0,0,0.62);
    -webkit-box-shadow: 21px 33px 48px 2px rgba(0,0,0,0.62);
    -moz-box-shadow: 21px 33px 48px 2px rgba(0,0,0,0.62);
    border-radius: 50%;
    cursor: pointer;
    height: 13vw;
    width: 13vw;
}

#interface {
    width: 27vw;
    height: 27vw;
    display: grid;
    grid-template-rows: 5vw  1fr 2fr;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1vw;
    padding: 1.3vw;
    box-shadow: var(--black-shadow);
}

#ble-button {
    height: 100%;
    border-radius: 3vw;
    font-size: 1vw;
    margin-left: auto;    
    font-weight: 400;
    cursor: pointer;
    border: none;
    color: #ffffff;
    background-color: var(--blue);
    text-align: center;
    padding: 0 1.5vw 0 1.5vw;
    background-color: var();
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.3s;
    box-shadow: 0 0.6vw 1vw rgba(0, 0, 0, 0.1);
}
#ble-button:hover {
    background-color: var(--blue/10);
}
#ble-button:active {
    background-color:var(--blue/10);
    transform: translateY(2px);
    box-shadow: 0 0.6vw 1vw rgba(0, 0, 0, 0.1);
}

#ble-status {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* o space-between según prefieras */
    width: 100%;                  /* ocupa todo el ancho del padre */
    padding: 0 0 0 1vw;         /* relleno interno en rem para mantener consistencia */
    box-sizing: border-box;       /* incluye padding en el cálculo de ancho */
    background-color: transparent;
}

#ble-status button {
    flex-shrink: 0;           /* evita que el botón se encoja */
    font-weight: 300;
    font-size: 1.3vw;          /* texto estable */
    padding: 0.25rem 0.75rem; /* espacio interno uniforme */
    background-color: transparent;
    color: var(--gray);
    border: none;
    cursor: pointer;
}

#ble-status span {
    font-size: 2vw;   
    margin-right: 0.66vw;
}

#mobile-button button {
    font-size: 3vw;
    font-weight: lighter;
    background-color: rgba(128, 128, 128, 0);
    transform: scale(1.3);
    border-radius: 100%;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--black-shadow);
}

#desktop-button {
    display: grid;
    padding: 1vw;
    grid-gap: 0.6vw;
    grid-template-rows: 1fr 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    box-shadow: var(--black-shadow);
}

#desktop-button button {
    font-size: 3vw;
    text-align: center;
    background-color: var(--fundamental-color);
    box-shadow: var(--black-shadow);
    font-weight: lighter;
    color: rgb(255, 255, 255);
    border: 2px solid var(--border-color);
    border-radius: 2.3vw;
}

#desktop-axis {
    display: grid;
    padding: 1vw;
    grid-row-gap: 1vw;
    grid-column-gap: 0.5vw;
    grid-template-rows: 1fr 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    box-shadow: var(--black-shadow);
}

#desktop-axis div {
    font-size: 2vw;
    border: none;
}

.slider-non {
    font-weight: 300;
    display: flex;
    color:var(--gray);
    justify-content: center;
    align-items: center;
}

.value {
    color: white
}

.slider-bar {
    border-radius: 1vw;
    width: 12vw;
    height: 1vw;
    background: var(--blue);
    box-shadow: inset 0px 0px 20px #000000; 
}

#settings-grid {
    display: grid;
    padding: 0.5vw;
    grid-column-gap: 0.1vw;
    grid-template-columns: 3fr 1fr;
    grid-column: span 2;
    border-radius: 1vw;
    justify-content:flex-end;
    align-items: center;
    text-align: center;
}

.settings-label {
    display: flex;
    justify-content:flex-start;
    align-items: center;
    text-align: left;
    font-size: 1.2vw;
    font-weight: lighter;
}

.settings-toggle {
    position: relative;
    display: inline-block;
    margin-left: 1.25vw;
    height: 2.5vw;
    touch-action: manipulation; 
}

.toggle-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 3vw;

}

.toggle-nub {
    position: absolute;
    content: "";
    height: 2vw;
    width: 2vw;
    left: 0.25vw;
    bottom: 0.25vw;
    background-color: rgb(255, 255, 255);
    border-radius: 50%;
}

#gamepad-select {
text-align-last:left;
width: 100%;
justify-content: center;
border-radius: 1vw;
height: 3vw;
color: #ffffff;
background-color: rgba(97, 97, 97, 0);
margin: 0.4vw 0 0.4vw 0.83vw;
}

.option-joystick {
    border-radius: 1vw;
    color: #ffffff;
    font-size: 1vw;
    font-weight: 300;
    border: 1px solid var(--border-color);
    background-color: #1b1b1b;
}

.joystick-options {
    color: #ffffff;
    display: flex;
    margin: 1.66vw 0 1.66vw 0;
    justify-content: center;
    padding: 0 1.66vw 0 1.66vw;
    align-items: center;
    border: 0.25vw solid var(--border-color);
    grid-column: span 2;
    border-radius: 1vw;
}


.joystick-options span {
    font-size:  3.33vw;
}

.ble-content {
    display: flex;
    justify-content: space-between;
    box-shadow: var(--white-shadow);
    background-color: #303030;
    border: 2px solid rgba(136, 136, 136, 0.3);
    font-size: 1.5vw;
    font-weight: lighter;
    text-align: left;
    border-radius: 3vw;
    padding: 0.5vw;
    grid-column: span 2;
    align-items: center;
}

.logotype {
    height: 9vw;
}

.logotype img {
    margin-top: 1.6vw;
    width: 25vw;
}

#sponsors {
    height: 25vw;
    opacity: 0.25; /* Hace la imagen 50% transparente */
}

.option {
    font-size: 3.3vw;
    font-weight: 100;
}