:root {
    --msn-orange: #ff6600;
    --msn-orange-light: #ff8833;
    --msn-blue: #0066cc;
    --msn-blue-light: #3399ff;
    --msn-header-bg: #ff6600;
    --msn-panel-bg: #ffffff;
    --msn-border: #cccccc;
    --msn-text: #000000;
    --msn-gray: #f0f0f0;
    --msn-input-bg: #ffffff;

    --header-gradient: linear-gradient(to bottom, #1a94d1, #ff8833);
    --input-gradient: linear-gradient(to bottom, #e6e6e6, #f5f5f5);
    --roomlist-gradient: linear-gradient(to bottom, #f0f0f0, #ffffff);
    --send-gradient: linear-gradient(to bottom, #0066cc, #0052a3);
    --action-gradient: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    --messages-gradient: #ffffff;
}
.nicklist-users {
    background-color: #ffffff;
    list-style: none;
    min-height: calc(100% - 22%);
    max-height: calc(100% - 22%);
    overflow-y: scroll;
    overflow-x: hidden;
}
* {
    box-sizing: border-box;
    padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

html {
    overflow-y: hidden;
    overflow-x: hidden;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background-color: var(--input-gradient);
    justify-content: center;
    align-items: center;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
    width: 100%;
    font-size: 14px;
    background: var(--msn-blue);
}

a {
    text-decoration: underline;
    /* color: #0066cc; */
}

a:hover {
    color: #0052a3;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--header-gradient);
    border-bottom: 1px solid #cc5500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header .channel-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.header #user-count {
    font-size: 14px;
    color: #ffffff;
    position: absolute;
    top: 44px;
    right: 64px;
}

.chat-header {
    background: var(--header-gradient);
    color: white;
    font-size: 27px;
    font-weight: 600;
    justify-content: space-between;
    align-items: self-start;
    flex-direction: column;
    width: 100%;
    /* top: -2px; */
    position: relative;
    height: 94%;
}

.chatH-container {

flex-direction: row;

background: var(--msn-gray);

/* background: #ffffff; */

display: flex;
}

.chatH-header {
    display: flex;
    align-items: stretch;
}

.chat-logo-stump {
    display: flex;
    height: 34px;
    background: var(--header-gradient);
}

.chat-left-line-stump {
    display: flex;
    flex-direction: column;
    position: relative;
    top: -5px;
    background: var(--header-gradient);
}

.roomtitle-bar {
    display: flex;
    align-items: center;
    justify-content: center;
}

#roomtitleHDR {
    position: relative;
    left: 4dvh;
}

.chat-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.nav-sep {
    width: 1px;
    height: 15px;
    background: rgba(255, 255, 255, 0.3);
}

.tabs {
    display: flex;
    justify-content: center;
    background-color: #333;
    overflow: hidden;
}

.tablink {
    background-color: #555;
    color: white;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 20px;
    font-size: 17px;
    flex: 1;
}

.tablink:hover {
    background-color: #777;
}

.tablink.active {
    background-color: #111;
}

.tabcontent {
    /* height: calc(100vh - 50px); */
}

.main-container {
    display: flex;
    width: 100%;
    height: 100%;
    border-bottom: #ffffe9 solid 39px;
}

.chat-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    top: 0px;
    left: 0px;
    height: 100dvh;
    margin-right: -1px;
    background: var(--header-gradient);
}

.right-column {
    width: 100%;
    
}

.left-columm {
    flex-direction: column;
    display: flex;
}

.top_line-area {
    width: 100%;
    display: flex;
}

img.top_line-img {
    width: 100%;
    height: 0.5dvh;
}

img#top_line {
    position: relative;
    top: 52px;
    left: 0px;
}

.chat-box {
    background-color: #fff;
    min-height: 98.8%;
    max-height: 99.8%;
    overflow-y: scroll;
    position: relative;
    top: 0px;
    margin-left: 3px;
    margin-right: 1px;
}

.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background: #f9f9f9;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 4px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

.chat-box p {
    margin: 0 0 -1px 0;
    color: #333;
    line-height: 1.5;
}

.chat-messages {
    flex-direction: column;
    border-radius: 0;
    border: solid #cccccc 1px;
    scrollbar-width: thin;
    scrollbar-color: #cccccc #ffffff;
    background: var(--messages-gradient);
    max-height: 82.7%;
    min-height: 82.7%;
}

.chat-messages::-webkit-scrollbar,
.nicklist::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.nicklist::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb,
.nicklist::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.message {
    margin-bottom: 16px;
    max-width: 80%;
    align-self: flex-start;
}

.message-admin {
    align-self: flex-start;
    background-color: #fffacd;
    border-radius: 0;
    padding: 10px 12px;
    border-left: 3px solid var(--msn-orange);
}

.username {
    font-weight: 600;
    color: #000;
    font-size: 15px;
    margin-bottom: 2px;
}

.host-tag {
    color: var(--msn-orange);
    font-size: 12px;
    font-weight: 500;
    margin-left: 4px;
}

.message-content {
    font-size: 15px;
    line-height: 1.4;
    color: #333;
}

.topic-display {
    background-color: #ffffff;
    text-align: center;
    border-bottom: 1px solid #cccccc;
    padding: 0px;
}

.topic {
    font-style: normal;
    font-size: small;
    padding-left: 8px;
    color: #000;
}

.input-area {
    background: var(--input-gradient);
    height: 35%;
    padding: 11px 4px;
    border-top: 1px solid #cccccc;
    align-items: center;
    bottom: 0px;
    width: 100%;
    display: flex;
}

.chat-input-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 84.4%;
    background-color: var(--msn-gray);
    padding: 10px;
    box-sizing: border-box;
    border-top: 2px solid #cccccc;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1;
}

#chat-input {
    border-radius: 3px;
    font-size: 14px;
    background-color: #ffffff;
    color: #333;
    outline: none;
    width: 78%;
    border: 1px solid #999999;
    padding: 5px;
    height: 55%;
}

