[data-theme="dark"] {
    --radchat-color: #40a02b;
    --main-bg-color: #11111b;
    --pum-button-inactive-fg: #cdd6f4;
    --pum-button-inactive-bg: #11111b;
    --pum-button-active-fg: #89b4fa;
    --pum-button-active-bg: #1e1e2e;
    --pum-title-color: #cdd6f4;
    --pum-bg-color: #1e1e2e;
    --user-color: #89b4fa;
    --timestamp-color: #313244;
    --separator-color: #181825;
    --message-color: #cdd6f4;
    --message-bg-color: #1e1e2e;
    --input-bg-color: #181825;
    --input-text-color: #cdd6f4;
    --input-button-inactive-bg: #b4befe;
    --input-button-inactive-fg: #11111b;
    --input-button-active-bg: #89b4fa;
    --input-button-active-fg: #11111b;
}

[data-theme="light"] {
    --radchat-color: #40a02b;
    --main-bg-color: #dce0e8;
    --pum-button-inactive-fg: #4c4f69;
    --pum-button-inactive-bg: #dce0e8;
    --pum-button-active-fg: #1e66f5;
    --pum-button-active-bg: #eff1f5;
    --pum-title-color: #4c4f69;
    --pum-bg-color: #eff1f5;
    --user-color: #1e66f5;
    --timestamp-color: #8c8fa1;
    --separator-color: #e6e9ef;
    --message-color: #4c4f69;
    --message-bg-color: #eff1f5;
    --input-bg-color: #e6e9ef;
    --input-text-color: #4c4f69;
    --input-button-inactive-bg: #7287fd;
    --input-button-inactive-fg: #dce0e8;
    --input-button-active-bg: #1e66f5;
    --input-button-active-fg: #dce0e8;
}

body {
	font-family: Arial, sans-serif; 
	margin: 0;
	padding: 0;  /* Remove padding from body */
	background-color: var(--main-bg-color);
	color: var(--pum-title-color);
	height: 100vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;  /* Prevent body scroll */
}
.container {
	max-width: 800px;
	margin: 0 auto;
	width: 100%;
	position: relative;
	height: 100vh;
	padding: 20px;  /* Move padding here */
	padding-bottom: 80px;  /* Space for message input */
	display: flex;
	flex-direction: column;
}

.header-controls {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 20px; /* Space between buttons */
	align-items: center;
	justify-content: center;
}


/* Show/hide appropriate icon based on theme */
[data-theme="light"] .theme-icon .sun { display: none; }
[data-theme="dark"] .theme-icon .moon { display: none; }

@media (max-width: 100px) {
	.header-controls {
		gap: 10px;
	}
}

.settings-button, .users-button, .theme-button {
	top: 20px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--pum-button-inactive-bg);
}

.settings-button {
	right: calc(50%);
}

.users-button {
	right: calc(60%);
}

.theme-button {
	right: calc(30%);
}

.message-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-right: 8px;
}

.delete-button {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--timestamp-color);
	padding: 2px 6px;
	font-size: 12px;
	opacity: 0;
	transition: opacity 0.3s;
}

.message:hover .delete-button {
	opacity: 1;
}

.delete-button:hover {
	background: var(--pum-button-inactive-fg);
}

.settings-icon, .users-icon, .theme-icon{
	width: 24px;
	height: 24px;
	fill: var(--pum-button-inactive-fg);
}

.settings-button:hover, .users-button:hover, .theme-button:hover {
	background-color: var(--pum-button-active-bg);
}

.settings-button:hover .settings-icon,
.users-button:hover .users-icon,
.theme-button:hover .theme-icon {
	fill: var(--pum-button-active-fg);
}

#users-list {
	margin-top: 0px;
}

.current-user {
	position: absolute;
	right: 0;
	top: 28px;
	color: var(--user-color);
	font-weight: bold;
}

.username-section, .users-section {
	position: fixed;
	transform: translateX(-50%);
	top: 70px;
	padding: 15px;
	background-color: var(--pum-bg-color);
	border-radius: 5px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.3);
	z-index: 100;
	display: none;
	min-width: 250px;
}

.username-section {
	right: 50%;
	transform: translateX(10%);
}

.username-section h3 {
	margin-top: 0;
	margin-bottom: 20px;
}

.users-section {
	right: 50%;
	transform: translateX(-10%);
}

.users-section h3 {
	margin-top: 0;
	margin-bottom: 10px;
}

.user-item {
	padding: 8px 0;
	color: var(--user-color);
	border-bottom: 1px solid var(--separator-color);
}

.user-item:last-child {
	border-bottom: none;
}
.messages-section {
	flex-grow: 1;
	margin-top: 60px;  /* Space for gear icon */
	margin-bottom: 60px;
	overflow-y: auto;
	height: 0;  /* Allow flex-grow to work */
}
.message {
	padding: 10px 0;
}
.message .username {
	color: var(--user-color);
	font-weight: bold;
}
.message .timestamp {
	color: var(--timestamp-color);
	font-weight: thin;
	font-size: 0.8em;
}

.message .content {
	margin-top: 5px;
	color: var(--message-color);
	word-wrap: break-word;     /* Handle long words */
	word-break: break-word;    /* Break words at arbitrary points if needed */
	white-space: pre-wrap;     /* Preserve whitespace and wraps */
	max-width: 100%;          /* Ensure it doesn't exceed container width */
}
.message-section {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px;
	background-color: var(--message-bg-color);
	z-index: 100;  /* Ensure it stays on top */
}

.message-container {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	gap: 10px;
}

.youtube-embed {
	position: relative;
	padding-top: 10px;
	width: 100%;
	max-width: 560px;  /* Standard YouTube width */
}

.youtube-embed iframe {
	border-radius: 4px;
}

.image-embed {
	padding-top: 10px;
	max-width: 560px;  /* Match YouTube width */
}

.image-embed img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	display: block;
}

input {
	padding: 10px;
	border: none;
	border-radius: 4px;
	background-color: var(--input-bg-color);
	color: var(--input-text-color);
	flex-grow: 1;
}
textarea {
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: var(--input-bg-color);
    color: var(--input-text-color);
    flex-grow: 1;
    resize: none;  /* Prevents manual resizing */
    min-height: 38px;  /* Match your previous input height */
    line-height: 1.4;
    font-family: Arial, sans-serif;  /* Match your body font */
}
button {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	background-color: var(--input-button-inactive-bg);
	color: var(--input-button-inactive-fg);
	cursor: pointer;
}
button:hover {
	background-color: var(--input-button-active-bg);
	color: var(--input-button-active-fg)
}

button.scroll {
	padding: 10px 20px;
	border-radius: 4px;
	border: none;
	background-color: var(--input-button-inactive-bg);
	fill: var(--input-button-inactive-fg);
	padding: 10px;
	cursor: pointer;
}

button.scroll:hover {
	background-color: var(--input-button-active-bg);
}

.scroll-icon {
	width: 14px;
	height: 14px;
	fill: var(--var-input-button-inactive-fg);
	color: var(--var-input-button-inactive-fg);
}

.scroll-icon:hover {
	fill: var(--var-input-button-active-fg);
	color: var(--var-input-button-active-fg);
}

.radchat {
	position: absolute;
	left: 0;
	font-family: Arial, sans-serif; 
	font-size: 2em;
	font-weight: bold;
	color: var(--radchat-color);
}
#status, #username-status {
	margin-top: 10px;
}
