.m-title-container
{
    display: block;
    color: var(--text-color);
    padding: 10px;;
    text-align: center;
    font-family: "PingFang SC", "Microsoft YaHei", "SimHei", sans-serif;
}

.m-title-container p{
    color: var(--red-seal);
}

.m-row-container{
    padding:0% 10%;
    width: fit-content; 
    height: fit-content;
    overflow: hidden;
    margin-bottom: 100px;
}


.m-grayscale{
    filter: grayscale(25%); /* image color filter */
}

.m-col{
    float:left;
    width:100%;
}

.m-col a {
    text-decoration: none;    /* remove underline */
}

.m-tool-container{
    border-radius: 10px;
    border: 2px solid var(--tool-box-border-color);
    text-align: center;
    color: var(--text-black);
    margin: 20px;
    height: 200px;
    padding-top: 10px;
    overflow: hidden;
}

.m-tool-container:hover{
    background-color: transparent;
    color: var(--text-black);
    cursor: pointer;
}

.m-tool-container img{
    margin-top: 5%;
    height: 50%;
    max-width:100%;
}

.m-tool-container hr{
    max-width:100%;
    margin-top: 5%;
    margin-left: 20px;
    margin-right: 20px;
    height: 0; 
    border: 0; 
    border-top: 1px solid var(--light_ink);
}
.m-tool-container hr:hover{
    border-top: 1px solid var(--ink-black);   
}

.m-tool-container p{
    font-weight: bold;
    width:100%;
}


.logo-name-cn{
    font-size:25px;
    font-weight: bold;
}

.logo-name-cn-image{
    height: 40px;
}

.logo-name-en{
    font-family:monospace;
    font-size:18px;
    color: var(--red-seal);
    margin-bottom: 10px;
}

#resource-hub {
    width: 100%;
    min-height: 100vh;
    padding: 10px;
    background-color: var(--page-background-color);
    color: var(--text-gray);
    font-family: "Lato", sans-serif;
    box-sizing: border-box;
}

.resource-cards{
    color: var(--ink-black);
    margin-right: 10px;
    margin-left: 10px;
}

.resource-card{
    color: var(--ink-black);
}

.section {
    margin-bottom: 10px;
}

.section-hidden{
    display: none;
}

.section-header {
    padding: 10px;
    font-weight: bold;
    background-color: var(--light-ink-glass);
    cursor: pointer;
    border-radius: 5px;
}
.section-body {
    border: solid 1px var(--light-ink-glass);
    line-height: 2;
    display: none; /* collapsed by default */
    padding: 10px;
    border-radius: 5px;
    margin-top: 5px;
    overflow: hidden;
}

.section-body-sound{
    display: none;
}

.section-body-sound.display{
    display: flex;
    flex-direction: column;
}

.section-body-sound-row{
    margin-top: 5px;
    display: flex;
    /* flex-direction: row; */
    flex-direction: column;
    border: solid 1px var(--light-ink-glass);
    border-radius: 5px;
}
.section-body-sound-category{
    margin: 5px;
    /* text-align: center; */
    /* width: 100px; */
    padding: 2px 4px;
    background-color: transparent;
    flex-shrink: 0; /*ensures the category div keeps its width. */
}

.section-body-sounds{
    margin: 5px;
    /* text-align: center; */
    padding: 2px 4px;
    background-color: transparent;
}

.section-button {
    all:unset;
    margin: 5px 10px;
    color: var(--profile-text-gray);
    background-color: transparent;
    cursor: pointer;
}

.section-button:hover {
    background-color: var(--button-background-hover-color);
    color:var(--red-seal)
}

.phonetic-group {
    margin-bottom: 24px;
}

.phonetic-group-body {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 10px;
}

.phonetic {
    position: relative;
    color: var(--ink-black);
    width: 85px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    font-size: 1.2em;
    display: flex;
    align-items: flex-end;     /* vertical alignment */
    justify-content: center;   /* horizontal alignment */
    cursor: pointer;           /* remove quotes */
    overflow: hidden;
}

