* {
    color: #E1F5FE;
    font-family: monospace;
    font-size: 12px;
    margin: 0;
    padding: 0;
}

html {
    background: #262626;
}

.prio-2 {
    color: #B0BEC5 !important;
}

.prio-3 {
    color: #64B5F6 !important;
}

.prio-4 {
    color: #81C784 !important;
}

.prio-5 {
    color: #b3ac25 !important;
}

.prio-6 {
    color: #c8514c !important;
}

.prio-7 {
    color: #ae2a25 !important;
}

.prio-2 .p { /* verbose */
    background: #5394EC;
}

.prio-3 .p { /* debug */
    background: #326586;
}

.prio-4 .p { /* info */
    background: #5d9801;
    color: #111;
}

.prio-5 .p { /* warn */
    background: #ABC023;
    color: #111;
}

.prio-6 .p { /* err */
    background: #CC666E;
}

.prio-7 .p {  /* assert */
    background: #FF6B68;
}

/* msg */

.prio-2 .m { /* verbose */
    color: #5394EC;
}

.prio-3 .m { /* debug */
    color: #299999;
}

.prio-4 .m { /* info */
    color: #E1F5FE;
}

.prio-5 .m { /* warn */
    color: #ABC023;
}

.prio-6 .m { /* err */
    color: #CC666E;
}

.prio-7 .m {  /* assert */
    color: #FF6B68;
}

/* spans */

.c {
    display: inline-block;
    min-width: 100px;
    font-size: 0.9em;
    color: #BBDEFB;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Date/time on top of message - only for left pane */
#logs .log-entry > .c {
    display: block;
    width: 100%;
    font-size: 0.75em;
    color: #90CAF9;
    font-weight: 400;
    margin-bottom: 2px;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

.p {
    display: inline-block;
    width: 28px;
    text-align: center;
    color: #E3F2FD;
    font-weight: 600;
    font-size: 0.9em;
}

.t {
    display: inline-block;
    color: #BBDEFB;
    font-weight: 600;
    font-size: 0.95em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.m {
    display: inline-block;
    color: #E1F5FE;
    font-size: 0.95em;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.message-text {
    font-size: 1.05em;
    line-height: 1.5;
    padding: 2px 4px;
    display: inline-block;
}

.message-text a {
    color: #64B5F6 !important;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.message-text a:visited {
    color: #90CAF9 !important;
}

.message-text a:hover {
    color: #BBDEFB !important;
    text-shadow: 0 0 4px rgba(100, 181, 246, 0.5);
}

.mp {
    color: #CFD8DC;
    font-weight: 500;
}

.sp {
    margin-right: 5px;
}

.ti {
    height: 14px;
    width: 14px;
}

.log-entry {
    border-bottom: 1px solid rgba(79, 195, 247, 0.1);
    margin: 2px 0;
    display: flex;
    align-items: center;
}

/* Date/time on top only for left pane (messages) */
#logs .log-entry {
    flex-direction: column;
    align-items: flex-start;
}

#logs .log-entry > .message-row {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Right pane (contacts) keeps inline layout */
#contacts .log-entry {
    flex-direction: row;
}

.message-group.channel-message {
    background: rgba(79, 195, 247, 0.05);
    border-left: 2px solid var(--channel-color, rgba(79, 195, 247, 0.3));
}

.message-group.direct-message {
    background: rgba(156, 39, 176, 0.05);
    border-left: 2px solid rgba(156, 39, 176, 0.2);
}

.log-entry .name span[style*="color"] {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-block;
    font-weight: 600;
}

.highlight {
    background: rgba(255,255,0,0.2);
}

.log-entry:hover {
    background: rgba(255,255,0,0.2);
    cursor: pointer;
}

.dot {
    height: .8rem;
    width: .8rem;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease;
}

.log-entry:hover .dot {
    transform: scale(1.2);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.stripe {
    width: 2px;
    height: 1rem;
}

#container {
    display: flex;
    flex-direction: row;
}

#logs, #contacts {
    padding: 12px;
    background: rgba(26, 26, 46, 0.4);
    min-height: 200px;
    margin: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(79, 195, 247, 0.15);
}

