@font-face {
    font-family: 'PixelOperator';
    src: url('./assets/fonts/pixeloperator.woff2') format('woff2');
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PixelOperator", "Courier New", "Consolas", "Monaco", monospace, sans-serif !important;
}

body {
    font-weight: normal;
    font-style: normal;
    font-size: 14px;
    letter-spacing: 1px;
    background: #f0f0f0;
    overflow: hidden;
   
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: crosshair;
    user-select: none;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background: white;
   
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}


#color-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 50px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.342);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

#color-list {
    flex: 1;
    overflow-y: auto;
    padding: calc(50vh - 18px) 10px calc(50vh - 18px) 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}


.color-item {
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.color-item:hover {
    border-color: #333;
}

.color-item.selected {
    width: 40px;
    height: 40px;
    border: 5px #aba389 solid;
        -o-border-image: url(./assets/image/border.png) 5 repeat;
        border-image: url(./assets/image/border.png) 5 repeat;
        border-image-outset: 1px;
        background-color: #7e635c;
        box-shadow: 0px 0px 5px #000;
}


#add-color-button {
    position: fixed;
    right: 65px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #7e635c;
    border: 5px #aba389 solid;
    border-image: url(./assets/image/border.png) 5 repeat;
    border-image-outset: 1px;
    box-shadow: 0px 0px 5px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    color: #FFF;
    transition: all 0.2s;
}

#add-color-button:hover {
    background: #8a6f67;
    transform: translateY(-50%) scale(1.05);
}


#color-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#color-popup {
    background: #7e635c;
    border: 11px #aba389 solid;
    border-image: url(./assets/image/windows_out.png) 11 repeat;
    border-image-outset: 1px;
    box-shadow: 0px 0px 10px #000;
    padding: 20px;
    border-radius: 0;
    min-width: 300px;
    text-align: center;
}

#color-popup h3 {
    color: #FFF;
    margin-bottom: 15px;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
}

#color-picker-input {
    width: 80px;
    height: 40px;
    border: none;
    cursor: pointer;
    margin: 10px;
}

#color-hex-input {
    background: #aba389;
    border: 3px #7e635c solid;
    color: #000;
    padding: 8px;
    margin: 10px;
    width: 120px;
    text-align: center;
    font-family: "PixelOperator", "Courier New", monospace, sans-serif;
}

.popup-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.popup-button {
    background: #7e635c;
    border: 5px #aba389 solid;
    border-image: url(./assets/image/border.png) 5 repeat;
    border-image-outset: 1px;
    color: #FFF;
    padding: 8px 15px;
    cursor: pointer;
    font-family: "PixelOperator", "Courier New", monospace, sans-serif;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
}

.popup-button:hover {
    background: #8a6f67;
}


#color-context-menu {
    position: fixed;
    background: #7e635c;
    border: 5px #aba389 solid;
    border-image: url(./assets/image/border.png) 5 repeat;
    border-image-outset: 1px;
    box-shadow: 0px 0px 5px #000;
    display: none;
    z-index: 10000;
    min-width: 120px;
}

.context-menu-item {
    padding: 10px 15px;
    color: #FFF;
    cursor: pointer;
    font-family: "PixelOperator", "Courier New", monospace, sans-serif;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
    border-bottom: 1px solid #aba389;
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background: #8a6f67;
}

.context-menu-item.delete {
    color: #ff6666;
}

#tools-panel {
    position: fixed;
    left: 5px;
    top: 35px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
            pointer-events: initial;
            background-color: #aba389;
            border: 11px #aba389 solid;
            border-width: 11px;
            -o-border-image: url(./assets/image/windows_out.png) 11 repeat;
            border-image: url(./assets/image/windows_out.png) 11 repeat;
            border-image-outset: 1px;
            box-shadow: 0px 0px 5px #000;
}
#tools-panel span{
        display: block;
            pointer-events: none;
            text-shadow: 1px 1px #4d313b;
            color: #7e635c;
            margin-bottom: 0px;
            font-size: 14px;
            margin-top: 0px;
            text-align: center;
}

