* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

body.desktop-mode {
    --desktop-base-font: 12px;
    --desktop-small-font: 10px;
    --desktop-large-font: 18px;
    --desktop-medium-font: 14px;
    --desktop-button-font: 11px;
    --desktop-button-padding: 8px 14px;
    --desktop-modal-button-padding: 8px 16px;
    --desktop-input-height: 32px;
    --desktop-search-width: 40px;
    --desktop-search-expanded: 200px;
    
    font-size: var(--desktop-base-font);
}

body.desktop-mode .create-note-btn {
    font-size: var(--desktop-base-font);
    padding: var(--desktop-button-padding);
}

body.desktop-mode .search-input {
    width: var(--desktop-search-width);
    height: var(--desktop-input-height);
    font-size: var(--desktop-base-font);
    padding: 6px 12px;
}

body.desktop-mode .search-input:focus,
body.desktop-mode .search-input.expanded {
    width: var(--desktop-search-expanded);
    padding-left: 12px;
}

body.desktop-mode .search-input:not(.expanded):not(:focus)::placeholder {
    font-size: var(--desktop-small-font);
}

body.desktop-mode .back-btn {
    width: var(--desktop-search-width);
    height: var(--desktop-input-height);
    font-size: var(--desktop-base-font);
}

body.desktop-mode .note-title {
    font-size: var(--desktop-medium-font);
}

body.desktop-mode .note-meta {
    font-size: var(--desktop-small-font);
}

body.desktop-mode .note-title-text {
    font-size: var(--desktop-large-font);
}

body.desktop-mode .content-body {
    font-size: var(--desktop-small-font);
}

body.desktop-mode .content-body h1 {
    font-size: var(--desktop-base-font);
}

body.desktop-mode .content-body h2 {
    font-size: 11px; /* Keep medium size */
}

body.desktop-mode .content-body h3 {
    font-size: var(--desktop-small-font);
}

body.desktop-mode .markdown-editor-fullsize {
    font-size: var(--desktop-base-font);
}

body.desktop-mode .btn-cancel,
body.desktop-mode .btn-confirm,
body.desktop-mode .btn-preview {
    font-size: var(--desktop-button-font);
    padding: var(--desktop-modal-button-padding);
}


body.desktop-mode .tooltip-author,
body.desktop-mode .tooltip-time {
    font-size: 11px;
}

body.desktop-mode .markdown-preview-content {
    font-size: 12px;
}

body.desktop-mode .markdown-preview p, 
body.desktop-mode .markdown-preview-content p {
    font-size: 10px;
}

body.desktop-mode .form-group label {
    font-size: 12px;
}
.app-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    position: relative;
}

.note-list-view {
    height: calc(100vh - 70px); /* Subtract header height */
    display: flex;
    flex-direction: column;
}

.note-detail-view {
    height: calc(100vh - 70px); /* Subtract header height */
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    gap: 15px;
    align-items: center;
}


.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 48px; /* Adjust width to match back button */
    height: 38px;
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
    font-size: 14px;
    color: #333;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; /* Ensure emoji display */
}

.search-input:focus,
.search-input.expanded {
    width: 250px; /* Width after expansion */
    padding-left: 15px;
    text-align: left;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(108, 117, 125, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: text;
}

.search-input:focus::placeholder,
.search-input.expanded::placeholder {
    color: #6c757d;
}

.search-input::placeholder {
    color: #666;
    font-size: 14px;
}

.search-input:not(.expanded):not(:focus)::placeholder {
    font-size: 12px; /* Smaller icon in collapsed state */
}

.create-note-btn {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.create-note-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: translateY(-1px);
}

.search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 1;
}

.search-clear.hidden {
    opacity: 0;
    pointer-events: none;
}

.search-clear:hover {
    background: rgba(108, 117, 125, 0.1);
    color: #495057;
}


