.inter-tight-font {
    font-family: "Inter Tight", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.inter-font {
    font-family: "Inter", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.jetbrains-mono-font {
    font-family: "JetBrains Mono", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.staatliches-regular-font {
    font-family: "Staatliches", serif;
    font-weight: 400;
    font-style: normal;
}

.bricolage-grotesque-font {
    font-family: "Bricolage Grotesque", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

.doto-font {
  font-family: "Doto", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "ROND" 0;
}

.sono-font {
  font-family: "Sono", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "MONO" 1;
}

.victor-mono-font {
  font-family: "Victor Mono", serif;
  font-optical-sizing: auto;
  font-weight: 200;
  font-style: normal;
  font-feature-settings: "ss06";
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;  /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

.logo-style {
    text-shadow:
        0px 0px 0 rgb(220,220,220),
        0px -1px 0 rgb(216,216,216),
        0px -2px 0 rgb(213,213,213),
        0px -3px 0 rgb(210,210,210),
        0px -4px 0 rgb(207,207,207),
        0px -5px 0 rgb(203,203,203),
        0px -6px 0 rgb(200,200,200),
        0px -7px 0 rgb(197,197,197),
        0px -8px 0 rgb(193,193,193),
        0px -9px 0 rgb(190,190,190),
        0px -10px 0 rgb(187,187,187),
        0px -11px 0 rgb(183,183,183),
        0px -12px 0 rgb(180,180,180),
        0px -13px 0 rgb(177,177,177),
        0px -14px 0 rgb(174,174,174),
        0px -15px 0 rgb(170,170,170),
        0px -16px 0 rgb(167,167,167),
        0px -17px 0 rgb(164,164,164),
        0px -18px 0 rgb(160,160,160),
        0px -19px 0 rgb(157,157,157),
        0px -20px 0 rgb(154,154,154),
        0px -21px 0 rgb(151,151,151),
        0px -22px 0 rgb(148,148,148),
        0px -23px 0 rgb(145,145,145),
        0px -24px 0 rgb(142,142,142),
        0px -25px 0 rgb(139,139,139),
        0px -26px 0 rgb(136,136,136),
        0px -27px 0 rgb(133,133,133),
        0px -28px 0 rgb(130,130,130),
        0px -29px 0 rgb(127,127,127),
        0px -30px 0 rgb(124,124,124),
        0px -31px 0 rgb(121,121,121),
        0px -32px 0 rgb(118,118,118),
        0px -21px 20px rgba(0,0,0,0.6),
        0px -21px 1px rgba(0,0,0,0.5),
        0px 0px 20px rgba(0,0,0,.2);
    font-size: 80px;
    font-variation-settings: 'wght' 700;
    margin: 0;
}

b, strong, .bold {
    text-shadow:
        0.25px 0px 0px,
        -0.25px 0px 0px,
        0px 0.25px 0px,
        0px -0.25px 0px;
    font-variation-settings: 'wght' 700;
}

img.emoji {
    display: inline-block;
    width: 2ch;  /* Make emoji exactly two characters wide */
    height: 1em;
    vertical-align: -0.12em;
    margin: 0;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
    font-family: 'Victor Mono', monospace;
    font-variation-settings: 'wght' 400;
}

button {
    font-family: 'Victor Mono', monospace;
}

button img.emoji {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.1em;
    margin: 0;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#game-canvas {
    width: 100%;
    height: 100%;
}

#ui-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-family: 'Victor Mono', monospace;
}

.draggable-window {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(32px) saturate(1.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    min-width: 220px;
    user-select: none;
    z-index: 1000;
    font-family: 'Victor Mono', monospace;
    color: white;
    display: none;  /* Hidden by default */
    transition: box-shadow 0.2s ease;
}

.draggable-window.active {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.draggable-window.active .window-header {
    background-color: rgba(255, 255, 255, 0.15);
}

.draggable-window:not(.active) {
    /*opacity: 0.8;*/
    backdrop-filter: blur(0px) saturate(1.6);
    background-color: rgba(16, 16, 18, 1);
}

.window-header {
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    border-radius: 8px 8px 0 0;
    height: 24px;
}

.window-title {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
}

.window-controls {
    display: flex;
    gap: 4px;
}

.close-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
    opacity: 0.8;
}

.close-button:hover {
    background-color: rgba(255, 0, 0, 0.2);
    opacity: 1;
}

.window-content {
    padding: 12px;
}

#inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 4px;
}

.inventory-item {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.inventory-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.inventory-item.selected {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

#dock {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(32px) saturate(1.6);
    border-radius: 12px;
    padding: 8px;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.2);
}

#dock-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dock-item {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.dock-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.dock-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

.dock-item.active {
    background-color: rgb(255 255 255 / 10%);
    box-shadow: 0 0 12px rgb(255 255 255 / 10%);
}

.dock-item img {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: saturate(1.5);
}

.dock-item .indicator {
    display: none;
    position: absolute;
    right: -2px;
    /* top: -2px; */
    width: 4px;
    height: 16px;
    background-color: #fff;
    border-radius: 16px;
    /* border: 2px solid rgba(0, 0, 0, 0.75); */
}

#controls-help {
    font-size: 14px;
}

#controls-help p {
    margin: 5px 0;
}

/* Shop styles */
#shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px;
}

/* Avatar editor styles */
#avatar-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 300px;
}

