/* ============================================
   PLACES COMMON STYLES
   Общие стили для всех страниц локаций
   ============================================ */

/* Terminal */
.terminal {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 25%; 
    background: rgba(0, 0, 0, 0.0);
    font-family: 'Courier New', monospace;
    pointer-events: auto;
    overflow: hidden;
    max-height: 20%;
    min-height: 5%;
    border-top-left-radius: 16px;
}

.terminal-content {
    overflow-y: auto;
    color: #fff;
    line-height: 1.5;
    padding: 12px;
}

.terminal-line {
    width: 100%;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
    margin-bottom: 0px;
    text-align: right; 
}

.terminal-line:last-child {
    margin-bottom: 0;
}

.terminal-line::before {
    content: '>';
    margin-right: 8px;
    color: #fff;
    opacity: 0.0;
}

.terminal-content::-webkit-scrollbar {
    width: 6px;
}

.terminal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: #0f0;
    border-radius: 3px;
}

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

/* Navigation Container - низ центр */
.nav-container {
    position: fixed;
    bottom: 0;
    left: 45%;
    z-index: 10003;   
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-location-name {
    color: #fff;
    font-family: 'Menlo', monospace;
    font-size: 40px;
    font-weight: bold;
    letter-spacing: 1px;
    white-space: nowrap;
    cursor: pointer;    
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.07);   
    border-radius: 100px;
}

.rules-icon {
    visibility: hidden;
    font-size: 30px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, visibility 0s;
    width: 34px;
    display: inline-block;
    text-align: center;
}

.nav-container:hover .rules-icon {
    visibility: visible;
}

/* Action Buttons - нижний левый угол */
.nav-buttons {
    position: fixed;
    bottom: 0;
    left: 20px;
    z-index: 10003;
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

/* Кнопка с аватаром - большая */
#navBtnInfo {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    width: 110px;
    height: 110px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.2s;
    padding: 0;
    overflow: hidden;
}

#navBtnInfo:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

#navBtnInfo .nav-btn-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Кнопки ITEMS и NOTES - маленькие */
#navBtnItems, #navBtnNotes {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 30px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.2s;
}

#navBtnItems:hover, #navBtnNotes:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* Online Users Panel */
.online-panel {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    z-index: 10002;
    font-family: 'Courier New', monospace;
}

.online-panel-content {
    padding: 0;
    margin: 0;
}

.online-users-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.online-user-card {
    width: 50px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 6px;
    padding: 4px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 255, 0, 0.2);
    opacity: 1;
}

.online-user-card:hover {
    transform: scale(1.1);
    border-color: #0f0;
    background: rgba(0, 0, 0, 0.8);
}

.online-user-avatar {
    width: 35px;
    height: 35px;
    margin: 0 auto 3px;
    object-fit: cover;
    transition: transform 0.2s ease;
    display: block;
}

.online-user-card:hover .online-user-avatar {
    transform: scale(1.05);
}