.notes-container {
    padding: 20px 20px 90px 20px; /* 90px bottom to avoid floating button blocking */
    flex: 1; /* Fill remaining space */
    overflow-y: auto;
    /* Completely hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.notes-container::-webkit-scrollbar {
    display: none;
}

.note-item {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.note-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Unread status background color */
.note-item.unread-new {
    background: rgba(0, 123, 255, 0.08);
    border-left: 4px solid #007bff;
}

.note-item.unread-modified {
    background: rgba(40, 167, 69, 0.08);
    border-left: 4px solid #28a745;
}
.note-item.new-join {
    background: rgba(40, 167, 69, 0.08);
    border-left: 4px solid #a7289c;
}

.pinned-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-top: 24px solid #ff9800;
    border-left: 24px solid transparent;
    z-index: 10;
    transition: border-top-color 0.2s ease;
}

.note-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.note-permission-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.permission-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
    line-height: 1;
}

.permission-badge.owner {
    background: rgba(255, 193, 7, 0.2);
    color: #F57F17;
}

.permission-badge.write {
    background: rgba(76, 175, 80, 0.2);
    color: #2E7D32;
}

.permission-badge.read {
    background: rgba(33, 150, 243, 0.2);
    color: #1565C0;
}

.note-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.note-manage-btn {
    background: rgba(108, 117, 125, 0.1);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    color: #6c757d;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.note-manage-btn:hover {
    background: rgba(108, 117, 125, 0.2);
    transform: scale(1.1);
}

.note-owner-name {
    font-size: 11px;
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
    border-radius: 12px;
    padding: 2px 8px;
    flex-shrink: 0;
}

.btn-join {
    background: rgba(33, 150, 243, 0.1);
    color: #1976D2;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 8px;
}

.btn-join:hover {
    background: rgba(33, 150, 243, 0.2);
    transform: translateY(-1px);
}

.manage-section {
    margin: 16px 0;
}

.manage-section h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

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

.share-code-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.share-code-display span {
    flex: 1;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    color: #495057;
}

.btn-share {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    width: 100%;
}

.btn-share:hover {
    background: rgba(40, 167, 69, 0.2);
    transform: translateY(-1px);
}

.share-code-display.hidden {
    display: none;
}

.members-list {
    max-height: 200px;
    overflow-y: auto;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 500;
    color: #333;
}

.member-permission {
    font-size: 12px;
    color: #6c757d;
}

.member-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.permission-toggle {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.permission-toggle:hover {
    background: rgba(108, 117, 125, 0.2);
}

.permission-toggle.write {
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
}

.permission-toggle.write:hover {
    background: rgba(76, 175, 80, 0.2);
}

.btn-remove {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: rgba(220, 53, 69, 0.2);
}

.note-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.note-stats {
    display: flex;
    gap: 15px;
    align-items: center;
}

.note-title-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: min(744px, 93vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}


.modal.borderless .modal-content {
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.modal-body.compact {
    padding: 12px;
}

.modal-body.compact .modal-actions {
    gap: 6px;
    margin-top: 0;
}

.modal-body.compact .preview-container {
    margin-bottom: 4px;
    max-width: min(744px, 93vw);
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    padding: 12px;
    background: white;
}

 

.modal-body {
    padding: 25px;
}

.modal-body input,
.modal-body textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.3s ease;
    resize: vertical;
}

.modal-body input:focus,
.modal-body textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn-cancel,
.btn-confirm {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.btn-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

.hidden {
    display: none !important;
}

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

.back-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 48px;
    height: 38px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}


.back-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.note-info {
    flex: 1;
    text-align: center;
    margin: 0 20px;
}

.note-info h2 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.note-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 5px;
    font-size: 12px;
    color: #7f8c8d;
}


.content-timeline {
    position: relative;
    padding: 20px 20px 90px 20px; 
    flex: 1; 
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    display: flex;
    flex-direction: column;
}

.content-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
}

.content-timeline::-webkit-scrollbar {
    display: none;
}


.timeline-loader {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    margin-bottom: 20px;
}

.timeline-loader.show {
    display: flex;
}

.loader-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}


.content-block {
    background: white;
    border: 1px solid #e8eaed;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    margin: 0;
}

