/* author_bio.css
   架構：#authorBioPage 以 position:absolute 填滿 #stage 內
   20px = 20px
*/

#authorBioPage {
    position: fixed;
    margin: 0;
    background-color: var(--bg-color);
    z-index: 2100;
    /* 高於遊戲 overlay (2000) 與 GameMessage (2050)；4 個覆蓋層統一 2100 */
    display: none;
    /* 預設隱藏 */
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
    font-family: var(--font-main);
    color: whitesmoke;
    overflow: hidden;
    border-radius: 15px;
    /* 15px → 15px */
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.5);
    /* 0.625/37.5px → 12/38px */
    width: 100%;
    height: 100%;
}

#authorBioPage.active {
    display: flex;
}

/* Header / Filters */
.bio-header {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    /* 0.3/20px → 6/20px */
    margin-bottom: 6px;
    /* 6px → 6px */
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    /* 12px → 12px */
    border-radius: 10px;
    /* 10px → 10px */
    backdrop-filter: blur(6px);
    /* 6px → 6px */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* 1px → 1px */
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* 6px → 6px */
}

.filter-group label {
    font-size: 16px;
    /* 16px → 16px */
    opacity: 0.8;
}

.filter-group select,
.filter-group input {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 2px 12px;
    /* 0.1/12px → 2/12px */
    border-radius: 6px;
    /* 6px → 6px */
    font-family: inherit;
    font-size: 20px;
    /* 20px → 20px */
    color: #333;
    outline: none;
}

.filter-group input {
    min-width: 200px;
    /* 200px → 200px */
    width: 100%;
}

/* Main Content Area */
.bio-content {
    display: flex;
    flex: 1;
    gap: 10px;
    /* 10px → 10px */
    overflow: hidden;
    flex-direction: row;
}

/* Author List 左側欄 */
.author-list-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    /* 6px → 6px */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.list-title {
    padding: 6px;
    /* 6px → 6px */
    font-size: 24px;
    /* 24px → 24px */
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    /* 1px → 1px */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    /* 6px → 6px */
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
}

.author-scroll.grabbing {
    cursor: grabbing;
}

/*作者列表item*/
.author-item {
    padding: 6px;
    /* 6px → 6px */
    margin-bottom: 6px;
    /* 6px → 6px */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    /* 6px → 6px */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* 4px → 4px */
}

.author-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(6px);
    /* 6.25px → 6px */
}

.author-item.selected {
    background: #c0392b;
    box-shadow: 0 5px 19px rgba(0, 0, 0, 0.3);
    /* 0.25/18.75px → 5/19px */
}

.author-name {
    font-size: 20px;
    /* 20px → 20px */
    font-weight: bold;
}

.author-stats {
    font-size: 14px;
    /* 14px → 14px */
    opacity: 0.7;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

/* Works List */
.works-list-container {
    flex: 1.5;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    /* 6px → 6px */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.works-controls {
    padding: 8px 12px;
    /* 0.4/12px → 8/12px */
    display: flex;
    gap: 8px;
    /* 8px → 8px */
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* 1px → 1px */
}

.sort-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* 1px → 1px */
    color: whitesmoke;
    padding: 6px 10px;
    /* 0.3/10px → 6/10px */
    border-radius: 10px;
    /* 10px → 10px */
    cursor: pointer;
    font-size: 18px;
    /* 18px → 18px */
    transition: all 0.2s;
}

.sort-btn.active {
    background: whitesmoke;
    color: #5d1818;
    font-weight: bold;
}

.works-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    /* 12.5px → 12px */
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
}

.works-scroll.grabbing {
    cursor: grabbing;
}

/*作品列表item*/
.work-item {
    padding: 6px;
    /* 6px → 6px */
    margin-bottom: 6px;
    /* 6px → 6px */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    /* 10px → 10px */
    cursor: pointer;
    transition: all 0.2s ease;
}

.work-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.work-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    /* 6.25px → 6px */
}

.work-title {
    font-weight: bold;
    color: #f1c40f;
}

.work-rating {
    font-size: 18px;
    /* 18px → 18px */
    color: #ecf0f1;
}

.work-snippet {
    font-size: 18px;
    /* 18px → 18px */
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Close button for the page */
.page-close-btn {
    position: absolute;
    top: 1px;
    /* 1px → 1px */
    right: 20px;
    /* 20px → 20px */
    font-size: 40px;
    /* 40px → 40px */
    cursor: pointer;
    z-index: 101;
    opacity: 0.6;
}

.page-close-btn:hover {
    opacity: 1;
}