body,html{
	height: 100%;
	margin: 0;
    background: #7F7FD5; 
    background: -webkit-linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5); 
    background: linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5);
}

.row { 
	display: flex;
	justify-content: flex-start; /* 靠左 */
	align-items: flex-start; /* 視需求決定是否靠上 */ 
}

.justify-content-center > .chat{
	flex: 0 0 100%;
    max-width: 100%;
	/*align-items: center;
	margin-top: auto;
	margin-bottom: auto;*/
}
.card{
	display: flex;
	flex-direction: column;
	height: 100vh; /* Full viewport height */
	border-radius: 15px !important;
	background-color: rgba(0,0,0,0.4) !important;
}
.contacts_body{
	padding:  0.75rem 0 !important;
	overflow-y: auto;
	white-space: nowrap;
}
    
/* Custom Scrollbar */
.msg_card_body::-webkit-scrollbar {
    width: 8px;
}
  
.msg_card_body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
  
.msg_card_body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.msg_card_body{
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.card-header{
	border-radius: 15px 15px 0 0 !important;
	border-bottom: 0 !important;
}
.card-footer{
	border-radius: 0 0 15px 15px !important;
	border-top: 0 !important;
}
.container{
	align-content: center;
}
.search{
	border-radius: 15px 0 0 15px !important;
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color:white !important;
}
.search:focus{
	box-shadow:none !important;
  	outline:0px !important;
}
.type_msg{
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color:white !important;
	height: 60px !important;
	overflow-y: auto;
}
.type_msg:focus{
	box-shadow:none !important;
   	outline:0px !important;
}
.attach_btn{
	border-radius: 15px 0 0 15px !important;
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color: white !important;
	cursor: pointer;
}
.send_btn{
	border-radius: 0 15px 15px 0 !important;
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color: white !important;
	cursor: pointer;
}
.search_btn{
	border-radius: 0 15px 15px 0 !important;
	background-color: rgba(0,0,0,0.3) !important;
	border:0 !important;
	color: white !important;
	cursor: pointer;
}
.contacts{
	list-style: none;
	padding: 0;
}
.contacts li{
	width: 100% !important;
	padding: 5px 10px;
	margin-bottom: 15px !important;
}
.active{
	background-color: rgba(0,0,0,0.3);
}
.user_img{
	height: 70px;
	width: 70px;
	border:1.5px solid #f5f6fa;

}
.user_img_msg{
	height: 40px;
	width: 40px;
	border:1.5px solid #f5f6fa;
	/* owl breaking*/
	animation: pulse 2s infinite ease-in-out;
	transition: transform 0.3s;
}
.img_cont{
	position: relative;
	height: 70px;
	width: 70px;
}
.img_cont_msg{
	height: 40px;
	width: 40px;
}
.online_icon{
	position: absolute;
	height: 15px;
	width:15px;
	background-color: #4cd137;
	border-radius: 50%;
	bottom: 0.2em;
	right: 0.4em;
	border:1.5px solid white;
}
.offline{
	background-color: #c23616 !important;
}
.user_info{
	margin-top: auto;
	margin-bottom: auto;
	margin-left: 15px;
}
.user_info span{
	font-size: 20px;
	color: white;
}
.user_info p{
	font-size: 12px;
	color: rgba(255,255,255,0.6);
}
.video_cam{
	margin-left: 50px;
	margin-top: 5px;
}
.video_cam span{
	color: white;
	font-size: 20px;
	cursor: pointer;
	margin-right: 20px;
}
.msg_cotainer{
	margin-top: auto;
	margin-bottom: auto;
	margin-left: 10px;
	border-radius: 25px;
    background-color: #82ccdd;
	padding: 10px;
	position: relative;
}
.msg_cotainer_send{
	margin-top: auto;
	margin-bottom: auto;
	margin-right: 10px;
	border-radius: 25px;
	background-color: #58cc71;
	padding: 10px;
	position: relative;
}
.msg_time{
	position: absolute;
	left: 0;
	bottom: -15px;
	color: rgba(255,255,255,0.5);
	font-size: 10px !important; 
}
.msg_time_send{
	position: absolute;
	right:0;
	bottom: -15px;
	color: rgba(255,255,255,0.5);
	font-size: 10px !important;
}
.msg_head{
	position: relative;
}
#action_menu_btn{
	position: absolute;
	right: 10px;
	top: 10px;
	color: white;
	cursor: pointer;
	font-size: 20px;
}
.action_menu{
	z-index: 1;
	position: absolute;
	padding: 15px 0;
	background-color: rgba(0,0,0,0.5);
	color: white;
	border-radius: 15px;
	top: 30px;
	right: 15px;
	display: none;
}
.action_menu ul{
	list-style: none;
	padding: 0;
	margin: 0;
}
.action_menu ul li{
	width: 100%;
	padding: 10px 15px;
	margin-bottom: 5px;
}
.action_menu ul li i{
	padding-right: 10px;
}
.action_menu ul li:hover{
	cursor: pointer;
	background-color: rgba(0,0,0,0.2);
}
@media(max-width: 576px){
	.contacts_card{
	margin-bottom: 15px !important;
}
}
/* owl breaking;*/
@keyframes pulse {
	0% { transform: scale(1);}
	50% { transform: scale(1.1);}
	100% { transform: scale(1);}
}