#logs::before, #contacts::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(79, 195, 247, 0.3) 50%, transparent 100%);
    margin-bottom: 12px;
}

#leftbar, #rightbar {
    background: #1a1a2e;
    height: 100vh;
    overflow-y: auto;
    border-right: 2px solid rgba(79, 195, 247, 0.3);
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 195, 247, 0.5) rgba(15, 52, 96, 0.3);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

#rightbar {
    border-right: none;
    border-left: 2px solid rgba(79, 195, 247, 0.3);
}

#leftbar::-webkit-scrollbar, #rightbar::-webkit-scrollbar {
    width: 10px;
}

#leftbar::-webkit-scrollbar-track, #rightbar::-webkit-scrollbar-track {
    background: rgba(15, 52, 96, 0.3);
    border-radius: 5px;
}

#leftbar::-webkit-scrollbar-thumb, #rightbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(79, 195, 247, 0.6) 0%, rgba(79, 195, 247, 0.4) 100%);
    border-radius: 5px;
    border: 2px solid rgba(15, 52, 96, 0.3);
}

#leftbar::-webkit-scrollbar-thumb:hover, #rightbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(79, 195, 247, 0.8) 0%, rgba(79, 195, 247, 0.6) 100%);
}

#midbar {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

.resize-bar {
    background: linear-gradient(180deg, rgba(79, 195, 247, 0.2) 0%, rgba(79, 195, 247, 0.1) 100%);
    height: 100vh;
    width: 8px;
    cursor: col-resize;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    user-select: none;
    transition: background 0.2s ease;
    border-left: 1px solid rgba(79, 195, 247, 0.3);
    border-right: 1px solid rgba(79, 195, 247, 0.3);
}

.resize-bar:hover {
    background: linear-gradient(180deg, rgba(79, 195, 247, 0.4) 0%, rgba(79, 195, 247, 0.2) 100%);
}

.resize-bar::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 40px;
    background: rgba(79, 195, 247, 0.6);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.resize-bar:hover::before {
    background: rgba(79, 195, 247, 0.9);
    height: 50px;
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.5);
}

.btn {
    border: 1px solid rgba(79, 195, 247, 0.3);
    background: rgba(26, 26, 46, 0.5);
    color: #BBDEFB;
    padding: 6px 12px;
    border-radius: 6px;
    margin: 3px;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    cursor: pointer;
    border-color: rgba(79, 195, 247, 0.5);
    background: rgba(79, 195, 247, 0.15);
    color: #E1F5FE;
    box-shadow: 0 2px 6px rgba(79, 195, 247, 0.2);
}

.btn.active {
    background: rgba(79, 195, 247, 0.25);
    border-color: rgba(79, 195, 247, 0.5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.25);
}

.pin {
    height: 1rem;
    width: 1rem;
}

.chighlight {
    background: rgba(79, 195, 247, 0.25);
    color: #fff;
    padding: 2px 6px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(79, 195, 247, 0.2);
    font-weight: 600;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

#map {
    height: 100%;
    flex: auto;
}

.leaflet-interactive {
    transition: opacity 0.2s ease;
}

.leaflet-path {
    stroke-linecap: round;
    stroke-linejoin: round;
}

#warning {
    background: #262626;
    color: #ff0;
    position: absolute;
    bottom: 0;
    z-index: 999;
    margin: 12px;
    margin-left: 20px;
    padding: 12px;
    font-size: 1.2em;
}

.settings {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(79, 195, 247, 0.15);
    background: rgba(26, 26, 46, 0.5);
    margin: 8px 12px;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 195, 247, 0.2);
}

.settings:hover {
    background: rgba(26, 26, 46, 0.7);
    border-color: rgba(79, 195, 247, 0.4);
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.15);
}