.change-count-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    z-index: 10;
    min-width: 20px;
    text-align: center;
    border: 2px solid white;
    transition: all 0.2s ease;
}

.change-count-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.5);
}

body.desktop-mode .change-count-badge {
    font-size: 9px;
    padding: 3px 6px;
    bottom: 6px;
    right: 6px;
    border-radius: 10px;
}

.history-list {
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 10px;
}

.history-item {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.history-item:hover {
    border-color: #dadce0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-item.current {
    border-color: #4285f4;
    background: rgba(66, 133, 244, 0.02);
}

.history-item .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e8ed;
    margin-bottom: 0;
}


.history-version {
    font-weight: 600;
    font-size: 13px;
    color: #1a73e8;
}

.history-item.current .history-version {
    color: #4285f4;
    font-weight: 700;
}

.history-author {
    font-size: 12px;
    color: #5f6368;
    background: rgba(95, 99, 104, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.history-time {
    font-size: 11px;
    color: #9aa0a6;
}


.history-content {
    padding: 16px;
    font-size: 13px;
    line-height: 1.4;
    max-height: 65vh;
    overflow-y: auto;
    background: white;
    border-top: 1px solid #e8eaed;
}

.history-content p {
    margin: 4px 0;
}

.history-content h1,
.history-content h2,
.history-content h3 {
    margin: 8px 0 4px 0;
    color: #202124;
}

.history-content code {
    background: #f1f3f4;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
}

.history-content pre {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    padding: 8px;
    overflow-x: auto;
    font-size: 12px;
}

.history-content blockquote {
    border-left: 3px solid #4285f4;
    padding-left: 8px;
    margin: 8px 0;
    color: #5f6368;
    font-style: italic;
}


body.desktop-mode .history-item .history-header {
    padding: 10px 12px;
}

body.desktop-mode .history-version {
    font-size: 11px;
}

body.desktop-mode .history-author {
    font-size: 10px;
    padding: 1px 6px;
}

body.desktop-mode .history-time {
    font-size: 9px;
}


body.desktop-mode .history-content {
    font-size: 11px;
    padding: 12px;
    max-height: 45vh;
}

.diff-added {
    color: #059669;
    font-weight: 600;
    font-size: 11px;
    background: rgba(34, 197, 94, 0.1);
    padding: 1px 4px;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.diff-deleted {
    color: #dc2626;
    font-weight: 600;
    font-size: 11px;
    background: rgba(239, 68, 68, 0.1);
    padding: 1px 4px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
 
body.desktop-mode .diff-added,
body.desktop-mode .diff-deleted {
    font-size: 9px;
    padding: 0px 3px;
}

.diff-prefix {
    width: 20px;
    text-align: center;
    font-weight: 700;
    flex-shrink: 0;
    padding: 0 4px;
}

.diff-line-content {
    flex: 1;
    padding-right: 8px;
    white-space: pre-wrap;
    word-break: break-all;
}


body.desktop-mode .diff-prefix {
    width: 16px;
    padding: 0 2px;
}

body.desktop-mode .diff-line-content {
    padding-right: 6px;
}


.inline-diff-added,
.inline-diff-deleted {
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
}

.inline-diff-added {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.inline-diff-deleted {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.history-content del,
.history-content s {
    background: rgba(239, 68, 68, 0.15);
    text-decoration: line-through;
    text-decoration-color: #dc2626;
    color: #b91c1c;
    padding: 2px 4px;
    border-radius: 3px;
    border-left: 3px solid #ef4444;
}

.history-content strong {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
    border-left: 3px solid #22c55e;
}

.diff-deleted-line {
    background: rgba(239, 68, 68, 0.15);
    padding: 6px 8px;
    border-radius: 4px;
    margin: 4px 0;
}

.diff-added-line {
    background: rgba(34, 197, 94, 0.15);
    padding: 6px 8px;
    border-radius: 4px;
    margin: 4px 0;
}

/* Ensure markdown content inside diff blocks renders properly */
.diff-deleted-line p,
.diff-added-line p {
    margin: 0;
}

.diff-deleted-line h1, .diff-deleted-line h2, .diff-deleted-line h3,
.diff-added-line h1, .diff-added-line h2, .diff-added-line h3 {
    margin: 4px 0;
}

.diff-deleted-line ul, .diff-deleted-line ol,
.diff-added-line ul, .diff-added-line ol {
    margin: 4px 0;
    padding-left: 20px;
}

body.desktop-mode .diff-deleted-line,
body.desktop-mode .diff-added-line {
    padding: 4px 6px;
    margin: 2px 0;
}

.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}


.image-preview-container {
    position: relative;
    max-width: min(744px, 93vw);
    max-height: 80vh;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

 
.preview-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* WebSocket Message Popup Styles */
.message-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    max-height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e1e8ed;
    z-index: 2000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.message-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.message-popup-body {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
}

.message-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
    position: relative;
}

.message-item:hover {
    background: rgba(66, 133, 244, 0.02);
}

.message-item[style*="cursor: pointer"]:hover {
    background: rgba(66, 133, 244, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.12);
}

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

.message-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.message-text strong {
    color: #1a73e8;
    font-weight: 600;
}

.message-text em {
    color: #5f6368;
    font-style: normal;
    font-weight: 500;
}


.message-time {
    font-size: 11px;
    color: #9aa0a6;
    margin-top: 6px;
    text-align: right;
}

.message-modify {
    border-left: 3px solid #28a745;
}

.message-popup-footer {
    padding: 12px 20px;
    border-top: 1px solid #e1e8ed;
    background: #fafbfc;
    border-radius: 0 0 12px 12px;
}

.btn-clear-messages {
    width: 100%;
    background: rgba(95, 99, 104, 0.1);
    color: #5f6368;
    border: 1px solid rgba(95, 99, 104, 0.2);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-messages:hover {
    background: rgba(95, 99, 104, 0.2);
    color: #202124;
    transform: translateY(-1px);
}

.message-item {
    animation: slideInMessage 0.3s ease-out;
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.desktop-mode .message-popup {
    width: 280px;
    top: 70px;
    right: 15px;
}


body.desktop-mode .message-item {
    padding: 10px 16px;
}

body.desktop-mode .message-text {
    font-size: 12px;
}


body.desktop-mode .message-time {
    font-size: 10px;
}

body.desktop-mode .btn-clear-messages {
    font-size: 11px;
    padding: 6px 12px;
}

.content-block:first-child {
    border-radius: 8px 8px 0 0;
}

.content-block:last-child {
    border-radius: 0 0 8px 8px;
}

.content-block:only-child {
    border-radius: 8px;
}

.content-block:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-block.referenced {
    border-left: 3px solid #ff9800;
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.05) 0%, white 100%);
}

.content-block.edited {
    border-left: 3px solid #28a745;
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.05) 0%, white 100%);
}

.content-block.referenced.edited {
    border-left: 3px solid #ff9800;
    border-right: 3px solid #28a745;
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.05) 0%, rgba(40, 167, 69, 0.05) 100%);
}

.content-block.highlight {
    background: #fff3cd !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
    transition: all 0.3s ease !important;
}

.reference-rendered {
    opacity: 0.8;
}

.reference-rendered p {
    margin: 0;
    font-size: 13px;
}

.reference-rendered h1, .reference-rendered h2, .reference-rendered h3 {
    font-size: 14px;
    margin: 4px 0;
}

.content-body {
    padding: 16px;
    font-size: 12px;
    line-height: 1.15;
    color: #202124;
}

.content-body > *:first-child {
    margin-top: 0;
}

.content-body > *:last-child {
    margin-bottom: 0;
}

.content-body h1 {
    font-size: 14px;
    font-weight: 600;
    margin: 6px 0 3px 0;
    color: #1a73e8;
    border-bottom: 1px solid #e8eaed;
    padding-bottom: 2px;
}

.content-body h2 {
    font-size: 13px;
    font-weight: 600;
    margin: 5px 0 2px 0;
    color: #1a73e8;
}

.content-body h3 {
    font-size: 12px;
    font-weight: 600;
    margin: 4px 0 1px 0;
    color: #1a73e8;
}

.content-body p {
    margin: 1px 0;
    line-height: 1.15;
}

.content-body strong {
    font-weight: 600;
    color: #202124;
}

.content-body em {
    font-style: italic;
    color: #5f6368;
}

.content-body code {
    background: #f1f3f4;
    color: #d93025;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
}

.content-body pre {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    margin: 12px 0;
}

.content-body pre code {
    background: none;
    color: #202124;
    padding: 0;
    font-size: 11px;
}

.content-body blockquote {
    margin: 6px 0;
    padding: 4px 8px;
    background: #f8f9fa;
    border-left: 4px solid #4285f4;
    font-style: italic;
    color: #5f6368;
}

.content-body ul, .content-body ol {
    margin: 6px 0;
    padding-left: 20px;
}

.content-body li {
    margin: 1px 0;
    line-height: 1.15;
}

.content-body hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid #e8eaed;
}

