        :root {
            --primary-color: #4285f4;
            --secondary-color: #f1f3f4;
            --text-color: #202124;
            --border-color: #dadce0;
            --success-color: #34a853;
            --error-color: #ea4335;
            --notice-color: #5f6368;
            --tab-active: #ffffff;
            --tab-inactive: #f1f3f4;
            --background-color: #f8f9fa;
            --card-color: #ffffff;
            --input-background: #ffffff;
            --nick-colors: #4285f4, #ea4335, #34a853, #fbbc05, #673ab7, #ff5722, #009688, #e91e63;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Inter', Arial, sans-serif;
            background-color: var(--background-color);
            color: var(--text-color);
            margin: 0;
            padding: 0;
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: auto;
        }

        /* Modern Login Form */
        .login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
            padding: 20px;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        }

        .login-box {
            background: var(--card-color);
			border: 1px solid #127f2f;
            border-radius: 12px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.12);
            width: 100%;
            max-width: 400px;
            padding: 40px;
            transform: translateY(0);
            transition: all 0.3s ease;
        }

        .login-box:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 40px rgba(0,0,0,0.15);
        }

        .login-title {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 30px;
            color: #127f2f;
            text-align: center;
            position: relative;
        }

        .login-title:after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 50px;
            height: 3px;
            background: #127f2f;
            border-radius: 3px;
        }

        .form-group {
            margin-bottom: 20px;
            position: relative;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            font-size: 14px;
            color: #5f6368;
        }

        .form-control {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #127f2f;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s;
            background-color: var(--input-background);
        }

        .form-control:focus {
            outline: none;
            border-color: #127f2f;
            box-shadow: 0 0 0 3px rgba(66,133,244,0.2);
        }

        .btn {
            display: inline-block;
            background-color: #127f2f;
            color: white;
            border: none;
            border-radius: 8px;
            padding: 14px 24px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            width: 100%;
            transition: all 0.3s;
        }

        .btn:hover {
            background-color: #127f2f;
            transform: translateY(-2px);
        }

        .btn:active {
            transform: translateY(0);
        }

        /* Chat Interface */
        .chat-container {
            display: none;
            flex: 1;
            width: 100%;
            background-color: white;
            overflow: hidden;
            flex-direction: column;
            #border-radius: 12px 12px 0 0;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        }

        .chat-header {
            background-color: #127f2f;
            color: white;
            padding: 12px 16px;
            #display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 12px 12px 0 0;
        }
		
	/* Small phones (up to 480px) */
	@media screen and (max-width: 480px) {
		.chat-header {
			padding: 8px 10px;
			flex-direction: column;
			align-items: flex-start;
			border-radius: 8px 8px 0 0;
		}
	}

	/* Regular smartphones (481px to 767px) */
	@media screen and (min-width: 481px) and (max-width: 767px) {
		.chat-header {
			padding: 8px 10px;
			border-radius: 10px 10px 0 0;
		}
	}

	/* Tablets and larger phones (768px to 1024px) */
	@media screen and (min-width: 768px) and (max-width: 1024px) {
		.chat-header {
			padding: 8px 10px;
			border-radius: 12px 12px 0 0;
		}
	}		

        .chat-title {
            font-size: 18px;
            font-weight: 600;
        }

        .topic {
            font-size: 14px;
            opacity: 0.9;
            margin-top: 4px;

        }
		
	/* Small phones (up to 480px) */
	@media screen and (max-width: 480px) {
		.topic {
			font-size: 8px;
			margin-top: 2px;
		}
	}

	/* Regular smartphones (481px to 767px) */
	@media screen and (min-width: 481px) and (max-width: 767px) {
		.topic {
			font-size: 8px;
			margin-top: 3px;
		}
	}

	/* Tablets and larger phones (768px to 1024px) */
	@media screen and (min-width: 768px) and (max-width: 1024px) {
		.topic {
			font-size: 8px;
			margin-top: 3px;
		}
	}		

        .connection-status {
            display: none;
            align-items: center;
            font-size: 14px;
        }

        .status-indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 8px;
            box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
        }

        .connected {
            background-color: var(--success-color);
            animation: pulse 2s infinite;
        }

        .disconnected {
            background-color: var(--error-color);
        }

        .connecting {
            background-color: #fbbc05;
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        /* Tabs */
		.tab-bar {
			display: flex !important; /* Force it to always be visible */
			background-color: var(--secondary-color);
			border-bottom: 1px solid var(--border-color);
			-ms-overflow-style: none; /* Internet Explorer and Edge */
			scrollbar-width: none;    /* Firefox */
			overflow-x: auto;
			#scrollbar-width: thin;
			flex-direction: row;
		}		

        .tab-bar::-webkit-scrollbar {
            height: 6px;
        }

        .tab-bar::-webkit-scrollbar-thumb {
            background-color: rgba(0,0,0,0.2);
            border-radius: 3px;
        }

        .tab {
            padding: 6px 10px;
            cursor: pointer;
            white-space: nowrap;
            border-right: 1px solid var(--border-color);
            background-color: var(--tab-inactive);
            display: flex;
            align-items: center;
            position: relative;
            transition: all 0.2s;
            font-size: 10px;
            font-weight: 500;
        }

        .tab.active {
            background-color: var(--tab-active);
            font-weight: 600;
            border-bottom: 2px solid #127f2f;
        }

        .tab.unread {
            font-weight: bold;
            color: #ff0000;
            position: relative;
        }

        .tab.unread:after {
            content: '';
            position: absolute;
            top: 5px;
            right:20px;
            width: 8px;
            height: 8px;
            background-color: var(--primary-color);
            border-radius: 50%;
        }

        .close-tab {
            margin-left: 8px;
            color: #5f6368;
            font-size: 14px;
            width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s;
            opacity: 0.7;
        }

        .close-tab:hover {
            background-color: rgba(0,0,0,0.1);
            opacity: 1;
        }

		.chat-content {
			display: flex;
			height: calc(100vh - 250px);
		}

		/* For mobile devices */
		@media (max-width: 768px) {
			.chat-content {
				height: calc(100vh - 150px); /* Adjust height for mobile screens */
			}
		}

		/* For tablets and smaller screens */
		@media (max-width: 1024px) {
			.chat-content {
				height: calc(100vh - 200px); /* Adjust height for tablets */
			}
		}

     
        .messages-container {
            flex: 1;
            overflow-y: auto;
            padding: 0px;
            display: flex;
            flex-direction: column;
            scrollbar-width: thin;
        }

        .messages-container::-webkit-scrollbar {
            width: 8px;
        }

        .messages-container::-webkit-scrollbar-thumb {
            background-color: rgba(0,0,0,0.2);
            border-radius: 4px;
        }

		.message {
			/* Message bubble styling */
			margin: 0 0 2px 0;
			padding: 8px 12px;
			word-wrap: break-word;
			white-space: pre-wrap;
			line-height: 1.6;
			border-radius: 8px;
			#background-color: #f8f9fa;
			border: 1px solid rgba(255, 255, 255, 0.3);
			font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
			font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
			color: #333;
			#animation: fadeIn 0.3s ease-out;
			box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
			max-width: 100%;
			#width: fit-content;
			flex-direction: column-reverse;
			
			/* Scrollable container behavior */
			position: relative;
			display: block;
			overflow-wrap: break-word;
			
			/* Fixed font alternative */
			&.fixed-font {
				font-size: 22px;
				font-family: "Courier New", Courier, monospace;
			}
		}

		/* Animation */
		@keyframes fadeIn {
			from { opacity: 0.5; }
			to { opacity: 1; }
		}

		/* Mobile responsiveness */
		@media (max-width: 480px) {
			.message {
				padding: 6px;
				font-size: 14px;
				line-height: 1.5;
				max-width: 100%;
			}
		}

		@media (min-width: 481px) and (max-width: 768px) {
			.message {
				padding: 8px;
				font-size: 15px;
				line-height: 1.6;
			}
		}

		@media (min-width: 769px) and (max-width: 1024px) {
			.message {
				padding: 10px;
				font-size: 16px;
				line-height: 1.7;
			}
		}

		/* Clear line breaks */
		.message br {
			clear: left;
			display: block;
			content: "";
			margin-top: 4px;
		}

        .message:hover {
            background-color: rgba(0,0,0,0.03);
        }
		
        .nicklist {
            width: 200px;
            border-left: 1px solid var(--border-color);
            overflow-y: auto;
            padding: 15px;
            background-color: var(--secondary-color);
            transition: width 0.3s;
            display: flex;
            flex-direction: column;
            scrollbar-width: thin;
        }
		
        /* For all mobile devices: phones, phablets, small tablets */
        @media screen and (max-width: 768px) {
            .nicklist {
                width: 105px;
                border-left: none;
                border-top: 1px solid var(--border-color);
                flex-direction: column;
                overflow-x: auto;
                overflow-y: hidden;
                padding: 12px;
                border-left: 1px solid var(--border-color);
                overflow-y: auto;
                background-color: var(--secondary-color);
                transition: width 0.3s;
                display: flex;
                flex-direction: column;
            }
        }

        /* For very small screens (old phones, narrow viewports) */
        @media screen and (max-width: 480px) {
            .nicklist {
                padding: 10px;
                font-size: 12px;
            }
        } 		

        .nickname {
            padding: 3px 0;
            font-size: 14px;
            display: flex;
            align-items: center;
            cursor: pointer;
            border-radius: 3px;
            transition: all 0.2s;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .nickname-content {
            display: flex;
            align-items: center;
            width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .nick-avatar {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            color: white;
            font-weight: bold;
            margin-right: 6px;
            flex-shrink: 0;
            font-size: 12px;
        }
		
		/* Base styles for all devices */
		.nick-avatar {
			display: inline-flex;
			align-items: center;
			justify-content: center;
			border-radius: 50%;
			color: white;
			font-weight: bold;
			flex-shrink: 0;
			background-color: var(--primary-color); /* Fallback color */
		}

		/* Extra small devices (phones, 320px and below) */
		@media only screen and (max-width: 320px) {
			.nick-avatar {
				width: 14px;
				height: 14px;
				font-size: 10px;
				margin-right: 4px;
			}
		}

		/* Small devices (phones, 321px to 480px) */
		@media only screen and (min-width: 321px) and (max-width: 480px) {
			.nick-avatar {
				width: 15px;
				height: 15px;
				font-size: 11px;
				margin-right: 5px;
			}
		}

		/* Medium devices (phones/tablets, 481px to 768px) */
		@media only screen and (min-width: 481px) and (max-width: 768px) {
			.nick-avatar {
				width: 16px;
				height: 16px;
				font-size: 12px;
				margin-right: 6px;
			}
		}

		/* Large devices (tablets, 769px to 1024px) */
		@media only screen and (min-width: 769px) and (max-width: 1024px) {
			.nick-avatar {
				width: 18px;
				height: 18px;
				font-size: 13px;
				margin-right: 7px;
			}
		}

		/* Extra large devices (large tablets/laptops, 1025px and up) */
		@media only screen and (min-width: 1025px) {
			.nick-avatar {
				width: 20px;
				height: 20px;
				font-size: 14px;
				margin-right: 8px;
			}
		}

		/* Specific adjustments for portrait/landscape modes */
		@media screen and (orientation: portrait) {
			.nick-avatar {
				/* Potentially slightly larger in portrait for better touch targets */
				width: calc(16px + 1vmin);
				height: calc(16px + 1vmin);
			}
		}

		@media screen and (orientation: landscape) {
			.nick-avatar {
				/* Slightly more compact in landscape */
				margin-right: 5px;
			}
		}

		/* High-density displays (Retina) */
		@media 
		only screen and (-webkit-min-device-pixel-ratio: 2),
		only screen and (min-resolution: 192dpi) {
			.nick-avatar {
				/* Optional: add subtle enhancements for retina */
				box-shadow: 0 0 1px rgba(0,0,0,0.3);
			}
		}

		/* Accessibility considerations */
		@media (prefers-reduced-motion: reduce) {
			.nick-avatar {
				transition: none;
			}
		}

		@media (prefers-contrast: more) {
			.nick-avatar {
				border: 1px solid black;
			}
		}

		/* Foldable devices and very small screens */
		@media (max-width: 300px) {
			.nick-avatar {
				width: 12px;
				height: 12px;
				font-size: 9px;
				margin-right: 3px;
			}
		}

		/* Tall aspect ratio devices (common in modern smartphones) */
		@media (min-aspect-ratio: 9/16) {
			.nick-avatar {
				/* Slightly larger for tall screens */
				width: 17px;
				height: 17px;
			}
		}		

        .nick {
            font-weight: 500;
            overflow: hidden;
            text-overflow: ellipsis;
            #max-width: calc(100% - 30px);
            display: inline-block;
            vertical-align: middle;
        }

        /* Nickname popup modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0,0,0,0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            display: none;
        }

        .modal-content {
            background-color: var(--card-color);
            padding: 20px;
            border-radius: 8px;
            width: 300px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .modal-title {
            font-size: 12px;
            margin-bottom: 15px;
            color: var(--primary-color);
        }

        .modal-input {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
        }

        .modal-buttons {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .modal-button {
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            border: none;
        }

        .modal-primary {
            background-color: var(--primary-color);
            color: white;
        }		

        .nick:hover {
            background-color: rgba(66,133,244,0.1);
            text-decoration: underline;
        }

        .notice {
            color: #ff0000;
            font-style: italic;
            font-size: 0.9em;
        }

        .error {
            color: var(--error-color);
            background-color: rgba(234,67,53,0.1);
            padding: 8px 12px;
            border-radius: 8px;
        }

        .join {
            color: var(--success-color);
			display: none;
        }

        .part, .quit {
            color: var(--error-color);
			display: none;
        }

        .nick-change {
            color: #673ab7;
        }

        .action {
            color: #5f6368;
            font-style: italic;
        }

        .ban {
            color: var(--error-color);
            font-weight: bold;
        }
		
        .nicklist.hidden {
            width: 0;
            padding: 0;
            overflow: hidden;
            border-left: none;
        }

        .user-count {
            font-weight: 500;
            margin-bottom: 10px;
            padding-bottom: 5px;
            border-bottom: 1px solid var(--border-color);
            text-align: center;
            font-size: 14px;
            color: var(--notice-color);
        }

        .nicklist-title {
            display: none;
        }

        .nicklist-category {
            margin-top: 15px;
            font-size: 12px;
            color: var(--notice-color);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: none;
        }

        /* For all mobile devices (phones, phablets, small tablets) */
        @media screen and (max-width: 768px) {
            .nicklist-category {
                display: block;
                margin-top: 10px;
                font-size: 9px;
                letter-spacing: 0.4px;
                display: none;
            }
        }

        /* For very small screens (old phones, tiny devices) */
        @media screen and (max-width: 480px) {
            .nicklist-category {
                font-size: 9px;
                margin-top: 8px;
                letter-spacing: 0.3px;
                display: none;
            }
        }
        
        .nicklist-category.has-users {
            display: block;
        }

        .nickname {
            padding: 3px 0;
            font-size: 14px;
            display: flex;
            align-items: center;
            cursor: pointer;
            border-radius: 3px;
            transition: all 0.2s;
        }
        
        /* For all mobile devices (phones, phablets, small tablets) */
        @media screen and (max-width: 768px) {
            .nickname {
                padding: 1px;
                font-size: 10px;
                border-radius: 5px;
            }
        }

        /* For very small screens (older phones, narrow devices) */
        @media screen and (max-width: 480px) {
            .nickname {
                padding: 1px;
                font-size: 10px;
                border-radius: 5px;
            }
        }       

        .nickname:hover {
            background-color: rgba(0,0,0,0.05);
        }

        .nick-prefix {
            margin-right: 5px;
            font-size: 12px;
        }

        .ircop { color: #ff0000; }
        .owner { color: #ff4500; }
        .superadmin { color: #ff8c00; }
        .admin { color: #ffa500; }
        .rj { color: #9370db; }
        .vip { color: #32cd32; }

        /* Context menu */
        .context-menu {
            position: absolute;
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            z-index: 100;
            display: none;
            min-width: 180px;
            overflow: hidden;
        }

        .context-menu-item {
            padding: 10px 15px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .context-menu-item:hover {
            background-color: var(--secondary-color);
        }

        .context-menu-item:active {
            background-color: rgba(0,0,0,0.05);
        }

        .context-menu-divider {
            height: 1px;
            background-color: var(--border-color);
            margin: 4px 0;
        }
		
		.message-input img.message-emoji {
			width: 20px;
			height: 20px;
			vertical-align: middle;
			margin: 0 1px;
			display: inline-block;
		}		

        .input-area {
            display: flex;
            padding: 10px;
            border-top: 1px solid var(--border-color);
            background-color: white;
            flex-direction: column;
            border-radius: 0 0 12px 12px;
        }

        .input-toolbar {
            display: flex;
            margin-bottom: 10px;
            gap: 5px;
        }

        .format-btn {
            padding: 5px 10px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background: white;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
        }

        .format-btn:hover {
            background-color: rgba(0,0,0,0.05);
        }

        .format-btn.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        .message-input-container {
            display: flex;
            width: 100%;
            gap: 10px;
        }

        .message-input {
            flex: 1;
            padding: 12px 16px;
            border: 1px solid #127f2f;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s;
            resize: none;
            min-height: 50px;
            max-height: 10px;
        }

        .message-input:focus {
            outline: none;
            border-color: #127f2f;
            box-shadow: 0 0 0 3px rgba(66,133,244,0.2);
        }
		
		.message-emoji {
			#width: 20px;
			height: 20px;
			vertical-align: middle;
			margin: 0 1px;
			display: inline-block;
		}		

        .send-button {
            padding: 0 20px;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 500;
            min-width: 80px;
        }

        .send-button:hover {
            background-color: #3367d6;
        }

        .send-button:disabled {
            background-color: #cccccc;
            cursor: not-allowed;
        }

        .emoji-picker {
            position: absolute;
            bottom: 130px;
            left: 10px;
            background: white;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px;
            width: 250px;
            height: 200px;
            overflow-y: auto;
            display: none;
            z-index: 100;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .emoji-category {
            font-weight: bold;
            margin-bottom: 5px;
            padding-bottom: 5px;
            border-bottom: 1px solid var(--border-color);
        }

        .emoji-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 5px;
        }

        .emoji {
            width: 30px;
            height: 30px;
            cursor: pointer;
            transition: transform 0.2s;
            object-fit: contain;
            padding: 3px;
            border-radius: 4px;
        }

        .emoji:hover {
            transform: scale(1.2);
            background-color: rgba(0,0,0,0.05);
        }

		/* Color codes for IRC messages */
		.irc-color-black { color: #000000; }
		.irc-color-dark-blue { color: #00007f; }
		.irc-color-dark-green { color: #009300; }
		.irc-color-light-red { color: #ff0000; }
		.irc-color-dark-red { color: #7f0000; }
		.irc-color-magenta { color: #9c009c; }
		.irc-color-orange { color: #fc7f00; }
		.irc-color-yellow { color: #ffff00; }
		.irc-color-light-green { color: #00fc00; }
		.irc-color-cyan { color: #009393; }
		.irc-color-light-cyan { color: #00ffff; }
		.irc-color-light-blue { color: #0000fc; }
		.irc-color-light-magenta { color: #ff00ff; }
		.irc-color-gray { color: #7f7f7f; }
		.irc-color-light-gray { color: #d2d2d2; }
		.irc-color-white { color: #ffffff; }

		.irc-bold { font-weight: bold; }
		.irc-underline { text-decoration: underline; }
		.irc-italic { font-style: italic; }
		.irc-strikethrough { text-decoration: line-through; }
		.irc-monospace { font-family: monospace; }

        /* Color picker */
        .color-picker {
            position: absolute;
            bottom: 130px;
            left: 10px;
            background: white;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px;
            display: none;
            z-index: 100;
            width: 180px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .color-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
        }

        .color-option {
            width: 30px;
            height: 30px;
            display: inline-block;
            margin: 0;
            cursor: pointer;
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 4px;
            transition: all 0.2s;
        }

        .color-option:hover {
            transform: scale(1.1);
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }

        /* Nick colors */
        .nick-color-1 { color: #4285f4; }
        .nick-color-2 { color: #ea4335; }
        .nick-color-3 { color: #34a853; }
        .nick-color-4 { color: #fbbc05; }
        .nick-color-5 { color: #673ab7; }
        .nick-color-6 { color: #ff5722; }
        .nick-color-7 { color: #009688; }
        .nick-color-8 { color: #e91e63; }

        /* Responsive Design */
        @media (max-width: 768px) {
            .login-box {
                padding: 30px 20px;
            }
        }

        /* Modern scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(0,0,0,0.05);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(0,0,0,0.2);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(0,0,0,0.3);
        }

        /* Animation for new messages */
        @keyframes highlight {
            0% { background-color: rgba(66,133,244,0.1); }
            100% { background-color: transparent; }
        }

        .highlight {
            #animation: highlight 1.5s ease-out;
        }

        /* Password field eye toggle */
        .password-container {
            position: relative;
        }

        .toggle-password {
            position: absolute;
            right: 10px;
            top: 70%;
            transform: translateY(-50%);
            cursor: pointer;
            color: #5f6368;
            font-size: 18px;
        }
		
    /* WHOIS Modal Styles */
    .whois-content {
        width: 350px;
        max-width: 90%;
        background: var(--card-color);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        animation: fadeInUp 0.3s ease-out;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .whois-header {
        display: flex;
        align-items: center;
        padding: 20px;
        background: var(--primary-color);
        color: white;
        position: relative;
    }

    .whois-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        font-weight: bold;
        color: var(--primary-color);
        margin-right: 15px;
        flex-shrink: 0;
    }

    .whois-title {
        flex-grow: 1;
    }

    .whois-title h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

    .whois-status {
        font-size: 12px;
        opacity: 0.9;
        margin-top: 3px;
    }

    .close-modal {
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
        margin-left: 15px;
        line-height: 1;
    }

    .whois-body {
        padding: 20px;
    }

    .whois-row {
        display: flex;
        margin-bottom: 12px;
        align-items: flex-start;
    }

    .whois-label {
        font-weight: 600;
        color: var(--notice-color);
        width: 100px;
        flex-shrink: 0;
        font-size: 14px;
    }

    .whois-value {
        flex-grow: 1;
        font-size: 14px;
        word-break: break-word;
    }

    .whois-actions {
        display: flex;
        gap: 10px;
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px solid var(--border-color);
    }

    .whois-btn {
        flex: 1;
        padding: 8px 12px;
        border-radius: 6px;
        border: none;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
    }

    .pm-btn {
        background: var(--primary-color);
        color: white;
    }

    .pm-btn:hover {
        background: #3367d6;
    }

    .ignore-btn {
        background: var(--secondary-color);
        color: var(--text-color);
    }

    .ignore-btn:hover {
        background: #e0e0e0;
    }

    /* Status badges */
    .status-badge {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 500;
        text-transform: uppercase;
    }

    .status-online {
        background: var(--success-color);
        color: white;
    }

    .status-away {
        background: #fbbc05;
        color: white;
    }

    .status-offline {
        background: var(--error-color);
        color: white;
    }

	#scroll-to-bottom {
		position: fixed;
		bottom: 100px;
		left: 50%; /* Center horizontally */
		transform: translateX(-50%); /* Adjust for exact center */
		background-color: var(--primary-color);
		color: white;
		padding: 8px 12px;
		border-radius: 4px;
		cursor: pointer;
		z-index: 1000;
		display: none;
		box-shadow: 0 2px 5px rgba(0,0,0,0.2);
		transition: opacity 0.3s;
		white-space: nowrap; /* Prevent text from wrapping */
	}

	#scroll-to-bottom:hover {
		opacity: 0.9;
	}
	
	.scroll-button {
		#padding: 5px 10px;
		border: none;
		#background: #ddd;
		cursor: pointer;
		#border-radius: 4px;
	}
	
	.typing-indicator {
		color: #999;
		font-style: italic;
		font-size: 0.9em;
		padding: 5px 10px;
	}

	.message.seen::after {
		content: " ✓✓";
		color: #4CAF50;
		font-size: 0.8em;
		margin-left: 5px;
	}

	// Add this to your CSS section:

	.typing-indicator {
		color: #888;
		font-style: italic;
		padding: 5px 10px;
		margin: 5px 0;
		border-left: 3px solid #ccc;
	}

	.seen-notification {
		color: #888;
		font-size: 0.8em;
		text-align: right;
		padding: 2px 10px;
		margin-top: -10px;
	}

	.new-message-notification {
		position: fixed;
		top: 10px;
		left: 50%;
		transform: translateX(-50%);
		background-color: var(--primary-color);
		color: white;
		padding: 8px 16px;
		border-radius: 4px;
		cursor: pointer;
		z-index: 1000;
		box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	}
        :root {
            --primary-color: #4285f4;
            --secondary-color: #34a853;
            --error-color: #ea4335;
            --warning-color: #fbbc05;
            --text-color: #333;
            --bg-color: #f5f5f5;
            --panel-color: #fff;
            --border-color: #ddd;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-color);
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .chat-container {
            display: none;
            flex: 1;
            flex-direction: column;
            height: 100vh;
        }

        .header {
            background-color: var(--primary-color);
            color: white;
            padding: 10px 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .tab-bar {
            display: flex;
            background-color: #127f2f;
            overflow-x: auto;
            white-space: nowrap;
        }

        .tab {
            padding: 10px 15px;
            color: #000000;
            cursor: pointer;
            position: relative;
            display: flex;
            align-items: center;
        }

        .tab.active {
            background-color: #ffffff;;
        }

        .tab.unread::after {
            content: '';
            position: absolute;
            top: 5px;
            right: 5px;
            width: 8px;
            height: 8px;
            background-color: #127f2f;
            border-radius: 50%;
        }

        .close-tab {
            margin-left: 8px;
            font-size: 16px;
            opacity: 0.7;
        }

        .close-tab:hover {
            opacity: 1;
        }

        .messages-container {
            flex: 1;
            overflow-y: auto;
            padding: 4px;
            background-color: var(--panel-color);
            position: relative;
        }

        .message {
            margin-bottom: 10px;
            line-height: 1.4;
            word-wrap: break-word;
			border: 0 solid black;
			border-left-width: thin;
        }

        .message.highlight {
            #animation: highlight 1s;
        }

        @keyframes highlight {
            0% { background-color: rgba(255, 255, 0, 0.3); }
            100% { background-color: transparent; }
        }

        .message.notice {
            color: #ff0000;
        }

        .message.error {
            color: var(--error-color);
        }

        .message.join {
            color: var(--secondary-color);
        }

        .message.part, .message.quit {
            color: var(--error-color);
        }

        .message.nick-change {
            color: var(--warning-color);
        }

        .message.privmsg {
            margin-bottom: 5px;
        }

        .message.action {
            color: #888;
            font-style: italic;
        }

        .input-area {
            display: flex;
            padding: 10px;
            background-color: var(--panel-color);
            border-top: 1px solid #127f2f;
        }

        .message-input {
            flex: 1;
            padding: 10px;
            border: 1px solid #127f2f;
            border-radius: 4px;
            resize: none;
            height: 60px;
        }

        .send-button {
            margin-left: 10px;
            padding: 0 15px;
            background-color: #127f2f;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        .send-button:disabled {
            background-color: #ccc;
            cursor: not-allowed;
        }

        .status-indicator {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 5px;
        }

        .status-indicator.connected {
            background-color: var(--secondary-color);
        }

        .status-indicator.disconnected {
            background-color: var(--error-color);
        }

        .status-indicator.connecting {
            background-color: var(--warning-color);
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }

        .nicklist {
            #width: 150px;
            background-color: var(--panel-color);
            border-left: 1px solid var(--border-color);
            overflow-y: auto;
            padding: 10px;
        }

        .nicklist.hidden {
            display: none;
        }

        .nicklist-category {
            margin-bottom: 10px;
        }

        .nicklist-category.has-users {
            display: block;
        }

        .nicklist-category:not(.has-users) {
            display: none;
        }

        .nicklist-category h4 {
            margin-bottom: 5px;
            color: #666;
            font-size: 0.9em;
        }

        .nick-prefix {
            margin-right: 5px;
            font-size: 0.9em;
        }

        .ircop {
            color: #ff0000;
        }

        .owner {
            color: #ff9900;
        }

        .superadmin {
            color: #9900ff;
        }

        .admin {
            color: #0099ff;
        }

        .rj {
            color: #00cc99;
        }

        .vip {
            color: #ffcc00;
        }

        .context-menu {
            display: none;
            position: absolute;
            background-color: var(--panel-color);
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            z-index: 1000;
            min-width: 150px;
        }

        .context-menu button {
            display: block;
            width: 100%;
            padding: 8px 15px;
            text-align: left;
            background: none;
            border: none;
            cursor: pointer;
        }

        .context-menu button:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }

        .color-options {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 5px;
        }

        .color-option {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            cursor: pointer;
            border: 1px solid var(--border-color);
        }

        .color-option:hover {
            transform: scale(1.2);
        }

        .format-button {
            background: none;
            border: none;
            padding: 5px;
            cursor: pointer;
            font-size: 1.1em;
        }

        .format-button.active {
            color: var(--primary-color);
        }

        .nick {
            font-weight: bold;
            cursor: pointer;
        }

        .message-emoji {
            height: 20px;
            vertical-align: middle;
        }

        .nick-avatar {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            color: white;
            font-weight: bold;
            margin-right: 5px;
        }

        /* Typing indicator styles */
        .typing-indicator {
            color: #888;
            font-style: italic;
            padding: 5px 10px;
            margin: 5px 0;
            border-left: 3px solid #ccc;
            animation: fadeIn 0.3s;
        }

        /* Seen notification styles */
        .seen-notification {
            color: #888;
            font-size: 0.8em;
            text-align: right;
            padding: 2px 10px;
            margin-top: -10px;
            animation: fadeIn 0.3s;
        }

        /* New message notification */
        .new-message-notification {
            position: fixed;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--primary-color);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            z-index: 1000;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            animation: slideIn 0.3s;
        }

        /* Scroll to bottom button */
        #scroll-to-bottom {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--primary-color);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            z-index: 1000;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            display: none;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideIn {
            from { 
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
            to { 
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        /* Modal styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            background-color: var(--panel-color);
            padding: 20px;
            border-radius: 8px;
            max-width: 400px;
            width: 100%;
        }

        .modal h3 {
            margin-bottom: 15px;
        }

        .modal input {
            width: 100%;
            padding: 8px;
            margin-bottom: 15px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
        }

        .modal-buttons {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .modal-button {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        .modal-button.primary {
            background-color: var(--primary-color);
            color: white;
        }

        .modal-button.secondary {
            background-color: var(--border-color);
        }
		
		.typing-seen-notification {
		  position: fixed;
		  bottom: 10px;
		  right: 10px;
		  background-color: rgba(0, 0, 0, 0.7);
		  color: white;
		  padding: 5px 10px;
		  border-radius: 4px;
		  font-size: 12px;
		  z-index: 1000;
		  max-width: 200px;
		}

		#typing-indicator, #seen-indicator {
		  margin: 2px 0;
		}
		.message.topic {
		  text-align: center;
		}
		
		