.settings::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(79, 195, 247, 0.4);
    border-radius: 8px 0 0 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings:hover::before {
    opacity: 1;
}

#settings-types {
    background: rgba(79, 195, 247, 0.08);
    border-color: rgba(79, 195, 247, 0.25);
}

#settings-types::before {
    opacity: 0.5;
}

#settings-reporters {
    background: rgba(79, 195, 247, 0.08);
    border-color: rgba(79, 195, 247, 0.25);
}

#settings-reporters::before {
    background: rgba(79, 195, 247, 0.4);
    opacity: 0.5;
}

#settings-translation {
    background: rgba(79, 195, 247, 0.08);
    border-color: rgba(79, 195, 247, 0.25);
}

#settings-translation::before {
    background: rgba(79, 195, 247, 0.4);
    opacity: 0.5;
}

#settings-contacts {
    background: rgba(79, 195, 247, 0.08);
    border-color: rgba(79, 195, 247, 0.25);
}

#settings-contacts::before {
    background: rgba(79, 195, 247, 0.4);
    opacity: 0.5;
}

#settings-bots {
    background: rgba(79, 195, 247, 0.08);
    border-color: rgba(79, 195, 247, 0.25);
}

#settings-bots::before {
    background: rgba(79, 195, 247, 0.4);
    opacity: 0.5;
}

.bots-list {
    padding: 8px 0;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.bots-loading, .bots-empty {
    padding: 12px;
    text-align: center;
    color: #90CAF9;
    font-size: 12px;
}

.bot-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: rgba(26, 26, 46, 0.3);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.bot-item:hover {
    background: rgba(79, 195, 247, 0.1);
    border-color: rgba(79, 195, 247, 0.2);
}

.bot-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bot-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bot-name {
    color: #E1F5FE;
    font-size: 12px;
    font-weight: 500;
}

.bot-time {
    color: #90CAF9;
    font-size: 11px;
}

#about {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: 8px;
    color: #BBDEFB;
    font-size: 11px;
    padding: 10px 16px;
    margin: 8px 12px;
}

#about a {
    color: #4FC3F7;
    text-decoration: none;
    transition: color 0.2s ease;
}

#about a:hover {
    color: #81D4FA;
    text-decoration: underline;
}

.highlight {
    background: rgba(255,255,0,0.25);
}

.settings-cb {
    display: inline-block;
    margin-right: 12px;
}

.settings-cb > label > input {
    margin-right: 6px;
}

.settings-cb > label > img {
    margin-right: 6px;
}

.icon-16 {
    height: 16px;
    vertical-align: middle;
}