/* typing ...*/
.typing {
	width: 50px;
	height: 20px;
	display: flex;
	justify-content: space-around;
	align-items: center;
}

.typing span {
	width: 3px;
	height: 3px;
	background-color: #e4eee6;
	border-radius: 50%;
	display:  inline-block;	
	animation: typing 1s infinite ease-in-out;
}
/* ...jumping*/
.typing span:nth-child(2) {
	animation-delay: 0.2s;
}
.typing span:nth-child(3) {
	animation-delay: 0.4s;
}
@keyframes typing {
	0%, 100% {transform: translateY(0);}
	50% {transform: translateY(-10px);}
}

/* Light Mode */
body.light-mode {
    background: #f0f2f5;
}

.light-mode .card {
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0;
}

.light-mode .user_info span, .light-mode .font-controls span, .light-mode #action_menu_btn, .light-mode .video_cam span {
    color: #000000;
}

.light-mode .user_info p {
    color: rgba(0,0,0,0.6);
}

.light-mode .type_msg, .light-mode .search {
    background-color: #f0f2f5 !important;
    color: #000000 !important;
}

.light-mode .send_btn, .light-mode .search_btn, .light-mode .attach_btn {
    background-color: #f0f2f5 !important;
    color: #000000 !important;
}

.light-mode .msg_time {
    color: rgba(0,0,0,0.5);
}

.light-mode .msg_time_send {
    color: rgba(255,255,255,0.7);
}

.light-mode .msg_cotainer {
    background-color: #e4e6eb;
    color: #050505;
}

.light-mode .msg_cotainer_send {
    background-color: #0084ff;
    color: white;
}

/* Fix for invisible controls in light mode */
.light-mode .btn-outline-light {
    color: #000;
    border-color: #ccc;
}

.light-mode .btn-outline-light:hover {
    color: #fff;
    background-color: #000;
}

.light-mode .font-controls .text-white {
    color: #000 !important;
}

/* */
#chart-container {
    display: none;
}

#chart-container.show {
    display: block;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background-color: rgba(0,0,0,0.2);
    border-radius: 10px;
    margin-top: 1rem;
}

.chart-item {
    background-color: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 10px;
}

.chart-item h5 {
    color: white;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.chart-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chart-item ul li a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

.dark-theme #chart-container {
    background-color: #2c2c2c;
}

.dark-theme .chart-item {
    background-color: #333;
}

.dark-theme .chart-item h5,
.dark-theme .chart-item ul li a {
    color: #e0e0e0;
}

#turnstile-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255,255,255,0.95);
	z-index: 10000;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
}