.tools-cat{
        overflow: auto;
            min-width: 100%;
            height: 100%;
            margin: 0 -5px -5px -5px;
            background-color: #7e635c;
            border: 5px #7e635c solid;
            border-width: 5px;
            -o-border-image: url(./assets/image/windows_in.png) 5 repeat;
            border-image: url(./assets/image/windows_in.png) 5 repeat;
}

.tool-item {
    width: 50px;
    height: 50px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
        border: 6px #aba389 outset;
            -o-border-image: url(./assets/image/button.png) 6 repeat;
            border-image: url(./assets/image/button.png) 6 repeat;
            background-color: #aba389;
            transition: filter 0.125s;
}

.tool-item img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    opacity: 0.8;
}

.tool-item.active img {
    opacity: 1;
    filter: brightness(1.2);
}

.tool-item:hover {
    background: #a57555;
    border-color: #666;
}

.tool-item.active {
    background: #a47c61;
    border-color: #a47c61;
    color: #0066cc;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
}

.info-left{
    position: fixed;
    left: -4px;
    top: -4px;
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 10px;
}


.info-panel {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background: #7e635c;
    border: 5px #aba389 solid;
    border-image: url(./assets/image/border.png) 5 repeat;
    border-image-outset: 1px;
    display: inline-block;
    border-radius: 0;
    box-shadow: 0px 0px 5px #000;
    padding: 0 5px;
    z-index: 1000;
}

.info-title {
    font-weight: normal;
    font-size: 12px;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 4px;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 2px;
}

.info-content {
    color: #FFF;
        font: 16px pixel-op, sans-serif;
        text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
}

#users-panel {
    position: fixed;
    top: -4px;
    right: -4px;
}


#bucket-count.empty {
    color: #ff4444;
}

#bucket-timer {
    font-size: 13px;
    color: #dcdcdc;
}


#canvas {
    cursor: none;
}


#floating-tool-icon {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    display: none;
    transform: translate(-50%, -50%);
}

#floating-tool-icon img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    display: block;
}


#custom-tooltip {
    position: fixed;
    display: none;
    background: #7e635c;
    border: 5px #aba389 solid;
    border-image: url(./assets/image/border.png) 5 repeat;
    border-image-outset: 1px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.8);
    z-index: 10001;
    pointer-events: none;
    max-width: 200px;
    padding: 8px 12px;
}

#tooltip-content {
    color: #FFF;
    font-family: "PixelOperator", "Courier New", monospace, sans-serif;
    font-size: 12px;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
    line-height: 1.3;
}

.tooltip-title {
    color: #FFD700;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.tooltip-shortcut {
    color: #87CEEB;
    font-size: 11px;
    display: block;
    margin-top: 4px;
}


#color-list::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

#color-list {
    scrollbar-width: none;
    -ms-overflow-style: none;
}


@media (max-width: 768px) {
    #color-sidebar {
        width: 50px;
    }
    
    .color-item {
        width: 30px;
        height: 30px;
    }
    
    #selected-color-preview {
        width: 40px;
        height: 40px;
    }
    .info-panel {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .info-title {
        font-size: 9px;
    }
    
    .info-content {
        font-size: 10px;
    }
}


#chat-panel {
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 2000;
}

#chat-toggle {
    width: 40px;
    height: 40px;
    background: #7e635c;
    border: 5px #aba389 solid;
    border-image: url(./assets/image/border.png) 5 repeat;
    border-image-outset: 1px;
    box-shadow: 0px 0px 5px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #FFF;
    transition: all 0.2s;
}

#chat-toggle:hover {
    background: #8a6f67;
    transform: scale(1.05);
}

#chat-container {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 300px;
    height: 400px;
    background: #7e635c;
    border: 11px #aba389 solid;
    border-image: url(./assets/image/windows_out.png) 11 repeat;
    border-image-outset: 1px;
    box-shadow: 0px 0px 10px #000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

#chat-container.hidden {
    display: none;
}

#chat-header {
    background: #aba389;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #7e635c;
    color: #7e635c;
    font-weight: bold;
    text-shadow: 1px 1px #4d313b;
}

#chat-close {
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 2px;
    transition: background-color 0.2s;
}

#chat-close:hover {
    background: #7e635c;
    color: #FFF;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chat-message {
    padding: 6px 10px;
    border-radius: 3px;
    background: rgba(171, 163, 137, 0.3);
    border-left: 3px solid #aba389;
    color: #FFF;
    font-size: 12px;
    word-wrap: break-word;
}