@media only screen and (max-width: 900px) {
    * {
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.3);
    }

    html {
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
    }

    body {
        overflow-x: hidden;
        touch-action: pan-y;
    }

    #container {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 100vh;
        overflow: hidden;
    }

    #leftbar {
        flex: 0 0 40vh;
        background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
        height: 40vh;
        min-height: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #midbar {
        flex: 1 1 auto;
        height: 60vh;
        min-height: 300px;
        position: relative;
    }

    #rightbar {
        flex: 0 0 40vh;
        height: 40vh;
        min-height: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .settings {
        margin: 6px 8px;
        padding: 14px 12px;
        border-radius: 10px;
    }

    .settings-header {
        padding: 12px;
        font-size: 12px;
        margin: -14px -12px 12px -12px;
    }

    .btn {
        padding: 10px 16px;
        margin: 4px;
        font-size: 13px;
        min-height: 44px;
        min-width: 44px;
        border-radius: 8px;
    }

    /* Smaller buttons in right pane on mobile */
    #rightbar .btn,
    #settings-contacts .btn {
        padding: 6px 10px;
        margin: 3px;
        font-size: 11px;
        min-height: 32px;
        min-width: 32px;
        border-radius: 6px;
    }

    .log-entry {
        margin: 1px 0;
        touch-action: manipulation;
    }

    .translation-row {
        gap: 10px;
        margin-bottom: 8px;
    }

    .translation-row label {
        min-width: 60px;
        font-size: 13px;
    }

    .translation-row select {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 44px;
        border-radius: 8px;
    }

    .translation-row input[type="checkbox"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }

    .reset-btn {
        padding: 12px 20px;
        font-size: 13px;
        min-height: 48px;
        border-radius: 8px;
    }

    .translate-btn {
        padding: 2px 6px;
        font-size: 9px;
        min-height: auto;
        min-width: auto;
        border-radius: 3px;
        line-height: 1.2;
    }

    .resize-bar {
        display: none;
    }

    #logs, #contacts {
        padding: 4px 6px;
        margin: 4px 6px;
    }

    #about {
        margin: 6px 8px;
        padding: 12px;
        font-size: 11px;
    }

    .settings-cb {
        margin: 6px 8px 6px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .settings-cb > label {
        display: flex;
        align-items: center;
        cursor: pointer;
        min-height: 44px;
    }

    .settings-cb > label > input {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
        margin-right: 8px;
    }

    .toggle-icon {
        font-size: 16px;
        min-width: 24px;
        min-height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dot {
        height: 1rem;
        width: 1rem;
        min-width: 1rem;
        min-height: 1rem;
    }

    .sp {
        margin-right: 10px;
    }

    .c {
        min-width: 60px;
        font-size: 0.85em;
    }

    /* Date/time on top - mobile (only left pane) */
    #logs .log-entry > .c {
        font-size: 0.7em;
        margin-bottom: 1px;
    }

    /* Message text below name on mobile - force vertical stacking */
    #logs .message-row {
        flex-direction: column;
        align-items: flex-start;
    }

    #logs .message-row .message {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex: 1;
        width: 100%;
    }

    #logs .message-row .message .t {
        display: block !important;
        margin-bottom: 2px;
        width: 100%;
        flex-shrink: 0;
    }

    #logs .message-row .message .message-text {
        display: block !important;
        width: 100%;
        margin-top: 2px;
        flex-shrink: 0;
    }

    #logs .message-row .message .sp {
        margin-right: 0;
        display: block;
    }

    /* Force translate button to stay on same row as message content */
    #logs .message-row .translate-btn {
        align-self: flex-start;
        margin-bottom: 2px;
    }

    .p {
        width: 28px;
        font-size: 10px;
    }

    .t {
        font-size: 0.85em;
    }

    .m {
        font-size: 0.85em;
        line-height: 1.2;
    }

    .message-text {
        font-size: 0.9em;
        line-height: 1.3;
        padding: 1px 2px;
    }

    .log-entry .name span[style*="color"] {
        padding: 1px 3px;
        font-size: 0.9em;
    }

    .dot {
        height: 0.6rem;
        width: 0.6rem;
        min-width: 0.6rem;
        min-height: 0.6rem;
        margin-right: 4px;
    }

    #map {
        touch-action: pan-x pan-y pinch-zoom;
        /* Performance optimizations for mobile */
        will-change: transform;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    /* Reduce marker rendering complexity on mobile */
    .leaflet-marker-icon {
        will-change: transform;
    }

    /* Optimize canvas rendering on mobile */
    .leaflet-container {
        -webkit-tap-highlight-color: transparent;
    }
}

@media only screen and (max-width: 600px) {
    #leftbar {
        flex: 0 0 35vh;
        height: 35vh;
        min-height: 250px;
    }

    #midbar {
        height: 50vh;
        min-height: 300px;
    }

    #rightbar {
        flex: 0 0 35vh;
        height: 35vh;
        min-height: 250px;
    }

    .settings-header {
        font-size: 11px;
        padding: 10px;
    }

    .settings-header span:first-child {
        flex: 1;
        line-height: 1.4;
    }

    .btn {
        padding: 12px 14px;
        font-size: 12px;
    }

    /* Even smaller buttons in right pane on very small screens */
    #rightbar .btn,
    #settings-contacts .btn {
        padding: 5px 8px;
        margin: 2px;
        font-size: 10px;
        min-height: 28px;
        min-width: 28px;
        border-radius: 5px;
    }

    .log-entry {
        padding: 10px 12px;
    }
}