#compass {
    position: fixed !important;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(32px) saturate(1.6);
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-family: 'Victor Mono', monospace;
    overflow: hidden;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#compass-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: center;
    transition: transform 0.1s ease;
}

#compass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top center,
        #ffffff00 0%,
        #00000040 50%,
        #000000bf 100%
    );
    pointer-events: none;
}

.direction {
    position: absolute;
    font-family: 'Victor Mono', monospace;
    font-size: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subdirection {
    font-size: 8px;
}

.n { color: red; top: 5px; left: 50%; transform: translateX(-50%); }
.ne { top: 12px; right: 12px; transform: rotate(45deg); }
.e { top: 50%; right: 5px; transform: translateY(-50%) rotate(90deg); }
.se { bottom: 12px; right: 12px; transform: rotate(135deg); }
.s { bottom: 5px; left: 50%; transform: translateX(-50%) rotate(180deg); }
.sw { bottom: 12px; left: 12px; transform: rotate(-135deg); }
.w { top: 50%; left: 5px; transform: translateY(-50%) rotate(-90deg); }
.nw { top: 12px; left: 12px; transform: rotate(-45deg); }

.avatar-customization {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
}

.color-section h3 {
    margin: 0;
    color: white;
    font-size: 14px;
}

.color-section input[type="color"] {
    width: 50px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#settings-panel {
    padding: 16px;
    min-width: 300px;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section h3 {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: white;
    opacity: 0.9;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 16px;
}

.setting-item label {
    color: white;
    font-size: 13px;
    opacity: 0.8;
}

.setting-item select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    min-width: 140px;
}

.setting-item select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.setting-item select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
}

#chat-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    z-index: 1000;
    display: grid;
}

#chat-input {
    width: 100%;
    min-height: 1ch;
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: normal;
    word-break: break-word;
    cursor: text;
    transform: none !important;
    position: relative !important;
    place-self: center;
}

#chat-input:empty .chat-content:after {
    content: 'Type a message...';
    color: rgba(255, 255, 255, 0.5);
    position: absolute;
}