.chat-message.system {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #666;
    font-style: italic;
    color: #ddd;
}

.chat-message .user-id {
    font-weight: bold;
    color: #FFD700;
}

#chat-input-container {
    padding: 10px;
    display: flex;
    gap: 8px;
    background: rgba(171, 163, 137, 0.2);
    border-top: 1px solid #aba389;
}

#chat-input {
    flex: 1;
    background: #aba389;
    border: 3px #7e635c solid;
    color: #000;
    padding: 6px 8px;
    font-family: "PixelOperator", "Courier New", monospace, sans-serif;
    font-size: 12px;
}

#chat-input:focus {
    outline: none;
    border-color: #5a4a45;
    background: #beb6a1;
}

#chat-send {
    background: #7e635c;
    border: 5px #aba389 solid;
    border-image: url(./assets/image/border.png) 5 repeat;
    border-image-outset: 1px;
    color: #FFF;
    padding: 6px 12px;
    cursor: pointer;
    font-family: "PixelOperator", "Courier New", monospace, sans-serif;
    text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000;
    font-size: 11px;
    transition: background-color 0.2s;
}

#chat-send:hover {
    background: #8a6f67;
}


#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #7e635c;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #aba389;
    border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #beb6a1;
}


#pixel-hover-border {
    position: fixed;
    pointer-events: none;
    border: 3px solid #ff0000;
    z-index: 1000;
    display: none;
    box-sizing: border-box;
}


#other-users-cursors {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999;
}

.user-cursor {
    position: absolute;
    pointer-events: none;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.05s ease-out;
}

.user-cursor-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.user-cursor-label {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: "PixelOperator", "Courier New", monospace;
    white-space: nowrap;
    margin-top: -14px;
    margin-left: 35px;
}


#settings-container {
    position: fixed;
    bottom: 10px;
    right: 60px;
    z-index: 2000;
}

#settings-button {
width: 40px;
    height: 40px;
    background: #7e635c;
    border: 5px #aba389 solid;
    border-image: url(./assets/image/border.png) 5 repeat;
    border-image-outset: 1px;
    box-shadow: 0px 0px 5px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #FFF;
    transition: all 0.2s;
}

#settings-button:hover {
    background: #8a6f67;
        transform: scale(1.05);
}

#settings-button svg {
    color: #2e2419;
}

#settings-dropdown {
    position: absolute;
    bottom: 60px;
    right: 0;
    min-width: 280px;
    background: #aba389;
        border: 11px #aba389 solid;
        border-image: url(./assets/image/windows_out.png) 11 repeat;
        border-image-outset: 1px;
        box-shadow: 0px 0px 10px #000;
}

#settings-dropdown.hidden {
    display: none !important;
}

.settings-dropdown-section {
    padding: 15px;
}

.settings-dropdown-section h4 {
    margin: 0 0 12px 0;
    color: #2e2419;
    font-size: 16px;
    border-bottom: 2px solid #7e635c;
    padding-bottom: 5px;
}

.account-info-dropdown {
    margin-bottom: 12px;
}

.account-item-dropdown {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    color: #2e2419;
    font-size: 14px;
}

#user-color-display-dropdown {
    width: 18px;
    height: 18px;
    border: 2px solid #2e2419;
    margin-left: 8px;
    display: inline-block;
}

.dropdown-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dropdown-button {
    background: #7e635c;
    border: 2px solid #2e2419;
    color: #fdfdfd;
    padding: 8px 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-button:hover {
    background: #84635b;
}


.teleport-controls, .saved-locations-controls {
    margin-top: 10px;
}

.current-position {
    color: #4a3e2a;
    margin-bottom: 10px;
    font-size: 12px;
}

.teleport-inputs {
    margin-bottom: 10px;
}

.teleport-inputs input, .save-location-input input {
    background: #aba389;
    border: 2px solid #7e635c;
    color: #000;
    padding: 4px 6px;
    margin-bottom: 5px;
    width: 100%;
    box-sizing: border-box;
}

.teleport-coords {
    display: flex;
    gap: 5px;
}

.teleport-coords input {
    width: calc(50% - 2.5px);
}

.teleport-inputs input:focus, .save-location-input input:focus {
    outline: none;
    border-color: #5a4a45;
    background: #beb6a1;
}

.teleport-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.teleport-buttons .dropdown-button {
    flex: 1;
    padding: 4px 8px;
    font-size: 11px;
}

.save-location-input {
    display: flex;
    gap: 5px;
    align-items: flex-end;
    margin-bottom: 10px;
}

.save-location-input input {
    flex: 1;
    margin-bottom: 0;
}

.save-location-input .dropdown-button {
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
}

#saved-locations {
    max-height: 150px;
    overflow-y: auto;
}