#chat-input:focus {
    border-color: var(--msn-blue);
    background-color: #fff;
}

.input-box {
    width: 40%;
    flex: 1;
    border: solid 2px #999999;
    border-radius: 3px;
    padding: 10px 16px;
    outline: none;
    font-size: 15px;
    background-color: white;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.send-button {
    background: var(--send-gradient);
    color: #ffffff;
    border: 1px solid #004d99;
    border-radius: 3px;
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    width: 94px;
}

.send-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    background: linear-gradient(to bottom, #0077dd, #0066cc);
}

.send-button:active {
    transform: translateY(0);
}

#send-button {
    color: #fff;
}

#send-button:hover {
    background-color: #0077dd;
}

.action-button {
    background: var(--action-gradient);
    background-image: url('MSN/!.png');
    color: white;
    border: 1px solid #999;
    border-radius: 3px;
    padding: 10px 20px;
    cursor: pointer;
    background-repeat: no-repeat;
    background-size: 21px;
    height: 31px;
    background-position: center;
}

.action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    background-image: url('MSN/!-checked.png');
}

.nicklist {
    overflow: hidden;
    -ms-overflow-style: none;
    position: relative;
    /* top: 27px; */
    width: 30%;
    background: var(--input-gradient);
    display: block;
    border-left: 1px solid #cccccc;
}

.nicklist h3 {
    margin-top: 0;
    font-size: 16px;
    color: #000;
}

.nicklist ul {
    list-style-type: none;
    padding: 0;
}

.nicklist ul li {
    position: relative;
    left: 15px;
    cursor: default;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.nicklist ul li::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('MSN/modesT.png');
    background-repeat: no-repeat;
    position: relative;
    top: -1px;
    left: 5px;
}

.nicklist ul li.owner::before {
    background-position: -16px 0;
}

.nicklist ul li.host::before {
    background-position: -32px 0;
}

.nicklist ul li.participant::before {
    background-position: -112px 0;
}

.nicklist ul li.spectator::before {
    background-position: -48px 0;
    display: none;
}

.nicklist ul li.member::before {
    background-position: -48px 0;
    display: none;
}

.nicklist ul li.ircop::before {
    background-position: 0px 0;
}

.nicklist-header {
    min-height: 37px;
    position: relative;
    max-height: 40px;
    background: var(--send-gradient);
    width: 100%;
}

.nicklist-RoomName {
    color: #ffffff;
    position: relative;
    left: 7px;
    font-weight: bold;
}

.nicklist-UserCount {
    color: #ffffff;
    font-size: small;
    padding-left: 6px;
}



.nicklist-users ul li {
    position: relative;
    left: 22px;
    list-style: none;
}

.nicklist-users ul li::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url(MSN/modesT.png);
    background-repeat: no-repeat;
    position: relative;
    top: 0px;
    left: -9px;
}

.nicklist-users ul li.owner::before {
    background-position: -16px 0;
}

.nicklist-userNickname {
    background-color: #f5f5f5;
    font-weight: bolder;
    height: 35px;
    border-bottom: 1px solid #cccccc;
}

.nicklist-userNickname span.participant::before {
    background-position: -112px 0;
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url(MSN/modesT.png);
    background-repeat: no-repeat;
    position: relative;
    left: -7px;
}

.nicklist-userNickname span.host::before {
    background-position: -32px 0;
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url(MSN/modesT.png);
    background-repeat: no-repeat;
    position: relative;
    left: -7px;
}

.nicklist-userNickname span.owner::before {
    background-position: -16px 0;
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url(MSN/modesT.png);
    background-repeat: no-repeat;
    position: relative;
    left: -7px;
}

.nicklist-userNickname span.spectator::before {
    background-position: -48px 0;
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url(MSN/modesT.png);
    background-repeat: no-repeat;
    position: relative;
    left: -7px;
}

.nicklist-userNickname span.member::before {
    background-position: 24px 0;
    display: none;
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url(MSN/modesT.png);
    background-repeat: no-repeat;
    position: relative;
    left: -7px;
}

.nicklist-user {
    font-size: 14px;
    color: #333;
    padding: 6px 0;
    position: relative;
    left: 22px;
    list-style: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: 3px;
    margin: 2px 0;
}

.nicklist-user:hover {
    background-color: #e6f0ff;
}

.nicklist-user.selected {
    background-color: #cce0ff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.nicklist-user.selected span {
    color: var(--msn-blue);
    font-weight: 600;
}