.content-body a {
    color: #1a73e8;
    text-decoration: none;
}

.content-body a:hover {
    text-decoration: underline;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal.large .modal-content {
    width: min(744px, 93vw);
}

.content-editor-container {
    margin-bottom: 20px;
}

.no-reference {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.content-editor-container {
    margin-bottom: 15px;
    min-height: auto;
    display: flex;
    flex-direction: column;
}

.modal-body.compact .content-editor-container {
    margin-bottom: 4px;
    min-height: auto;
}

.markdown-editor-fullsize {
    width: 100%;
    min-height: 120px;
    max-height: calc(80vh - 120px);
    padding: 15px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    outline: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.15;
    resize: none;
    overflow-y: auto;
    background: white;
    color: #2c3e50;
    transition: all 0.2s ease;
}

/* Editor styles in compact mode */
.modal-body.compact .markdown-editor-fullsize {
    padding: 12px;
    border-radius: 6px;
    line-height: 1.1;
}

.markdown-editor-fullsize:focus {
    background: #fafafa;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.markdown-editor-fullsize::placeholder {
    color: #6c757d;
    font-style: italic;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-preview {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-preview:hover {
    background: #138496;
    transform: translateY(-1px);
}

.preview-container {
    max-width: min(744px, 93vw);
    max-height: 80vh;
    overflow-y: auto;
    border: none;
    border-radius: 0;
    background: transparent;
}

.markdown-preview-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.3;
    color: #2c3e50;
    min-height: 200px;
}

/* Markdown rendering styles */
.markdown-preview h1, .markdown-preview h2, .markdown-preview h3,
.markdown-preview h4, .markdown-preview h5, .markdown-preview h6,
.markdown-preview-content h1, .markdown-preview-content h2, .markdown-preview-content h3,
.markdown-preview-content h4, .markdown-preview-content h5, .markdown-preview-content h6 {
    margin: 8px 0 4px 0;
    font-weight: 600;
    color: #1a202c;
}

.markdown-preview h1, .markdown-preview-content h1 { font-size: 1.5em; border-bottom: 2px solid #e1e8ed; padding-bottom: 4px; }
.markdown-preview h2, .markdown-preview-content h2 { font-size: 1.3em; }
.markdown-preview h3, .markdown-preview-content h3 { font-size: 1.1em; }

.markdown-preview p, .markdown-preview-content p {
    margin: 1px 0;
    line-height: 1.15;
}

.markdown-preview strong, .markdown-preview-content strong {
    font-weight: 600;
    color: #1a202c;
}

.markdown-preview em, .markdown-preview-content em {
    font-style: italic;
    color: #4a5568;
}

.markdown-preview code, .markdown-preview-content code {
    background: #f1f3f4;
    color: #d73a49;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.markdown-preview pre, .markdown-preview-content pre {
    background: #f6f8fa;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    margin: 12px 0;
}

.markdown-preview pre code, .markdown-preview-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 13px;
}

.markdown-preview blockquote, .markdown-preview-content blockquote {
    margin: 6px 0;
    padding: 4px 8px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    font-style: italic;
    color: #4a5568;
}

.markdown-preview ul, .markdown-preview ol,
.markdown-preview-content ul, .markdown-preview-content ol {
    margin: 6px 0;
    padding-left: 24px;
}

.markdown-preview li, .markdown-preview-content li {
    margin: 1px 0;
    line-height: 1.15;
}

.markdown-preview hr, .markdown-preview-content hr {
    margin: 10px 0;
    border: none;
    border-top: 2px solid #e1e8ed;
}

.markdown-preview a, .markdown-preview-content a {
    color: #007bff;
    text-decoration: none;
}

.markdown-preview a:hover, .markdown-preview-content a:hover {
    text-decoration: underline;
}

.markdown-preview table, .markdown-preview-content table {
    border-collapse: collapse;
    margin: 6px 0;
    width: 100%;
}

.markdown-preview th, .markdown-preview td,
.markdown-preview-content th, .markdown-preview-content td {
    border: 1px solid #e1e8ed;
    padding: 8px 12px;
    text-align: left;
}

.markdown-preview th, .markdown-preview-content th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Content hover tooltip */
.content-tooltip {
    position: absolute;
    background: rgba(45, 55, 72, 0.95);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    max-width: min(558px, 93vw);
    max-height: 80vh;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: opacity 0.2s ease;
}

.content-tooltip.has-reference {
    max-width: min(744px, 93vw);
    min-width: min(372px, 46.5vw);
    max-height: 80vh;
    overflow-y: auto;
}

.content-tooltip.hidden {
    opacity: 0;
    pointer-events: none;
}

.content-tooltip.show {
    opacity: 1;
    pointer-events: auto;
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.content-tooltip.no-reference .tooltip-header {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.content-tooltip.no-reference .tooltip-footer {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.tooltip-author {
    font-weight: 500;
    color: #3498db;
}

.tooltip-time {
    font-size: 10px;
    opacity: 0.8;
}


.tooltip-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-ref {
    font-size: 10px;
    opacity: 0.7;
    display: block;
    margin-bottom: 6px;
}

.tooltip-reference {
    margin: 8px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}


.tooltip-ref-content {
    font-size: 11px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
    line-height: 1.2;
    max-height: 150px;
    overflow-y: auto;
}

.tooltip-ref-content h1,
.tooltip-ref-content h2,
.tooltip-ref-content h3 {
    color: #fff;
    margin: 2px 0;
    font-size: 12px;
}

.tooltip-ref-content p {
    margin: 2px 0;
    line-height: 1.2;
}

.tooltip-ref-content strong {
    color: #ffc107;
}

.tooltip-ref-content em {
    color: #87ceeb;
}

.tooltip-ref-content code {
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 10px;
}

.tooltip-ref-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 4px;
    margin: 3px 0;
    overflow-x: auto;
    font-size: 10px;
}

.tooltip-ref-content blockquote {
    border-left: 3px solid #3498db;
    padding-left: 4px;
    margin: 3px 0;
    opacity: 0.8;
}

.tooltip-ref-content ul,
.tooltip-ref-content ol {
    margin: 3px 0;
    padding-left: 16px;
}

.tooltip-ref-content li {
    margin: 1px 0;
}

.tooltip-ref-content:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: underline;
}

.tooltip-actions {
    display: flex;
    gap: 8px;
}

.tooltip-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.tooltip-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.tooltip-readonly-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}


/* Reference content search loader */
.reference-search-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 2000;
    padding: 12px;
    display: none;
    backdrop-filter: blur(4px);
}

.search-loader-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.search-text {
    font-size: 14px;
    font-weight: 500;
}

.search-progress {
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search loader in desktop mode */
body.desktop-mode .search-text {
    font-size: 12px;
}

body.desktop-mode .search-progress {
    font-size: 10px;
}

/* Large popup styles in desktop mode */
body.desktop-mode .content-tooltip.has-reference {
    max-width: min(744px, 93vw);
    min-width: min(372px, 46.5vw);
    max-height: 80vh;
    font-size: 10px;
}

body.desktop-mode .tooltip-ref-content {
    font-size: 9px;
    max-height: 120px;
}

/* Permission badges in desktop mode */
body.desktop-mode .permission-badge {
    font-size: 9px;
    padding: 1px 5px;
}

/* Management button in desktop mode */
body.desktop-mode .note-manage-btn {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

/* New note popup button in desktop mode */
body.desktop-mode .btn-join,
body.desktop-mode .btn-share {
    font-size: 11px;
    padding: 6px 12px;
}

body.desktop-mode .permission-toggle,
body.desktop-mode .btn-remove {
    font-size: 9px;
    padding: 3px 6px;
}

/* Management popup in desktop mode */
body.desktop-mode .manage-section h5 {
    font-size: 12px;
}

body.desktop-mode .share-code-display span {
    font-size: 10px;
}

body.desktop-mode .member-name {
    font-size: 12px;
}

body.desktop-mode .member-permission {
    font-size: 10px;
}

/* Read-only hint in desktop mode */
body.desktop-mode .tooltip-readonly-hint {
    font-size: 9px;
    padding: 4px 8px;
}

/* File drag and drop upload styles */
.markdown-editor-fullsize.drag-over {
    border: 2px dashed #667eea !important;
    background: rgba(102, 126, 234, 0.05) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

.markdown-editor-fullsize.drag-over::after {
    content: "Drag files here to upload";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    z-index: 1000;
}

/* Create relative positioning container for drag hint */
.content-editor-container {
    position: relative;
}

/* Upload success notification */
.upload-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    z-index: 3000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Template functionality styles */
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-actions-right {
    display: flex;
    gap: 10px;
}

.btn-template {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.btn-template:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.template-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: #f8f9fa;
}

.template-item {
    background: white;
    border-bottom: 1px solid #e8eaed;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

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

.template-item:hover {
    background: #f0f2f5;
}

.template-info {
    flex: 1;
    margin-right: 15px;
}

.template-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.template-preview {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    max-height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.template-actions {
    display: flex;
    gap: 8px;
}

.template-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-insert {
    background: #28a745;
    color: white;
}

.btn-insert:hover {
    background: #218838;
}

.btn-edit {
    background: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.form-group {
    margin-bottom: 15px;
}

/* Compact spacing for template edit modal */
.modal-body.compact .form-group {
    margin-bottom: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.template-content-editor {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    resize: vertical;
}

.template-content-editor:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Compact spacing for template content editor */
.modal-body.compact .template-content-editor {
    min-height: 150px;
    padding: 10px;
}
 
.empty-templates {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-templates 
.empty-templates .empty-text {
    font-size: 14px;
    margin-bottom: 15px;
}

.template-name:hover {
    color: #667eea;
    text-decoration: underline;
}



.template-preview-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.template-preview-body h1,
.template-preview-body h2,
.template-preview-body h3,
.template-preview-body h4,
.template-preview-body h5,
.template-preview-body h6 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
}

.template-preview-body p {
    margin-bottom: 10px;
}

.template-preview-body code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
}

.template-preview-body pre {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 10px;
}

.template-preview-body ul,
.template-preview-body ol {
    padding-left: 20px;
    margin-bottom: 10px;
}

.template-preview-body blockquote {
    border-left: 4px solid #667eea;
    padding-left: 12px;
    margin: 10px 0;
    color: #666;
    font-style: italic;
}

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

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

/* WebSocket connection status indicator styles */
.connection-status {
    margin-left: 10px;
    font-size: 12px;
    font-weight: bold;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.connection-status.connecting {
    color: #ffc107;
    animation: pulse 1.5s ease-in-out infinite;
}

.connection-status.connected {
    color: #28a745;
}

.connection-status.disconnected {
    color: #6c757d;
    opacity: 0.7;
}

.connection-status.error {
    color: #dc3545;
    animation: blink 1s ease-in-out infinite;
}

.connection-status.unknown {
    color: #6c757d;
}

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

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}