.saved-location {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(171, 163, 137, 0.3);
    padding: 4px 6px;
    margin-bottom: 3px;
    border-radius: 2px;
    font-size: 11px;
}

.location-info {
    flex: 1;
    color: #4a3e2a;
}

.location-actions {
    display: flex;
    gap: 3px;
}

.location-btn {
    background: #7e635c;
    color: #FFF;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 1px;
    font-size: 10px;
}

.location-btn:hover {
    background: #8a6f67;
}

.dropdown-button.secondary {
    background: #a67c5a;
    border-color: #2e2419;
}

.dropdown-button.secondary:hover {
    background: #b8896b;
}


#settings-overlay, #create-account-overlay, #login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#settings-overlay.hidden, #create-account-overlay.hidden, #login-overlay.hidden {
    display: none !important;
}

#settings-popup, #create-account-popup, #login-popup {
    background: #f4ead7;
        border: 11px #aba389 solid;
        border-image: url(./assets/image/windows_out.png) 11 repeat;
        border-image-outset: 1px;
        box-shadow: 0px 0px 10px #000;
    border-radius: 16px;
    min-width: 420px;
    max-width: 520px;
    font-family: "PixelOperator", "Courier New", monospace;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#settings-header, #create-account-header, #login-header {
    border-bottom: 3px solid #2e2419;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#settings-header h3, #create-account-header h3, #login-header h3 {
    margin: 0;
    color: #2e2419;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.3);
}

#settings-close, #create-account-close, #login-close {
    background: #2e2419;
    color: #f4ead7;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

#settings-close:hover, #create-account-close:hover, #login-close:hover {
    background: #4a3e2a;
    border-color: #c6ad8f;
    transform: scale(1.1);
}

#settings-content, #create-account-content, #login-content {
    padding: 24px;
    background: #f4ead7;
}
#login-content input{
background: #aba389;
    border: 3px #7e635c solid;
    color: #000;
    padding: 9px 8px;
    font-family: "PixelOperator", "Courier New", monospace, sans-serif;
    font-size: 12px;
    margin-top: 10px;
    width: 100%;
}

#login-content input::placeholder{
    color: #FFF;
}


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

.settings-section h4 {
    margin: 0 0 16px 0;
    color: #2e2419;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 3px solid #c6ad8f;
    padding-bottom: 8px;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
}

#account-info {
    margin-bottom: 18px;
    background: rgba(198, 173, 143, 0.1);
    padding: 16px;
    border-radius: 12px;
    border: 2px solid rgba(198, 173, 143, 0.3);
}

.account-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #2e2419;
    font-size: 15px;
    font-weight: 500;
}

.account-item:last-child {
    margin-bottom: 0;
}

#user-color-display {
    width: 24px;
    height: 24px;
    border: 3px solid #2e2419;
    border-radius: 6px;
    margin-left: 12px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.account-buttons {
    display: flex;
    gap: 12px;
}

