:root {
    --primary-gold: #dcbf87;
    --shade-gold: #bc9c6d;
    --font-family: "gamay-narrow", sans-serif;
}

  

body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(10, 10, 10, 0.78), rgba(10, 10, 10, 0.78)),
        url('/images/homepage/hero/SoccerStadium2-blurry4.png') center / cover no-repeat;
    min-height: 100vh;
}

#logoContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    height: 80px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(220, 191, 135, 0.25);
    z-index: 1000;
    box-sizing: border-box;
}

#logoContainer a {
    display: flex;
    align-items: center;
}

#logoContainer img {
    height: 60px;
    width: auto;
}

.back-btn {
    color: var(--primary-gold);
    font-size: 22px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

#settingsContainer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100%;
    margin-top: 80px;
    height: calc(100vh - 80px);

    overflow-y: scroll; /* Allows scrolling within the container */
}

#componentContainer {

    justify-content: left;
    overflow-y: auto; /* Allows scrolling for long lists of components */
    width: 410px;
    height: 100%; /* Full height of its parent */
    padding: 10px; /* Space for components */
    box-sizing: border-box; /* Includes padding in width calculation */

}

#canvasContainer {
   
    justify-content: right;
    height: 100%; /* Full height of its parent */
    width: 310px;   
    position: sticky;
    top: 100px; /* Stays below the header */
    margin-right: 0px;
    
}

canvas#playerCanvas {

    width: 300px;
    height: 575px;
    border-style: solid;
    border-color:#dcbf87;
    border-width: 5px;
    border-radius: 10px;

    margin-top: 10px;
    
}

canvas#gameCanvas {

    width: 600px;
    height: 700px;
    border-style: solid;
    border-color: #dcbf87;
    border-width: 5px;
    border-radius: 10px;

    margin-top: 10px;
    
}


canvas#backgroundCanvas {

    width: 300px;
    height: 575px;
    border-style: solid;
    border-color: #dcbf87;
    border-width: 5px;
    border-radius: 10px;

    margin-top: 10px;
    
}







/*
.settings-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start; 
    height: 50vh; 
    padding: 20px;
    gap: 20px; 
  }

*/
  

/*
.settings-form {
    flex: 1;
    flex-wrap: wrap;
    flex-direction: column;
    overflow-y: auto; 
}

*/





.component {
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #dcbf87;
}

.component.developerTools {


    border-style: dashed;
    border-color: red;

}

.componentHeader {

    font-family: var(--font-family);
    font-weight: 600;
    font-style: normal;
    font-size: 20px;

    width: 100%;
    color: #dcbf87;
    
    text-align: center;

    margin-bottom: 20px;

}

.componentBody {

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    padding-bottom: 10px;

}







#admin {

    display: flex;
    flex-direction: column;
    justify-content: center;

}

.input-group#newOrExistingCharacterGroup {

    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;

}

.input-group#existingCharacterGroup {

    display:flex;
    flex-direction: column;
    justify-content: center;
    flex-wrap: wrap;

    display: none;
    

}

#editCharacter {

    align-self: flex-end;

}

#admin select {
    width: 100%;
    padding: 8px 32px 8px 14px;
    box-sizing: border-box;
    border-radius: 20px;
    background: #111;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    font-family: var(--font-family);
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23dcbf87' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

#dbAdmin {

    display: flex;
    flex-direction: column;
    justify-content: center;

}

.input-group#dbAdminGroup {

    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;

}



label.inputHeader {
    font-family: var(--font-family);
    font-weight: 600;
    font-style: normal;
    font-size: 15px;

    width: 100%;
    text-align: left;


    display: block;
    color: #dcbf87;
    margin-bottom: 5px;
}




#gender {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: center;

}


/*************************************/
/*          Name and number          */
/*************************************/
#namenumber {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: center;

}


#namenumber .input-group {
    height: auto;
    margin: 5px;
    margin-bottom: 20px;
    min-width: 70px;
}


/*

#namenumber label {
    font-family: "gamay-narrow", sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 15px;

    width: 100%;
    text-align: left;


    display: block;
    color: #dcbf87;
    margin-bottom: 5px;
}

*/

#namenumber input, #namenumber select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box; /* Includes padding in width */
    border-radius: 20px;

}


/***********************************/
/*        LOADING INDICATOR        */
/***********************************/

#loadingIndicator {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.loader {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #dcbf87;
    width: 80px;
    height: 80px;
    animation: spin 2s linear infinite;
}

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



/***************************************/
/*  Name and number size and position  */
/***************************************/