.marker-pin {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #32a85c;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(50, 168, 92, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.marker-pin::after {
    content: '';
    width: 20px;
    height: 20px;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    border-radius: 50%;
}

.marker-pin.missing {
    background: #EF5350;
    box-shadow: 0 2px 8px rgba(239, 83, 80, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.marker-pin.ghosted {
    background: #FFB74D;
    box-shadow: 0 2px 8px rgba(255, 183, 77, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.marker-pin.custom {
    filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(87deg) brightness(119%) contrast(119%);
}

.marker-pin:hover {
    transform: scale(1.15);
    z-index: 1000;
    cursor: pointer;
}

.custom-div-icon {
    cursor: pointer;
}

.custom-div-icon {
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: block;
    line-height: 0;
}

.custom-div-icon img {
   position: absolute;
   width: 20px;
   height: 18px;
   left: 3px;
   top: 3px;
   z-index: 2;
   fill: #607e8c;
   pointer-events: none;
}

.custom-div-icon span {
    position: absolute;
    color: #607e8c;
    font-size: 16px;
    left: 0;
    right: 0;
    margin: 10px auto;
    text-align: center;
    z-index: 2;
}

.marker-emoji {
    position: absolute !important;
    width: 20px !important;
    height: 20px !important;
    left: 2px !important;
    top: 2px !important;
    right: auto !important;
    margin: 0 !important;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    text-align: center;
}

.tooltip-title {
    color: #111;
    font-weight: bold;
}

.tooltip-detail {
    color: #444;
    font-size: 0.8em;
}

/* Settings header for collapsible sections */
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    color: #E3F2FD;
    font-weight: bold;
    font-size: 13px;
    border-bottom: 1px solid rgba(79, 195, 247, 0.15);
    margin: -12px -16px 12px -16px;
    background: rgba(79, 195, 247, 0.06);
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-header:hover {
    color: #fff;
    background: rgba(79, 195, 247, 0.1);
    border-bottom-color: rgba(79, 195, 247, 0.25);
}

.toggle-icon {
    font-size: 14px;
    color: #90CAF9;
    transition: transform 0.2s ease;
    font-weight: bold;
}

.settings-header:hover .toggle-icon {
    color: #BBDEFB;
}

/* Translation controls */
.translation-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px;
    background: rgba(26, 26, 46, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(79, 195, 247, 0.12);
}

.translation-help {
    padding: 8px 12px;
    background: rgba(79, 195, 247, 0.1);
    border-left: 3px solid rgba(79, 195, 247, 0.4);
    border-radius: 4px;
    color: #BBDEFB;
    font-size: 11px;
    font-style: italic;
    margin-bottom: 4px;
}

/* Channel controls */
.channel-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.translation-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.translation-row label {
    min-width: 50px;
    font-size: 12px;
    color: #BBDEFB;
    font-weight: 500;
}

.translation-row select {
    background: rgba(26, 26, 46, 0.6);
    color: #E1F5FE;
    border: 1px solid rgba(79, 195, 247, 0.25);
    padding: 6px 10px;
    font-size: 12px;
    font-family: monospace;
    border-radius: 6px;
    flex: 1;
    transition: all 0.2s ease;
}

.translation-row select:hover {
    border-color: rgba(79, 195, 247, 0.4);
    background: rgba(26, 26, 46, 0.7);
}

.translation-row select:focus {
    outline: none;
    border-color: rgba(79, 195, 247, 0.5);
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.15);
    background: rgba(26, 26, 46, 0.8);
}

.translation-row input[type="checkbox"] {
    margin-right: 4px;
}

.translation-row input[type="checkbox"] + label {
    min-width: auto;
    cursor: pointer;
}

/* Reset button */
.reset-btn {
    background: rgba(79, 195, 247, 0.2);
    color: #E1F5FE;
    border: 1px solid rgba(79, 195, 247, 0.4);
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: monospace;
    transition: all 0.2s ease;
    width: 100%;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(79, 195, 247, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reset-btn:hover {
    background: rgba(79, 195, 247, 0.3);
    border-color: rgba(79, 195, 247, 0.5);
    box-shadow: 0 3px 8px rgba(79, 195, 247, 0.25);
}

/* Translation button */
.translate-btn {
    background: rgba(79, 195, 247, 0.2);
    color: #E1F5FE;
    border: 1px solid rgba(79, 195, 247, 0.35);
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 4px;
    font-family: monospace;
    transition: all 0.2s ease;
    font-weight: 600;
    line-height: 1.2;
    min-width: auto;
    min-height: auto;
}

.translate-btn:hover {
    background: rgba(79, 195, 247, 0.3);
    border-color: rgba(79, 195, 247, 0.5);
}

.translate-btn:disabled {
    background: #444;
    color: #666;
    cursor: not-allowed;
}

/* T button (translate) */
.translate-btn[data-state="translate"] {
    background: rgba(79, 195, 247, 0.3);
    border-color: rgba(79, 195, 247, 0.5);
    color: #fff;
}

.translate-btn[data-state="translate"]:hover {
    background: rgba(79, 195, 247, 0.4);
    box-shadow: 0 2px 6px rgba(79, 195, 247, 0.25);
}

/* O button (original) */
.translate-btn[data-state="original"] {
    background: rgba(79, 195, 247, 0.25);
    border-color: rgba(79, 195, 247, 0.45);
    color: #fff;
}

.translate-btn[data-state="original"]:hover {
    background: rgba(79, 195, 247, 0.35);
    box-shadow: 0 2px 6px rgba(79, 195, 247, 0.25);
}

/* Translation result */
.translation-result {
    margin-top: 4px;
    padding: 4px;
    background: #1a1a1a;
    border-left: 2px solid #2a536d;
    font-size: 11px;
    color: #ccc;
    font-style: italic;
}

.translation-loading {
    color: #888;
    font-style: italic;
}

/* Collision Helper Styles */
/* Button Separator */
.button-separator {
    width: 100%;
    height: 1px;
    background: rgba(79, 195, 247, 0.3);
    margin: 8px 0;
    border: none;
}

/* Sorting buttons (Last Advert, Hash, Name) */
.btn.sort-btn {
    background: rgba(79, 195, 247, 0.15);
    border-color: rgba(79, 195, 247, 0.3);
    color: #BBDEFB;
}

.btn.sort-btn:hover {
    background: rgba(79, 195, 247, 0.25);
    border-color: rgba(79, 195, 247, 0.4);
}

.btn.sort-btn.active {
    background: rgba(79, 195, 247, 0.3);
    border-color: rgba(79, 195, 247, 0.5);
    color: #fff;
}

/* Action buttons (Collision Helper, Repeater Setup, Weekly Stats) */
.collision-helper-btn {
    background: rgba(239, 83, 80, 0.15) !important;
    border: 1px solid rgba(239, 83, 80, 0.35) !important;
    color: #EF9A9A !important;
}

.collision-helper-btn:hover {
    background: rgba(239, 83, 80, 0.25) !important;
    border-color: rgba(239, 83, 80, 0.45) !important;
    color: #FFCDD2 !important;
}

.repeater-setup-btn {
    background: rgba(76, 175, 80, 0.2) !important;
    border: 1px solid rgba(76, 175, 80, 0.4) !important;
    color: #A5D6A7 !important;
}

.repeater-setup-btn:hover {
    background: rgba(76, 175, 80, 0.3) !important;
    border-color: rgba(76, 175, 80, 0.5) !important;
    color: #C8E6C9 !important;
}

.weekly-stats-btn {
    background: rgba(255, 152, 0, 0.2) !important;
    border: 1px solid rgba(255, 152, 0, 0.4) !important;
    color: #FFCC80 !important;
}

.weekly-stats-btn:hover {
    background: rgba(255, 152, 0, 0.3) !important;
    border-color: rgba(255, 152, 0, 0.5) !important;
    color: #FFE0B2 !important;
}

.collision-helper-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.collision-helper-content {
    background: #333333;
    border: 2px solid #555;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.collision-helper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #555;
    background: #2a2a2a;
}

.collision-helper-header h3 {
    color: #ddd;
    font-size: 16px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #ddd;
    background: #444;
    border-radius: 4px;
}

.collision-helper-table {
    padding: 20px;
}

.hex-grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 3px;
    max-width: 1000px;
    margin: 0 auto;
}

.hex-cell {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-cell:hover {
    transform: scale(1.1);
    z-index: 10;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Color coding for hex cells */
.hex-cell.unoccupied {
    background: #2d4a2d;
    color: #4a7c4a;
    border-color: #4a7c4a;
}

.hex-cell.unoccupied:hover {
    background: #3d5a3d;
    border-color: #5a8c5a;
}

.hex-cell.occupied {
    background: #4a2d2d;
    color: #d4a5a5;
    border-color: #8c5a5a;
}

.hex-cell.occupied:hover {
    background: #5a3d3d;
    border-color: #9c6a6a;
}

.hex-cell.colliding {
    background: #1a1a1a;
    color: #ffcc00;
    border-color: #666;
}

.hex-cell.colliding:hover {
    background: #2a2a2a;
    border-color: #777;
}

.weekly-stats-content {
    min-width: 600px;
    max-width: 800px;
    background: #333333 !important;
}

.weekly-stats-content-body {
    padding: 20px;
    background: #333333 !important;
}

.stats-section {
    margin-bottom: 30px;
}

.stats-section h4 {
    color: #ddd;
    font-size: 18px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.stats-table thead {
    background: #1a1a1a;
}

.stats-table th {
    color: #ddd;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #444;
    font-weight: bold;
}

.stats-table td {
    color: #ccc;
    padding: 8px 10px;
    border-bottom: 1px solid #333;
}

.stats-table tbody tr:hover {
    background: #2a2a2a;
}

.stats-total {
    color: #2a536d;
    font-size: 16px;
    padding: 10px 0;
    text-align: right;
    border-top: 1px solid #444;
    margin-top: 5px;
}

.stats-date-range {
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
    border-top: 1px solid #444;
}

.node-info-box {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 300px;
    max-width: 90%;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.node-info-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #BBDEFB;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.node-info-close:hover {
    background: rgba(79, 195, 247, 0.2);
}

.node-info-title {
    font-size: 16px;
    font-weight: 600;
    color: #BBDEFB;
    margin-bottom: 12px;
    padding-right: 30px;
}

.node-info-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.node-info-row {
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    color: #E3F2FD;
    line-height: 1.5;
}

.node-info-row strong {
    color: #BBDEFB;
    margin-right: 8px;
    min-width: 100px;
}

.node-info-pubkey {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    word-break: break-all;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.2s ease;
    user-select: all;
}

.node-info-pubkey:hover {
    background: rgba(79, 195, 247, 0.15);
}

.copy-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(79, 195, 247, 0.5);
    border-radius: 6px;
    padding: 10px 20px;
    color: #BBDEFB;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.copy-notification.show {
    opacity: 1;
}

@media only screen and (max-width: 600px) {
    .node-info-box {
        top: 5px;
        left: 5px;
        right: 5px;
        transform: none;
        min-width: auto;
        max-width: none;
        padding: 12px 15px;
    }

    .node-info-row {
        font-size: 12px;
    }

    .node-info-row strong {
        min-width: 80px;
    }

    .node-info-pubkey {
        font-size: 10px;
    }

    .copy-notification {
        font-size: 12px;
        padding: 8px 16px;
    }
}