
body {
	width: 100%;
	height: 100vh;
	background-color: var(--bg-color);
	margin: 0px;
}


/* --- bar layout --- */
#bar-layout {
	height: 56px;
	width: 100%;
	float: left;
	position: fixed;
	z-index: 1;
}

/* title bar */
#title-bar {
	box-shadow: 1px 0px 1px 2px var(--shadow-color);
	background-color: var(--bg-color);
	z-index: 100;
	margin: 0px;
	height: 40px;
	float: left;
	overflow: hidden;
	position: fixed;
}

@media (max-width:1080px) {
	#title-bar {
		width: 96%;
		padding: 8px 2%;
	}
}

@media (min-width:1080px) {
	#title-bar {
		width: calc(1080px * 0.96);
		padding: 8px calc(50% - 540px * 0.96);
	}
}

.bar-button {
	margin: 0px;
	padding: 0px;
	height: 40px;
	width: 40px;
	line-height: 40px;
	text-align: center;
	border-radius: 20px;
	box-shadow: none;
	background-color: var(--bg-color);
	float: left;
	font-size: 24px;
	color: var(--text-light-color);
}

.bar-button:active {
	background-color: var(--bg-active-color);
}

.sub-bar {
	width: calc(100% - 96px);
	float: left;
	overflow: hidden;
	margin: 0px 8px;
	display: none;
}

.title {
	width: 100%;
	line-height: 40px;
	font-size: 110%;
	color: var(--text-color);
	margin: 0px;
	float: left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#onlinetime {
	font-size: 70%;
	color: var(--text-lightest-color);
	margin: 0px;
	float: left;
	width: 100%;
}

#search-input {
	background-color: var(--bg-color);
	width: 100%;
	outline: none;
	border: none;
	caret-color: var(--accent-active-color);
	-webkit-tap-highlight-color: rgba(255, 0, 0, 0);
}

/* text bar */
#text-bar {
	float: left;
	height: 48px;
	display: none;
	background-color: var(--shadow-color);
	border-radius: 16px 16px 0px 0px;
	box-shadow: -1px 0px 1px 2px var(--shadow-color);
	position: fixed;
	bottom: 0;
	left: 0;
}

@media (max-width:1080px) {
	#text-bar {
		width: 96%;
		padding: 0px 2%;
	}
}

@media (min-width:1080px) {
	#text-bar {
		width: calc(1080px * 0.96);
		padding: 0px calc(50% - 540px * 0.96);
	}
}

#inputbutton {
	background-color: rgba(0, 0, 0, 0);
	font-size: 26px;
	line-height: 40px;
	text-align: center;
	color: var(--text-light-color);
	height: 40px;
	width: 40px;
	margin: 4px 0px;
	box-shadow: none;
	border-radius: 20px;
	float: left;
}

#inputbutton:active {
	background-color: var(--bg-active-color);
}

#inputprogress {
	float: left;
	display: none;
	width: calc(100% - 48px);
	height: 48px;
}

.progressbg {
	height: 9px;
	width: 95%;
	background-color: var(--bg-color);
	margin: 10px 0px;
	border-radius: 5px;
}

.progress {
	height: 9px;
	background-color: var(--accent-color);
	border-radius: 5px;
}

#textarea {
	width: calc(100% - 80px);
	height: 100%;
	float: left;
	overflow: hidden;
}

#msginput {
	outline: none;
	border: none;
	border-bottom: 1px solid var(--accent-color);
	background-color: rgba(0, 0, 0, 0);
	float: left;
	color: var(--text-color);
	font-size: 100%;
	height: 30px;
	width: 100%;
	padding-top: 10px;
	resize: none;
	font-family: 'Microsoft Yahei', 'STXihei', sans-serif;
	margin-left: -2px;
	caret-color: var(--accent-active-color);
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

#msginput:focus {
	border-bottom: 2px solid var(--accent-color);
	color: var(--text-color)
}