#nameNumberSizePosition {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: center;

}

#nameNumberSizePosition .input-group {
    margin: 10px 0;
    height: 25px;
    line-height: 15px;

    margin: 5px;
    margin-bottom: 40px;
    min-width: 70px;

}

#nameNumberSizePosition label {
    font-family: var(--font-family);
    font-weight: 600;
    font-style: normal;
    font-size: 15px;

    width: 100%;
    text-align: left;


    display: block;
    color: #dcbf87;
    margin-bottom: 5px;
}

#nameNumberSizePosition input, #nameNumberSizePosition select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box; /* Includes padding in width */
    border-radius: 20px;

}

#nameNumberSizePosition button {

    font-family: var(--font-family);
    display: inline-block;
    min-height: 50px;
    min-width: 50px;
    background-color: black;
    color: #dcbf87;

    border-radius: 26px;
    cursor: pointer;
    border: 2px solid #dcbf87;
    margin: 5px;

    text-align: center;
    cursor: pointer;
    margin: 5px;

}

#nameSizeDisplay, #namePositionDisplay, #numberSizeDisplay, #numberPositionDisplay {

    font-family: var(--font-family);
    color: #dcbf87;

}

#nameNumberSizePosition div {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: center;

}




#skinTones {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: space-evenly;

}

#continent {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: center;

}

#countries {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: space-evenly;

}

#shoeColor {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: space-evenly;

}

#shoeModels {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: space-evenly;

}

#saveCharacter {

    flex-direction: row;
    flex-flow: row wrap;
    justify-content: center;

}

#mainLogoContainer {

    display: flex;
}

#logo {

    margin: auto;

}



/********************************************/
/*                  BUTTONS                 */
/********************************************/
button {
    all: unset;  
}

/**************************/
/*  REEL FUUTBULL BUTTON  */
/**************************/
.reel-button {

    all: unset;

    position: relative; /* This is needed for Tooltip to work */
    display: inline-block;
    width: 93px;
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--shade-gold);
    border-radius: 26px;
    cursor: pointer;
    border: 2px solid var(--shade-gold);
    margin: 5px;

}

.reel-button:hover {
    outline: 1px solid var(--shade-gold);
    filter: brightness(120%);
}

.reel-button:focus {
    outline: 1px solid var(--shade-gold);
}

.reel-button:active {
    filter: contrast(90%); 
    filter: brightness(120%);
}

.reel-button.selected {
    outline: 1px solid var(--shade-gold);
    filter: contrast(90%); 
    filter: brightness(120%);
}





/*******************/
/*  ADMIN BUTTONS  */
/*******************/
#newCharacter, #existingCharacter, #editCharacter, #deleteCharacter, #logThisCharacter, #logAllCharacters {

    width: 93px;
    height: 50px;

}


#newCharacter img, #existingCharacter img, #editCharacter img, #deleteCharacter img, #logThisCharacter img, #logAllCharacters img {

    width: 93px; /* 927 */
    height: 50px; /* 500 */

}





/*******************/
/*  GENDER BUTTON  */
/*******************/
.gender-button {

    position: relative; /* This is needed for Tooltip to work */
    display: inline-block;
    width: 50px;
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--shade-gold);
    border-radius: 26px;
    border: none;
    cursor: pointer;
    border: 2px solid var(--shade-gold);
    margin: 5px;
    
}

.gender-button img {

    width: 50px;
    height: 50px;

}

.gender-button:hover {
    outline: 1px solid var(--shade-gold);
    filter: contrast(90%); 
    filter: brightness(120%);
}

.gender-button:focus {
    outline: 1px solid var(--shade-gold);
    filter: contrast(90%); 
    filter: brightness(120%);
}

.gender-button:active {
    filter: contrast(90%); 
    filter: brightness(120%);
}

.gender-button.selected {
    outline: 1px solid var(--shade-gold);
    filter: contrast(90%); 
    filter: brightness(120%);
}

.gender-button:hover::after {
    
    content: attr(data-gender);
    
    font-family: var(--font-family);
    font-weight: 400;
    font-style: normal;
    font-size: 12px;

    position: absolute;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-35%);

    background-color: black;
    color: var(--primary-gold);
    text-align: center;
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 8px;
    z-index: 1;

}

/**********************/
/*  SKIN TONE BUTTON  */
/**********************/

.skin-tone-button {

    position: relative; /* This is needed for Tooltip to work */
    display: inline-block;
    
    width: 50px; 
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--shade-gold);
    border-radius: 26px; 
    border: 2px solid var(--shade-gold);
    cursor: pointer;
    margin: 5px;
   
}

