* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
}

.container {
    max-width: 100%;
    background-color: white;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* 顶部导航栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
    border-bottom: 0px solid #eaeaea;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
}

.header-fh {
    width: 10px;
    height: 18px;
}

.header-ss {
    width: 18px;
    height: 18px;
}

/* 成员头像网格 */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 15px;
}

.avatar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.avatar-item:active {
    background-color: #eeeeee;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 10%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username {
    font-size: 12px;
    color: #333;
    margin-top: 5px;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 底部收起按钮 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 15px;
    display: flex;
    justify-content: center;
    border-top: 0.5px solid #eaeaea;
}

.collapse-btn {
    background-color: transparent;
    border: none;
    padding: 8px 20px;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.collapse-btn img {
    width: 12px;
    height: 8px;
}

/* 全局弹窗遮罩 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

/* 弹窗主体 - 背景图 brij.png 高清显示 */
.modal-content {
    background: url("brij.png") no-repeat center;
    background-size: cover;
    padding: 24px 20px;
    border-radius: 14px;
    width: 85%;
    max-width: 320px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* 输入分组（局部半透，不遮挡背景图） */
.input-group {
    margin-bottom: 18px;
    background-color: rgba(255, 255, 255, 0.25);
    padding: 10px;
    border-radius: 8px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 文件选择按钮 */
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-button {
    border: 1px solid rgba(221, 221, 221, 0.6);
    border-radius: 6px;
    padding: 10px;
    background-color: rgba(245, 245, 245, 0.7);
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-input-button:hover {
    background-color: rgba(235, 235, 235, 0.85);
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-name {
    font-size: 12px;
    margin-top: 6px;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 文本/数字输入框 */
#newName, #countInput, #groupName {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(221, 221, 221, 0.6);
    border-radius: 6px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.7);
    outline: none;
    transition: border 0.2s;
}

#newName:focus, #countInput:focus, #groupName:focus {
    border-color: #07C160;
}

/* 预览容器 */
.preview-container {
    width: 100px;
    height: 100px;
    margin: 12px auto;
    border: 1px dashed rgba(204, 204, 204, 0.7);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.25);
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
}

/* 按钮区域 */
.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.modal-btn {
    padding: 9px 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.modal-btn:active {
    opacity: 0.85;
}

.confirm-btn {
    background-color: #07C160;
    color: white;
}

.cancel-btn {
    background-color: rgba(245, 245, 245, 0.85);
    color: #333;
}