#sendbutton {
	background-color: rgba(0, 0, 0, 0);
	font-size: 22px;
	line-height: 40px;
	text-align: center;
	color: var(--accent-color);
	height: 40px;
	width: 40px;
	margin: 4px 0px;
	box-shadow: none;
	border-radius: 20px;
	float: left;
}

#sendbutton:active {
	background-color: var(--bg-active-color);
}

#encrypterror {
	width: 100%;
	text-align: center;
	margin: 0px;
	height: 48px;
	line-height: 48px;
}


/* --- main layout --- */
#main-layout {
	padding-top: 56px;
	margin: 0px auto;
	width: 96%;
	height: calc(100% - 56px);
	max-width: calc(1080px *0.96);
}

/* chat view */
#chat-view {
	float: left;
	overflow: auto;
	width: 100%;
	padding-top: 8px;
}

/* msg view */
#msg-view {
	float: left;
	overflow: auto;
	width: 100%;
	height: calc(100vh - 108px);
	display: none;
	padding-bottom: 4px;
}

#msg-view .msg {
	float: left;
	padding: 4px 0px;
	width: 100%;
}

.msg .time {
	color: var(--text-lightest-color);
	text-align: center;
	padding: 4px 8px;
	margin: 4px auto;
	font-size: 80%;
	border-radius: 16px;
	width: fit-content;
}

.msg .time:active {
	background-color: var(--bg-active-color);
}

.msg .avatar {
	height: 36px;
	width: 36px;
	border-radius: 24px;
	float: left;
	object-fit: cover;
}

.msg .icon {
	float: right;
	color: var(--text-lightest-color);
}

.msg .bubble {
	max-width: calc(90% - 50px);
	padding: 4px;
	min-height: 28px;
	box-shadow: 0.5px 0.5px 1.5px 1px var(--shadow-color);
}

.msg .receive {
	float: left;
	margin-left: 8px;
	background: var(--receive-bg-color);
	border-radius: 4px 20px 20px 20px;
	color: var(--receive-text-color);
}

.msg .receive:active {
	background-color: var(--receive-active-color);
}

.msg .send {
	float: right;
	background: var(--send-bg-color);
	border-radius: 20px 20px 4px 20px;
	color: var(--send-text-color);
}

.msg .send:active {
	background-color: var(--send-active-color);
}

.msg .sender {
	font-size: 90%;
	margin: 0px 6px;
	float: left;
	color: var(--text-light-color);
	width: calc(100% - 12px);
}

.msg .content span {
	margin: 3px 6px 4px 6px;
	float: left;
	line-break: anywhere;
}

.msg .content img {
	height: 300px;
	max-width: 100%;
	object-fit: cover;
	border-radius: 16px;
	float: left;
}

/* profile view */
#profile-view {
	display: none;
	float: left;
	width: 100%;
	height: calc(100% - 16px);
	padding-top: 16px;
	overflow: auto;
}

#chat-icon-input {
	position: absolute;
	overflow: hidden;
	right: 0px;
	top: 0px;
	filter: alpha(opacity=0);
	opacity: 0;
	cursor: pointer;
	pointer-events: none;
}

/* search view */
#search-view {
	display: none;
	float: left;
	width: 100%;
	height: calc(100% - 16px);
	padding-top: 16px;
	overflow: auto;
}


/* settings view */
#settings-view {
	display: none;
	float: left;
	width: 100%;
	height: calc(100% - 16px);
	padding-top: 16px;
	overflow: auto;
}

#avatar-input {
	position: absolute;
	overflow: hidden;
	right: 0px;
	top: 0px;
	filter: alpha(opacity=0);
	opacity: 0;
	cursor: pointer;
	pointer-events: none;
}

#theme-select {
	float: left;
	width: 100%;
}