.online-user-name {
    color: #0f0;
    font-size: 8px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-user-nickname {
    color: #888;
    font-size: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-user-card.inactive {
    opacity: 0.5;
    filter: grayscale(0.5);
    cursor: default;
}

.online-user-card.inactive:hover {
    transform: none;
    border-color: rgba(0, 255, 0, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.progress-bar-container {
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 1px;
    margin: 2px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 1px;
    transition: width 0.3s ease;
}

.progress-bar-level {
    background: #0f0;
}

.progress-bar-carma {
    background: #00f;
    opacity:0.7;
}

.online-panel.hidden {
    display: none;
}

/* Navigation Modal */
.nav-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 20020;
    justify-content: center;
    align-items: center;
}

.nav-modal.show {
    display: flex;
}

.nav-modal-content {
    background: #0a0a0a;
    border: 2px solid #0f0;
    border-radius: 12px;
    min-width: 300px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
    animation: modalAppear 0.2s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.nav-modal-header {
    background: #000;
    padding: 12px 16px;
    border-bottom: 1px solid #0f0;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-modal-title {
    color: #0f0;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-modal-close {
    color: #0f0;
    cursor: pointer;
    font-size: 20px;
    transition: opacity 0.2s;
}

.nav-modal-close:hover {
    opacity: 0.7;
}

.nav-modal-body {
    padding: 20px;
}

.nav-locations {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-location {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-location:hover {
    background: rgba(0, 255, 0, 0.15);
    border-color: #0f0;
    transform: translateX(5px);
}

.nav-location.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-location.disabled:hover {
    background: rgba(0, 255, 0, 0.05);
    border-color: rgba(0, 255, 0, 0.3);
    transform: none;
}

/* Modal Panels - centered on screen */
.modal-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20090;
    background: #0a0c10;
    border: 2px solid #ccc;
    border-radius: 16px;
   width: 1000px;
    max-width: 95vw;
    height: 700px;
    max-height: 90vh;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    font-family: 'Menlo', monospace;
}

.modal-panel.open {
    display: flex;
}

.modal-panel .panel-header {
    color: #fff;
    padding: 16px 20px;
    background: #1a1c20;
    border-bottom: 1px solid #2a2c30;
    font-weight: bold;
    font-size: 16px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.modal-panel .panel-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

.modal-panel .panel-close:hover {
    color: #ff4444;
}

.modal-panel .panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-size: 20px;
    line-height: 1.6;
    color: #ccc;
}

.modal-panel.dragging {
    opacity: 0.9;
    cursor: grabbing;
}

/* INFO, ITEMS, NOTES Panels */
.info-item {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.info-title {
    text-transform: uppercase;
    font-size: 16px;
    font-weight: bold;
    color: #0f0;
    margin-bottom: 10px;
    font-family: 'Menlo', monospace;
}

/* Notes panel styles */
.note {
    background: rgba(0, 255, 0, 0.05);
    border-left: 3px solid #0f0;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}



.note-text {
    color: #fff;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Notes filter buttons */
.notes-filter-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-right: 15px;
}

.notes-filter-btn {
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    transition: all 0.2s;
}

.notes-filter-btn:hover {
    background: rgba(0, 255, 0, 0.2);
}

.notes-filter-btn.active {
    background: rgba(0, 255, 0, 0.3);
    border-color: #ffd700;
}

.note-sender {
    font-weight: bold;
    color: #0f0;
    margin-bottom: 5px;
    cursor: pointer;
    display: inline-block;  /* Чтобы ширина была по содержимому */
    padding: 2px 8px;      /* Небольшие отступы для лучшего клика */
    border-radius: 12px;   /* Скругленные углы */
    transition: all 0.2s;
}

.note-sender:hover {
    background: rgba(0, 255, 0, 0.15);
    text-decoration: underline;
}

/* Непрочитанные сообщения */
.note.unread {
    background: rgba(255, 215, 0, 0.15);
    border-left: 3px solid #ffd700;
}

.note.unread .note-sender {
    color: #ffd700;
}

.note.unread .note-date {
    color: #ffd700;
}

/* Notes button badge */
.notes-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff0000;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: 'Courier New', monospace;
    border: 1px solid #fff;
    z-index: 10;
}

.panel-title {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Кнопка добавления заметки */
.add-note-btn {
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    margin-left: 20px;  /* Увеличь это значение */
    margin-right: 10px;
    transition: all 0.2s;
}

.add-note-btn:hover {
    background: rgba(0, 255, 0, 0.2);
}

.items-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 2px solid #0f0;
    margin-left: 40px;
}

.item-name {
    font-size: 14px;
    color: #fff;
    font-family: 'Menlo', monospace;
}

/* Rules Dialog */
.rules-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border: 2px solid #0f0;
    border-radius: 12px;
    padding: 20px;
    min-width: 350px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 20001;
    display: none;
    flex-direction: column;
    gap: 15px;
}

.rules-dialog.show {
    display: flex;
}

.rules-dialog-title {
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #0f0;
    padding-bottom: 10px;
}

.rules-dialog-content {
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.rules-dialog-button {
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    transition: all 0.2s;
    align-self: flex-end;
}

.rules-dialog-button:hover {
    background: rgba(0, 255, 0, 0.2);
}

/* Avatars carousel */
#avatarsCarousel {
    scrollbar-width: thin;
    scrollbar-color: #0f0 rgba(0, 255, 0, 0.1);
}

#avatarsCarousel::-webkit-scrollbar {
    height: 6px;
}

#avatarsCarousel::-webkit-scrollbar-track {
    background: rgba(0, 255, 0, 0.1);
    border-radius: 3px;
}

#avatarsCarousel::-webkit-scrollbar-thumb {
    background: #0f0;
    border-radius: 3px;
}

.add-note-btn {
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    margin-right: 10px;
    transition: all 0.2s;
}

.add-note-btn:hover {
    background: rgba(0, 255, 0, 0.2);
}

/* Items button badge */
.items-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff0000;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: 'Courier New', monospace;
    border: 1px solid #fff;
    z-index: 10;
}
/* Sender list scroll */
#sendersList::-webkit-scrollbar {
    width: 4px;
}

#sendersList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

#sendersList::-webkit-scrollbar-thumb {
    background: #0f0;
    border-radius: 2px;
}

.sender-item:hover {
    background: rgba(0, 255, 0, 0.08) !important;
}