.nicklist-user.selected::before {
    filter: brightness(0.8) saturate(2);
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.host-tag-nicklist {
    color: var(--msn-orange);
    font-size: 11px;
    font-weight: 500;
    margin-left: 4px;
}

.owner-tag-nicklist {
    color: var(--msn-orange);
    font-size: 11px;
    font-weight: 500;
    margin-left: 4px;
}

.user-display {
    padding: 12px 16px;
    font-size: 15px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.people-count {
    background-color: rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
}

.nicklist-users ul li.participantAway::before,
.nicklist-users ul li.ownerAway::before,
.nicklist-users ul li.hostAway::before,
.nicklist-users ul li.memberAway::before,
.nicklist-users ul li.spectatorAway::before {
    background-position: -80px 0;
}

span.participantAway,
span.memberAway,
span.spectatorAway,
span.hostAway,
span.ownerAway,
span.ircopxAway {
    font-style: italic;
    color: gray;
}

li.participantAway,
li.memberAway,
li.spectatorAway,
li.hostAway,
li.ownerAway,
li.ircopxAway {
    font-style: italic;
    color: gray;
}

li.participantAway::after,
li.memberAway::after,
li.spectatorAway::after,
li.hostAway::after,
li.ownerAway::after,
li.ircopxAway::after {
    content: ' (Away)';
    font-style: italic;
    color: gray;
}

.nicklist-buttons {
    background-color: #f5f5f5;
    position: relative;
    padding: 15px;
    top: 0px;
    justify-content: center;
    display: flex;
    border-top: 1px solid #cccccc;
}

.whisper-button {
    width: 16px;
    height: 16px;
    margin: 6px;
    border-style: none;
    background-image: url('MSN/whisper.png');
    background-color: transparent;
    cursor: pointer;
}

.ignore-button {
    width: 16px;
    height: 16px;
    margin: 6px;
    border-style: none;
    background-image: url('MSN/ignore.png');
    background-color: transparent;
    cursor: pointer;
}

.highlight-button {
    width: 16px;
    height: 16px;
    margin: 6px;
    border-style: none;
    background-image: url('MSN/highlight.png');
    background-color: transparent;
    cursor: pointer;
}

.viewprofile-button {
    width: 16px;
    height: 16px;
    margin: 6px;
    border-style: none;
    background-image: url('MSN/viewprofile.png');
    background-color: transparent;
    cursor: pointer;
}

.AwayButton {
    background-image: url('MSN/coffeeAway.png');
    width: 36px;
    height: 25px;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    top: 3px;
    padding: 9px 15px;
    position: absolute;
    right: 28px;
    transition: all 0.1s ease;
    cursor: pointer;
    background-color: transparent;
    border: none;
}

.AwayButton.pressed {
    background-image: url('MSN/coffeeAway-checked.png');
    transform: translateY(2px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

button {
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

button:focus {
    -webkit-box-shadow: inset 0px 0px 5px #c1c1c1;
    -moz-box-shadow: inset 0px 0px 5px #c1c1c1;
    box-shadow: inset 0px 0px 5px #c1c1c1;
}

.join-box {
    position: absolute;
    left: 6px;
    top: -20px;
    z-index: 999999;
    width: 50px;
    height: 50px;
}

.exit-box {
    position: absolute;
    left: 0px;
    top: -20px;
    z-index: 999999;
    width: 50px;
    height: 50px;
}

.room-list {
    background: var(--roomlist-gradient);
}

#RoomList {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    background-color: #fff;
    height: 80%;
}

.roomlist-container {
    background: #fff;
    padding: 0px;
    display: flex;
    flex-direction: column;
    position: relative;
    top: 0px;
    flex-wrap: wrap;
}

.roomlist-body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.roomlist-h1, .roomlist-h2 {
    text-align: center;
    color: #333;
}

.roomlist-h1 {
    font-size: 2.5em;
    margin: 0;
}

.roomlist-h2 {
    font-size: 2em;
    margin: 20px 0;
}

.roomlist-category-dropdown {
    /* margin-bottom: 10px; */
}

.roomlist-category-dropdown select {
    padding: 10px;
    font-size: 1.2em;
    border-radius: 4px;
    border: 1px solid #ddd;
    width: 100%;
    max-width: 400px;
}

.roomlist-create-channel-link {
    text-align: center;
    /* margin-bottom: 20px; */
}

.roomlist-create-channel-link a {
    font-size: 0.9em;
    color: var(--msn-blue);
    text-decoration: none;
    cursor: pointer;
}

.roomlist-create-channel-link a:hover {
    text-decoration: underline;
}

.roomlist-room-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    flex-grow: 1;
    overflow-x: auto;
}

.roomlist-room-list th, .roomlist-room-list td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 1.1em;
}

.roomlist-room-list th {
    background-color: #f8f8f8;
    font-size: 1.2em;
}

.roomlist-room-list tr {
    background-color: #ffffff;
}

.roomlist-room-list tr:nth-child(even) {
    background-color: #f9f9f9;
}

.roomlist-room-list tr:hover {
    background-color: #fff5e6;
}

.roomlist-pagination, .roomlist-pagination2 {
    text-align: center;
    margin-top: 20px;
}

.roomlist-pagination button {
    margin: 9px;
}

.roomlist-pagination a, .roomlist-pagination2 a {
    margin: 0 10px;
    text-decoration: none;
    color: #333;
    font-size: 1.1em;
    padding: 10px 15px;
    display: inline-block;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.roomlist-pagination a:hover, .roomlist-pagination2 a:hover {
    color: var(--msn-blue);
    background-color: #f0f0f0;
}

.roomlist-room-list a {
    text-decoration: none;
    color: var(--msn-blue);
    font-weight: bold;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: color 0.3s ease;
}

.roomlist-room-list a:hover {
    color: #004d99;
}

.roomlist-nickname-container {
    margin-bottom: 3px;
    position: relative;
}

.roomlist-nickname-display {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.roomlist-nickname-edit {
    font-size: 1em;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

.roomlist-nickname-save {
    padding: 5px 10px;
    font-size: 1em;
    background-color: var(--msn-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.roomlist-nickname-save:hover {
    background-color: #004d99;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #ece9d8;
    margin: 10% auto;
    padding: 20px;
    border: 2px solid #003c74;
    width: 250px;
    font-family: "MS Sans Serif", "Tahoma", sans-serif;
    font-size: 12px;
    color: #000;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
}

.close-modal {
    color: #000;
    float: right;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #003c74;
}

#host-keyword-input {
    width: 100%;
    padding: 6px;
    margin: 10px 0;
    border: 1px solid #003c74;
    background-color: #fff;
    font-family: "MS Sans Serif", "Tahoma", sans-serif;
    font-size: 12px;
    color: #000;
    outline: none;
}

#host-keyword-input:focus {
    border-color: var(--msn-blue);
}

.win2k-btn {
    padding: 6px 12px;
    border: 1px solid #003c74;
    background-color: #ece9d8;
    font-family: "MS Sans Serif", "Tahoma", sans-serif;
    font-size: 12px;
    color: #000;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.win2k-btn:hover {
    background-color: #d4d0c8;
}

.win2k-btn:active {
    background-color: #c0c0c0;
    border-color: #000;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.context-menu {
    max-width: calc(100vw - 20px);
    padding: 5px;
    box-sizing: border-box;
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 160px;
}

.context-menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.context-menu ul li {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 16px;
}

.context-menu ul li:hover {
    background-color: #fff5e6;
}

.context-menu ul li.separator {
    border-bottom: 1px solid #ccc;
    padding: 0;
    margin: 8px 0;
}

.context-menu ul li.submenu {
    position: relative;
}

.context-menu ul li.submenu ul {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    min-width: 160px;
}

.context-menu ul li.submenu:hover ul {
    display: block;
}

.window-toggle {
    position: absolute;
    top: 3px;
    right: 9px;
    z-index: 1001;
    background-color: rgb(255 255 255);
    border-radius: 3px;
}

button#toggle-window-style {
    width: 5vh;
    height: 2vh;
    background-color: unset;
    border-radius: 20px 20px 20px 20px;
    border-style: groove;
}

#mirc-chat-container {
    font-family: 'Lucida Console', Monaco, monospace;
    font-size: 12px;
    width: 100%;
    height: 100vh;
    background-color: #f0f0f0;
    border: none;
    box-shadow: none;
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.mirc-title-bar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 6px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
    user-select: none;
}

.mirc-title {
    font-weight: bold;
}

.mirc-buttons {
    display: flex;
    gap: 5px;
}

.mirc-button {
    background: #d0d0d0;
    border: 1px solid #999;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
}

.mirc-button.close {
    background: #ff4444;
    color: white;
}

.mirc-menu-bar {
    background-color: #e0e0e0;
    border-bottom: 1px solid #999;
    padding: 2px 5px;
    display: flex;
    gap: 15px;
}

.mirc-menu-item {
    cursor: pointer;
}

.mirc-menu-item:hover {
    text-decoration: underline;
}

.mirc-status-bar {
    background-color: #e0e0e0;
    border-top: 1px solid #999;
    padding: 2px 5px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.mirc-chat-area {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.mirc-chat-box {
    flex: 1;
    padding: 5px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    margin: 5px;
}

.mirc-nicklist {
    width: 150px;
    padding: 5px;
    overflow-y: auto;
    background-color: #f8f8f8;
    border-left: 1px solid #ccc;
    margin: 0;
}

.mirc-input-area {
    display: flex;
    padding: 5px;
    background-color: #e0e0e0;
    border-top: 1px solid #999;
    position: sticky;
    bottom: 0;
}

.mirc-input {
    flex: 1;
    padding: 3px;
    border: 1px solid #999;
    font-family: 'Lucida Console', Monaco, monospace;
    font-size: 12px;
}

.mirc-send-button {
    margin-left: 5px;
    padding: 3px 10px;
    background-color: #d0d0d0;
    border: 1px solid #999;
    cursor: pointer;
}

.mirc-message {
    margin: 2px 0;
    line-height: 1.3;
}

.mirc-message .timestamp {
    color: #888;
    margin-right: 5px;
}

.mirc-message .nick {
    font-weight: bold;
}

.mirc-message .text {
    color: #000;
}

.mirc-nicklist-item {
    padding: 2px 5px;
}

.mirc-nicklist-item.owner {
    color: #ff0000;
    font-weight: bold;
}

.mirc-nicklist-item.host {
    color: #0000ff;
    font-weight: bold;
}

.mirc-nicklist-item.voice {
    color: #009900;
}

.mirc-color-0 { color: white; }
.mirc-color-1 { color: black; }
.mirc-color-2 { color: navy; }
.mirc-color-3 { color: green; }
.mirc-color-4 { color: red; }
.mirc-color-5 { color: maroon; }
.mirc-color-6 { color: purple; }
.mirc-color-7 { color: orange; }
.mirc-color-8 { color: yellow; }
.mirc-color-9 { color: lime; }
.mirc-color-10 { color: teal; }
.mirc-color-11 { color: cyan; }
.mirc-color-12 { color: blue; }
.mirc-color-13 { color: magenta; }
.mirc-color-14 { color: gray; }
.mirc-color-15 { color: silver; }

.irc-reverse {
    color: black !important;
    background-color: white !important;
    filter: invert(100%);
}

.mirc-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 90%;
    height: 400px;
    background-color: #f0f0f0;
    border: 1px solid #999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    font-family: 'Lucida Console', Monaco, monospace;
    font-size: 12px;
}

.mirc-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mirc-modal-header {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mirc-modal-title {
    font-weight: bold;
}

.mirc-tabs {
    display: flex;
    margin-left: 20px;
}

.mirc-tab {
    background: transparent;
    border: none;
    color: white;
    padding: 2px 8px;
    margin-right: 2px;
    cursor: pointer;
    font-size: 11px;
}

.mirc-tab.active {
    background-color: #f0f0f0;
    color: black;
}

.mirc-modal-close {
    cursor: pointer;
    font-size: 16px;
}

.mirc-modal-body {
    flex: 1;
    padding: 5px;
    overflow: hidden;
}

.mirc-script-editor {
    width: 100%;
    height: 100%;
    border: 1px solid #999;
    font-family: 'Lucida Console', Monaco, monospace;
    font-size: 12px;
    line-height: 1.3;
    padding: 5px;
    resize: none;
    white-space: pre;
    tab-size: 4;
}

.mirc-modal-footer {
    padding: 6px;
    background-color: #e0e0e0;
    border-top: 1px solid #999;
    display: flex;
    justify-content: flex-end;
}

.mirc-modal-footer button {
    margin-left: 5px;
    padding: 2px 10px;
}

@keyframes time-reply-fade-in {
    0% {
        opacity: 0;
        transform: translateX(-15px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.time-reply-animate {
    animation: time-reply-fade-in 0.6s ease-out;
}

@keyframes glitchy-fade-in {
    0% {
        opacity: 0;
        transform: translateY(-5px);
        color: rgba(0, 0, 0, 0);
    }
    20% {
        opacity: 0.8;
        transform: translateY(2px);
        color: rgba(0, 0, 255, 0.8);
    }
    40% {
        opacity: 0.6;
        transform: translateY(-2px);
        color: rgba(0, 0, 0, 0.8);
    }
    60% {
        opacity: 0.8;
        transform: translateY(1px);
        color: rgba(128, 128, 128, 0.8);
    }
    80% {
        opacity: 0.7;
        transform: translateY(-1px);
        color: rgba(0, 0, 255, 0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        color: gray;
    }
}

.glitchy-fade-in {
    animation: glitchy-fade-in 1.5s ease-in-out;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(2px, -2px);
    }
    60% {
        transform: translate(-2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

.glitch-effect {
    animation: glitch 0.5s linear;
    position: relative;
    display: inline-block;
    color: gray;
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.fade-out {
    animation: fade-out 0.5s ease-out forwards;
}

.fade-in {
    animation: fade-in 0.5s ease-in forwards;
}

@keyframes pulse {
    0% { background-color: #cce0ff; }
    50% { background-color: #e6f0ff; }
    100% { background-color: #cce0ff; }
}

.nicklist-user.selected {
    animation: pulse 2s infinite;
}

.createchannel-body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.createchannel-container {
    width: 100%;
    max-width: 800px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin: 20px;
}

.createchannel-h1 {
    font-size: 2em;
    text-align: center;
    color: #333;
    margin: 0 0 20px 0;
}

.createchannel-h2 {
    font-size: 1.5em;
    text-align: center;
    color: #333;
    margin: 0 0 20px 0;
}

.createchannel-return-link {
    text-align: center;
    margin-bottom: 20px;
}

.createchannel-return-link a {
    font-size: 0.9em;
    color: var(--msn-blue);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.createchannel-return-link a:hover {
    color: #004d99;
}

.createchannel-form-section {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: #feffed;
}

.createchannel-form-group {
    margin-bottom: 20px;
}

.createchannel-form-group label {
    display: block;
    font-size: 1em;
    color: #34495e;
    margin-bottom: 8px;
}

.createchannel-form-group input,
.createchannel-form-group textarea,
.createchannel-form-group select {
    width: 100%;
    padding: 10px;
    font-size: 0.9em;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.createchannel-form-group input:focus,
.createchannel-form-group textarea:focus,
.createchannel-form-group select:focus {
    border-color: var(--msn-blue);
    box-shadow: 0 0 8px rgba(0, 102, 204, 0.2);
    outline: none;
}

.createchannel-form-group input[type="text"] {
    max-width: 400px;
}

.createchannel-form-group textarea {
    resize: vertical;
    height: 120px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
}

.createchannel-horizontal-group {
    display: flex;
    gap: 15px;
}

.createchannel-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.createchannel-tooltip.show {
    opacity: 1;
}

.createchannel-navigation-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.createchannel-navigation-buttons button {
    background: none;
    border: none;
    padding: 0;
    font-size: 1em;
    color: var(--msn-blue);
    cursor: pointer;
    transition: color 0.3s ease;
}

.createchannel-navigation-buttons button:hover {
    color: #004d99;
}

#channel-switcher {
    display: none;
    padding: 0px;
    border-radius: 5px;
    border: none;
    background-color: #fefadf;
    font-size: 22px;
    top: 37px;
    font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

.switch {
    position: absolute;
    top: -45px;
    left: -28px;
    width: 100%;
    background-color: #325f7600;
    padding: 10px;
    z-index: 999;
}

.connecting {
    position: relative;
    top: 0px;
    right: 0px;
}

.connected {
    position: relative;
    top: 0px;
    right: 0px;
}

.TopicSet {
    position: relative;
    top: -9px;
    left: 0px;
}

.spectatormode {
    display: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

div#master-head {
    position: relative;
    top: 0px;
    z-index: 8;
}

@media (min-width: 1024px) and (min-height: 768px) {
    .chat-left-line-stump {
        height: 1.4dvh;
    }
    
    #channel-switcher {
        position: relative;
        left: 85%;
    }
    
    .chat-container {
        width: 84%;
    }
    
    .chat-box {
        min-height: 99.8%;
        max-height: 99.8%;
    }
    
    .input-box {
        padding: 10px 16px;
        width: 80%;
    }
    
    .input-area {
        height: 10%;
    }
    
    .chat-messages {
        max-height: 84.7%;
        min-height: 82.7%;
        top: 0.23x;
        position: relative;
        /* left: 1px; */
    }
    
    .chat-box {
        margin-left: 3px;
        overflow-y: scroll;
        position: relative;
        margin-right: 1px;
    }
}

@media (min-width: 1440px) and (max-width: 1919px) {
    .header .channel-name {
        position: relative;
        top: 0px;
        right: 50%;
    }
    
    .header #user-count {
        right: 2px;
    }
    
    .toggle-nicklist.mobile-only {
        display: none;
    }
    
    #channel-switcher {
        top: 36px;
        width: 13%;
    }
    
    html {
        overflow-y: hidden;
    }
    
    .nicklist {
        width: 15%;
        min-height: 76%;
    }
    
    .nicklist.open {
        right: -70%;
    }
    
    .roomlist-container {
        top: 45px;
    }
    
    .chat-container {
        width: 85%;
    }
    
    img#top_line {
        position: relative;
        top: 52px;
        left: 0px;
    }
    
    #exitimg {
        width: 18px;
        height: 18px;
    }
    
    .chat-box {
        overflow-y: scroll;
    }
}

@media (min-width: 1920px) {
    .chat-input-container {
        width: 77%;
    }
    
    .exit-box {
        position: absolute;
        top: 19px;
        right: 18%;
        width: 15px;
        height: 16px;
    }
    
    #exitimg {
        width: 36px;
        height: 39px;
    }
    
    #channel-switcher {
        position: relative;
        left: 83%;
        top: 73px;
        width: 14%;
    }
    
    .nicklist {
        width: 16%;
        min-height: 78%;
        top: 166px;
    }
    
    .nicklist.open {
        right: 0;
    }
    
    .roomlist-container {
        top: 73px;
    }
    
    .chat-container {
        top: -74px;
    }
    
    .chat-box {
        min-height: calc(100vh - 169px);
        max-height: calc(100vh - 169px);
    }
}

@media (min-width: 468px) and (max-width: 1000px) and (orientation: landscape) {
    #channel-switcher {
        top: 49px;
        right: 216px;
        width: 27%;
    }
    
    #RoomList {
        top: 0px;
    }
    
    .chat-input-container {
        width: 75%;
    }
    
    .header .channel-name {
        position: relative;
        top: 0px;
        right: 50%;
    }
    
    #channel-switcher {
        position: absolute;
        width: 201px;
    }
    
    .nicklist {
        min-height: 100%;
    }
    .nicklist-users {
        min-height: 62%;
    }
    
    html, body {
        /* overflow: unset; */
    }
    
    .nicklist.open {
        right: 0;
    }
    
    #roomtitle {
        text-align: center;
    }
    
    .roomlist-container {
        /* top: 44px; */
        /* width: 74%; */
    }
    #RoomList {
        height: 85%;
    }
}

@media screen and (orientation: landscape) and (max-width: 900px) {
    .input-area {
        width: 99.98%;
    }
}

@media screen and (orientation: landscape) and (max-height: 600px) {
    .chat-messages {
        min-height: 54%;
        max-height: 56%;
    }
    .exit-box {
        top: 0px;
    }
    .join-box {
        top: 0px;
    }
}a

@media (max-width: 768px) {
    .header #user-count {
        left: 229px;
        top: 40px;
    }
    
    img#top_line {
        position: relative;
        top: 52px;
        left: 0px;
    }
    
    #exitimg {
        width: 31px;
        height: 25px;
    }
    
    .chat-box {
        background-color: white;
        position: relative;
        top: 2px;
    }
    
    .chat-input-container #user-count {
        display: block;
        font-size: 12px;
        color: #6a8fcc;
        margin-right: 10px;
    }
    
    .nicklist {
        right: -99%;
        max-height: 57%;
    }
    
    .nicklist.open {
        right: 0;
    }
    
    .toggle-nicklist.desktop-only {
        display: none;
    }
    
    .toggle-nicklist.mobile-only {
        display: block;
        position: relative;
        top: 82px;
        right: 46px;
    }
    
    .context-menu ul li.submenu ul {
        left: auto;
        right: 100%;
    }
    
    .context-menu {
        font-size: 14px;
    }
    
    .action-button {
        margin-left: 5px;
        margin-right: 5px;
    }
    
    header {
        display: -webkit-inline-box;
    }
    
    .nicklist {
        position: fixed;
        top: 0;
        height: 100vh;
        margin-top: 0;
        z-index: 1000;
        transition: transform 0.3s ease-in-out;
    }
    
    .main-container {
        width: 100%;
        height: calc(100vh - 60px);
        padding-bottom: 60px;
    }
    
    .nicklist-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        display: none;
    }
    
    .nicklist-overlay.visible {
        display: block;
    }
    
    .swipe-area {
        position: fixed;
        top: 60px;
        right: 0;
        width: 30px;
        height: 80%;
        z-index: 100;
    }
    
    .header {
        padding: 10px;
    }
    
    .header .channel-name {
        font-size: 16px;
    }
    
    .header #user-count {
        font-size: 12px;
        position: absolute;
        top: 42px;
        left: 50%;
    }
    
    .switch {
        top: 49px;
        right: 179px;
    }
    
    .roomtitle {
        text-align: left;
    }
    
    #channel-switcher {
        top: -46px;
        left: 95%;
        width: 5%;
    }
    
    .input-area {
        position: relative;
        left: 0;
        right: 0;
        /* padding: 8px; */
        background: var(--input-gradient);
        z-index: 1000;
        margin: 0;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    }
    
    .send-button {
        margin-left: 0;
    }
    
    .input-area {
        width: 100%;
    }
    
    .roomlist-container {
        position: relative;
        top: 20px;
    }
    
    .nicklist {
        /* overflow-y: scroll; */
    }
    
    .nicklist.open {
        width: 98%;
        /* min-height: 100%; */
        z-index: 999999999999;
    }
    .nicklist-RoomName {
     left: 25px;
    }
    .nicklist-UserCount {
     left: 30px;
     position: relative;
    }
    .roomlist-h1 {
        font-size: 2em;
    }
    
    .roomlist-h2 {
        font-size: 1.5em;
    }
    
    .roomlist-category-dropdown select {
        font-size: 1em;
        padding: 8px;
    }
    
    .roomlist-room-list th, .roomlist-room-list td {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .roomlist-room-list th {
        font-size: 1em;
    }
    
    .roomlist-pagination a, .roomlist-pagination2 a {
        padding: 8px 12px;
        font-size: 1em;
    }
    
    .chatroom-header #user-count {
        display: none;
    }
    
    .chatroom-chat-input-container #user-count {
        display: block;
        font-size: 12px;
        color: #6a8fcc;
        margin-right: 10px;
    }
    
    .chatroom-nicklist {
        right: -99%;
    }
    
    .chatroom-nicklist.open {
        right: 0;
    }
    
    .chatroom-toggle-nicklist.desktop-only {
        display: none;
    }
    
    .chatroom-toggle-nicklist.mobile-only {
        display: block;
    }
    
    .createchannel-h1 {
        font-size: 2em;
    }
    
    .createchannel-container {
        padding: 20px;
    }
    
    .createchannel-form-group input,
    .createchannel-form-group textarea,
    .createchannel-form-group select {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .createchannel-navigation-buttons button {
        font-size: 0.9em;
    }
    
    .createchannel-horizontal-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .roomlist-create-channel-link {
        /* margin-top: 20px; */
        /* margin-bottom: 15px; */
    }
    
    .roomlist-category-dropdown {
        position: relative;
        top: 4px;
        margin-bottom: 48px;
    }
    
    #paginationContainer {
        position: absolute;
        bottom: -36px;
    }
    
    .roomlist-nickname-container {
        position: relative;
        top: 22px;
    }
    
    #roomtitleHDR {
        position: relative;
        left: 27px;
    }
    
    .createchannel-container {
        padding: 20px;
        margin: 10px;
    }
    
    .createchannel-h1 {
        font-size: 1.8em;
    }
    
    .createchannel-h2 {
        font-size: 1.3em;
    }
    
    .createchannel-form-group input,
    .createchannel-form-group textarea,
    .createchannel-form-group select {
        padding: 8px;
        font-size: 0.85em;
    }
    
    .createchannel-form-group input[type="text"] {
        max-width: 100%;
    }
    
    .createchannel-form-group textarea {
        height: 100px;
    }
    
    .createchannel-horizontal-group {
        flex-direction: column;
        gap: 10px;
    }
}
    
    .roomlist-create-channel-link {
        /* margin-top: 20px; */
        /* margin-bottom: 15px; */
        position: relative;
        top: 0px;
    }
    
    .roomlist-category-dropdown {
        position: relative;
        top: 0px;
        margin-left: 7px;
    }
    
    #paginationContainer {
        position: absolute;
        bottom: -36px;
    }
    
    .roomlist-nickname-container {
        position: relative;
        top: 4px;
        /* left: 18px; */
    }
    
    #roomtitleHDR {
        position: relative;

    }
}