.theme-card {
	margin: 4px;
	padding: 8px;
	width: calc(50% - 24px);
	border-radius: 8px;
	border-bottom: 1px var(--accent-color);
	float: left;
}

.theme-card [md-icon] {
	font-size: 24px;
}

.theme-card .theme-title {
	font-size: 100%;
	word-break: break-all;
	margin: 2px 0px;
	height: 32px;
	line-height: 32px;
}

.theme-card .theme-text {
	font-size: 80%;
	line-height: 20px;
}

.theme-card .theme-mode-msg-view {
	margin-top: 16px;
}

.theme-card .theme-mode-chat-view {
	margin-top: 16px;
}

.theme-card .msg {
	float: left;
	padding: 4px 0px;
	width: 100%;
}

.theme-card .msg .time:active {
	background-color: rgba(0, 0, 0, 0);
}

#theme-mode-day {
	background-color: var(--z-day-bg-color);
	box-shadow: 1px 1px 2px 1.5px var(--z-day-shadow-color);
}

#theme-mode-day .theme-title{
	color: var(--z-day-text-color);
}

#theme-mode-day [md-icon]{
	color: var(--z-day-text-light-color);
}

#theme-mode-day .theme-text{
	color: var(--z-day-text-lightest-color);
}

#theme-mode-day .msg .time {
	color: var(--z-day-text-lightest-color);
}

#theme-mode-day .msg .icon {
	color: var(--z-day-text-lightest-color);
}

#theme-mode-day .msg .bubble {
	box-shadow: 0.5px 0.5px 1.5px 1px var(--z-day-shadow-color);
}

#theme-mode-day .msg .receive {
	background: var(--z-day-receive-bg-color);
	color: var(--z-day-receive-text-color);
}

#theme-mode-day .send {
	background: var(--z-day-send-bg-color);
	color: var(--z-day-send-text-color);
}

#theme-mode-day .msg .sender {
	color: var(--z-day-text-light-color);
}

#theme-mode-night {
	background-color: var(--z-night-bg-color);
	box-shadow: 1px 1px 2px 1.5px var(--z-night-shadow-color);
}

#theme-mode-night .theme-title{
	color: var(--z-night-text-color);
}

#theme-mode-night [md-icon]{
	color: var(--z-night-text-light-color);
}

#theme-mode-night .theme-text{
	color: var(--z-night-text-lightest-color);
}

#theme-mode-night .msg .time {
	color: var(--z-night-text-lightest-color);
}

#theme-mode-night .msg .icon {
	color: var(--z-night-text-lightest-color);
}

#theme-mode-night .msg .bubble {
	box-shadow: 0.5px 0.5px 1.5px 1px var(--z-night-shadow-color);
}

#theme-mode-night .msg .receive {
	background: var(--z-night-receive-bg-color);
	color: var(--z-night-receive-text-color);
}

#theme-mode-night .send {
	background: var(--z-night-send-bg-color);
	color: var(--z-night-send-text-color);
}

#theme-mode-night .msg .sender {
	color: var(--z-night-text-light-color);
}




/* --- animation-layout --- */
#animation-layout {
	height: 100%;
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	float: left;
	z-index: 2;
	pointer-events: none;
}

.animationitem {
	position: fixed;
	z-index: 100;
	font-size: 180%;
	pointer-events: none;
}

.animationitem img {
	height: 50px;
	width: 50px;
}


/* --- dialog-layout --- */
#side-dialog {
	top: 64px;
}

#media-option {
	bottom: 56px;
}

.fileinput {
	position: absolute;
	overflow: hidden;
	right: 0px;
	top: 0px;
	filter: alpha(opacity=0);
	opacity: 0;
	cursor: pointer;
	pointer-events: none;
}

/* #img-viewer {
	width: 100%;
	max-height: 100%;
	overflow: auto;
	padding: 0px;
} */

#img-display {
	max-width: 96%;
	max-height: 96%;
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	margin: auto;
	background: var(--bg-color);
}