.settings-button {
    background: linear-gradient(135deg, #c6ad8f 0%, #d4c4a8 100%);
    border: 2px solid #2e2419;
    color: #2e2419;
    padding: 12px 20px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    flex: 1;
    border-radius: 10px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    outline: none;
}

.settings-button:hover {
    background: linear-gradient(135deg, #d4c4a8 0%, #e2d4b6 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.settings-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.settings-button:focus {
    outline: none;
}


.account-step {
    display: block;
    min-height: 280px;
}

.account-step.hidden {
    display: none;
}

.account-step h4 {
    margin: 0 0 12px 0;
    color: #2e2419;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
}

.account-step p {
    margin: 0 0 20px 0;
    color: #4a3e2a;
    font-size: 15px;
    line-height: 1.5;
    background: rgba(198, 173, 143, 0.1);
    padding: 12px;
    border-radius: 8px;
    border: 4px solid #c6ad8f;
}

.account-step input {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
    background: #aba389;
        border: 3px #7e635c solid;
        color: #000;
        padding: 6px 8px;
        font-family: "PixelOperator", "Courier New", monospace, sans-serif;
        font-size: 12px;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.account-step input:focus {
    outline: none;
    border-color: #c6ad8f;
    background: #f8f8f8;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(198, 173, 143, 0.2);
    transform: translateY(-1px);
}

.account-step input::placeholder {
    color: #ffffff;
}

#user-color-picker {
    width: 80px;
    height: 50px;
    padding: 0;
    cursor: pointer;
    border-radius: 10px;
    border: 3px solid #2e2419;
    background: none;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

#user-color-picker:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.step-buttons, .popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.popup-button {
    background: linear-gradient(135deg, #c6ad8f 0%, #d4c4a8 100%);
    border: 2px solid #2e2419;
    color: #2e2419;
    padding: 12px 24px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    min-width: 100px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-shadow: none;
    outline: none;
}

.popup-button:hover {
    background: linear-gradient(135deg, #d4c4a8 0%, #e2d4b6 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.popup-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.popup-button:focus {
    outline: none;
}

.popup-button.secondary {
    background: linear-gradient(135deg, #a8a8a8 0%, #b8b8b8 100%);
    border-color: #2e2419;
    color: #2e2419;
}

.popup-button.secondary:hover {
    background: linear-gradient(135deg, #b8b8b8 0%, #c8c8c8 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.popup-button.secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.popup-button.secondary:focus {
    outline: none;
}


@media (max-width: 768px) {
    #settings-popup, #create-account-popup, #login-popup {
        min-width: 90%;
        max-width: 95%;
        margin: 0 10px;
        border-radius: 12px;
    }

    #settings-header, #create-account-header, #login-header {
        padding: 14px 18px;
    }

    #settings-header h3, #create-account-header h3, #login-header h3 {
        font-size: 18px;
    }

    #settings-content, #create-account-content, #login-content {
        padding: 18px;
    }

    .account-step {
        min-height: 250px;
    }

    .account-step h4 {
        font-size: 18px;
    }

    .account-step input {
        padding: 14px;
        font-size: 16px;
    }

    .popup-button {
        padding: 14px 18px;
        font-size: 16px;
        min-width: 90px;
    }

    .step-buttons, .popup-buttons {
        gap: 10px;
        flex-direction: column-reverse;
    }

    .popup-button {
        width: 100%;
    }

    #user-color-picker {
        width: 100px;
        height: 60px;
    }

    #settings-button {
        width: 45px;
        height: 45px;
    }

    #settings-dropdown {
        min-width: 250px;
        right: -10px;
    }

    .dropdown-button {
        padding: 12px;
        font-size: 16px;
    }
}


@media (hover: none) and (pointer: coarse) {
   
    .tool-item {
        min-height: 48px;
        min-width: 48px;
    }

    .dropdown-button, .popup-button {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 16px;
    }

   
    #color-list .color-item {
        min-height: 40px;
        min-width: 40px;
    }

   
    .tool-item:active {
        transform: scale(0.95);
        opacity: 0.8;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }

    .dropdown-button:active, .popup-button:active {
        transform: scale(0.98);
        opacity: 0.9;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }

    .color-item:active {
        transform: scale(0.9);
        transition: transform 0.1s ease;
    }

   
    #settings-button {
        min-height: 48px;
        min-width: 48px;
    }

    #chat-toggle {
        min-height: 48px;
        min-width: 48px;
    }
}

/* Bulle de notification chat */
#chat-notification-bubble {
    position: fixed;
    bottom: 60px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    max-width: 200px;
    word-wrap: break-word;
    opacity: 0.85;
    z-index: 2001;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#chat-notification-bubble.hidden {
    display: none;
}

#chat-notification-content {
    font-family: "PixelOperator", "Courier New", monospace;
}