.skin-tone-button img {

    width: 50px;
    height: 50px;

}

.skin-tone-button:hover {

    outline: 2px solid var(--shade-gold);

}

.skin-tone-button:focus {

    outline: 2px solid var(--shade-gold);

}

.skin-tone-button:active {
    outline: 2px solid var(--shade-gold);
}

.skin-tone-button.selected {
    outline: 2px solid var(--shade-gold);
    filter: contrast(90%); 
}

.skin-tone-button:hover::after {

    content: attr(data-colorname);

    font-family: var(--font-family);
    font-weight: 400;
    font-style: normal;
    font-size: 12px;

    position: absolute;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-35%);

    background-color: black;
    color: var(--primary-gold);
    text-align: center;
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 8px;
    z-index: 1;
 
}

#skinAlmondButton {background-color: #dcbf87}
#skinBandButton {background-color: #dcbf87}
#skinBeigeButton {background-color: #dcbf87}
#skinBronzeButton {background-color: #dcbf87}
#skinChestnutButton {background-color: #dcbf87}
#skinChocolateButton {background-color: #dcbf87}
#skinEspressoButton {background-color: #dcbf87}
#skinGoldenButton {background-color: #dcbf87}
#skinHoneyButton {background-color: #dcbf87}
#skinIvoryButton {background-color: #dcbf87}
#skinLimestoneButton {background-color: #dcbf87}
#skinPaleIvoryButton {background-color: #dcbf87}
#skinPorcelainButton {background-color: #dcbf87}
#skinRoseBeigeButton {background-color: #dcbf87}
#skinSandButton {background-color: #dcbf87}
#skinSennaButton {background-color: #dcbf87}
#skinUmberButton {background-color: #dcbf87}
#skinWarmIvoryButton {background-color: #dcbf87}



/**********************/
/*  CONTINENT BUTTON  */
/**********************/

.continent-button {

    position: relative; /* This is needed for Tooltip to work */
    display: inline-block;
    width: 93px;
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--shade-gold);
    border-radius: 26px;
    cursor: pointer;
    border: 2px solid var(--shade-gold);
    margin: 5px;
    
}

.continent-button img {

    width: 93px; /* 927 */
    height: 50px; /* 500 */

}

.continent-button:hover {
    outline: 1px solid var(--shade-gold);
    filter: brightness(120%);
}

.continent-button:focus {
    outline: 1px solid var(--shade-gold);
}

.continent-button:active {
    filter: contrast(90%); 
    filter: brightness(120%);
}

.continent-button.selected {
    outline: 1px solid var(--shade-gold);
    filter: contrast(90%);
    filter: brightness(120%);
}

/* .css-pill gold gloss buttons now live in the shared styleButtons.css
   (linked last on each page). */



/***********************/
/*  ROUND FLAG BUTTON  */
/***********************/

.round-flag-button{

    position: relative; /* This is needed for Tooltip to work */
    display: inline-block;
    width: 50px; 
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-color: #dcbf87;
    border-radius: 26px; 
    border: 2px solid #dcbf87;
    cursor: pointer;
    margin: 5px;

    
}

.round-flag-button:hover {
    outline: 1px solid #dcbf87;
}

.round-flag-button:focus {
    outline: 1px solid #dcbf87;
}

.round-flag-button:active {
    filter: contrast(90%); 
}

.round-flag-button.selected {
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #dcbf87, 0 0 8px rgba(220, 191, 135, 0.8);
}

.round-flag-button:hover::after {
    
    content: attr(data-country);

    font-family: var(--font-family);
    font-weight: 400;
    font-style: normal;
    font-size: 12px;

    position: absolute;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-35%);

    background-color: black;
    color: var(--primary-gold);
    text-align: center;
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 8px;
    z-index: 1;

}

.round-flag-button img {
    
    width: 50px; /* 927 */
    height: 50px; /* 500 */
    
    image-rendering: -webkit-optimize-contrast; /* Chrome, Safari */
    image-rendering: crisp-edges; /* Firefox */
    image-rendering: pixelated; /* Chrome */
}



/***********************/
/*  SHOE COLOR BUTTON  */
/***********************/
.shoe-color-button{

    position: relative; /* This is needed for Tooltip to work */
    display: inline-block;
    width: 50px; 
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-color: #dcbf87;
    border-radius: 26px; 
    border: 2px solid #dcbf87;
    cursor: pointer;
    margin: 5px;

    
}