@media (max-width: 851px) and (max-height: 560px) {
    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    
    .nicklist {
        right: 0px;
    }
    
    .nicklist-overlay {
        background-color: rgba(0, 0, 0, 0);
    }
    
    .main-container {
        display: block;
    }
    
    .main-container {
        display: flex;
    }
    
    .nicklist-RoomName {
        color: #fafbfc;
        position: relative;
    }
    
    .nicklist-UserCount {
        color: #000;
        font-size: x-small;
        padding-left: 6px;
    }
    
    .nicklist-users {
        background-color: #fff;
        list-style: none;
        min-height: calc(100% - 144px);
        max-height: calc(100% - 144px);
    }
    
    .nicklist-userNickname {
        background-color: #efeff7;
        font-weight: bolder;
    }
    
    .nicklist-header {
        background-color: #a8b2cb;
        height: 9.4%;
        position: relative;
        top: 0px;
        left: 0px;
    }
    
    .nicklist-user {
        font-size: 14px;
        color: #333;
        padding: 6px 0;
        position: relative;
        left: 22px;
        list-style: none;
    }
    
    .nicklist-users ul li::before {
        content: "";
        display: inline-block;
        width: 16px;
        height: 16px;
        background-image: url(MSN/modesT.png);
        background-repeat: no-repeat;
        position: relative;
        top: 0px;
        left: -9px;
    }
    
    .nicklist-users ul li.owner::before {
        background-position: -16px 0;
    }
    
    .host-tag-nicklist {
        color: #3a7bd5;
        font-size: 11px;
        font-weight: 500;
        margin-left: 4px;
    }
    
    .people-count {
        background-color: rgba(255, 255, 255, 0.2);
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 13px;
        font-weight: 500;
    }
    
    .user-display {
        padding: 12px 16px;
        font-size: 15px;
        color: #555;
        border-bottom: 1px solid #f0f0f0;
        background-color: #fafafa;
    }
    
    .chat-messages {
        flex-direction: column;
    }
    
    .message {
        margin-bottom: 16px;
        max-width: 80%;
        align-self: flex-start;
    }
    
    .message-admin {
        align-self: flex-start;
        background-color: #f0f8ff;
        border-radius: 0 12px 12px 12px;
        padding: 10px 12px;
    }
    
    .username {
        font-weight: 600;
        color: #333;
        font-size: 15px;
        margin-bottom: 2px;
    }
    
    .host-tag {
        color: #3a7bd5;
        font-size: 12px;
        font-weight: 500;
        margin-left: 4px;
    }
    
    .message-content {
        font-size: 15px;
        line-height: 1.4;
        color: #333;
    }
    
    .input-box {
        width: 40%;
    }
    
    .input-area {
        height: 23%;
    }
    
    #chat-input {
        width: 60%;
    }
    
    .input-box {
        flex: 1;
        border: none;
        border-radius: 20px;
        padding: 10px 16px;
        outline: none;
        font-size: 15px;
        background-color: white;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }
    
    .send-button {
        background: linear-gradient(135deg, #3a7bd5, #00d2ff);
        color: white;
        border: none;
        border-radius: 20px;
        padding: 10px 20px;
        margin-left: 10px;
        cursor: pointer;
        font-size: 15px;
        font-weight: 500;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: all 0.2s;
    }
    
    .send-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    }
    
    .send-button:active {
        transform: translateY(0);
    }
    
    .chat-messages::-webkit-scrollbar,
    .nicklist::-webkit-scrollbar {
        width: 6px;
    }
    
    .chat-messages::-webkit-scrollbar-track,
    .nicklist::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .chat-messages::-webkit-scrollbar-thumb,
    .nicklist::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }
    
    .whisper-button {
        width: 16px;
        height: 16px;
        margin: 6px;
        border-style: none;
        background-image: url('MSN/whisper.png');
    }
    
    .ignore-button {
        width: 16px;
        height: 16px;
        margin: 6px;
        border-style: none;
        background-image: url('MSN/ignore.png');
    }
    
    .highlight-button {
        width: 16px;
        height: 16px;
        margin: 6px;
        border-style: none;
        background-image: url('MSN/highlight.png');
    }
    
    .viewprofile-button {
        width: 16px;
        height: 16px;
        margin: 6px;
        border-style: none;
        background-image: url('MSN/viewprofile.png');
    }
}