#chat-input:focus {
    outline: none;
    background-color: rgba(0, 0, 0, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.chat-prefix {
    font-variation-settings: 'wght' 700;
    text-shadow:
        0.25px 0px 0px,
        -0.25px 0px 0px,
        0px 0.25px 0px,
        0px -0.25px 0px;
    /* margin-right: 1ch; */
    user-select: none;
}

.system-prefix {
    color: #000;
    background: lightsalmon;
    border-radius: 8px/* 4px 4px 8px*/;
    padding: 0 4px 0 10px;
    margin: 0 -4px 0 -10px;
}

.chat-content {
    display: inline;
    min-width: 1px; /* Ensures cursor is visible when empty */
}

.chat-content:focus {
    outline: none;
}

.chat-bubble {
    position: absolute;
    background: #000;
    color: white;
    padding: 3px 2ch;
    border-radius: 12px;
    font-family: 'Victor Mono', monospace;
    font-size: 12px;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1px #808080;
    opacity: 1;
    transition: opacity 0.5s ease;
    max-width: 300px;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: normal;
    transform: translate(-50%, -20px);
    line-height: 1.5;
}

.chat-bubble.system-message {
    background: #222;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1px #666;
}

.chat-bubble img.emoji {
    display: inline-block;
    width: 2ch;  /* Make emoji exactly two characters wide */
    height: 1em;
    vertical-align: -0.1em;
    margin: 0;
}

.chat-bubble::before {
    content: '';
    position: fixed;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4.5px solid transparent;
    border-right: 4.5px solid transparent;
    border-top: 4.5px solid #808080;
}

.chat-bubble::after {
    content: '';
    position: fixed;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #000;
}

.chat-bubble.system-message::after {
    content: '';
    position: fixed;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #222;
}
.chat-bubble.system-message::before {
    border-top: 4px solid #505050;
}

.spoiler {
    background-color: #202225;
    color: transparent;
    cursor: pointer;
    border-radius: 3px;
    padding: 0 2px;
    user-select: none;
}

.spoiler:hover {
    background-color: #2f3136;
}

.spoiler.revealed {
    background-color: rgba(32, 34, 37, 0.1);
    color: inherit;
    cursor: text;
    user-select: text;
}

/* Messages window styles */
.messages-tabs {
    display: flex;
    gap: 1px;
}

.tab-button {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    padding: 0.5ch 1ch;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    /* font-family: 'Staatliches', Impact, sans-serif; */
    font-weight: bold;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.25);
}

.messages-content {
    min-width: 300px;
    height: 400px;
    overflow: hidden;
}

.tab-content {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    height: 100%;
    overflow: hidden;
}

.tab-content.active {
    display: block;
}

/* Chat message styles */
#chat-history {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.chat-message {
    padding: 3px 14px;
    max-width: 300px;
    width: fit-content;
    margin: 4px 4px 16px 4px;
    background: #000;
    color: white;
    border-radius: 12px;
    font-family: 'Victor Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: normal;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1px #808080;
    align-self: flex-start; /* Default alignment to left */
    position: relative;  /* For timestamp positioning */
}

.chat-message::before {
    content: '';
    position: absolute;
    left: -4.5px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 4.5px solid transparent;
    border-bottom: 4.5px solid transparent;
    border-right: 4.5px solid #808080;
}

.chat-message::after {
    content: '';
    position: absolute;
    left: -3.5px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 4px solid #000;
}

.chat-message.player-message::before {
    left: auto;
    right: -4.5px;
    border-right: none;
    border-left: 4.5px solid #808080;
}

.chat-message.player-message::after {
    left: auto;
    right: -3.5px;
    border-right: none;
    border-left: 4px solid #000;
}

.chat-message.system-message::before {
    border-right-color: #666;
}

.chat-message.system-message::after {
    border-right-color: #222;
}

.chat-message .timestamp {
    position: absolute;
    bottom: -16px;
    font-size: 10px;
    color: #666;
    text-align: start;
    left: 8px;
    text-shadow:
        0.25px 0px 0px,
        -0.25px 0px 0px,
        0px 0.25px 0px,
        0px -0.25px 0px;
    font-variation-settings: 'wght' 700;
}

.chat-message.player-message .timestamp {
    position: absolute;
    bottom: -16px;
    font-size: 10px;
    color: #666;
    text-align: end;
    right: 8px;
}

/* Player's own messages */
.chat-message.player-message {
    align-self: flex-end; /* Align to right */
    background: #000; /* Slightly different color to distinguish */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1px #808080;
}

.chat-message.system-message {
    align-self: flex-start; /* Ensure system messages stay on left */
    background: #222;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1px #666;
    color: white;
    font-style: normal;
}

