/* GLOBAL */

html, body {
    padding: 0;
    margin: 0;
    overflow: hidden;
    overflow-x: hidden;
    -webkit-text-size-adjust: none;
    width: 100%;
    height: 100%;
    position: fixed;
}

/* IDs */

#overlays {
    display:none; 
    position: absolute; 
    left: 0; 
    right: 0; 
    top: 0; 
    bottom: 0; 
    background-color: 
    rgba(0,0,0,0.5); 
    z-index: 200;
}

#title {
    padding: 10px;
}

#canvas {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

#connecting {
    display:none;
    position: absolute; 
    left: 0; 
    right: 0; 
    top: 0; 
    bottom: 0; 
    z-index: 100; 
    background-color: rgba(0,0,0,0.5);
}

#nick {
    width: 200px;
    float: left;
}

#team {
    width: 100px;
    float: right;
}

#gamemode {
    width: 200px;
    margin-left: 10px;
    margin-right: 5px;
    float: left;
}

#helloDialog {
    width: 600px;
    background-color: #FFFFFF;
    margin: 10px auto;
    border-radius: 15px;
    padding: 5px 15px 5px 15px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

/* Evitar scroll horizontal global */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Contenedor del chat */
#chat_container {
    position: fixed;
    bottom: 7px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 100;
    max-width: calc(100% - 20px);
}

/* Caja de texto */
#chat_textbox {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 14px;
    width: 380px;
    outline: none;
    box-sizing: border-box;
}

#emoji_btn {
    position: relative; /* 🔑 el panel se basa en este botón */
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 47.5%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

#emoji_btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

#emoji_picker {
    position: absolute; 
    bottom: 10px;            /* alineado en la base del botón */
    left: 355px;           /* 👉 aparece a la derecha del botón */
    background: rgba(0, 0, 0, 0.95);
    border-radius: 12px;
    padding: 0;
    z-index: 101;
    backdrop-filter: blur(10px);
    width: 320px;
    max-width: calc(100vw - 60px); /* nunca se pasa de pantalla */
    height: 280px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}


/* Categorías */
.emoji_categories {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px 12px 0 0;
    padding: 8px;
    gap: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Botones categorías */
.category_btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category_btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.category_btn.active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Contenido emojis */
.emoji_content {
    height: 220px;
    overflow-y: auto;
    padding: 8px;
}

/* Secciones emojis */
.emoji_section {
    display: none;
}

.emoji_section.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 4px;
}

/* Cada emoji */
.emoji_item {
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    text-align: center;
    transition: background 0.2s ease;
    user-select: none;
}

.emoji_item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* Scrollbar personalizada */
.emoji_content::-webkit-scrollbar {
    width: 6px;
}

.emoji_content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.emoji_content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.emoji_content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

#footer {
    text-align: center;
    margin-bottom: 10px;
    margin-top: -10px;
}

#play-btn {
    margin-left: 10px;
    width: 290px;
}

#settings-btn {
    float: left;
}

#spectate-btn {
    float: right;;
}

#refresh-gamemodes-btn {
    margin-left: 0px; 
}

#mobileStuff {
    display: none;
}
#touchpad, #touchCircle, #splitBtn, #ejectBtn {
    position: fixed;
}
#touchpad, #splitBtn, #ejectBtn {
    z-index: 2;
}
#touchpad {
    background: #000;
    opacity: 0.3;
    width: 20vw;
    height: 20vh;
    left: 0;
    bottom: 0;
}
#touchCircle {
    width: 4vw;
    height: 4vw;
    border-radius: 2vw;
    background: #f00;
    opacity: 0.3;
    z-index: 3;
}
#splitBtn, #ejectBtn {
    width: 8vw;
    height: 8vw;
    border-radius: 4vw;
    background: #777;
    opacity: 0.5;
}
#splitBtn {
    right: 18vw;
    bottom: 0;
}
#ejectBtn {
    bottom: 18vw;
    right: 0;
}
#settings {
    display: none;
}
#instructions {
    display: none;
}

/* CLASSES */

.checkbox label {
    margin-right: 10px;
}

.mb-10 {
    /*margin-top: 10px;*/
    position: absolute;
    padding: 0px 10px 0px 10px;
    left: -210px;
    background: #FFF;
    width: 200px;
    height: 245px;
    text-align: center;
}

.mb-10 h3 {
    margin-bottom: 20px;
}

.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
}

.center {
    display: table;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gallery {
    width: 64%;
    float: right;
}
.skin {
    list-style-type: none;
    margin-right: 10px;
    margin-bottom: 10px;
    float: left;
    max-width: 150px;
}
.circular {
    width: 150px;
    height: 150px;
    border-radius: 75px;
    -webkit-border-radius: 75px;
    -moz-border-radius: 75px;
    background-repeat: no-repeat;
    box-shadow: 0 0 8px rgba(0, 0, 0, .8);
    -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .8);
    -moz-box-shadow: 0 0 8px rgba(0, 0, 0, .8);
    background-size: 150px 150px;
    cursor: pointer;
}
.circular:hover {
    box-shadow: 0 0 12px rgba(0, 0, 0, .8);
    -webkit-box-shadow: 0 0 12px rgba(0, 0, 0, .8);
    -moz-box-shadow: 0 0 12px rgba(0, 0, 0, .8);
    -webkit-transition: all 0.2s linear;
    -o-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    -ms-transition: all 0.2s linear;
    transition: all 0.2s linear;
}
.skin > .title {
    cursor: pointer;
    text-align: center;
}
.skin > .title:hover {
    text-shadow: 0 0 2px rgba(0, 0, 0, .8);
    -webkit-transition: all 0.2s linear;
    -o-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    -ms-transition: all 0.2s linear;
    transition: all 0.2s linear;
}
.imgDescription {
    text-align: center;
    position: relative;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(29, 106, 154, 0.72);
    color: #fff;
    visibility: hidden;
    opacity: 0;
    transition: visibility opacity 0.2s;    
    -webkit-transition: visibility opacity 0.2s;
}
.circular:hover .imgDescription {
    visibility: visible;
    opacity: 1;
}
.grecaptcha-badge {
    visibility: hidden; 
}