.phonetic-bg {
    position: absolute;
    inset: 0;                  /* fill parent */
    background-size:90%;   
    /* background-size: contain; */ /* scale image to fit inside */
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;                /* behind text */
}

.phonetic_symbol {
    position: relative; 
    z-index: 1;                /* fix casing */
    background-color: #ffffffdd;
    margin-bottom: 5px;
    padding: 0px 5px;
    border-radius: 10px;
}

.phonetic:hover{
    color: var(--blue);
    cursor:pointer;
    background-color: var(--light-ink-glass);
    border-radius: 50%;
}

.phonetic sub {
    font-weight: bold;
    font-size: 0.6em;
    margin-left: 2px;
    opacity: 0.8;
    position: relative;
    top: 0.0em; /* adjust to move it downward */
}

.title{
    text-align: center;
}

.section-search{
    display: flex; /* collapsed by default */
    padding-left: 10px;
    border-radius: 5px;
    margin-top: 5px;
    margin-right: 10px;
    gap:5px;
    margin-bottom: 10px;
}

.section-search input[type="text"]:focus, .section-search select:focus {
  outline: none;
  border-color: var(--ink-black); /* your color */
  box-shadow: var(--ink-black);
}

#resource-search, #resource-search-word{
    height: 40px;
    /* width: 85%; */
    font-size: 90%;
    flex: 1;
    margin-left: 0px;
    text-align: left;
    box-sizing: border-box;
    border-radius: 5px;
    padding: 5px 10px;
    border: solid 1px var(--light-ink-glass);
}

#resource-select{
    margin-left: auto;
    color: var(--light-ink);
    padding: 5px 10px;
    background-color: transparent;
    border: solid 1px var(--light-ink-glass);
    border-radius: 5px;
    margin-bottom: 5px;
}

.resource-checkbox{
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--light-ink);
    padding: 5px 10px;
    background-color: transparent;
    border: solid 1px var(--light-ink-glass);
    border-radius: 5px;
    margin-bottom: 5px;
}
.checkbox-text{
    font-size: 14px;
}

#resource-search-sentence-button, #resource-search-word-button, #resource-search-challenge-button{
    all:unset;
    cursor: pointer;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    font-size:35px;
    align-items: center;     /* vertical center */
    justify-content: center; /* horizontal center */

    color: var(--red-seal);
}

#resource-search-sentence-button:hover, #resource-search-word-button:hover, #resource-search-challenge-button:hover{
    background-color: var(--red-seal);
    color:var(--white)
}

#add-sentence-btn, #join-challenge-btn{
    all:unset;
    cursor: pointer;
    border-radius: 5px;
    width: 28px;
    height: 28px;
    display: flex;
    font-weight: bold;
    font-size:25px;
    align-items: center;     /* vertical center */
    justify-content: center; /* horizontal center */
    margin-left: auto;
    color: var(--qing);
}

.back-button{
    all: unset;
    cursor: pointer;
    width: 25px;
    height: 25px;
    color: var(--ink-black);
}

.word-card-back:hover .back-button{
    color: var(--red-seal);
}

.back-button:hover{
    color: var(--red-seal);
}


.close-btn{

    all:unset;
    height: 28px;
    width: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;

    align-self: flex-end;

    color: var(--light-ink);
}

.close-btn:hover{
    color: var(--red-seal);
}

/* ================================
   DESKTOP (min-width: 768px)
================================ */
@media (min-width: 768px) {
    .m-quarter {
        width: 25%;
    }
    
    #resource-hub {
        padding-left: 100px;   /* Adjust to your sidebar width */
        box-sizing: border-box;
    }
}

/* ================================
   MOBILE (max-width: 767px)
================================ */
@media (max-width: 767px) {

    .phonetic-group-body {
        justify-content: center;
    }


}