@media (max-width: 480px) {
    .nicklist {
            width: 100%;
            position: fixed;
            right: -100%; /* Starts off-screen to the right */
            transition: right 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
            /* min-height: 5%; */
            /* max-height: 70px; */
            z-index: 99999999999999999999;
            height: 100%;
    }
    .nicklist-overlay {
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.nicklist-overlay.visible {
    opacity: 1;
}
    .chat-box {
        overflow-y: scroll;
        left: 0vh;
    }
    
    .roomlist-h1 {
        font-size: 1.5em;
    }
    
    .roomlist-h2 {
        font-size: 1.2em;
    }
    
    .roomlist-category-dropdown select {
        font-size: 0.9em;
        padding: 6px;
        width: 60%;
        border: outset;
    }
    
    .roomlist-room-list th, .roomlist-room-list td {
        padding: 8px;
        font-size: 0.8em;
    }
    
    #roomlistName {
        display: ruby-text;
    }
    
    .roomlist-room-list th {
        font-size: 0.9em;
    }
    
    .roomlist-pagination a, .roomlist-pagination2 a {
        padding: 6px 10px;
        font-size: 0.9em;
    }
    
    .createchannel-h1 {
        font-size: 1.8em;
    }
    
    .createchannel-form-group label {
        font-size: 1em;
    }
    
    .createchannel-form-group textarea {
        height: 80px;
    }
    
    .createchannel-h1 {
        font-size: 1.5em;
    }
    
    .createchannel-h2 {
        font-size: 1.1em;
    }
    
    .createchannel-form-group label {
        font-size: 0.9em;
    }
    
    .createchannel-form-group input,
    .createchannel-form-group textarea,
    .createchannel-form-group select {
        padding: 6px;
        font-size: 0.8em;
    }
    
    .createchannel-form-group textarea {
        height: 80px;
    }
    
    form {
        width: 90%;
    }
}
    
    .input-area {
        width: 100%;
        display: flex;
        justify-items: stretch;
        background: var(--header-gradient);
        /* z-index: 88888888888; */
    }
}