.shoe-color-button:hover {
    outline: 1px solid #dcbf87;
}

.shoe-color-button:focus {
    outline: 1px solid #dcbf87;
}

.shoe-color-button:active {
    filter: contrast(90%); 
}

.shoe-color-button.selected {
    outline: 1px solid #dcbf87;
    filter: contrast(90%); 
}

.shoe-color-button:hover::after {
    
    content: attr(data-shoecolor);

    font-family: var(--font-family);
    font-weight: 400;
    font-style: normal;
    font-size: 12px;

    position: absolute;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-35%);

    background-color: black;
    color: var(--primary-gold);
    text-align: center;
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 8px;
    z-index: 1;

}


.shoe-color-button img {

    width: 50px; /* 927 */
    height: 50px; /* 500 */

    image-rendering: -webkit-optimize-contrast; /* Chrome, Safari */
    image-rendering: crisp-edges; /* Firefox */
    image-rendering: pixelated; /* Chrome */
}


/*************************/
/*  SHOE DETAILS BUTTON  */
/*************************/
.shoe-model-button{

    position: relative; /* This is needed for Tooltip to work */
    display: inline-block;
    width: 50px; 
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-color: #dcbf87;
    border-radius: 26px; 
    border: 2px solid #bc9c6d;
    cursor: pointer;
    margin: 5px;

    
}

.shoe-model-button:hover {
    outline: 1px solid #bc9c6d;
}

.shoe-model-button:focus {
    outline: 1px solid #bc9c6d;
}

.shoe-model-button:active {
    filter: contrast(90%); 
}

.shoe-model-button.selected {
    outline: 1px solid #bc9c6d;
    filter: contrast(90%); 
}

.shoe-model-button:hover::after {
    
    content: attr(data-modelname);

    font-family: var(--font-family);
    font-weight: 400;
    font-style: normal;
    font-size: 12px;

    position: absolute;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-35%);

    background-color: black;
    color: var(--primary-gold);
    text-align: center;
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 8px;
    z-index: 1;

}


.shoe-model-button img {

    width: 50px; /* 927 */
    height: 50px; /* 500 */

    image-rendering: -webkit-optimize-contrast; /* Chrome, Safari */
    image-rendering: crisp-edges; /* Firefox */
    image-rendering: pixelated; /* Chrome */
}




/***************************/
/*  SAVE CHARACTER BUTTON  */
/***************************/

.save-button {

    position: relative; /* This is needed for Tooltip to work */
    display: inline-block;
    width: 93px;
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--shade-gold);
    border-radius: 26px;
    border: none;
    cursor: pointer;
    border: 2px solid var(--shade-gold);
    margin: 5px;
    
}

.save-button img {

    width: 93px;
    height: 50px;

}

.save-button:hover {
    outline: 1px solid var(--shade-gold);
    filter: contrast(90%); 
    filter: brightness(120%);
}

.save-button:focus {
    outline: 1px solid var(--shade-gold);
    filter: contrast(90%); 
    filter: brightness(120%);
}

.save-button:active {
    filter: contrast(90%); 
    filter: brightness(120%);
}

.save-button.selected {
    outline: 1px solid var(--shade-gold);
    filter: contrast(90%); 
    filter: brightness(120%);
}

.save-button:hover::after {
    
    content: attr(data-savetype);
    
    font-family: var(--font-family);
    font-weight: 400;
    font-style: normal;
    font-size: 12px;

    position: absolute;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-35%);

    background-color: black;
    color: var(--primary-gold);
    text-align: center;
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 8px;
    z-index: 1;

}




/*
.country-name:hover::after {
    content: attr(data-name);  
    position: absolute;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    z-index: 10;
}*/

/*

.round-flag-button:hover::after {
    content: attr(data-country);
    position: absolute;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    z-index: 1;
}

*/












/*
#skinAlmondButton {background-color: #94623d}
#skinBandButton {background-color: #ab8b64}
#skinBeigeButton {background-color: #ecbf83}
#skinBronzeButton {background-color: #764520}
#skinChestnutButton {background-color: #885633}
#skinChocolateButton {background-color: #301e11}
#skinEspressoButton {background-color: #633a17}
#skinGoldenButton {background-color: #81492a}
#skinHoneyButton {background-color: #cb9662}
#skinIvoryButton {background-color: #e9cba8}
#skinLimestoneButton {background-color: #e3b990}
#skinPaleIvoryButton {background-color: #f7ddc4}
#skinPorcelainButton {background-color: #eed0b8}
#skinRoseBeigeButton {background-color: #efc088}
#skinSandButton {background-color: #eec795}
#skinSennaButton {background-color: #d09e7c}
#skinUmberButton {background-color: #b26849}
#skinWarmIvoryButton {background-color: #f8e2ab}
*/