.chat-message.system-message .chat-name {
    font-style: normal;
}

.chat-message .chat-name {
    font-variation-settings: 'wght' 700;
    text-shadow:
        0.25px 0px 0px,
        -0.25px 0px 0px,
        0px 0.25px 0px,
        0px -0.25px 0px;
}

.chat-message.system-message .system-prefix {
    color: #000;
    background: lightsalmon;
    border-radius: 8px;
    padding: 0 4px 0 10px;
    margin: 0 -4px 0 -10px;
}

.new-messages-button {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #d80d1d;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: none;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.new-messages-button:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
}

.new-messages-button.visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Build Tools styles */
.build-tools-section {
    padding: 8px;
}

.build-tools-section h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    opacity: 0.9;
}

.build-tool-item {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px;
}

.build-height-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.build-height-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.build-height-controls input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.fixed-height-input {
    margin-left: 24px;
}

.fixed-height-input input[type="number"] {
    width: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    font-family: 'Victor Mono', monospace;
    font-size: 13px;
}

.fixed-height-input input[type="number"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.settings-layout {
    display: flex;
    gap: 0;
    padding: 0;
    height: 400px;
}

.settings-sidebar {
    width: 160px;
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
}

.sidebar-item {
    padding: 1ch 2ch;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.sidebar-icon {
    font-size: 16px;
}

.settings-pages {
    flex: 1;
    overflow-y: auto;
}

.settings-page {
    display: none;
    padding: 16px;
}

.settings-page.active {
    display: block;
}

#time-controls {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
}

#time-controls .speed-control,
#time-controls .time-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

#time-controls label {
    min-width: 60px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

#time-controls input[type="range"] {
    flex: 1;
}

#time-controls .speed-display {
    min-width: 100px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

#time-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

#time-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.paperdoll-view {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(32px) saturate(1.6);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.2);
    z-index: 100;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-content {
    text-align: center;
    color: #ffffff;
}

.loading-progress {
    width: 320px;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease-out;
}

#settings-window {
    width: 580px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #161616;
}

.modal-content {
    background-color: #1a1a1a;
    margin: 25% auto;
    padding: 20px 24px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    width: 300px;
    text-align: left;
    color: #fff;
    font-family: 'Victor Mono', monospace;
}

.modal-content h2 {
    margin: 0 0 16px 0;
    font-variation-settings: 'wght' 700;
    font-size: 24px;
}

.modal-content p {
    margin: 0;
    color: #aaa;
    font-size: 12px;
}

.input-group {
    display: flex;
    flex-direction: row;
    gap: 2ch;
}

#display-name-input {
    padding: 4px 2ch;
    background-color: #2a2a2a;
    width: 100%;
    border: none;
    border-radius: 34px;
    font-size: 12px;
    color: #fff;
    font-family: 'Victor Mono', monospace;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 0 0.5px #606060;
}

#display-name-input:focus {
    outline: none;
    border-color: #666;
}

#display-name-submit {
    padding: 4px 2ch;
    background-color: #2a2a2a;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    font-family: 'Victor Mono', monospace;
    font-variation-settings: 'wght' 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 0 0.5px #606060;
    transition: all 0.2s ease;
}

#display-name-submit:hover {
    background-color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 0 0.5px #606060;
    transform: rotate3d(-0.5, 0.2, -0.5, 6deg) scale(1.25);
}

.setting-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.setting-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Victor Mono', monospace;
    min-width: 140px;
}

.setting-input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.setting-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
}

.setting-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Victor Mono', monospace;
    transition: all 0.2s ease;
}

.setting-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.setting-button:active {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(1px);
}

.setting-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.setting-button.disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.setting-button.disabled:active {
    transform: none;
}

.chat-toolbar {
    display: flex;
    gap: 4px;
    padding: 0px 2px;
    height: 24px;
    background: #000;
    border-radius: 24px;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1px #808080;
    align-items: center;
}