@media (orientation: portrait) and (max-width: 400px) {
    .input-box {
        width: 60%;
    }
}

@media (orientation: portrait) and (max-height: 900px) {
    #RoomList {
        height: 85%;
    }
    .chat-box {
        min-height: 99.4%;
        max-height: 99.4%;
    }
    
    .chat-messages {
        min-height: 81%;
        max-height: 81%;
    }
    .exit-box {
        top: 2px;
    }
    .join-box {
        top: 2px;
    }
    .chat-header {
        height: 34px;
    }
    
    .chat-left-line-stump {
        height: 0.1dvh;
    }
}
    
    .input-box {
        width: 64%;
    }
    
    .send-button {
        width: 33%;
        height: 20%;
        display: contents;
    }
}
    
    .input-box {
        margin-bottom: 21px;
    }
}
    
    #channel-switcher {
        top: 34px;
    }
    
    .join-box {
        right: 18%;
    }
    
    .chat-box {
        overflow-y: scroll;
        position: relative;
        top: 2px;
        z-index: 99999999999999999999999999999;
    }
}
    
    .chat-box {
        min-height: 99.4%;
        max-height: 99.4%;
    }
}

@media (min-height: 1080px) {
    .chat-messages {
        min-height: 81.6%;
    }
    
    .chat-box {
        min-height: 99.4%;
        max-height: 99%;
    }
}
    
    .chat-container {
        /* min-height: calc(100vh - 7vh); */
    }
    
    #roomtitleHDR {
        position: relative;
        top: 0px;
    }
}
    
    .nicklist.open {
        left: 0%;
        width: 100%;
    }
}

@media (min-width: 1079px) {
    .toggle-nicklist.mobile-only {
        display: block;
        position: relative;
        right: -8px;
        top: -1px;
    }
}


/* =========================
   MOBILE INPUT FIXES - OPTIMIZED
   ========================= */
@media (max-width: 768px) {
    /* Make input area wrap on mobile */
    .input-area,
    .chat-input-container {
        flex-wrap: wrap;
        /* padding: 8px; */
        gap: 6px;
    }
    
    /* Input takes full width */
    #chat-input,
    .input-box {
        flex: 1 1 100%;
        width: 100% !important;
        min-width: 0;
        margin-bottom: 6px;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    /* Buttons on second row */
    .send-button,
    #send-button {
        flex: 1 1 auto;
        min-width: 100px;
        padding: 10px 20px;
        background: var(--send-gradient) !important;
        color: white !important;
    }
    
    .action-button {
        flex: 1 1 auto;
        min-width: 80px;
        padding: 10px 16px;
        background: var(--action-gradient) !important;
    }
}

@media (max-width: 480px) {
    .send-button,
    #send-button,
    .action-button {
        padding: 12px 16px;
        font-size: 14px;
        display: none;
    }
}
