.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--cryp-mobile-nav-height);
    background: var(--cryp-main-color);
    border-top: 1px solid var(--cryp-border-color);
    z-index: 100;
    padding: 8px 16px;
    justify-content: space-around;
    align-items: center;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    color: var(--cryp-muted-text-color);
    transition: color 0.15s ease;
    font-size: 12px;
}

.nav-btn svg {
    width: 24px;
    height: 24px;
}

.nav-btn.active {
    color: var(--cryp-accent-color);
}

.nav-btn span {
    font-size: 11px;
}

@media screen and (max-width: 768px) and (orientation: landscape) {
    .mobile-nav {
        height: 50px;
    }

    .messenger {
        padding-bottom: 50px;
    }

    .sidebar {
        bottom: 50px;
    }

    .chat-topbar,
    .sidebar-header {
        min-height: 50px;
    }

    .messages {
        max-height: calc(100vh - 150px);
    }
}

@media screen and (max-width: 480px) {
    .sidebar-header {
        padding: 12px;
        min-height: 56px;
    }

    .sidebar-header h2 {
        font-size: 16px;
    }

    .chat-topbar {
        padding: 12px;
        min-height: 56px;
    }

    .chat-subtitle {
        display: none;
    }

    .message {
        max-width: 95%;
        font-size: 13px;
        padding: 8px 10px;
    }

    .empty-chat svg {
        width: 48px;
        height: 48px;
    }

    .empty-chat p {
        font-size: 14px;
    }
}

@media (hover: none) and (pointer: coarse) {
    button,
    .chat-item,
    .nav-btn {
        cursor: default;
        -webkit-tap-highlight-color: transparent;
    }

    button:active,
    .chat-item:active,
    .nav-btn:active {
        opacity: 0.7;
    }

    input,
    button {
        font-size: 16px;
    }
}

@media screen and (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }

    .messenger {
        padding-bottom: var(--cryp-mobile-nav-height);
        position: relative;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: var(--cryp-mobile-nav-height);
        width: 85%;
        min-width: 100vw;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
        border: 0 !important;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .chat-panel {
        width: 100%;
        display: flex !important;
        border: 0 !important;
    }

    .chat-info {
        flex: 1;
    }

    .chat-password {
        padding: 8px 12px;
    }

    .messages {
        padding: 12px;
    }

    .message {
        max-width: 90%;
        font-size: 14px;
    }

    .message-form {
        padding: 12px;
    }

    .message-form button .button-text {
        display: none;
    }

    .message-form button svg {
        margin: 0;
    }

    .search-box {
        padding: 8px;
    }

    .search-box input,
    .search-box button {
        padding: 8px 12px;
        font-size: 14px;
    }

    .chat-list {
        padding: 8px;
    }

    .chat-item {
        padding: 10px;
    }
}