.chat-toolbar button {
    padding: 0 8px;
    height: 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    width: 36px;
    color: white;
    cursor: pointer;
}

.chat-toolbar button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-toolbar button.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chat-toolbar .color-select {
    background: transparent;
    border: none;
    height: 20px;
    border-radius: 12px;
    color: white;
    padding: 0 4px 0 20px;
    cursor: pointer;
    font-size: 12px;
    width: 36px;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='white'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 4px center;
    background-size: 16px;
}

/* Remove the ::before pseudo-element since we're using background-image */
.chat-toolbar .color-select::before {
    content: none;
}

.chat-toolbar .color-select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='white'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 4px center;
    background-size: 16px;
}

.chat-toolbar .color-select:focus, .chat-toolbar .color-select:active {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='white'/%3E%3C/svg%3E");
    border-color: rgba(255, 255, 255, 0.4);
    background-repeat: no-repeat;
    background-position: 4px center;
    background-size: 16px;
}

.chat-toolbar .color-select option {
    background-color: #1a1a1a;
    color: white;
    padding: 4px;
}

/* Color dropdown styles */
.color-dropdown {
    position: relative;
    display: inline-block;
}

.color-button {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.color-indicator {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2px;
}

.color-picker {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 4px;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    z-index: 1000;
}

.color-picker.show {
    display: grid;
}

.color-option {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.8);
}

.command-suggestions {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    max-height: 200px;
    overflow-y: auto;
    background: #111;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 0.5px #808080;
    border-radius: 8px;
    /* padding: 4px 8px; */
    margin-bottom: 2px;
    z-index: 1000;
    width: 328.8px;
    flex-direction: column;
    align-items: center;
}

.command-suggestion:first-child {
    margin-top: 6px;
}

.command-suggestion:last-child {
    margin-bottom: 6px;
}

.command-suggestion {
    padding: 4px 8px;
    width: 300px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    border-radius: 4px;
}

.command-suggestion:hover {
    background: rgba(255, 255, 255, 0.1);
}

.command-suggestion .command {
    font-weight: bold;
    color: #4a9eff;
    font-size: 12px;
}

.command-suggestion .description {
    color: #999;
    margin-left: 12px;
    font-size: 12px;
}

/* Add relative positioning to chat input container */
#chat-input {
    position: relative;
}

#capture-photo {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 32px;
    background: red;
    box-shadow: 0 0 0 4px #000, 0 0 0 8px red;
    margin-top: 8px;
}

.mode-toggle {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
}

.mode-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mode-toggle svg {
    position: absolute;
    width: 24px;
    height: 24px;
    color: white;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mode-toggle .video-icon {
    opacity: 0;
    transform: scale(0.8);
}

.mode-toggle.video-mode .photo-icon {
    opacity: 0;
    transform: scale(0.8);
}

.mode-toggle.video-mode .video-icon {
    opacity: 1;
    transform: scale(1);
}

#capture-photo {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 32px;
    background: #ff3b30;
    box-shadow: 0 0 0 4px #000, 0 0 0 8px red;
    margin-top: 8px;
    transition: all 0.3s ease;
    position: relative;
}

#capture-photo.video-mode {
    background: #ff3b30;
    box-shadow: 0 0 0 4px #000, 0 0 0 8px #ff3b30;
}

#capture-photo.video-mode.recording {
    background: #333;
    box-shadow: 0 0 0 4px #ff3b30, 0 0 0 8px #333;
}

#capture-photo.video-mode.recording::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #ff3b30;
    border-radius: 2px;
}

#recording-indicator {
    animation: pulse 2s infinite;
}

.rec-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

#camera-roll-toggle {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

#camera-roll-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

#camera-roll-toggle.active {
    background: rgba(255, 255, 255, 0.4);
}

#camera-roll-toggle svg {
    width: 24px;
    height: 24px;
    color: white;
}

#camera-roll {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    display: none;
}

#camera-roll > div {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
}

#camera-roll > div::-webkit-scrollbar {
    width: 8px;
}

#camera-roll > div::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#camera-roll > div::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#camera-roll > div::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}