/*
.hex-button {
    height: 50px;
    width: 50px;
    display: inline-block;
    background-color: #ddd;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    cursor: pointer;
}
  
input[type="number"], .number-button {
    width: 50px;
    height: 50px;
}

.playerCustomization {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: 1080px;
    width: 1920px;
}

.playerPreview {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url("/images/game/AbibasPlayer.png") no-repeat;
    background-color:#e6e6e6;
    border-radius: 10px;

}

.playerInputForm {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.inputGroup {
    margin-bottom: 20px;
}


#flagsContainer {
    background-color: #e6e6e6;
    padding: 10px;
    min-height: 120px;
    width: 400px;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; 


}

.flag {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.flag img {
    display: block; 
    width: 50px;    
    max-height: 50px; 
    object-fit: cover;
    
}

.flag.selected {
    transform: scale(1.1);  
    border: 2px solid #555; 
}

*/


/* Hairstyle position dev panel */

#hairstylePositionBody {
    flex-direction: column;
    gap: 10px;
}

#hairstylePositionBody label,
#hairstylePositionBody span {
    font-family: var(--font-family);
    color: var(--primary-gold);
    font-size: 14px;
}

.dev-nudge-btn {
    font-family: var(--font-family);
    display: inline-block;
    min-height: 40px;
    min-width: 50px;
    background-color: black;
    color: var(--primary-gold);
    border-radius: 20px;
    cursor: pointer;
    border: 2px solid var(--primary-gold);
    margin: 4px;
    text-align: center;
}

.dev-nudge-btn:hover {
    filter: brightness(1.2);
}

/* Hairstyle picker */

#hairstyleOptions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.hairstyle-btn {
    position: relative;
    background: #1a1a1a;
    border: 2px solid var(--shade-gold);
    border-radius: 12px;
    cursor: pointer;
    padding: 2px;
    width: 48px;
    height: 48px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.hairstyle-btn img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
}

.hairstyle-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.15) 50%,
        transparent 50.1%
    );
    pointer-events: none;
}

.hairstyle-btn:hover {
    border-color: var(--shade-gold);
}

.hairstyle-btn.selected {
    border-color: var(--primary-gold);
}

/* Hair color picker */

#hairstyleColorOptions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.hairstyle-color-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #333;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    overflow: hidden;
}

.hairstyle-color-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.15) 50%,
        transparent 50.1%
    );
    pointer-events: none;
}

.hairstyle-color-btn:hover {
    border-color: var(--shade-gold);
    transform: scale(1.1);
}

.hairstyle-color-btn.selected {
    border-color: var(--primary-gold);
    transform: scale(1.15);
}


/************************************************************/
/*                                                          */
/*              MOBILE LAYOUT  (≤ 640px)                    */
/*                                                          */
/************************************************************/

@media (max-width: 640px) {

    /* Stack layout vertically; let the page body scroll */
    #settingsContainer {
        flex-direction: column;
        height: auto;
        overflow-y: visible;
        align-items: center;
    }

    /* Canvas section: full-width, centered, fixed height */
    #canvasContainer {
        position: relative !important;
        top: auto !important;
        width: 100% !important;
        height: 390px !important;
        margin-right: 0 !important;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        flex-shrink: 0;
    }

    /* Scale the canvases down and centre them */
    canvas#backgroundCanvas,
    canvas#playerCanvas {
        position: absolute !important;
        width: 200px !important;
        height: 383px !important;
        margin-top: 4px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        border-width: 3px !important;
    }

    /* Settings panel: full width */
    #componentContainer {
        width: 100% !important;
        height: auto !important;
        overflow-y: visible !important;
        box-sizing: border-box;
    }

    /* ── Sticky mini canvas (JS adds this class on scroll) ── */
    #canvasContainer.sticky-mini {
        position: fixed !important;
        top: 105px !important;
        right: 8px !important;
        width: 86px !important;
        height: 165px !important;
        z-index: 999 !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none;
    }

    #canvasContainer.sticky-mini canvas#backgroundCanvas,
    #canvasContainer.sticky-mini canvas#playerCanvas {
        width: 82px !important;
        height: 157px !important;
        margin-top: 4px !important;
        left: 0 !important;
        transform: none !important;
        border-width: 2px !important;
    }
}
