body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: transparent;
    font-size: 20px; /* Increased base font size */
}

#chat-container {
    max-width: 400px;
    /* background-color: transparent; Kept transparent */
    border: none;
    /* box-shadow: 0 0 10px rgba(255, 255, 255, 0.1); Removed shadow */
    
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    /* Removed margin: 20px auto; */
    /* Removed display: flex and flex-direction */
}

#messages {
   
    padding: 10px;
    overflow-y: auto;
    /* border-bottom: 1px solid #555; Removed border */
    color: #fff;
    -webkit-overflow-scrolling: touch;
    max-height: 300px;
    
}

.message {
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 5px;
    background-color: rgba(33, 33, 33, 0.075); /* Semi-transparent black background */
    font-weight: 600; /* Make message text bolder */
    text-shadow: 2px 2px 4px black; /* Add black text shadow */
}

.message .username {
    font-weight: bold;
    margin-right: 5px;
    margin-left: 3px;
    vertical-align: middle;
}

.reply {
    /* border-left: 3px solid #f9e0e0; REMOVED */
    /* margin-left: 10px; REMOVED */
    /* padding-left: 8px; REMOVED */
    font-style: italic;
    color: #f8dfdf; /* Keep text styling */
    margin-bottom: 4px; /* Add some space below the reply text */
    display: block; /* Ensure it takes its own line */
}

/* Align reply icon */
.reply .reply-icon {
    vertical-align: -0.125em; /* Adjust alignment slightly */
    margin-right: 0.25em; /* Add space after icon */
}

/* New rule for the entire message when it's a reply */
.message-is-reply {
    border-left: 3px solid #f9e0e0; /* Apply border here */
    padding-left: 8px; /* Apply padding here */
    /* Adjust margin-left if needed to account for the padding */
    margin-left: -8px; /* Counteract the padding shift if desired */
}

/* Emote Styling */
.emote {
    height: 1.5em; /* Adjust size relative to text */
    width: auto;
    vertical-align: middle; /* Align with the text */
    margin: 0 1px; /* Tiny space around emotes */
}

/* System Message Styling */
.system-message {
    color: #dbdbdb; /* Grey color */
    font-style: italic;
    text-align: center;
    margin: 5px 0;
    font-size: 0.9em;
}

/* Example styling for connection status */
#status.connected {
    background-color: #1a3a1f;
    color: #a0e0a8;
}

#status.disconnected {
    background-color: #4d1f23;
    color: #f5c6cb;
}

/* Badge Styling */
.badge {
    display: inline-block;
    margin-right: 4px;
    /* Style rules removed as SVGs/IMGs handle appearance */
    vertical-align: middle; /* Keep vertical alignment */
    line-height: 1; /* Prevent extra space */
}

/* Fallback style for unknown badges */
.badge-unknown {
     padding: 1px 4px;
     font-size: 0.8em;
     font-weight: bold;
     border-radius: 4px;
     background-color: #555;
     color: #fff;
}

/* Style for subscriber badge IMG */
.badge-subscriber-img {
    height: calc(1em * (18 / 13)); /* Roughly 1.38em */
    width: auto;
    /* Inherits vertical-align: middle and margin from .badge */
}

/* Specific Badge Styles (Examples) - REMOVED as SVGs handle color */
/* .badge-moderator { ... } */
/* .badge-subscriber { ... } */

/* Add other badge types as needed */
/* .badge-vip { background-color: #ff69b4; } */
/* .badge-founder { background-color: #ff4500; } */

.highlight-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.highlight-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.message.highlighted {
    position: relative;
    padding: 8px 35px 8px 12px !important;
    margin: 8px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message.highlighted .username {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Sub highlight style */
.highlight-subbed {
    background: linear-gradient(135deg, #9D4EDD, #7B2CBF);
    color: white;
    border-left: 4px solid #7B2CBF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Gift highlight style */
.highlight-gifted {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    border-left: 4px solid #FFA500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Follow highlight style */
.highlight-followed {
    background: linear-gradient(135deg, #4CC9F0, #4361EE);
    color: white;
    border-left: 4px solid #4361EE;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Animation for new highlighted messages */
@keyframes highlightPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.message.highlighted {
    animation: highlightPulse 0.3s ease-out;
} 